[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6HQ8S7EMNPB9NGTE3EPF5W7":3,"skill-same:01M6HQ8S7EMNPB9NGTE3EPF5W7":53},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":27,"linkOnly":28,"markdownContent":29,"markdownBody":30,"frontMatter":31,"refName":33,"commitSha":34,"skillDirectory":35,"forksCount":13,"repositoryHtmlUrl":36,"repositoryHomepageUrl":6,"ownerHtmlUrl":37,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":38,"install":39,"resources":52},"01M6HQ8S7EMNPB9NGTE3EPF5W7","ce:compound",null,"Document a recently solved problem to compound your team's knowledge","apollostreetcompany\u002Fcodex-compound","apollostreetcompany","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F171311035?v=4","01M6HQ7K6QWS8PW86HHDJNTVQS","01M6HQ7KBDWSTW9HFJHC6S829D",0,"MIT","https:\u002F\u002Fgithub.com\u002Fapollostreetcompany\u002Fcodex-compound\u002Fblob\u002Fcodex\u002Ffeat\u002Fbead-0-import-bootstrap\u002Fplugins\u002Fcompound-engineering\u002Fskills\u002Fce-compound\u002FSKILL.md",[],[18,5,19,20,21,22,23,24,25,26],"compound","brief","team","knowledge","context","fix","document","problem","about","2026-11-10 10:12:30",false,"---\nname: ce:compound\ndescription: Document a recently solved problem to compound your team's knowledge\nargument-hint: \"[optional: brief context about the fix]\"\n---\n\n# \u002Fcompound\n\nCoordinate multiple subagents working in parallel to document a recently solved problem.\n\n## Purpose\n\nCaptures problem solutions while context is fresh, creating structured documentation in `docs\u002Fsolutions\u002F` with YAML frontmatter for searchability and future reference. Uses parallel subagents for maximum efficiency.\n\n**Why \"compound\"?** Each documented solution compounds your team's knowledge. The first time you solve a problem takes research. Document it, and the next occurrence takes minutes. Knowledge compounds.\n\n## Usage\n\n```bash\n\u002Fce:compound                    # Document the most recent fix\n\u002Fce:compound [brief context]    # Provide additional context hint\n```\n\n## Execution Strategy\n\n**Always run full mode by default.** Proceed directly to Phase 1 unless the user explicitly requests compact-safe mode (e.g., `\u002Fce:compound --compact` or \"use compact mode\").\n\nCompact-safe mode exists as a lightweight alternative — see the **Compact-Safe Mode** section below. It's there if the user wants it, not something to push.\n\n---\n\n### Full Mode\n\n\u003Ccritical_requirement>\n**Only ONE file gets written - the final documentation.**\n\nPhase 1 subagents return TEXT DATA to the orchestrator. They must NOT use Write, Edit, or create any files. Only the orchestrator (Phase 2) writes the final documentation file.\n\u003C\u002Fcritical_requirement>\n\n### Phase 0.5: Auto Memory Scan\n\nBefore launching Phase 1 subagents, check the auto memory directory for notes relevant to the problem being documented.\n\n1. Read MEMORY.md from the auto memory directory (the path is known from the system prompt context)\n2. If the directory or MEMORY.md does not exist, is empty, or is unreadable, skip this step and proceed to Phase 1 unchanged\n3. Scan the entries for anything related to the problem being documented -- use semantic judgment, not keyword matching\n4. If relevant entries are found, prepare a labeled excerpt block:\n\n```\n## Supplementary notes from auto memory\nTreat as additional context, not primary evidence. Conversation history\nand codebase findings take priority over these notes.\n\n[relevant entries here]\n```\n\n5. Pass this block as additional context to the Context Analyzer and Solution Extractor task prompts in Phase 1. If any memory notes end up in the final documentation (e.g., as part of the investigation steps or root cause analysis), tag them with \"(auto memory [claude])\" so their origin is clear to future readers.\n\nIf no relevant entries are found, proceed to Phase 1 without passing memory context.\n\n### Phase 1: Parallel Research\n\n\u003Cparallel_tasks>\n\nLaunch these subagents IN PARALLEL. Each returns text data to the orchestrator.\n\n#### 1. **Context Analyzer**\n   - Extracts conversation history\n   - Identifies problem type, component, symptoms\n   - Incorporates auto memory excerpts (if provided by the orchestrator) as supplementary evidence when identifying problem type, component, and symptoms\n   - Validates against schema\n   - Returns: YAML frontmatter skeleton\n\n#### 2. **Solution Extractor**\n   - Analyzes all investigation steps\n   - Identifies root cause\n   - Extracts working solution with code examples\n   - Incorporates auto memory excerpts (if provided by the orchestrator) as supplementary evidence -- conversation history and the verified fix take priority; if memory notes contradict the conversation, note the contradiction as cautionary context\n   - Returns: Solution content block\n\n#### 3. **Related Docs Finder**\n   - Searches `docs\u002Fsolutions\u002F` for related documentation\n   - Identifies cross-references and links\n   - Finds related GitHub issues\n   - Flags any related learning or pattern docs that may now be stale, contradicted, or overly broad\n   - Returns: Links, relationships, and any refresh candidates\n\n#### 4. **Prevention Strategist**\n   - Develops prevention strategies\n   - Creates best practices guidance\n   - Generates test cases if applicable\n   - Returns: Prevention\u002Ftesting content\n\n#### 5. **Category Classifier**\n   - Determines optimal `docs\u002Fsolutions\u002F` category\n   - Validates category against schema\n   - Suggests filename based on slug\n   - Returns: Final path and filename\n\n\u003C\u002Fparallel_tasks>\n\n### Phase 2: Assembly & Write\n\n\u003Csequential_tasks>\n\n**WAIT for all Phase 1 subagents to complete before proceeding.**\n\nThe orchestrating agent (main conversation) performs these steps:\n\n1. Collect all text results from Phase 1 subagents\n2. Assemble complete markdown file from the collected pieces\n3. Validate YAML frontmatter against schema\n4. Create directory if needed: `mkdir -p docs\u002Fsolutions\u002F[category]\u002F`\n5. Write the SINGLE final file: `docs\u002Fsolutions\u002F[category]\u002F[filename].md`\n\n\u003C\u002Fsequential_tasks>\n\n### Phase 2.5: Selective Refresh Check\n\nAfter writing the new learning, decide whether this new solution is evidence that older docs should be refreshed.\n\n`ce:compound-refresh` is **not** a default follow-up. Use it selectively when the new learning suggests an older learning or pattern doc may now be inaccurate.\n\nIt makes sense to invoke `ce:compound-refresh` when one or more of these are true:\n\n1. A related learning or pattern doc recommends an approach that the new fix now contradicts\n2. The new fix clearly supersedes an older documented solution\n3. The current work involved a refactor, migration, rename, or dependency upgrade that likely invalidated references in older docs\n4. A pattern doc now looks overly broad, outdated, or no longer supported by the refreshed reality\n5. The Related Docs Finder surfaced high-confidence refresh candidates in the same problem space\n\nIt does **not** make sense to invoke `ce:compound-refresh` when:\n\n1. No related docs were found\n2. Related docs still appear consistent with the new learning\n3. The overlap is superficial and does not change prior guidance\n4. Refresh would require a broad historical review with weak evidence\n\nUse these rules:\n\n- If there is **one obvious stale candidate**, invoke `ce:compound-refresh` with a narrow scope hint after the new learning is written\n- If there are **multiple candidates in the same area**, ask the user whether to run a targeted refresh for that module, category, or pattern set\n- If context is already tight or you are in compact-safe mode, do not expand into a broad refresh automatically; instead recommend `ce:compound-refresh` as the next step with a scope hint\n\nWhen invoking or recommending `ce:compound-refresh`, be explicit about the argument to pass. Prefer the narrowest useful scope:\n\n- **Specific file** when one learning or pattern doc is the likely stale artifact\n- **Module or component name** when several related docs may need review\n- **Category name** when the drift is concentrated in one solutions area\n- **Pattern filename or pattern topic** when the stale guidance lives in `docs\u002Fsolutions\u002Fpatterns\u002F`\n\nExamples:\n\n- `\u002Fce:compound-refresh plugin-versioning-requirements`\n- `\u002Fce:compound-refresh payments`\n- `\u002Fce:compound-refresh performance-issues`\n- `\u002Fce:compound-refresh critical-patterns`\n\nA single scope hint may still expand to multiple related docs when the change is cross-cutting within one domain, category, or pattern area.\n\nDo not invoke `ce:compound-refresh` without an argument unless the user explicitly wants a broad sweep.\n\nAlways capture the new learning first. Refresh is a targeted maintenance follow-up, not a prerequisite for documentation.\n\n### Phase 3: Optional Enhancement\n\n**WAIT for Phase 2 to complete before proceeding.**\n\n\u003Cparallel_tasks>\n\nBased on problem type, optionally invoke specialized agents to review the documentation:\n\n- **performance_issue** → `performance-oracle`\n- **security_issue** → `security-sentinel`\n- **database_issue** → `data-integrity-guardian`\n- **test_failure** → `cora-test-reviewer`\n- Any code-heavy issue → `kieran-rails-reviewer` + `code-simplicity-reviewer`\n\n\u003C\u002Fparallel_tasks>\n\n---\n\n### Compact-Safe Mode\n\n\u003Ccritical_requirement>\n**Single-pass alternative for context-constrained sessions.**\n\nWhen context budget is tight, this mode skips parallel subagents entirely. The orchestrator performs all work in a single pass, producing a minimal but complete solution document.\n\u003C\u002Fcritical_requirement>\n\nThe orchestrator (main conversation) performs ALL of the following in one sequential pass:\n\n1. **Extract from conversation**: Identify the problem, root cause, and solution from conversation history. Also read MEMORY.md from the auto memory directory if it exists -- use any relevant notes as supplementary context alongside conversation history. Tag any memory-sourced content incorporated into the final doc with \"(auto memory [claude])\"\n2. **Classify**: Determine category and filename (same categories as full mode)\n3. **Write minimal doc**: Create `docs\u002Fsolutions\u002F[category]\u002F[filename].md` with:\n   - YAML frontmatter (title, category, date, tags)\n   - Problem description (1-2 sentences)\n   - Root cause (1-2 sentences)\n   - Solution with key code snippets\n   - One prevention tip\n4. **Skip specialized agent reviews** (Phase 3) to conserve context\n\n**Compact-safe output:**\n```\n✓ Documentation complete (compact-safe mode)\n\nFile created:\n- docs\u002Fsolutions\u002F[category]\u002F[filename].md\n\nNote: This was created in compact-safe mode. For richer documentation\n(cross-references, detailed prevention strategies, specialized reviews),\nre-run \u002Fcompound in a fresh session.\n```\n\n**No subagents are launched. No parallel tasks. One file written.**\n\nIn compact-safe mode, only suggest `ce:compound-refresh` if there is an obvious narrow refresh target. Do not broaden into a large refresh sweep from a compact-safe session.\n\n---\n\n## What It Captures\n\n- **Problem symptom**: Exact error messages, observable behavior\n- **Investigation steps tried**: What didn't work and why\n- **Root cause analysis**: Technical explanation\n- **Working solution**: Step-by-step fix with code examples\n- **Prevention strategies**: How to avoid in future\n- **Cross-references**: Links to related issues and docs\n\n## Preconditions\n\n\u003Cpreconditions enforcement=\"advisory\">\n  \u003Ccheck condition=\"problem_solved\">\n    Problem has been solved (not in-progress)\n  \u003C\u002Fcheck>\n  \u003Ccheck condition=\"solution_verified\">\n    Solution has been verified working\n  \u003C\u002Fcheck>\n  \u003Ccheck condition=\"non_trivial\">\n    Non-trivial problem (not simple typo or obvious error)\n  \u003C\u002Fcheck>\n\u003C\u002Fpreconditions>\n\n## What It Creates\n\n**Organized documentation:**\n\n- File: `docs\u002Fsolutions\u002F[category]\u002F[filename].md`\n\n**Categories auto-detected from problem:**\n\n- build-errors\u002F\n- test-failures\u002F\n- runtime-errors\u002F\n- performance-issues\u002F\n- database-issues\u002F\n- security-issues\u002F\n- ui-bugs\u002F\n- integration-issues\u002F\n- logic-errors\u002F\n\n## Common Mistakes to Avoid\n\n| ❌ Wrong | ✅ Correct |\n|----------|-----------|\n| Subagents write files like `context-analysis.md`, `solution-draft.md` | Subagents return text data; orchestrator writes one final file |\n| Research and assembly run in parallel | Research completes → then assembly runs |\n| Multiple files created during workflow | Single file: `docs\u002Fsolutions\u002F[category]\u002F[filename].md` |\n\n## Success Output\n\n```\n✓ Documentation complete\n\nAuto memory: 2 relevant entries used as supplementary evidence\n\nSubagent Results:\n  ✓ Context Analyzer: Identified performance_issue in brief_system\n  ✓ Solution Extractor: 3 code fixes\n  ✓ Related Docs Finder: 2 related issues\n  ✓ Prevention Strategist: Prevention strategies, test suggestions\n  ✓ Category Classifier: `performance-issues`\n\nSpecialized Agent Reviews (Auto-Triggered):\n  ✓ performance-oracle: Validated query optimization approach\n  ✓ kieran-rails-reviewer: Code examples meet Rails standards\n  ✓ code-simplicity-reviewer: Solution is appropriately minimal\n  ✓ every-style-editor: Documentation style verified\n\nFile created:\n- docs\u002Fsolutions\u002Fperformance-issues\u002Fn-plus-one-brief-generation.md\n\nThis documentation will be searchable for future reference when similar\nissues occur in the Email Processing or Brief System modules.\n\nWhat's next?\n1. Continue workflow (recommended)\n2. Link related documentation\n3. Update other references\n4. View documentation\n5. Other\n```\n\n## The Compounding Philosophy\n\nThis creates a compounding knowledge system:\n\n1. First time you solve \"N+1 query in brief generation\" → Research (30 min)\n2. Document the solution → docs\u002Fsolutions\u002Fperformance-issues\u002Fn-plus-one-briefs.md (5 min)\n3. Next time similar issue occurs → Quick lookup (2 min)\n4. Knowledge compounds → Team gets smarter\n\nThe feedback loop:\n\n```\nBuild → Test → Find Issue → Research → Improve → Document → Validate → Deploy\n    ↑                                                                      ↓\n    └──────────────────────────────────────────────────────────────────────┘\n```\n\n**Each unit of engineering work should make subsequent units of work easier—not harder.**\n\n## Auto-Invoke\n\n\u003Cauto_invoke> \u003Ctrigger_phrases> - \"that worked\" - \"it's fixed\" - \"working now\" - \"problem solved\" \u003C\u002Ftrigger_phrases>\n\n\u003Cmanual_override> Use \u002Fce:compound [context] to document immediately without waiting for auto-detection. \u003C\u002Fmanual_override> \u003C\u002Fauto_invoke>\n\n## Routes To\n\n`compound-docs` skill\n\n## Applicable Specialized Agents\n\nBased on problem type, these agents can enhance documentation:\n\n### Code Quality & Review\n- **kieran-rails-reviewer**: Reviews code examples for Rails best practices\n- **code-simplicity-reviewer**: Ensures solution code is minimal and clear\n- **pattern-recognition-specialist**: Identifies anti-patterns or repeating issues\n\n### Specific Domain Experts\n- **performance-oracle**: Analyzes performance_issue category solutions\n- **security-sentinel**: Reviews security_issue solutions for vulnerabilities\n- **cora-test-reviewer**: Creates test cases for prevention strategies\n- **data-integrity-guardian**: Reviews database_issue migrations and queries\n\n### Enhancement & Documentation\n- **best-practices-researcher**: Enriches solution with industry best practices\n- **every-style-editor**: Reviews documentation style and clarity\n- **framework-docs-researcher**: Links to Rails\u002Fgem documentation references\n\n### When to Invoke\n- **Auto-triggered** (optional): Agents can run post-documentation for enhancement\n- **Manual trigger**: User can invoke agents after \u002Fce:compound completes for deeper review\n- **Customize agents**: Edit `compound-engineering.local.md` or invoke the `setup` skill to configure which review agents are used across all workflows\n\n## Related Commands\n\n- `\u002Fresearch [topic]` - Deep investigation (searches docs\u002Fsolutions\u002F for patterns)\n- `\u002Fce:plan` - Planning workflow (references documented solutions)\n","# \u002Fcompound\n\nCoordinate multiple subagents working in parallel to document a recently solved problem.\n\n## Purpose\n\nCaptures problem solutions while context is fresh, creating structured documentation in `docs\u002Fsolutions\u002F` with YAML frontmatter for searchability and future reference. Uses parallel subagents for maximum efficiency.\n\n**Why \"compound\"?** Each documented solution compounds your team's knowledge. The first time you solve a problem takes research. Document it, and the next occurrence takes minutes. Knowledge compounds.\n\n## Usage\n\n```bash\n\u002Fce:compound                    # Document the most recent fix\n\u002Fce:compound [brief context]    # Provide additional context hint\n```\n\n## Execution Strategy\n\n**Always run full mode by default.** Proceed directly to Phase 1 unless the user explicitly requests compact-safe mode (e.g., `\u002Fce:compound --compact` or \"use compact mode\").\n\nCompact-safe mode exists as a lightweight alternative — see the **Compact-Safe Mode** section below. It's there if the user wants it, not something to push.\n\n---\n\n### Full Mode\n\n\u003Ccritical_requirement>\n**Only ONE file gets written - the final documentation.**\n\nPhase 1 subagents return TEXT DATA to the orchestrator. They must NOT use Write, Edit, or create any files. Only the orchestrator (Phase 2) writes the final documentation file.\n\u003C\u002Fcritical_requirement>\n\n### Phase 0.5: Auto Memory Scan\n\nBefore launching Phase 1 subagents, check the auto memory directory for notes relevant to the problem being documented.\n\n1. Read MEMORY.md from the auto memory directory (the path is known from the system prompt context)\n2. If the directory or MEMORY.md does not exist, is empty, or is unreadable, skip this step and proceed to Phase 1 unchanged\n3. Scan the entries for anything related to the problem being documented -- use semantic judgment, not keyword matching\n4. If relevant entries are found, prepare a labeled excerpt block:\n\n```\n## Supplementary notes from auto memory\nTreat as additional context, not primary evidence. Conversation history\nand codebase findings take priority over these notes.\n\n[relevant entries here]\n```\n\n5. Pass this block as additional context to the Context Analyzer and Solution Extractor task prompts in Phase 1. If any memory notes end up in the final documentation (e.g., as part of the investigation steps or root cause analysis), tag them with \"(auto memory [claude])\" so their origin is clear to future readers.\n\nIf no relevant entries are found, proceed to Phase 1 without passing memory context.\n\n### Phase 1: Parallel Research\n\n\u003Cparallel_tasks>\n\nLaunch these subagents IN PARALLEL. Each returns text data to the orchestrator.\n\n#### 1. **Context Analyzer**\n   - Extracts conversation history\n   - Identifies problem type, component, symptoms\n   - Incorporates auto memory excerpts (if provided by the orchestrator) as supplementary evidence when identifying problem type, component, and symptoms\n   - Validates against schema\n   - Returns: YAML frontmatter skeleton\n\n#### 2. **Solution Extractor**\n   - Analyzes all investigation steps\n   - Identifies root cause\n   - Extracts working solution with code examples\n   - Incorporates auto memory excerpts (if provided by the orchestrator) as supplementary evidence -- conversation history and the verified fix take priority; if memory notes contradict the conversation, note the contradiction as cautionary context\n   - Returns: Solution content block\n\n#### 3. **Related Docs Finder**\n   - Searches `docs\u002Fsolutions\u002F` for related documentation\n   - Identifies cross-references and links\n   - Finds related GitHub issues\n   - Flags any related learning or pattern docs that may now be stale, contradicted, or overly broad\n   - Returns: Links, relationships, and any refresh candidates\n\n#### 4. **Prevention Strategist**\n   - Develops prevention strategies\n   - Creates best practices guidance\n   - Generates test cases if applicable\n   - Returns: Prevention\u002Ftesting content\n\n#### 5. **Category Classifier**\n   - Determines optimal `docs\u002Fsolutions\u002F` category\n   - Validates category against schema\n   - Suggests filename based on slug\n   - Returns: Final path and filename\n\n\u003C\u002Fparallel_tasks>\n\n### Phase 2: Assembly & Write\n\n\u003Csequential_tasks>\n\n**WAIT for all Phase 1 subagents to complete before proceeding.**\n\nThe orchestrating agent (main conversation) performs these steps:\n\n1. Collect all text results from Phase 1 subagents\n2. Assemble complete markdown file from the collected pieces\n3. Validate YAML frontmatter against schema\n4. Create directory if needed: `mkdir -p docs\u002Fsolutions\u002F[category]\u002F`\n5. Write the SINGLE final file: `docs\u002Fsolutions\u002F[category]\u002F[filename].md`\n\n\u003C\u002Fsequential_tasks>\n\n### Phase 2.5: Selective Refresh Check\n\nAfter writing the new learning, decide whether this new solution is evidence that older docs should be refreshed.\n\n`ce:compound-refresh` is **not** a default follow-up. Use it selectively when the new learning suggests an older learning or pattern doc may now be inaccurate.\n\nIt makes sense to invoke `ce:compound-refresh` when one or more of these are true:\n\n1. A related learning or pattern doc recommends an approach that the new fix now contradicts\n2. The new fix clearly supersedes an older documented solution\n3. The current work involved a refactor, migration, rename, or dependency upgrade that likely invalidated references in older docs\n4. A pattern doc now looks overly broad, outdated, or no longer supported by the refreshed reality\n5. The Related Docs Finder surfaced high-confidence refresh candidates in the same problem space\n\nIt does **not** make sense to invoke `ce:compound-refresh` when:\n\n1. No related docs were found\n2. Related docs still appear consistent with the new learning\n3. The overlap is superficial and does not change prior guidance\n4. Refresh would require a broad historical review with weak evidence\n\nUse these rules:\n\n- If there is **one obvious stale candidate**, invoke `ce:compound-refresh` with a narrow scope hint after the new learning is written\n- If there are **multiple candidates in the same area**, ask the user whether to run a targeted refresh for that module, category, or pattern set\n- If context is already tight or you are in compact-safe mode, do not expand into a broad refresh automatically; instead recommend `ce:compound-refresh` as the next step with a scope hint\n\nWhen invoking or recommending `ce:compound-refresh`, be explicit about the argument to pass. Prefer the narrowest useful scope:\n\n- **Specific file** when one learning or pattern doc is the likely stale artifact\n- **Module or component name** when several related docs may need review\n- **Category name** when the drift is concentrated in one solutions area\n- **Pattern filename or pattern topic** when the stale guidance lives in `docs\u002Fsolutions\u002Fpatterns\u002F`\n\nExamples:\n\n- `\u002Fce:compound-refresh plugin-versioning-requirements`\n- `\u002Fce:compound-refresh payments`\n- `\u002Fce:compound-refresh performance-issues`\n- `\u002Fce:compound-refresh critical-patterns`\n\nA single scope hint may still expand to multiple related docs when the change is cross-cutting within one domain, category, or pattern area.\n\nDo not invoke `ce:compound-refresh` without an argument unless the user explicitly wants a broad sweep.\n\nAlways capture the new learning first. Refresh is a targeted maintenance follow-up, not a prerequisite for documentation.\n\n### Phase 3: Optional Enhancement\n\n**WAIT for Phase 2 to complete before proceeding.**\n\n\u003Cparallel_tasks>\n\nBased on problem type, optionally invoke specialized agents to review the documentation:\n\n- **performance_issue** → `performance-oracle`\n- **security_issue** → `security-sentinel`\n- **database_issue** → `data-integrity-guardian`\n- **test_failure** → `cora-test-reviewer`\n- Any code-heavy issue → `kieran-rails-reviewer` + `code-simplicity-reviewer`\n\n\u003C\u002Fparallel_tasks>\n\n---\n\n### Compact-Safe Mode\n\n\u003Ccritical_requirement>\n**Single-pass alternative for context-constrained sessions.**\n\nWhen context budget is tight, this mode skips parallel subagents entirely. The orchestrator performs all work in a single pass, producing a minimal but complete solution document.\n\u003C\u002Fcritical_requirement>\n\nThe orchestrator (main conversation) performs ALL of the following in one sequential pass:\n\n1. **Extract from conversation**: Identify the problem, root cause, and solution from conversation history. Also read MEMORY.md from the auto memory directory if it exists -- use any relevant notes as supplementary context alongside conversation history. Tag any memory-sourced content incorporated into the final doc with \"(auto memory [claude])\"\n2. **Classify**: Determine category and filename (same categories as full mode)\n3. **Write minimal doc**: Create `docs\u002Fsolutions\u002F[category]\u002F[filename].md` with:\n   - YAML frontmatter (title, category, date, tags)\n   - Problem description (1-2 sentences)\n   - Root cause (1-2 sentences)\n   - Solution with key code snippets\n   - One prevention tip\n4. **Skip specialized agent reviews** (Phase 3) to conserve context\n\n**Compact-safe output:**\n```\n✓ Documentation complete (compact-safe mode)\n\nFile created:\n- docs\u002Fsolutions\u002F[category]\u002F[filename].md\n\nNote: This was created in compact-safe mode. For richer documentation\n(cross-references, detailed prevention strategies, specialized reviews),\nre-run \u002Fcompound in a fresh session.\n```\n\n**No subagents are launched. No parallel tasks. One file written.**\n\nIn compact-safe mode, only suggest `ce:compound-refresh` if there is an obvious narrow refresh target. Do not broaden into a large refresh sweep from a compact-safe session.\n\n---\n\n## What It Captures\n\n- **Problem symptom**: Exact error messages, observable behavior\n- **Investigation steps tried**: What didn't work and why\n- **Root cause analysis**: Technical explanation\n- **Working solution**: Step-by-step fix with code examples\n- **Prevention strategies**: How to avoid in future\n- **Cross-references**: Links to related issues and docs\n\n## Preconditions\n\n\u003Cpreconditions enforcement=\"advisory\">\n  \u003Ccheck condition=\"problem_solved\">\n    Problem has been solved (not in-progress)\n  \u003C\u002Fcheck>\n  \u003Ccheck condition=\"solution_verified\">\n    Solution has been verified working\n  \u003C\u002Fcheck>\n  \u003Ccheck condition=\"non_trivial\">\n    Non-trivial problem (not simple typo or obvious error)\n  \u003C\u002Fcheck>\n\u003C\u002Fpreconditions>\n\n## What It Creates\n\n**Organized documentation:**\n\n- File: `docs\u002Fsolutions\u002F[category]\u002F[filename].md`\n\n**Categories auto-detected from problem:**\n\n- build-errors\u002F\n- test-failures\u002F\n- runtime-errors\u002F\n- performance-issues\u002F\n- database-issues\u002F\n- security-issues\u002F\n- ui-bugs\u002F\n- integration-issues\u002F\n- logic-errors\u002F\n\n## Common Mistakes to Avoid\n\n| ❌ Wrong | ✅ Correct |\n|----------|-----------|\n| Subagents write files like `context-analysis.md`, `solution-draft.md` | Subagents return text data; orchestrator writes one final file |\n| Research and assembly run in parallel | Research completes → then assembly runs |\n| Multiple files created during workflow | Single file: `docs\u002Fsolutions\u002F[category]\u002F[filename].md` |\n\n## Success Output\n\n```\n✓ Documentation complete\n\nAuto memory: 2 relevant entries used as supplementary evidence\n\nSubagent Results:\n  ✓ Context Analyzer: Identified performance_issue in brief_system\n  ✓ Solution Extractor: 3 code fixes\n  ✓ Related Docs Finder: 2 related issues\n  ✓ Prevention Strategist: Prevention strategies, test suggestions\n  ✓ Category Classifier: `performance-issues`\n\nSpecialized Agent Reviews (Auto-Triggered):\n  ✓ performance-oracle: Validated query optimization approach\n  ✓ kieran-rails-reviewer: Code examples meet Rails standards\n  ✓ code-simplicity-reviewer: Solution is appropriately minimal\n  ✓ every-style-editor: Documentation style verified\n\nFile created:\n- docs\u002Fsolutions\u002Fperformance-issues\u002Fn-plus-one-brief-generation.md\n\nThis documentation will be searchable for future reference when similar\nissues occur in the Email Processing or Brief System modules.\n\nWhat's next?\n1. Continue workflow (recommended)\n2. Link related documentation\n3. Update other references\n4. View documentation\n5. Other\n```\n\n## The Compounding Philosophy\n\nThis creates a compounding knowledge system:\n\n1. First time you solve \"N+1 query in brief generation\" → Research (30 min)\n2. Document the solution → docs\u002Fsolutions\u002Fperformance-issues\u002Fn-plus-one-briefs.md (5 min)\n3. Next time similar issue occurs → Quick lookup (2 min)\n4. Knowledge compounds → Team gets smarter\n\nThe feedback loop:\n\n```\nBuild → Test → Find Issue → Research → Improve → Document → Validate → Deploy\n    ↑                                                                      ↓\n    └──────────────────────────────────────────────────────────────────────┘\n```\n\n**Each unit of engineering work should make subsequent units of work easier—not harder.**\n\n## Auto-Invoke\n\n\u003Cauto_invoke> \u003Ctrigger_phrases> - \"that worked\" - \"it's fixed\" - \"working now\" - \"problem solved\" \u003C\u002Ftrigger_phrases>\n\n\u003Cmanual_override> Use \u002Fce:compound [context] to document immediately without waiting for auto-detection. \u003C\u002Fmanual_override> \u003C\u002Fauto_invoke>\n\n## Routes To\n\n`compound-docs` skill\n\n## Applicable Specialized Agents\n\nBased on problem type, these agents can enhance documentation:\n\n### Code Quality & Review\n- **kieran-rails-reviewer**: Reviews code examples for Rails best practices\n- **code-simplicity-reviewer**: Ensures solution code is minimal and clear\n- **pattern-recognition-specialist**: Identifies anti-patterns or repeating issues\n\n### Specific Domain Experts\n- **performance-oracle**: Analyzes performance_issue category solutions\n- **security-sentinel**: Reviews security_issue solutions for vulnerabilities\n- **cora-test-reviewer**: Creates test cases for prevention strategies\n- **data-integrity-guardian**: Reviews database_issue migrations and queries\n\n### Enhancement & Documentation\n- **best-practices-researcher**: Enriches solution with industry best practices\n- **every-style-editor**: Reviews documentation style and clarity\n- **framework-docs-researcher**: Links to Rails\u002Fgem documentation references\n\n### When to Invoke\n- **Auto-triggered** (optional): Agents can run post-documentation for enhancement\n- **Manual trigger**: User can invoke agents after \u002Fce:compound completes for deeper review\n- **Customize agents**: Edit `compound-engineering.local.md` or invoke the `setup` skill to configure which review agents are used across all workflows\n\n## Related Commands\n\n- `\u002Fresearch [topic]` - Deep investigation (searches docs\u002Fsolutions\u002F for patterns)\n- `\u002Fce:plan` - Planning workflow (references documented solutions)\n",{"name":5,"description":7,"argument-hint":32},"[optional: brief context about the fix]","codex\u002Ffeat\u002Fbead-0-import-bootstrap","fcee358ce06652adf6e1dacc6351e05f12bc3988","plugins\u002Fcompound-engineering\u002Fskills\u002Fce-compound","https:\u002F\u002Fgithub.com\u002Fapollostreetcompany\u002Fcodex-compound","https:\u002F\u002Fgithub.com\u002Fapollostreetcompany","2026-03-25 18:12:52",{"source":8,"skillName":5,"commands":40,"prompt":50,"zipAvailable":51},[41,44,47],{"tool":42,"command":43},"npx","npx skills add apollostreetcompany\u002Fcodex-compound --skill \"ce:compound\"",{"tool":45,"command":46},"bunx","bunx skills add apollostreetcompany\u002Fcodex-compound --skill \"ce:compound\"",{"tool":48,"command":49},"pnpm","pnpm dlx skills add apollostreetcompany\u002Fcodex-compound --skill \"ce:compound\"","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fapollostreetcompany\u002Fcodex-compound\u002Fblob\u002Fcodex\u002Ffeat\u002Fbead-0-import-bootstrap\u002Fplugins\u002Fcompound-engineering\u002Fskills\u002Fce-compound\u002FSKILL.md",true,[],[54,64,76,84,91,106],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":27},"01M6HQDNTAST86HTWY6DCK4RJY","skill-one","Sample skill","https:\u002F\u002Fgithub.com\u002Fapollostreetcompany\u002Fcodex-compound\u002Fblob\u002Fcodex\u002Ffeat\u002Fbead-0-import-bootstrap\u002Ftests\u002Ffixtures\u002Fsample-plugin\u002Fskills\u002Fskill-one\u002FSKILL.md",[],[61,62,63],"skill one","sample skill","sample",{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":27},"01M6HQDM8XEPF79WXCN031KDBD","disabled-skill","A skill with model invocation disabled","https:\u002F\u002Fgithub.com\u002Fapollostreetcompany\u002Fcodex-compound\u002Fblob\u002Fcodex\u002Ffeat\u002Fbead-0-import-bootstrap\u002Ftests\u002Ffixtures\u002Fsample-plugin\u002Fskills\u002Fdisabled-skill\u002FSKILL.md",[],[71,72,73,74,75],"disabled skill","with","with model","true","model",{"skillNo":77,"name":78,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":27},"01M6HQDK1PG3422YX8WRBTTW0G","default-skill","https:\u002F\u002Fgithub.com\u002Fapollostreetcompany\u002Fcodex-compound\u002Fblob\u002Fcodex\u002Ffeat\u002Fbead-0-import-bootstrap\u002Ftests\u002Ffixtures\u002Fcustom-paths\u002Fskills\u002Fdefault-skill\u002FSKILL.md",[],[82,83],"default skill","default",{"skillNo":85,"name":86,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":27},"01M6HQDHXC3SKTG1P2JHQ2GDF4","custom-skill","https:\u002F\u002Fgithub.com\u002Fapollostreetcompany\u002Fcodex-compound\u002Fblob\u002Fcodex\u002Ffeat\u002Fbead-0-import-bootstrap\u002Ftests\u002Ffixtures\u002Fcustom-paths\u002Fcustom-skills\u002Fcustom-skill\u002FSKILL.md",[],[90],"custom skill",{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":27},"01M6HQDFDD5DDBPW75D93H8KMN","triage","Triage and categorize findings for the CLI todo system","https:\u002F\u002Fgithub.com\u002Fapollostreetcompany\u002Fcodex-compound\u002Fblob\u002Fcodex\u002Ffeat\u002Fbead-0-import-bootstrap\u002Fplugins\u002Fcompound-engineering\u002Fskills\u002Ftriage\u002FSKILL.md",[],[93,98,99,74,100,101,102,103,104,105],"source","for","type","todo","categorize","list","system","cli",{"skillNo":107,"name":108,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":27},"01M6HQDAVYQBR00YAPJNVDZBBY","test-xcode","Build and test iOS apps on simulator using XcodeBuildMCP","https:\u002F\u002Fgithub.com\u002Fapollostreetcompany\u002Fcodex-compound\u002Fblob\u002Fcodex\u002Ffeat\u002Fbead-0-import-bootstrap\u002Fplugins\u002Fcompound-engineering\u002Fskills\u002Ftest-xcode\u002FSKILL.md",[],[113,114,115,116,74,117,118,119,120,121,83,122,123],"test","test xcode","xcode","build and test","scheme","xcodebuildmcp","apps","name","build","use","ios"]