$npx -y skills add lujiafa/houtu-project-skills --skill docs-contextSuper Base Context — project doc loader & synchronizer. Triggers even without explicit "load docs"/"sync docs." READ MODE — load architecture/modules/coding/decision docs when work references project state: code work (write/modify/remove); design (features/APIs/schemas/architectu
| 1 | # docs-context — Context Loader & Doc Synchronizer |
| 2 | Manages reading and writing of project documentation, ensuring correct contextual constraints during development and keeping docs in sync with code afterward. |
| 3 | |
| 4 | ## Contents |
| 5 | - Positioning, conflict priority, context correction taxonomy |
| 6 | - Document Paths (5 doc types under `docs/`) |
| 7 | - BCU Splitting Principle (decision flow + section-omission rule) |
| 8 | - Modes & Triggers (Read / Write criteria, Removal & Rollback Sync) |
| 9 | - Read Mode: always-load, task-type loading, BCU / ADR resolution, three context scenarios, post-load behavior |
| 10 | - Write Mode: doc sync checklist, slug selection, ADR write flow, sync execution steps |
| 11 | - Handling Missing Documents (scope, init flow, template mapping) |
| 12 | - Sync Summary Format (Updated / Created / Deleted / Declined / Skipped / No Update / Shared / Needs Confirmation) |
| 13 | |
| 14 | ### Positioning: Super Base Context |
| 15 | docs-context is the **Super Base Context** for Agent Coding — structured project docs, task-aware Read Mode, bidirectional Write Mode. The remainder of this file specifies each. |
| 16 | |
| 17 | **Conflict priority** (when this skill's guidance collides with other instructions in the same turn): explicit user instruction > docs-context. |
| 18 | |
| 19 | ### Context Correction, Completion, and Reconstruction |
| 20 | Three scenarios in which docs-context restores the agent's project context — combined documents + code/comment scanning fills the gap when docs alone are insufficient. |
| 21 | |
| 22 | - **Correction** — Not limited to enforcing constraints on generated code. When context degrades due to long-conversation attention decay, context compression inaccuracies, or accumulated drift, the agent can re-read the relevant documents and scan the actual codebase to restore an accurate understanding. Documents act as the ground truth that pulls distorted context back on track. |
| 23 | - **Completion** — When the agent lacks context for the current task, documents provide the structural knowledge (architecture, module boundaries, dependencies, constraints), while code and comment scanning fills in the implementation specifics that documents may not cover. |
| 24 | - **Reconstruction** — When starting a new session or opening a project for the first time, the agent has zero knowledge of the project. By triggering this skill, the agent loads the relevant documents (backbone) and combines them with code and comment scanning to reconstruct a complete understanding of the project from scratch. |
| 25 | |
| 26 | ## Document Paths |
| 27 | All documents are located under the workspace `docs/` directory: |
| 28 | | Document | Path | Content | |
| 29 | |----------|------|---------| |
| 30 | | Architecture | `docs/architecture.md` | Workspace directory structure, project background, system architecture, service-level topology, constraints, future plans | |
| 31 | | Tech Stack | `docs/tech-stack.md` | Framework versions, dependency constraints, environment requirements, AI code generation limits | |
| 32 | | Coding Standards | `docs/coding.md` | Coding standards, naming conventions, API design standards, error handling, logging standards, testing standards | |
| 33 | | Module Registry | `docs/modules/<bcu-slug>.md` | **One file per Business Capability Unit (BCU).** Each BCU file holds a single business capability's implementation list (HTTP / RPC / MQ / scheduled tasks / third-party callbacks / DB tables / frontend pages), flow, state transitions, local upstream/downstream, external dependencies, related business flows. Slug names a business capability (e.g. `create-order`, `refund`, `consumer-pay`), NOT a microservice / Controller / package / table | |
| 34 | | Decision Records | `docs/decisions/ADR-<slug>.md` | One file per architecture decision (ADR). Slug-only filenames (no numeric prefix, no date prefix). Date lives in frontmatter | |
| 35 | |
| 36 | > **No README / index files** under `docs/modules/` or `docs/decisions/`. Use `Glob` to enumerate; read frontmatter / first-line responsibility on demand. |
| 37 | |
| 38 | ## BCU Splitting Principle |
| 39 | |
| 40 | A `docs/modules/<bcu-slug>.md` file represents **one Business Capability Unit (BCU)**. A BCU must satisfy all 7 conditions: |
| 41 | |
| 42 | 1. Has an explicit business goal |
| 43 | 2. Has |