# State Ledger

Keep this file factual, dated, and easy to resume from.

## Current Snapshot

Date: 2026-07-01

Project status: portable onboarding/RAG kit is built, source corpus is ingested, full-text search is rebuilt, and depth-context scaffold is populated.

Current priority: keep the kit maintainable for future agents through strict rules, deterministic scripts, manifest-backed sources, and progressive disclosure.

Current blocker: three nested Feishu resources are metadata-only due to permission/type limitations:

- `实习生学习专区 - 决胜`: no current-user permission.
- `实习生PPL`: bitable unsupported by `docs +fetch`.
- `实习生清单`: sheet unsupported by `docs +fetch`.

Next smallest action: if those three sources become required for answers, connect them through the appropriate Feishu permission/Base/Sheet workflow and regenerate `sources/source-manifest.yaml`.

## Locked Decisions

- Use Codex skill + zip package as the current delivery surface instead of web/chrome/desktop UI.
- Keep guided flow in module files and source evidence in `sources/`/`assets/`.
- Treat `source-manifest.yaml` as required source truth.
- Treat binary assets as non-searchable until extracted/described text exists.
- Use `MAINTAINERS.md` as the strict CRUD and read-scope contract.
- Use `.ai/context/` for deeper six-layer context instead of expanding `AGENTS.md`.

## Rejected Options

- Do not hand-edit `search/chunks.jsonl` or `search/index.json`; rebuild with `scripts/index_knowledge.py`.
- Do not delete modules by default; disable them.
- Do not store raw credentials or signed Feishu asset URLs in searchable text.
- Do not force all agents to read every module/source file before a small task; use progressive disclosure.

## Session Log

### 2026-07-01 Kit Build And Source Ingestion

#### Completed

- Built `onboarding-kit` with 10 modules.
- Added `AGENTS.md`, `kit.yaml`, `start.prompt.md`, `install.md`, and `skills/onboarding-buddy/SKILL.md`.
- Added source ingestion for main Feishu document, nested docs, PDF, images, video metadata, table, and external links.
- Generated `sources/source-manifest.yaml`.
- Extracted PDF text and image notes.
- Rebuilt search index.
- Packaged `onboarding-kit-v0.1.0.zip`.

#### Verification

- `python3 scripts/validate_kit.py` passed.
- `python3 scripts/index_knowledge.py` produced 206 chunks before `.ai/context`, 248 chunks after adding rule docs, and 311 chunks after indexing `.ai/context` including snapshots.
- Search verified PDF, table, image notes, nested 小红书 SOP,入职流程, and maintainer/install rules.
- `zip -T onboarding-kit-v0.1.0.zip` passed.

### 2026-07-01 Maintainer Rules And Skill Installation

#### Completed

- Added `MAINTAINERS.md`.
- Added `scripts/install_skill.py`.
- Extended `scripts/module_crud.py` with `list` and `show`.
- Tightened `scripts/validate_kit.py` to require core rules, scripts, and skill files.
- Indexed rule documents for maintainer queries.

#### Verification

- `python3 scripts/install_skill.py --dry-run` shows install path under `~/.codex/skills/onboarding-buddy`.
- `python3 scripts/module_crud.py list` lists all 10 modules.
- `python3 scripts/module_crud.py show day1-landing` prints the module.

### 2026-07-01 Depth Context Audit

#### Completed

- Ran `depth-context-architect` audit.
- Initial audit score was 1.5/10 because `.ai/context/` did not exist even though operational kit rules were present.
- Added `.ai/context/` project scaffold.
- Created snapshot `snapshots/depth-context-audit-20260701T093807Z.md`.
- Populated intent, rules, workspace map, state ledger, eval checklist, and systemization backlog with observed facts.
- Re-ran audit after repair: 5.3/10 overall; script now detects Surface, Context, Workspace, State, Intent, and System artifacts.
- Added Chinese aliases for 六层纵深上下文, 渐进式披露, 查询范围, and 读什么文档, then verified search retrieval.

#### Decision

- The previous kit was operationally usable but not fully aligned with six-layer vertical context because durable State, Intent, Workspace, and System context were scattered or implicit.
- The repaired design keeps root rules compact and puts deeper context in `.ai/context/`, matching the progressive disclosure principle.

