[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6HQA1SSHERMTN2XM9JTA6TR":3,"skill-same:01M6HQA1SSHERMTN2XM9JTA6TR":90},{"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":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":51,"commitSha":52,"skillDirectory":53,"forksCount":13,"repositoryHtmlUrl":54,"repositoryHomepageUrl":6,"ownerHtmlUrl":55,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":56,"install":57,"resources":69},"01M6HQA1SSHERMTN2XM9JTA6TR","compound-docs",null,"Capture solved problems as categorized documentation with YAML frontmatter for fast lookup","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\u002Fcompound-docs\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"compound docs","docs","compound","write","frontmatter","for","verified","true","with","problem","progress","as","read","capture","grep","Bash","lookup","fast","yaml","documentation","2026-11-10 10:12:30",false,"---\nname: compound-docs\ndescription: Capture solved problems as categorized documentation with YAML frontmatter for fast lookup\ndisable-model-invocation: true\nallowed-tools:\n  - Read # Parse conversation context\n  - Write # Create resolution docs\n  - Bash # Create directories\n  - Grep # Search existing docs\npreconditions:\n  - Problem has been solved (not in-progress)\n  - Solution has been verified working\n---\n\n# compound-docs Skill\n\n**Purpose:** Automatically document solved problems to build searchable institutional knowledge with category-based organization (enum-validated problem types).\n\n## Overview\n\nThis skill captures problem solutions immediately after confirmation, creating structured documentation that serves as a searchable knowledge base for future sessions.\n\n**Organization:** Single-file architecture - each problem documented as one markdown file in its symptom category directory (e.g., `docs\u002Fsolutions\u002Fperformance-issues\u002Fn-plus-one-briefs.md`). Files use YAML frontmatter for metadata and searchability.\n\n---\n\n\u003Ccritical_sequence name=\"documentation-capture\" enforce_order=\"strict\">\n\n## 7-Step Process\n\n\u003Cstep number=\"1\" required=\"true\">\n### Step 1: Detect Confirmation\n\n**Auto-invoke after phrases:**\n\n- \"that worked\"\n- \"it's fixed\"\n- \"working now\"\n- \"problem solved\"\n- \"that did it\"\n\n**OR manual:** `\u002Fdoc-fix` command\n\n**Non-trivial problems only:**\n\n- Multiple investigation attempts needed\n- Tricky debugging that took time\n- Non-obvious solution\n- Future sessions would benefit\n\n**Skip documentation for:**\n\n- Simple typos\n- Obvious syntax errors\n- Trivial fixes immediately corrected\n\u003C\u002Fstep>\n\n\u003Cstep number=\"2\" required=\"true\" depends_on=\"1\">\n### Step 2: Gather Context\n\nExtract from conversation history:\n\n**Required information:**\n\n- **Module name**: Which module or component had the problem\n- **Symptom**: Observable error\u002Fbehavior (exact error messages)\n- **Investigation attempts**: What didn't work and why\n- **Root cause**: Technical explanation of actual problem\n- **Solution**: What fixed it (code\u002Fconfig changes)\n- **Prevention**: How to avoid in future\n\n**Environment details:**\n\n- Rails version\n- Stage (0-6 or post-implementation)\n- OS version\n- File\u002Fline references\n\n**BLOCKING REQUIREMENT:** If critical context is missing (module name, exact error, stage, or resolution steps), ask user and WAIT for response before proceeding to Step 3:\n\n```\nI need a few details to document this properly:\n\n1. Which module had this issue? [ModuleName]\n2. What was the exact error message or symptom?\n3. What stage were you in? (0-6 or post-implementation)\n\n[Continue after user provides details]\n```\n\u003C\u002Fstep>\n\n\u003Cstep number=\"3\" required=\"false\" depends_on=\"2\">\n### Step 3: Check Existing Docs\n\nSearch docs\u002Fsolutions\u002F for similar issues:\n\n```bash\n# Search by error message keywords\ngrep -r \"exact error phrase\" docs\u002Fsolutions\u002F\n\n# Search by symptom category\nls docs\u002Fsolutions\u002F[category]\u002F\n```\n\n**IF similar issue found:**\n\nTHEN present decision options:\n\n```\nFound similar issue: docs\u002Fsolutions\u002F[path]\n\nWhat's next?\n1. Create new doc with cross-reference (recommended)\n2. Update existing doc (only if same root cause)\n3. Other\n\nChoose (1-3): _\n```\n\nWAIT for user response, then execute chosen action.\n\n**ELSE** (no similar issue found):\n\nProceed directly to Step 4 (no user interaction needed).\n\u003C\u002Fstep>\n\n\u003Cstep number=\"4\" required=\"true\" depends_on=\"2\">\n### Step 4: Generate Filename\n\nFormat: `[sanitized-symptom]-[module]-[YYYYMMDD].md`\n\n**Sanitization rules:**\n\n- Lowercase\n- Replace spaces with hyphens\n- Remove special characters except hyphens\n- Truncate to reasonable length (\u003C 80 chars)\n\n**Examples:**\n\n- `missing-include-BriefSystem-20251110.md`\n- `parameter-not-saving-state-EmailProcessing-20251110.md`\n- `webview-crash-on-resize-Assistant-20251110.md`\n\u003C\u002Fstep>\n\n\u003Cstep number=\"5\" required=\"true\" depends_on=\"4\" blocking=\"true\">\n### Step 5: Validate YAML Schema\n\n**CRITICAL:** All docs require validated YAML frontmatter with enum validation.\n\n\u003Cvalidation_gate name=\"yaml-schema\" blocking=\"true\">\n\n**Validate against schema:**\nLoad `schema.yaml` and classify the problem against the enum values defined in [yaml-schema.md](.\u002Freferences\u002Fyaml-schema.md). Ensure all required fields are present and match allowed values exactly.\n\n**BLOCK if validation fails:**\n\n```\n❌ YAML validation failed\n\nErrors:\n- problem_type: must be one of schema enums, got \"compilation_error\"\n- severity: must be one of [critical, high, medium, low], got \"invalid\"\n- symptoms: must be array with 1-5 items, got string\n\nPlease provide corrected values.\n```\n\n**GATE ENFORCEMENT:** Do NOT proceed to Step 6 (Create Documentation) until YAML frontmatter passes all validation rules defined in `schema.yaml`.\n\n\u003C\u002Fvalidation_gate>\n\u003C\u002Fstep>\n\n\u003Cstep number=\"6\" required=\"true\" depends_on=\"5\">\n### Step 6: Create Documentation\n\n**Determine category from problem_type:** Use the category mapping defined in [yaml-schema.md](.\u002Freferences\u002Fyaml-schema.md) (lines 49-61).\n\n**Create documentation file:**\n\n```bash\nPROBLEM_TYPE=\"[from validated YAML]\"\nCATEGORY=\"[mapped from problem_type]\"\nFILENAME=\"[generated-filename].md\"\nDOC_PATH=\"docs\u002Fsolutions\u002F${CATEGORY}\u002F${FILENAME}\"\n\n# Create directory if needed\nmkdir -p \"docs\u002Fsolutions\u002F${CATEGORY}\"\n\n# Write documentation using template from assets\u002Fresolution-template.md\n# (Content populated with Step 2 context and validated YAML frontmatter)\n```\n\n**Result:**\n- Single file in category directory\n- Enum validation ensures consistent categorization\n\n**Create documentation:** Populate the structure from `assets\u002Fresolution-template.md` with context gathered in Step 2 and validated YAML frontmatter from Step 5.\n\u003C\u002Fstep>\n\n\u003Cstep number=\"7\" required=\"false\" depends_on=\"6\">\n### Step 7: Cross-Reference & Critical Pattern Detection\n\nIf similar issues found in Step 3:\n\n**Update existing doc:**\n\n```bash\n# Add Related Issues link to similar doc\necho \"- See also: [$FILENAME]($REAL_FILE)\" >> [similar-doc.md]\n```\n\n**Update new doc:**\nAlready includes cross-reference from Step 6.\n\n**Update patterns if applicable:**\n\nIf this represents a common pattern (3+ similar issues):\n\n```bash\n# Add to docs\u002Fsolutions\u002Fpatterns\u002Fcommon-solutions.md\ncat >> docs\u002Fsolutions\u002Fpatterns\u002Fcommon-solutions.md \u003C\u003C 'EOF'\n\n## [Pattern Name]\n\n**Common symptom:** [Description]\n**Root cause:** [Technical explanation]\n**Solution pattern:** [General approach]\n\n**Examples:**\n- [Link to doc 1]\n- [Link to doc 2]\n- [Link to doc 3]\nEOF\n```\n\n**Critical Pattern Detection (Optional Proactive Suggestion):**\n\nIf this issue has automatic indicators suggesting it might be critical:\n- Severity: `critical` in YAML\n- Affects multiple modules OR foundational stage (Stage 2 or 3)\n- Non-obvious solution\n\nThen in the decision menu (Step 8), add a note:\n```\n? This might be worth adding to Required Reading (Option 2)\n```\n\nBut **NEVER auto-promote**. User decides via decision menu (Option 2).\n\n**Template for critical pattern addition:**\n\nWhen user selects Option 2 (Add to Required Reading), use the template from `assets\u002Fcritical-pattern-template.md` to structure the pattern entry. Number it sequentially based on existing patterns in `docs\u002Fsolutions\u002Fpatterns\u002Fcritical-patterns.md`.\n\u003C\u002Fstep>\n\n\u003C\u002Fcritical_sequence>\n\n---\n\n\u003Cdecision_gate name=\"post-documentation\" wait_for_user=\"true\">\n\n## Decision Menu After Capture\n\nAfter successful documentation, present options and WAIT for user response:\n\n```\n✓ Solution documented\n\nFile created:\n- docs\u002Fsolutions\u002F[category]\u002F[filename].md\n\nWhat's next?\n1. Continue workflow (recommended)\n2. Add to Required Reading - Promote to critical patterns (critical-patterns.md)\n3. Link related issues - Connect to similar problems\n4. Add to existing skill - Add to a learning skill (e.g., hotwire-native)\n5. Create new skill - Extract into new learning skill\n6. View documentation - See what was captured\n7. Other\n```\n\n**Handle responses:**\n\n**Option 1: Continue workflow**\n\n- Return to calling skill\u002Fworkflow\n- Documentation is complete\n\n**Option 2: Add to Required Reading** ⭐ PRIMARY PATH FOR CRITICAL PATTERNS\n\nUser selects this when:\n- System made this mistake multiple times across different modules\n- Solution is non-obvious but must be followed every time\n- Foundational requirement (Rails, Rails API, threading, etc.)\n\nAction:\n1. Extract pattern from the documentation\n2. Format as ❌ WRONG vs ✅ CORRECT with code examples\n3. Add to `docs\u002Fsolutions\u002Fpatterns\u002Fcritical-patterns.md`\n4. Add cross-reference back to this doc\n5. Confirm: \"✓ Added to Required Reading. All subagents will see this pattern before code generation.\"\n\n**Option 3: Link related issues**\n\n- Prompt: \"Which doc to link? (provide filename or describe)\"\n- Search docs\u002Fsolutions\u002F for the doc\n- Add cross-reference to both docs\n- Confirm: \"✓ Cross-reference added\"\n\n**Option 4: Add to existing skill**\n\nUser selects this when the documented solution relates to an existing learning skill:\n\nAction:\n1. Prompt: \"Which skill? (hotwire-native, etc.)\"\n2. Determine which reference file to update (resources.md, patterns.md, or examples.md)\n3. Add link and brief description to appropriate section\n4. Confirm: \"✓ Added to [skill-name] skill in [file]\"\n\nExample: For Hotwire Native Tailwind variants solution:\n- Add to `hotwire-native\u002Freferences\u002Fresources.md` under \"Project-Specific Resources\"\n- Add to `hotwire-native\u002Freferences\u002Fexamples.md` with link to solution doc\n\n**Option 5: Create new skill**\n\nUser selects this when the solution represents the start of a new learning domain:\n\nAction:\n1. Prompt: \"What should the new skill be called? (e.g., stripe-billing, email-processing)\"\n2. Run `python3 .claude\u002Fskills\u002Fskill-creator\u002Fscripts\u002Finit_skill.py [skill-name]`\n3. Create initial reference files with this solution as first example\n4. Confirm: \"✓ Created new [skill-name] skill with this solution as first example\"\n\n**Option 6: View documentation**\n\n- Display the created documentation\n- Present decision menu again\n\n**Option 7: Other**\n\n- Ask what they'd like to do\n\n\u003C\u002Fdecision_gate>\n\n---\n\n\u003Cintegration_protocol>\n\n## Integration Points\n\n**Invoked by:**\n- \u002Fcompound command (primary interface)\n- Manual invocation in conversation after solution confirmed\n- Can be triggered by detecting confirmation phrases like \"that worked\", \"it's fixed\", etc.\n\n**Invokes:**\n- None (terminal skill - does not delegate to other skills)\n\n**Handoff expectations:**\nAll context needed for documentation should be present in conversation history before invocation.\n\n\u003C\u002Fintegration_protocol>\n\n---\n\n\u003Csuccess_criteria>\n\n## Success Criteria\n\nDocumentation is successful when ALL of the following are true:\n\n- ✅ YAML frontmatter validated (all required fields, correct formats)\n- ✅ File created in docs\u002Fsolutions\u002F[category]\u002F[filename].md\n- ✅ Enum values match schema.yaml exactly\n- ✅ Code examples included in solution section\n- ✅ Cross-references added if related issues found\n- ✅ User presented with decision menu and action confirmed\n\n\u003C\u002Fsuccess_criteria>\n\n---\n\n## Error Handling\n\n**Missing context:**\n\n- Ask user for missing details\n- Don't proceed until critical info provided\n\n**YAML validation failure:**\n\n- Show specific errors\n- Present retry with corrected values\n- BLOCK until valid\n\n**Similar issue ambiguity:**\n\n- Present multiple matches\n- Let user choose: new doc, update existing, or link as duplicate\n\n**Module not in modules documentation:**\n\n- Warn but don't block\n- Proceed with documentation\n- Suggest: \"Add [Module] to modules documentation if not there\"\n\n---\n\n## Execution Guidelines\n\n**MUST do:**\n- Validate YAML frontmatter (BLOCK if invalid per Step 5 validation gate)\n- Extract exact error messages from conversation\n- Include code examples in solution section\n- Create directories before writing files (`mkdir -p`)\n- Ask user and WAIT if critical context missing\n\n**MUST NOT do:**\n- Skip YAML validation (validation gate is blocking)\n- Use vague descriptions (not searchable)\n- Omit code examples or cross-references\n\n---\n\n## Quality Guidelines\n\n**Good documentation has:**\n\n- ✅ Exact error messages (copy-paste from output)\n- ✅ Specific file:line references\n- ✅ Observable symptoms (what you saw, not interpretations)\n- ✅ Failed attempts documented (helps avoid wrong paths)\n- ✅ Technical explanation (not just \"what\" but \"why\")\n- ✅ Code examples (before\u002Fafter if applicable)\n- ✅ Prevention guidance (how to catch early)\n- ✅ Cross-references (related issues)\n\n**Avoid:**\n\n- ❌ Vague descriptions (\"something was wrong\")\n- ❌ Missing technical details (\"fixed the code\")\n- ❌ No context (which version? which file?)\n- ❌ Just code dumps (explain why it works)\n- ❌ No prevention guidance\n- ❌ No cross-references\n\n---\n\n## Example Scenario\n\n**User:** \"That worked! The N+1 query is fixed.\"\n\n**Skill activates:**\n\n1. **Detect confirmation:** \"That worked!\" triggers auto-invoke\n2. **Gather context:**\n   - Module: Brief System\n   - Symptom: Brief generation taking >5 seconds, N+1 query when loading email threads\n   - Failed attempts: Added pagination (didn't help), checked background job performance\n   - Solution: Added eager loading with `includes(:emails)` on Brief model\n   - Root cause: Missing eager loading causing separate database query per email thread\n3. **Check existing:** No similar issue found\n4. **Generate filename:** `n-plus-one-brief-generation-BriefSystem-20251110.md`\n5. **Validate YAML:**\n   ```yaml\n   module: Brief System\n   date: 2025-11-10\n   problem_type: performance_issue\n   component: rails_model\n   symptoms:\n     - \"N+1 query when loading email threads\"\n     - \"Brief generation taking >5 seconds\"\n   root_cause: missing_include\n   severity: high\n   tags: [n-plus-one, eager-loading, performance]\n   ```\n   ✅ Valid\n6. **Create documentation:**\n   - `docs\u002Fsolutions\u002Fperformance-issues\u002Fn-plus-one-brief-generation-BriefSystem-20251110.md`\n7. **Cross-reference:** None needed (no similar issues)\n\n**Output:**\n\n```\n✓ Solution documented\n\nFile created:\n- docs\u002Fsolutions\u002Fperformance-issues\u002Fn-plus-one-brief-generation-BriefSystem-20251110.md\n\nWhat's next?\n1. Continue workflow (recommended)\n2. Add to Required Reading - Promote to critical patterns (critical-patterns.md)\n3. Link related issues - Connect to similar problems\n4. Add to existing skill - Add to a learning skill (e.g., hotwire-native)\n5. Create new skill - Extract into new learning skill\n6. View documentation - See what was captured\n7. Other\n```\n\n---\n\n## Future Enhancements\n\n**Not in Phase 7 scope, but potential:**\n\n- Search by date range\n- Filter by severity\n- Tag-based search interface\n- Metrics (most common issues, resolution time)\n- Export to shareable format (community knowledge sharing)\n- Import community solutions\n","# compound-docs Skill\n\n**Purpose:** Automatically document solved problems to build searchable institutional knowledge with category-based organization (enum-validated problem types).\n\n## Overview\n\nThis skill captures problem solutions immediately after confirmation, creating structured documentation that serves as a searchable knowledge base for future sessions.\n\n**Organization:** Single-file architecture - each problem documented as one markdown file in its symptom category directory (e.g., `docs\u002Fsolutions\u002Fperformance-issues\u002Fn-plus-one-briefs.md`). Files use YAML frontmatter for metadata and searchability.\n\n---\n\n\u003Ccritical_sequence name=\"documentation-capture\" enforce_order=\"strict\">\n\n## 7-Step Process\n\n\u003Cstep number=\"1\" required=\"true\">\n### Step 1: Detect Confirmation\n\n**Auto-invoke after phrases:**\n\n- \"that worked\"\n- \"it's fixed\"\n- \"working now\"\n- \"problem solved\"\n- \"that did it\"\n\n**OR manual:** `\u002Fdoc-fix` command\n\n**Non-trivial problems only:**\n\n- Multiple investigation attempts needed\n- Tricky debugging that took time\n- Non-obvious solution\n- Future sessions would benefit\n\n**Skip documentation for:**\n\n- Simple typos\n- Obvious syntax errors\n- Trivial fixes immediately corrected\n\u003C\u002Fstep>\n\n\u003Cstep number=\"2\" required=\"true\" depends_on=\"1\">\n### Step 2: Gather Context\n\nExtract from conversation history:\n\n**Required information:**\n\n- **Module name**: Which module or component had the problem\n- **Symptom**: Observable error\u002Fbehavior (exact error messages)\n- **Investigation attempts**: What didn't work and why\n- **Root cause**: Technical explanation of actual problem\n- **Solution**: What fixed it (code\u002Fconfig changes)\n- **Prevention**: How to avoid in future\n\n**Environment details:**\n\n- Rails version\n- Stage (0-6 or post-implementation)\n- OS version\n- File\u002Fline references\n\n**BLOCKING REQUIREMENT:** If critical context is missing (module name, exact error, stage, or resolution steps), ask user and WAIT for response before proceeding to Step 3:\n\n```\nI need a few details to document this properly:\n\n1. Which module had this issue? [ModuleName]\n2. What was the exact error message or symptom?\n3. What stage were you in? (0-6 or post-implementation)\n\n[Continue after user provides details]\n```\n\u003C\u002Fstep>\n\n\u003Cstep number=\"3\" required=\"false\" depends_on=\"2\">\n### Step 3: Check Existing Docs\n\nSearch docs\u002Fsolutions\u002F for similar issues:\n\n```bash\n# Search by error message keywords\ngrep -r \"exact error phrase\" docs\u002Fsolutions\u002F\n\n# Search by symptom category\nls docs\u002Fsolutions\u002F[category]\u002F\n```\n\n**IF similar issue found:**\n\nTHEN present decision options:\n\n```\nFound similar issue: docs\u002Fsolutions\u002F[path]\n\nWhat's next?\n1. Create new doc with cross-reference (recommended)\n2. Update existing doc (only if same root cause)\n3. Other\n\nChoose (1-3): _\n```\n\nWAIT for user response, then execute chosen action.\n\n**ELSE** (no similar issue found):\n\nProceed directly to Step 4 (no user interaction needed).\n\u003C\u002Fstep>\n\n\u003Cstep number=\"4\" required=\"true\" depends_on=\"2\">\n### Step 4: Generate Filename\n\nFormat: `[sanitized-symptom]-[module]-[YYYYMMDD].md`\n\n**Sanitization rules:**\n\n- Lowercase\n- Replace spaces with hyphens\n- Remove special characters except hyphens\n- Truncate to reasonable length (\u003C 80 chars)\n\n**Examples:**\n\n- `missing-include-BriefSystem-20251110.md`\n- `parameter-not-saving-state-EmailProcessing-20251110.md`\n- `webview-crash-on-resize-Assistant-20251110.md`\n\u003C\u002Fstep>\n\n\u003Cstep number=\"5\" required=\"true\" depends_on=\"4\" blocking=\"true\">\n### Step 5: Validate YAML Schema\n\n**CRITICAL:** All docs require validated YAML frontmatter with enum validation.\n\n\u003Cvalidation_gate name=\"yaml-schema\" blocking=\"true\">\n\n**Validate against schema:**\nLoad `schema.yaml` and classify the problem against the enum values defined in [yaml-schema.md](.\u002Freferences\u002Fyaml-schema.md). Ensure all required fields are present and match allowed values exactly.\n\n**BLOCK if validation fails:**\n\n```\n❌ YAML validation failed\n\nErrors:\n- problem_type: must be one of schema enums, got \"compilation_error\"\n- severity: must be one of [critical, high, medium, low], got \"invalid\"\n- symptoms: must be array with 1-5 items, got string\n\nPlease provide corrected values.\n```\n\n**GATE ENFORCEMENT:** Do NOT proceed to Step 6 (Create Documentation) until YAML frontmatter passes all validation rules defined in `schema.yaml`.\n\n\u003C\u002Fvalidation_gate>\n\u003C\u002Fstep>\n\n\u003Cstep number=\"6\" required=\"true\" depends_on=\"5\">\n### Step 6: Create Documentation\n\n**Determine category from problem_type:** Use the category mapping defined in [yaml-schema.md](.\u002Freferences\u002Fyaml-schema.md) (lines 49-61).\n\n**Create documentation file:**\n\n```bash\nPROBLEM_TYPE=\"[from validated YAML]\"\nCATEGORY=\"[mapped from problem_type]\"\nFILENAME=\"[generated-filename].md\"\nDOC_PATH=\"docs\u002Fsolutions\u002F${CATEGORY}\u002F${FILENAME}\"\n\n# Create directory if needed\nmkdir -p \"docs\u002Fsolutions\u002F${CATEGORY}\"\n\n# Write documentation using template from assets\u002Fresolution-template.md\n# (Content populated with Step 2 context and validated YAML frontmatter)\n```\n\n**Result:**\n- Single file in category directory\n- Enum validation ensures consistent categorization\n\n**Create documentation:** Populate the structure from `assets\u002Fresolution-template.md` with context gathered in Step 2 and validated YAML frontmatter from Step 5.\n\u003C\u002Fstep>\n\n\u003Cstep number=\"7\" required=\"false\" depends_on=\"6\">\n### Step 7: Cross-Reference & Critical Pattern Detection\n\nIf similar issues found in Step 3:\n\n**Update existing doc:**\n\n```bash\n# Add Related Issues link to similar doc\necho \"- See also: [$FILENAME]($REAL_FILE)\" >> [similar-doc.md]\n```\n\n**Update new doc:**\nAlready includes cross-reference from Step 6.\n\n**Update patterns if applicable:**\n\nIf this represents a common pattern (3+ similar issues):\n\n```bash\n# Add to docs\u002Fsolutions\u002Fpatterns\u002Fcommon-solutions.md\ncat >> docs\u002Fsolutions\u002Fpatterns\u002Fcommon-solutions.md \u003C\u003C 'EOF'\n\n## [Pattern Name]\n\n**Common symptom:** [Description]\n**Root cause:** [Technical explanation]\n**Solution pattern:** [General approach]\n\n**Examples:**\n- [Link to doc 1]\n- [Link to doc 2]\n- [Link to doc 3]\nEOF\n```\n\n**Critical Pattern Detection (Optional Proactive Suggestion):**\n\nIf this issue has automatic indicators suggesting it might be critical:\n- Severity: `critical` in YAML\n- Affects multiple modules OR foundational stage (Stage 2 or 3)\n- Non-obvious solution\n\nThen in the decision menu (Step 8), add a note:\n```\n? This might be worth adding to Required Reading (Option 2)\n```\n\nBut **NEVER auto-promote**. User decides via decision menu (Option 2).\n\n**Template for critical pattern addition:**\n\nWhen user selects Option 2 (Add to Required Reading), use the template from `assets\u002Fcritical-pattern-template.md` to structure the pattern entry. Number it sequentially based on existing patterns in `docs\u002Fsolutions\u002Fpatterns\u002Fcritical-patterns.md`.\n\u003C\u002Fstep>\n\n\u003C\u002Fcritical_sequence>\n\n---\n\n\u003Cdecision_gate name=\"post-documentation\" wait_for_user=\"true\">\n\n## Decision Menu After Capture\n\nAfter successful documentation, present options and WAIT for user response:\n\n```\n✓ Solution documented\n\nFile created:\n- docs\u002Fsolutions\u002F[category]\u002F[filename].md\n\nWhat's next?\n1. Continue workflow (recommended)\n2. Add to Required Reading - Promote to critical patterns (critical-patterns.md)\n3. Link related issues - Connect to similar problems\n4. Add to existing skill - Add to a learning skill (e.g., hotwire-native)\n5. Create new skill - Extract into new learning skill\n6. View documentation - See what was captured\n7. Other\n```\n\n**Handle responses:**\n\n**Option 1: Continue workflow**\n\n- Return to calling skill\u002Fworkflow\n- Documentation is complete\n\n**Option 2: Add to Required Reading** ⭐ PRIMARY PATH FOR CRITICAL PATTERNS\n\nUser selects this when:\n- System made this mistake multiple times across different modules\n- Solution is non-obvious but must be followed every time\n- Foundational requirement (Rails, Rails API, threading, etc.)\n\nAction:\n1. Extract pattern from the documentation\n2. Format as ❌ WRONG vs ✅ CORRECT with code examples\n3. Add to `docs\u002Fsolutions\u002Fpatterns\u002Fcritical-patterns.md`\n4. Add cross-reference back to this doc\n5. Confirm: \"✓ Added to Required Reading. All subagents will see this pattern before code generation.\"\n\n**Option 3: Link related issues**\n\n- Prompt: \"Which doc to link? (provide filename or describe)\"\n- Search docs\u002Fsolutions\u002F for the doc\n- Add cross-reference to both docs\n- Confirm: \"✓ Cross-reference added\"\n\n**Option 4: Add to existing skill**\n\nUser selects this when the documented solution relates to an existing learning skill:\n\nAction:\n1. Prompt: \"Which skill? (hotwire-native, etc.)\"\n2. Determine which reference file to update (resources.md, patterns.md, or examples.md)\n3. Add link and brief description to appropriate section\n4. Confirm: \"✓ Added to [skill-name] skill in [file]\"\n\nExample: For Hotwire Native Tailwind variants solution:\n- Add to `hotwire-native\u002Freferences\u002Fresources.md` under \"Project-Specific Resources\"\n- Add to `hotwire-native\u002Freferences\u002Fexamples.md` with link to solution doc\n\n**Option 5: Create new skill**\n\nUser selects this when the solution represents the start of a new learning domain:\n\nAction:\n1. Prompt: \"What should the new skill be called? (e.g., stripe-billing, email-processing)\"\n2. Run `python3 .claude\u002Fskills\u002Fskill-creator\u002Fscripts\u002Finit_skill.py [skill-name]`\n3. Create initial reference files with this solution as first example\n4. Confirm: \"✓ Created new [skill-name] skill with this solution as first example\"\n\n**Option 6: View documentation**\n\n- Display the created documentation\n- Present decision menu again\n\n**Option 7: Other**\n\n- Ask what they'd like to do\n\n\u003C\u002Fdecision_gate>\n\n---\n\n\u003Cintegration_protocol>\n\n## Integration Points\n\n**Invoked by:**\n- \u002Fcompound command (primary interface)\n- Manual invocation in conversation after solution confirmed\n- Can be triggered by detecting confirmation phrases like \"that worked\", \"it's fixed\", etc.\n\n**Invokes:**\n- None (terminal skill - does not delegate to other skills)\n\n**Handoff expectations:**\nAll context needed for documentation should be present in conversation history before invocation.\n\n\u003C\u002Fintegration_protocol>\n\n---\n\n\u003Csuccess_criteria>\n\n## Success Criteria\n\nDocumentation is successful when ALL of the following are true:\n\n- ✅ YAML frontmatter validated (all required fields, correct formats)\n- ✅ File created in docs\u002Fsolutions\u002F[category]\u002F[filename].md\n- ✅ Enum values match schema.yaml exactly\n- ✅ Code examples included in solution section\n- ✅ Cross-references added if related issues found\n- ✅ User presented with decision menu and action confirmed\n\n\u003C\u002Fsuccess_criteria>\n\n---\n\n## Error Handling\n\n**Missing context:**\n\n- Ask user for missing details\n- Don't proceed until critical info provided\n\n**YAML validation failure:**\n\n- Show specific errors\n- Present retry with corrected values\n- BLOCK until valid\n\n**Similar issue ambiguity:**\n\n- Present multiple matches\n- Let user choose: new doc, update existing, or link as duplicate\n\n**Module not in modules documentation:**\n\n- Warn but don't block\n- Proceed with documentation\n- Suggest: \"Add [Module] to modules documentation if not there\"\n\n---\n\n## Execution Guidelines\n\n**MUST do:**\n- Validate YAML frontmatter (BLOCK if invalid per Step 5 validation gate)\n- Extract exact error messages from conversation\n- Include code examples in solution section\n- Create directories before writing files (`mkdir -p`)\n- Ask user and WAIT if critical context missing\n\n**MUST NOT do:**\n- Skip YAML validation (validation gate is blocking)\n- Use vague descriptions (not searchable)\n- Omit code examples or cross-references\n\n---\n\n## Quality Guidelines\n\n**Good documentation has:**\n\n- ✅ Exact error messages (copy-paste from output)\n- ✅ Specific file:line references\n- ✅ Observable symptoms (what you saw, not interpretations)\n- ✅ Failed attempts documented (helps avoid wrong paths)\n- ✅ Technical explanation (not just \"what\" but \"why\")\n- ✅ Code examples (before\u002Fafter if applicable)\n- ✅ Prevention guidance (how to catch early)\n- ✅ Cross-references (related issues)\n\n**Avoid:**\n\n- ❌ Vague descriptions (\"something was wrong\")\n- ❌ Missing technical details (\"fixed the code\")\n- ❌ No context (which version? which file?)\n- ❌ Just code dumps (explain why it works)\n- ❌ No prevention guidance\n- ❌ No cross-references\n\n---\n\n## Example Scenario\n\n**User:** \"That worked! The N+1 query is fixed.\"\n\n**Skill activates:**\n\n1. **Detect confirmation:** \"That worked!\" triggers auto-invoke\n2. **Gather context:**\n   - Module: Brief System\n   - Symptom: Brief generation taking >5 seconds, N+1 query when loading email threads\n   - Failed attempts: Added pagination (didn't help), checked background job performance\n   - Solution: Added eager loading with `includes(:emails)` on Brief model\n   - Root cause: Missing eager loading causing separate database query per email thread\n3. **Check existing:** No similar issue found\n4. **Generate filename:** `n-plus-one-brief-generation-BriefSystem-20251110.md`\n5. **Validate YAML:**\n   ```yaml\n   module: Brief System\n   date: 2025-11-10\n   problem_type: performance_issue\n   component: rails_model\n   symptoms:\n     - \"N+1 query when loading email threads\"\n     - \"Brief generation taking >5 seconds\"\n   root_cause: missing_include\n   severity: high\n   tags: [n-plus-one, eager-loading, performance]\n   ```\n   ✅ Valid\n6. **Create documentation:**\n   - `docs\u002Fsolutions\u002Fperformance-issues\u002Fn-plus-one-brief-generation-BriefSystem-20251110.md`\n7. **Cross-reference:** None needed (no similar issues)\n\n**Output:**\n\n```\n✓ Solution documented\n\nFile created:\n- docs\u002Fsolutions\u002Fperformance-issues\u002Fn-plus-one-brief-generation-BriefSystem-20251110.md\n\nWhat's next?\n1. Continue workflow (recommended)\n2. Add to Required Reading - Promote to critical patterns (critical-patterns.md)\n3. Link related issues - Connect to similar problems\n4. Add to existing skill - Add to a learning skill (e.g., hotwire-native)\n5. Create new skill - Extract into new learning skill\n6. View documentation - See what was captured\n7. Other\n```\n\n---\n\n## Future Enhancements\n\n**Not in Phase 7 scope, but potential:**\n\n- Search by date range\n- Filter by severity\n- Tag-based search interface\n- Metrics (most common issues, resolution time)\n- Export to shareable format (community knowledge sharing)\n- Import community solutions\n",{"name":5,"description":7,"allowed-tools":43,"preconditions":47,"disable-model-invocation":50},[44,45,33,46],"Read","Write","Grep",[48,49],"Problem has been solved (not in-progress)","Solution has been verified working",true,"codex\u002Ffeat\u002Fbead-0-import-bootstrap","fcee358ce06652adf6e1dacc6351e05f12bc3988","plugins\u002Fcompound-engineering\u002Fskills\u002Fcompound-docs","https:\u002F\u002Fgithub.com\u002Fapollostreetcompany\u002Fcodex-compound","https:\u002F\u002Fgithub.com\u002Fapollostreetcompany","2026-03-25 18:12:52",{"source":8,"skillName":5,"commands":58,"prompt":68,"zipAvailable":50},[59,62,65],{"tool":60,"command":61},"npx","npx skills add apollostreetcompany\u002Fcodex-compound --skill compound-docs",{"tool":63,"command":64},"bunx","bunx skills add apollostreetcompany\u002Fcodex-compound --skill compound-docs",{"tool":66,"command":67},"pnpm","pnpm dlx skills add apollostreetcompany\u002Fcodex-compound --skill compound-docs","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fapollostreetcompany\u002Fcodex-compound\u002Fblob\u002Fcodex\u002Ffeat\u002Fbead-0-import-bootstrap\u002Fplugins\u002Fcompound-engineering\u002Fskills\u002Fcompound-docs\u002FSKILL.md",[70,76,80,86],{"path":71,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":74,"sourceHtmlUrl":75},"assets\u002Fcritical-pattern-template.md","ASSET","资产文件",875,"https:\u002F\u002Fgithub.com\u002Fapollostreetcompany\u002Fcodex-compound\u002Fblob\u002Fcodex\u002Ffeat\u002Fbead-0-import-bootstrap\u002Fplugins\u002Fcompound-engineering\u002Fskills\u002Fcompound-docs\u002Fassets\u002Fcritical-pattern-template.md",{"path":77,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":78,"sourceHtmlUrl":79},"assets\u002Fresolution-template.md",3162,"https:\u002F\u002Fgithub.com\u002Fapollostreetcompany\u002Fcodex-compound\u002Fblob\u002Fcodex\u002Ffeat\u002Fbead-0-import-bootstrap\u002Fplugins\u002Fcompound-engineering\u002Fskills\u002Fcompound-docs\u002Fassets\u002Fresolution-template.md",{"path":81,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":84,"sourceHtmlUrl":85},"references\u002Fyaml-schema.md","REFERENCE","参考文档",3104,"https:\u002F\u002Fgithub.com\u002Fapollostreetcompany\u002Fcodex-compound\u002Fblob\u002Fcodex\u002Ffeat\u002Fbead-0-import-bootstrap\u002Fplugins\u002Fcompound-engineering\u002Fskills\u002Fcompound-docs\u002Freferences\u002Fyaml-schema.md",{"path":87,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":88,"sourceHtmlUrl":89},"schema.yaml",6902,"https:\u002F\u002Fgithub.com\u002Fapollostreetcompany\u002Fcodex-compound\u002Fblob\u002Fcodex\u002Ffeat\u002Fbead-0-import-bootstrap\u002Fplugins\u002Fcompound-engineering\u002Fskills\u002Fcompound-docs\u002Fschema.yaml",[91,101,111,119,126,140],{"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":38},"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",[],[98,99,100],"skill one","sample skill","sample",{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":38},"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",[],[108,26,109,25,110],"disabled skill","with model","model",{"skillNo":112,"name":113,"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":114,"categories":115,"keywords":116,"publishedAt":38},"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",[],[117,118],"default skill","default",{"skillNo":120,"name":121,"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":122,"categories":123,"keywords":124,"publishedAt":38},"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",[],[125],"custom skill",{"skillNo":127,"name":128,"nameZh":6,"description":129,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":130,"categories":131,"keywords":132,"publishedAt":38},"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",[],[128,133,23,25,134,135,136,137,138,139],"source","type","todo","categorize","list","system","cli",{"skillNo":141,"name":142,"nameZh":6,"description":143,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":144,"categories":145,"keywords":146,"publishedAt":38},"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",[],[147,148,149,150,25,151,152,153,154,155,118,156,157],"test","test xcode","xcode","build and test","scheme","xcodebuildmcp","apps","name","build","use","ios"]