- All Rosetta prep steps MUST be FULLY completed, load-context skill loaded and fully executed
- ACQUIRE
reverse-engineering/SKILL.md FROM KB and EXECUTE for domain extraction
- Existing project documentation is likely stale and incomplete: source code is the true source of truth
- Documentation phase is based on discovery phase to perform deep analysis, but avoid reading entire codebase.
- Select which files to read, group organize by modules/batches/groups and must assign to subagents to execute.
- Dual-mode based on state.mode:
- Scan for each target doc file
- Compare existing content against codebase findings
- install = create all; upgrade = update gaps only
- Never overwrite human-added content; merge alongside
- Report created/updated/skipped files
- Analyze project structure and key source files
- Create TODO task per document with business context angle
- Track unknowns in ASSUMPTIONS.md with forward references
- Create or update documents:
CONTEXT.md:
- What this doc is for and what it should contain, self-defining style
- Self-defines purpose, content type, style
- Bulleted business context, purpose, domain — stakeholder perspective
- No technical details
ARCHITECTURE.md:
- What this doc is for and what it should contain, self-defining style
- Self-defines purpose, content type, style
- Architecture, modules, workspace structure, testing, styling, building blocks
- No business context — reference CONTEXT.md
- Reference CODEMAP.md for file structure
IMPLEMENTATION.md:
- What this doc is for and what it should contain, self-defining style
- Self-defines purpose, content type, style
- Baseline state VERY BRIEFLY (first part, use word "Baseline" in header, not word "current" - misleading later on)
- High-level change log, each change separate header with date and description (second part)
- DRY — reference other docs
- The only implementation change log
- If nothing to add - add template
ASSUMPTIONS.md:
- What this doc is for and what it should contain, self-defining style
- Self-defines purpose, content type, style
- Each entry: assumption, confidence level, target file when resolved
- Revalidate all assumptions after other documents complete
- If nothing to add - add template
TODO.md:
- What this doc is for and what it should contain, self-defining style
- Self-defines purpose, content type, style
- Each entry comes with header containing "priority when what where" and body with details
- If nothing to add - add template
AGENT MEMORY.md:
- What this doc is for and what it should contain, self-defining style
- Self-defines purpose, content type, style
- Must follow the template exactly - it will be updated during use
- Keep template entries so that AI knows how to fill them in later on
- It is for agent operational notes, not a duplicate of CONTEXT.md/ARCHITECTURE.md
README.md:
- Create in workspace and in each repository root README.md files if missing
- Special cases:
- Speckit: if
memory/constitution.md and specs folder exist, add "MUST ACQUIRE speckit-integration-policy.md FROM KB and execute it" to CONTEXT.md
- Composite (state.composite = true): create top-level docs as registries with workspace-relative paths to sub-repo docs
- If large project add "MUST USE SKILL
large-workspace-handling" to CONTEXT.md
AGENT MEMORY.md
# AGENT MEMORY
Generalized reusable lessons from agent sessions.
Root causes converted into preventive rules, not incident-specific notes.
Entries are h3 headers with [ACTIVE|RETIRED] status.
Content: brief, grep-friendly, MECE across sections.
Style: one-liner per entry, optional sub-bullets for context.
Keep template entries so that AI knows how to fill them in later on.
## Preventive Rules
### <Generalized Preventive Rule> [ACTIVE|RETIRED]
[Root cause, Reasons, Problems]
## What Worked
### <Generalized What Worked> [ACTIVE|RETIRED]
[Root cause, Reasons, Problems]
## What Failed
### <Generalized What Failed> [ACTIVE|RETIRED]
[Hypothesis, Root cause, Reasons, Problems]
## Discoveries
### <Generalized Discovery> [ACTIVE|RETIRED]
[Usage, Reasons, Problems]
1---2name: init-workspace-documentation3description: Generate workspace docs.4license: Apache-2.05---67<init_workspace_documentation>89<role>10Senior technical writer — recovers intent from code, not transcribes implementation.11</role>1213<when_to_use_skill>14Workspaces lack structured documentation, forcing every session to re-discover facts and repeat mistakes. This skill creates five foundational docs from source code analysis. Proof: all five docs exist, are non-empty, complementary, and track unknowns.15</when_to_use_skill>1617<core_concepts>1819- All Rosetta prep steps MUST be FULLY completed, load-context skill loaded and fully executed20- ACQUIRE `reverse-engineering/SKILL.md` FROM KB and EXECUTE for domain extraction21- Existing project documentation is likely stale and incomplete: source code is the true source of truth22- Documentation phase is based on discovery phase to perform **deep** analysis, but avoid reading entire codebase.23- Select which files to read, group organize by modules/batches/groups and must assign to subagents to execute.2425</core_concepts>2627<process>28291. Dual-mode based on state.mode:30 - Scan for each target doc file31 - Compare existing content against codebase findings32 - install = create all; upgrade = update gaps only33 - Never overwrite human-added content; merge alongside34 - Report created/updated/skipped files352. Analyze project structure and key source files363. Create TODO task per document with business context angle374. Track unknowns in ASSUMPTIONS.md with forward references385. Create or update documents:3940CONTEXT.md:41- What this doc is for and what it should contain, self-defining style42- Self-defines purpose, content type, style43- Bulleted business context, purpose, domain — stakeholder perspective44- No technical details4546ARCHITECTURE.md:47- What this doc is for and what it should contain, self-defining style48- Self-defines purpose, content type, style49- Architecture, modules, workspace structure, testing, styling, building blocks50- No business context — reference CONTEXT.md51- Reference CODEMAP.md for file structure5253IMPLEMENTATION.md:54- What this doc is for and what it should contain, self-defining style55- Self-defines purpose, content type, style56- Baseline state VERY BRIEFLY (first part, use word "Baseline" in header, not word "current" - misleading later on)57- High-level change log, each change separate header with date and description (second part)58- DRY — reference other docs59- The only implementation change log60- If nothing to add - add template6162ASSUMPTIONS.md:63- What this doc is for and what it should contain, self-defining style64- Self-defines purpose, content type, style65- Each entry: assumption, confidence level, target file when resolved66- Revalidate all assumptions after other documents complete67- If nothing to add - add template6869TODO.md:70- What this doc is for and what it should contain, self-defining style71- Self-defines purpose, content type, style72- Each entry comes with header containing "priority when what where" and body with details73- If nothing to add - add template7475AGENT MEMORY.md:76- What this doc is for and what it should contain, self-defining style77- Self-defines purpose, content type, style78- Must follow the template exactly - it will be updated during use79- Keep template entries so that AI knows how to fill them in later on80- It is for agent operational notes, not a duplicate of CONTEXT.md/ARCHITECTURE.md8182README.md:83- Create in workspace and in each repository root README.md files if missing84856. Special cases:86 - Speckit: if `memory/constitution.md` and `specs` folder exist, add "MUST ACQUIRE speckit-integration-policy.md FROM KB and execute it" to CONTEXT.md87 - Composite (state.composite = true): create top-level docs as registries with workspace-relative paths to sub-repo docs88 - If large project add "MUST USE SKILL `large-workspace-handling`" to CONTEXT.md8990</process>9192<validation_checklist>93- Each document contains self-definition of purpose and style94- Documents complement without repeating each other95- ASSUMPTIONS.md entries have forward references to target documents96- Upgrade mode: human content preserved, only gaps filled97- Files can be grepped by headers for useful information and ToC98</validation_checklist>99100<templates>101102### AGENT MEMORY.md103104```markdown105# AGENT MEMORY106107Generalized reusable lessons from agent sessions.108Root causes converted into preventive rules, not incident-specific notes.109Entries are h3 headers with [ACTIVE|RETIRED] status.110Content: brief, grep-friendly, MECE across sections. 111Style: one-liner per entry, optional sub-bullets for context.112Keep template entries so that AI knows how to fill them in later on.113114## Preventive Rules115116### <Generalized Preventive Rule> [ACTIVE|RETIRED]117[Root cause, Reasons, Problems]118119## What Worked120121### <Generalized What Worked> [ACTIVE|RETIRED]122[Root cause, Reasons, Problems]123124## What Failed125126### <Generalized What Failed> [ACTIVE|RETIRED]127[Hypothesis, Root cause, Reasons, Problems]128129## Discoveries130131### <Generalized Discovery> [ACTIVE|RETIRED]132[Usage, Reasons, Problems]133```134135</templates>136137</init_workspace_documentation>