### 2026-07-01 Maintainer Handoff

#### Completed

- Added `HANDOFF.md` as a root-level orientation file for future maintainers and their Codex.
- Linked `HANDOFF.md` from `AGENTS.md`, `MAINTAINERS.md`, and `.ai/context/03-workspace-map.md`.
- Added `HANDOFF.md` to validation and search indexing.
- Adjusted `scripts/search_knowledge.py` so handoff/maintainer/orientation queries prioritize `HANDOFF.md`.

#### Decision

- `HANDOFF.md` is an orientation layer, not a replacement for `AGENTS.md`, `MAINTAINERS.md`, or `.ai/context/`.

#### Next Smallest Action

- If handoff instructions start repeating across future projects, extract a reusable handoff template under `.ai/context/templates/`.

### 2026-07-01 First-Run Package Bootstrap

#### Completed

- Added `BOOTSTRAP.md` as the first-message prompt for handing the zip to a new agent session.
- Added `scripts/bootstrap_session.py` to scan package text files and generate `.ai/context/session-bootstrap.md`.
- Updated `AGENTS.md`, `HANDOFF.md`, `MAINTAINERS.md`, `install.md`, `start.prompt.md`, and `skills/onboarding-buddy/SKILL.md` to describe the bootstrap flow.
- Updated validation requirements so `BOOTSTRAP.md` and `scripts/bootstrap_session.py` are required package files.

#### Decision

- Full package warmup is an explicit, thread-scoped exception to progressive disclosure.
- After bootstrap in the same agent session, ordinary questions should use `scripts/search_knowledge.py` and cited files instead of rescanning the full package.
- A new agent session must run bootstrap again because model context does not persist across conversations.

#### Next Smallest Action

- If this pattern is reused in another kit, promote `BOOTSTRAP.md` and `bootstrap_session.py` into a reusable package handoff template.

### 2026-07-01 Cross-Agent Adapter Layer

#### Completed

- Added `CLAUDE.md` for Claude Code.
- Added `GEMINI.md` for Gemini.
- Added `.github/copilot-instructions.md` for GitHub Copilot.
- Added `.cursor/rules/onboarding-kit.mdc` for Cursor.
- Added `.clinerules` for Cline.
- Added `AGENT_COMPATIBILITY.md` as the compatibility matrix and shared adapter policy.
- Updated `AGENTS.md`, `BOOTSTRAP.md`, `HANDOFF.md`, `MAINTAINERS.md`, and `install.md` to describe the package as a cross-agent kit.
- Updated validation, indexing, and bootstrap generation so adapter files are required, searchable, and included in session maps.

#### Decision

- Agent-specific files are thin adapters only; they must point back to shared contracts instead of duplicating business process details.
- `AGENTS.md`, `BOOTSTRAP.md`, `HANDOFF.md`, `MAINTAINERS.md`, `.ai/context/`, `kit.yaml`, and `sources/source-manifest.yaml` remain the shared source of truth.

#### Next Smallest Action

- If another agent is added, update `AGENT_COMPATIBILITY.md`, add only the minimal native adapter file, then update validation and indexing.

### 2026-07-01 Manual Source Enrichment For Account Registration And Channels

#### Completed

- Added sanitized manual source `sources/raw/manual-20260701-account-registration-channel-notes.md`.
- Updated `sources/source-manifest.yaml` to 23 source items and added `manual_note_20260701_account_registration_channels`.
- Updated `sources/README.md` to allow `manual_note` source type.
- Updated `intern-role-basics` to include learning-zone and AI product links; bumped to `0.1.1`.
- Updated `sourcing-channels` to include account registration company info, Boss publishing fields, and猎聘/Boss/脉脉入口; bumped to `0.1.1`.
- Updated `recruiting-intern-hiring` with the fuller AI-native recruiting intern JD; bumped to `0.1.1`.
- Updated `ppl-management` to clarify that interns only need the current PPL link/entry and that PPL permissions/configuration belong to mentor or Recruiting Ops; bumped to `0.1.1`.

#### Safety Handling

- Preserved company names, display names, channel URLs, job publishing fields, and office location needed for account registration.
- Did not save personal phone numbers, verification codes, face-recognition instructions, scannable certification QR codes, colleague avatars, or raw signed Feishu asset URLs as searchable source.

#### Next Smallest Action

- Run validation, rebuild index, regenerate session bootstrap, and verify representative searches for Boss registration and PPL link boundary.

### 2026-07-02 Manual Source Enrichment For Learning Zone

#### Completed

- Replaced the failed permission placeholder for `linked_doc_b2afedea6f41` with maintainer-supplied sanitized text for `实习生学习专区 - 决胜`.
- Preserved onboarding resource, Day 1 required actions, TTC做单流程, 人才库, 交付流程, 考勤汇报, 新人快速上手, and 中后台支持群 guidance.
- Updated `linked_doc_cefddbbc486e` to document that `实习生PPL` remains metadata-only by maintainer decision and is not a current content gap.
- Updated `sources/source-manifest.yaml` for the learning-zone source and PPL maintenance boundary.

#### Safety Handling

- Omitted the course platform account and password from searchable source text.
- Kept the course URL and routed credential access through mentor, Recruiting Ops, or the support group.

#### Packaging Instruction

- Before repackaging, delete the previous `onboarding-kit-v0.1.0.zip`.
- Create the replacement zip with the same filename.

#### Current Remaining Gap

- `实习生清单` remains metadata-only because it is a Sheet unsupported by `docs +fetch`; ingest it later only if sheet-backed answers become required.

#### Next Smallest Action

- Run validation, rebuild index, verify representative search, regenerate session bootstrap if packaging, then replace the zip.

### 2026-07-02 Liepin And Maimai Account Boundary Correction

#### Completed

- Updated `sourcing-channels` from `0.1.1` to `0.1.2`.
- Clarified that Liepin and Maimai accounts are registered by interns using their own phone number and identity information as required by the platforms.
- Clarified that company JD publishing must use team-confirmed company information, display name, office location, and job description.
- Added `sources/raw/manual-20260702-liepin-maimai-registration-boundary.md`.
- Updated `sources/source-manifest.yaml` to include the new manual note.

#### Safety Handling

- Did not store phone numbers, identity numbers, verification codes, face verification material, QR codes, or screenshots.
- Added explicit guidance that those personal authentication materials must not be saved in the kit, chat, or shared documents.

#### Next Smallest Action

- Run validation, rebuild index, verify representative search for Liepin/Maimai registration, regenerate session bootstrap, then replace the zip with the same filename.

### 2026-07-02 Boss Colleague Verification Correction

#### Completed

- Updated `sourcing-channels` from `0.1.2` to `0.1.3`.
- Clarified that Boss enterprise verification should use `同事协助认证`.
- Added `sources/raw/manual-20260702-boss-colleague-verification.md`.
- Updated `sources/source-manifest.yaml` to include the Boss colleague verification manual note.
- Updated the earlier account registration manual note so Boss verification is no longer described as an open set of possible methods.

#### Safety Handling

- Did not store verification QR codes, verification codes, colleague avatars, face verification materials, phone numbers, or personal account authentication details.
- Explicitly routes verification blockers to mentor or Recruiting Ops.

#### Next Smallest Action

- Run validation, rebuild index, verify representative search for Boss colleague verification, regenerate session bootstrap, then replace the zip with the same filename.

### 2026-07-02 Boss Two Registration Methods Correction

#### Completed

- Updated `sourcing-channels` from `0.1.3` to `0.1.4`.
- Clarified that Boss has two account registration methods: find Celine, or register with the intern's own Boss account.
- Clarified that when using the intern's own Boss account and enterprise verification is required, choose `同事协助认证`.
- Updated `sources/raw/manual-20260702-boss-colleague-verification.md` and the related source manifest context.
- Updated the earlier account registration manual note to avoid implying Boss has only one account path.

#### Safety Handling

- Did not store phone numbers, identity numbers, verification codes, QR codes, colleague avatars, face verification materials, or personal account authentication details.
- Kept Celine as an escalation/contact route without adding personal contact details.

#### Next Smallest Action

- Run validation, rebuild index, verify representative search for the two Boss registration methods, regenerate session bootstrap, then replace the zip with the same filename.

### 2026-07-02 Boss Registration Priority And Role Correction

#### Completed

- Updated `sourcing-channels` from `0.1.4` to `0.1.5`.
- Clarified that Boss should prioritize registration with the intern's own account.
- Clarified that the Celine Boss account can only be used by one person and is therefore a fallback path.
- Clarified that when registering an intern's own Boss account, the role should be `猎头`, not `招聘者`.
- Updated the Boss registration manual source and source manifest context.

#### Safety Handling

- Continued to avoid storing phone numbers, identity numbers, verification codes, QR codes, colleague avatars, face verification materials, or personal account authentication details.

#### Next Smallest Action

- Run validation, rebuild index, verify representative search for Boss own-account registration and role selection, regenerate session bootstrap, then replace the zip with the same filename.

### 2026-07-02 Handoff Refresh

#### Completed

- Updated `HANDOFF.md` with a 2026-07-02 project handoff summary.
- Summarized what the project built: modules, journeys, Codex skill, maintainer contract, six-layer context, cross-agent adapters, deterministic scripts, source corpus, search index, and bootstrap flow.
- Summarized 2026-07-02 maintenance work around learning-zone ingestion, PPL metadata-only decision, Liepin/Maimai account boundaries, Boss registration priority, Boss role selection, and Boss colleague verification.
- Added a current development state section and preserved the older 2026-07-01 state as historical context.
- Added a current next-improvements list and preserved the older list as historical context.

#### Next Smallest Action

- Run validation, rebuild index, verify representative search for handoff/project summary, regenerate session bootstrap, then replace the zip with the same filename.

### 2026-07-02 Handoff Language Cleanup

#### Completed

- Rewrote `HANDOFF.md` as a clean English maintainer handoff.
- Removed the date from the project handoff summary heading.
- Replaced mojibake in the project summary with readable English while preserving key Chinese business labels such as `猎头`, `招聘者`, `同事协助认证`, `实习生PPL`, and `实习生清单`.
- Corrected the Windows packaging command so the zip preserves the `onboarding-kit/` root folder.

#### Next Smallest Action

- Run validation, rebuild index, verify representative handoff search, regenerate session bootstrap, then replace the zip with the same filename.

### 2026-07-02 v0.1.1 Maintenance Fixes

#### Completed

- Implemented FIX-1 through FIX-10 from `D:/download/onboarding-kit-fix-handoff-20260702.md`.
- Added `scripts/package_kit.py` for cross-platform packaging with forward-slash zip paths, learner `state/` exclusion, required-file self-test, and version-based zip names.
- Normalized `search/chunks.jsonl` `source_file` and `chunk_id` paths to forward slashes.
- Fixed validator module-loop short-circuiting so root-file errors do not hide module metadata errors.
- Sanitized CSV ingestion and added CSV files to sensitive-content validation.
- Centralized sensitive-content patterns in `scripts/kitlib.py` and used them from ingest and validation.
- Added help_ref heading and FAQ-id validation; fixed `modules/offer-preboarding` anchor data and bumped it to `0.1.1`.
- Reduced `search/index.json` to metadata only.
- Enabled validator warnings for TODO/TBD placeholder text and malformed `last_reviewed`.
- Updated skill installation so installed copies include a `Kit Location` section.
- Added `.gitignore`, required-script coverage for `package_kit.py`, Windows Python command compatibility notes, and updated packaging docs.
- Bumped kit version to `0.1.1`.

#### Verification

- `python scripts/validate_kit.py` passed.
- `python scripts/index_knowledge.py` produced 461 chunks after the compatibility-note refresh.
- `python scripts/bootstrap_session.py` passed.
- Representative searches for `入职当天要做什么` and `Boss 账号怎么注册` returned the expected top modules.
- Regression checks passed for validator dual-error reporting, zero backslash `source_file` paths, CSV sensitive scanning, and installed skill location notes.

#### Next Smallest Action

- Run final `python scripts/package_kit.py` and distribute `onboarding-kit-v0.1.1.zip`; retire older `onboarding-kit-v0.1.0.zip` artifacts.

### 2026-07-03 Python Compatibility Note

#### Completed

- Clarified in `install.md`, `HANDOFF.md`, and `MAINTAINERS.md` that kit scripts require Python 3.10+.
- Kept documentation examples on `python3` for macOS/Linux while allowing Windows users to run the same commands with `python` or `py -3`.

#### Verification

- `python scripts/validate_kit.py` passed.
- `python scripts/index_knowledge.py` produced 464 chunks.
- `python scripts/search_knowledge.py "Python Windows python3 py -3 3.10" --top-k 3` returned the compatibility notes.

### 2026-07-04 Python-Unavailable Q&A Fallback

#### Completed

- Added Python-unavailable Q&A fallback guidance to `BOOTSTRAP.md`, `start.prompt.md`, and `skills/onboarding-buddy/SKILL.md`.
- Clarified that learners who only ask questions can continue by reading `search/chunks.jsonl`, `sources/source-manifest.yaml`, and cited module/source files directly when Python is not installed.
- Kept Python 3.10+ as required for validation, index rebuilds, source ingestion, maintenance, and packaging.
- Bumped kit version to `0.1.2` for the repackaged release.

#### Verification

- `python scripts/validate_kit.py` passed.
- `python scripts/index_knowledge.py` produced 461 chunks.

### 2026-07-06 Post-Homework Leader Interview Scheduling

#### Completed

- Added sanitized manual source `sources/raw/manual-20260706-leader-interview-calendar-scheduling.md` based on two Feishu calendar screenshots.
- Updated `sources/source-manifest.yaml` to 26 source items and 4 manual notes.
- Updated `interview-arrangement` from `0.1.0` to `0.1.1`.
- Expanded the `schedule-interview` step so post-homework leader interviews require a Feishu calendar event, candidate/interviewer/organizer invitees, room or video meeting setup, sanitized `OpenAI分析` or candidate summary, permitted resume/homework attachments, reminders, attendance-status check, candidate sync, and PPL update.
- Added `knowledge.md#作业后约面日程` and FAQ coverage for “收到作业后怎么约 leader 面试 / OpenAI分析放哪里”.
- Bumped kit version to `0.1.3`.

#### Safety Handling

- Did not save the raw screenshots as kit assets because they contain candidate and employee names, school background, meeting link, participant status, and attachment filename.
- Stored only the generalized workflow and privacy boundary; no phone numbers, identity numbers, card numbers, verification codes, raw Feishu signed URLs, or private candidate details were added.

#### Verification

- `python scripts/validate_kit.py` passed.
- `python scripts/index_knowledge.py` produced 473 chunks after updating handoff and state records.
- Representative post-homework leader-interview search returned `interview-arrangement` FAQ, knowledge, and steps.

### 2026-07-06 Redacted Screenshot Asset Retention

#### Completed

- Created processed screenshot assets:
  - `assets/images/leader-interview-calendar-redacted-01.jpg`
  - `assets/images/leader-interview-calendar-redacted-02.jpg`
- Added searchable image notes:
  - `sources/image-notes/leader-interview-calendar-redacted-01.md`
  - `sources/image-notes/leader-interview-calendar-redacted-02.md`
- Updated `sources/source-manifest.yaml` from 26 to 28 source items and from 7 to 9 image assets.
- Updated the manual source note to clarify that the kit retains only redacted screenshots, not unprocessed originals.
- Bumped kit version to `0.1.4`.

#### Safety Handling

- Redacted candidate names, employee names, avatars, meeting links, meeting room/background event fragments, participant list/status details, school or resume details, analysis body text, and attachment filename.
- Kept only the interface structure needed to show where to create the Feishu event, check attendees, add `OpenAI分析`, attach permitted materials, and set reminders.

#### Verification

- `python scripts/validate_kit.py` passed.
- `python scripts/index_knowledge.py` produced 479 chunks after updating handoff and state records.

### 2026-07-06 Python/Uv Bootstrap Standardization

#### Completed

- Added `.python-version` with Python `3.12` for uv-managed runs.
- Added `bootstrap.ps1` and `bootstrap.sh` as optional cross-platform bootstrap wrappers.
- Updated `AGENTS.md`, `BOOTSTRAP.md`, `start.prompt.md`, `skills/onboarding-buddy/SKILL.md`, `install.md`, `MAINTAINERS.md`, `AGENT_COMPATIBILITY.md`, and thin agent adapters so agents detect Python before Q&A and maintenance.
- Changed the Python-unavailable policy: Q&A should first ask to run uv bootstrap and use uv-managed Python; direct `search/chunks.jsonl` reading is now only an emergency fallback when installation is declined or blocked.
- Updated `scripts/validate_kit.py` and `scripts/package_kit.py` so `.python-version`, `bootstrap.ps1`, and `bootstrap.sh` are required package files.
- Updated `scripts/package_kit.py` so packaged `.sh` files retain executable permissions.
- Updated `Onboarding-Agent-Kit-使用说明.docx` with the new v0.1.5 package name and Python/uv bootstrap instructions.
- Bumped kit version to `0.1.5`.

#### Safety Handling

- uv installation is never silent. The bootstrap scripts ask the user before downloading and running the official uv installer.
- If the user declines installation or setup is blocked, only Q&A may use the emergency fallback through `search/chunks.jsonl` and cited files.

#### Verification

- `powershell -NoProfile -ExecutionPolicy Bypass -File .\bootstrap.ps1` passed using local `py -3`.
- `python scripts/validate_kit.py` passed.
- `python scripts/index_knowledge.py` produced 493 chunks after updating handoff and state records.

### 2026-07-07 Candidate Homework And Visual Trust Guidance

#### Completed

- Added sanitized manual source `sources/raw/manual-20260707-homework-and-visual-trust-guidance.md`.
- Updated `candidate-activation` from `0.1.0` to `0.1.1`.
- Added the standard candidate homework prompt: research `OpenAI` from a headhunter consultant perspective and present the result in a Feishu document, with AI tools allowed for analysis and organization.
- Added evaluation emphasis for the homework: information integration, industry insight, and structured expression.
- Added visual-trust guidance: when relevant official or redacted screenshots/flowcharts exist in `sources/source-manifest.yaml`, pair them with concise text; do not send raw screenshots with personal or internal sensitive information.
- Updated `AGENTS.md`, `.ai/context/02-rules.md`, and `skills/onboarding-buddy/SKILL.md` so agents can include manifest-backed official/redacted images alongside answers.
- Updated `sources/source-manifest.yaml` to 29 source items and 5 manual notes.
- Bumped kit version to `0.1.6`.

#### Safety Handling

- Did not add or distribute raw screenshots for this change.
- Visual guidance explicitly blocks screenshots containing candidate information, employee names/avatars, phone numbers, identity numbers, bank cards, verification codes, meeting links, internal permission materials, or raw signed Feishu asset URLs.

#### Verification

- `python scripts/validate_kit.py` passed.
- `python scripts/index_knowledge.py` produced 504 chunks after final handoff/state refresh.
- Representative searches for OpenAI homework and visual-flowchart trust returned `candidate-activation` FAQ/knowledge and the manual source.

### 2026-07-07 Meeting-Room Q&A Image Binding

#### Completed

- Updated `interview-arrangement` from `0.1.1` to `0.1.2`.
- Added a direct FAQ match for “我现在已经收到了实习生候选人的作业 我想约会议室 我该怎么做”.
- Added `knowledge.md#作业后约面配图` so post-homework meeting-room and leader-interview questions must include the two redacted Feishu Calendar screenshots when the chat environment supports images.
- Updated `AGENTS.md`, `.ai/context/02-rules.md`, and `skills/onboarding-buddy/SKILL.md` to clarify that local images should be rendered with absolute Markdown paths when supported.
- Bumped kit version to `0.1.7`.

#### Safety Handling

- Only the processed redacted screenshots under `assets/images/` may be sent.
- Raw screenshots or screenshots containing candidate names, employee names/avatars, meeting links, school background, resume details, attachment filenames, phone numbers, identity numbers, bank cards, verification codes, or internal permission materials remain disallowed.

#### Verification

- `python scripts/validate_kit.py` passed.
- `python scripts/index_knowledge.py` produced 510 chunks.
- Representative search for the user's exact meeting-room question returned `interview-arrangement` FAQ `homework-to-meeting-room-with-images` as the top result and `knowledge.md#作业后约面配图` in the top results.
