PluginBench
Skill
Pass
Audit score 90

compound-docs

everyinc/compound-engineering-plugin

Capture solved problems as categorized documentation with YAML frontmatter for fast lookup

What is compound-docs?

Automatically documents verified problem solutions into a searchable knowledge base organized by symptom category. Use this after confirming a fix to build institutional memory that future sessions can quickly reference.

  • Detects problem resolution via confirmation phrases ("that worked", "it's fixed", etc.) or manual `/doc-fix` command
  • Extracts context from conversation history: module name, symptom, investigation attempts, root cause, solution, and prevention steps
  • Validates YAML frontmatter against enum schema before creating documentation
  • Generates categorized markdown files in `docs/solutions/[category]/` with consistent naming
  • Searches existing documentation for similar issues and offers cross-referencing options
  • Detects common patterns across 3+ similar issues and suggests adding to critical patterns

How to install compound-docs

npx skills add https://github.com/everyinc/compound-engineering-plugin --skill compound-docs
Prerequisites
  • Problem must be solved and verified working (not in-progress)
  • Conversation history available with problem context
  • docs/solutions/ directory structure (created automatically)
  • schema.yaml and assets/resolution-template.md files present
Claude Code
Cursor
Windsurf
Cline

How to use compound-docs

  1. 1.Confirm the problem is fixed using phrases like "that worked" or "it's fixed", or manually invoke `/doc-fix`
  2. 2.Provide missing context if prompted: module name, exact error message, stage, and resolution steps
  3. 3.Review similar issues if found and choose to create new doc or update existing one
  4. 4.Validate YAML frontmatter against the schema (tool will block if invalid)
  5. 5.Review the generated documentation file in docs/solutions/[category]/
  6. 6.Choose post-documentation action: continue workflow, add to critical patterns, link related issues, or create learning skill

Use cases

Good for
  • Document a tricky Rails debugging session so the team doesn't repeat the same investigation next time
  • Capture non-obvious configuration fixes with exact error messages for future reference
  • Build searchable knowledge base of module-specific issues organized by symptom type
  • Create cross-referenced documentation when multiple related problems share a root cause
  • Identify recurring patterns and promote critical solutions to required reading
Who it's for
  • Engineering teams building institutional knowledge
  • Developers working through multi-stage implementation (Stages 0-6)
  • Teams using Rails with module-based architecture
  • Anyone needing fast lookup of previously solved problems

compound-docs FAQ

When should I document a problem?

Document non-trivial problems that required multiple investigation attempts, tricky debugging, or non-obvious solutions. Skip simple typos, obvious syntax errors, and trivial fixes immediately corrected.

What happens if I'm missing critical context?

The skill will ask for required details: module name, exact error message, stage, and resolution steps. It will wait for your response before proceeding to documentation creation.

Can I document a problem that's similar to an existing one?

Yes. The skill searches existing docs and presents options: create a new doc with cross-reference (recommended), update the existing doc if the root cause is identical, or skip. You decide.

What if YAML validation fails?

The skill will show validation errors and block documentation creation. Provide corrected values matching the enum schema (problem_type, severity, symptoms, etc.) before proceeding.

How are files organized?

Files are organized by symptom category in docs/solutions/[category]/ with names like `missing-include-BriefSystem-20251110.md`. Categories are determined by the problem_type enum in schema.yaml.

Full instructions (SKILL.md)

Source of truth, from everyinc/compound-engineering-plugin.


name: compound-docs description: Capture solved problems as categorized documentation with YAML frontmatter for fast lookup disable-model-invocation: true allowed-tools:

  • Read # Parse conversation context
  • Write # Create resolution docs
  • Bash # Create directories
  • Grep # Search existing docs preconditions:
  • Problem has been solved (not in-progress)
  • Solution has been verified working

compound-docs Skill

Purpose: Automatically document solved problems to build searchable institutional knowledge with category-based organization (enum-validated problem types).

Overview

This skill captures problem solutions immediately after confirmation, creating structured documentation that serves as a searchable knowledge base for future sessions.

Organization: Single-file architecture - each problem documented as one markdown file in its symptom category directory (e.g., docs/solutions/performance-issues/n-plus-one-briefs.md). Files use YAML frontmatter for metadata and searchability.


<critical_sequence name="documentation-capture" enforce_order="strict">

7-Step Process

<step number="1" required="true"> ### Step 1: Detect Confirmation

Auto-invoke after phrases:

  • "that worked"
  • "it's fixed"
  • "working now"
  • "problem solved"
  • "that did it"

OR manual: /doc-fix command

Non-trivial problems only:

  • Multiple investigation attempts needed
  • Tricky debugging that took time
  • Non-obvious solution
  • Future sessions would benefit

Skip documentation for:

  • Simple typos
  • Obvious syntax errors
  • Trivial fixes immediately corrected </step>
<step number="2" required="true" depends_on="1"> ### Step 2: Gather Context

Extract from conversation history:

Required information:

  • Module name: Which module or component had the problem
  • Symptom: Observable error/behavior (exact error messages)
  • Investigation attempts: What didn't work and why
  • Root cause: Technical explanation of actual problem
  • Solution: What fixed it (code/config changes)
  • Prevention: How to avoid in future

Environment details:

  • Rails version
  • Stage (0-6 or post-implementation)
  • OS version
  • File/line references

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:

I need a few details to document this properly:

1. Which module had this issue? [ModuleName]
2. What was the exact error message or symptom?
3. What stage were you in? (0-6 or post-implementation)

[Continue after user provides details]
</step> <step number="3" required="false" depends_on="2"> ### Step 3: Check Existing Docs

Search docs/solutions/ for similar issues:

# Search by error message keywords
grep -r "exact error phrase" docs/solutions/

# Search by symptom category
ls docs/solutions/[category]/

IF similar issue found:

THEN present decision options:

Found similar issue: docs/solutions/[path]

What's next?
1. Create new doc with cross-reference (recommended)
2. Update existing doc (only if same root cause)
3. Other

Choose (1-3): _

WAIT for user response, then execute chosen action.

ELSE (no similar issue found):

Proceed directly to Step 4 (no user interaction needed). </step>

<step number="4" required="true" depends_on="2"> ### Step 4: Generate Filename

Format: [sanitized-symptom]-[module]-[YYYYMMDD].md

Sanitization rules:

  • Lowercase
  • Replace spaces with hyphens
  • Remove special characters except hyphens
  • Truncate to reasonable length (< 80 chars)

Examples:

  • missing-include-BriefSystem-20251110.md
  • parameter-not-saving-state-EmailProcessing-20251110.md
  • webview-crash-on-resize-Assistant-20251110.md </step>
<step number="5" required="true" depends_on="4" blocking="true"> ### Step 5: Validate YAML Schema

CRITICAL: All docs require validated YAML frontmatter with enum validation.

<validation_gate name="yaml-schema" blocking="true">

Validate against schema: Load schema.yaml and classify the problem against the enum values defined in yaml-schema.md. Ensure all required fields are present and match allowed values exactly.

BLOCK if validation fails:

❌ YAML validation failed

Errors:
- problem_type: must be one of schema enums, got "compilation_error"
- severity: must be one of [critical, high, medium, low], got "invalid"
- symptoms: must be array with 1-5 items, got string

Please provide corrected values.

GATE ENFORCEMENT: Do NOT proceed to Step 6 (Create Documentation) until YAML frontmatter passes all validation rules defined in schema.yaml.

</validation_gate> </step>

<step number="6" required="true" depends_on="5"> ### Step 6: Create Documentation

Determine category from problem_type: Use the category mapping defined in yaml-schema.md (lines 49-61).

Create documentation file:

PROBLEM_TYPE="[from validated YAML]"
CATEGORY="[mapped from problem_type]"
FILENAME="[generated-filename].md"
DOC_PATH="docs/solutions/${CATEGORY}/${FILENAME}"

# Create directory if needed
mkdir -p "docs/solutions/${CATEGORY}"

# Write documentation using template from assets/resolution-template.md
# (Content populated with Step 2 context and validated YAML frontmatter)

Result:

  • Single file in category directory
  • Enum validation ensures consistent categorization

Create documentation: Populate the structure from assets/resolution-template.md with context gathered in Step 2 and validated YAML frontmatter from Step 5. </step>

<step number="7" required="false" depends_on="6"> ### Step 7: Cross-Reference & Critical Pattern Detection

If similar issues found in Step 3:

Update existing doc:

# Add Related Issues link to similar doc
echo "- See also: [$FILENAME]($REAL_FILE)" >> [similar-doc.md]

Update new doc: Already includes cross-reference from Step 6.

Update patterns if applicable:

If this represents a common pattern (3+ similar issues):

# Add to docs/solutions/patterns/common-solutions.md
cat >> docs/solutions/patterns/common-solutions.md << 'EOF'

## [Pattern Name]

**Common symptom:** [Description]
**Root cause:** [Technical explanation]
**Solution pattern:** [General approach]

**Examples:**
- [Link to doc 1]
- [Link to doc 2]
- [Link to doc 3]
EOF

Critical Pattern Detection (Optional Proactive Suggestion):

If this issue has automatic indicators suggesting it might be critical:

  • Severity: critical in YAML
  • Affects multiple modules OR foundational stage (Stage 2 or 3)
  • Non-obvious solution

Then in the decision menu (Step 8), add a note:

💡 This might be worth adding to Required Reading (Option 2)

But NEVER auto-promote. User decides via decision menu (Option 2).

Template for critical pattern addition:

When user selects Option 2 (Add to Required Reading), use the template from assets/critical-pattern-template.md to structure the pattern entry. Number it sequentially based on existing patterns in docs/solutions/patterns/critical-patterns.md. </step>

</critical_sequence>


<decision_gate name="post-documentation" wait_for_user="true">

Decision Menu After Capture

After successful documentation, present options and WAIT for user response:

✓ Solution documented

File created:
- docs/solutions/[category]/[filename].md

What's next?
1. Continue workflow (recommended)
2. Add to Required Reading - Promote to critical patterns (critical-patterns.md)
3. Link related issues - Connect to similar problems
4. Add to existing skill - Add to a learning skill (e.g., hotwire-native)
5. Create new skill - Extract into new learning skill
6. View documentation - See what was captured
7. Other

Handle responses:

Option 1: Continue workflow

  • Return to calling skill/workflow
  • Documentation is complete

Option 2: Add to Required Reading ⭐ PRIMARY PATH FOR CRITICAL PATTERNS

User selects this when:

  • System made this mistake multiple times across different modules
  • Solution is non-obvious but must be followed every time
  • Foundational requirement (Rails, Rails API, threading, etc.)

Action:

  1. Extract pattern from the documentation
  2. Format as ❌ WRONG vs ✅ CORRECT with code examples
  3. Add to docs/solutions/patterns/critical-patterns.md
  4. Add cross-reference back to this doc
  5. Confirm: "✓ Added to Required Reading. All subagents will see this pattern before code generation."

Option 3: Link related issues

  • Prompt: "Which doc to link? (provide filename or describe)"
  • Search docs/solutions/ for the doc
  • Add cross-reference to both docs
  • Confirm: "✓ Cross-reference added"

Option 4: Add to existing skill

User selects this when the documented solution relates to an existing learning skill:

Action:

  1. Prompt: "Which skill? (hotwire-native, etc.)"
  2. Determine which reference file to update (resources.md, patterns.md, or examples.md)
  3. Add link and brief description to appropriate section
  4. Confirm: "✓ Added to [skill-name] skill in [file]"

Example: For Hotwire Native Tailwind variants solution:

  • Add to hotwire-native/references/resources.md under "Project-Specific Resources"
  • Add to hotwire-native/references/examples.md with link to solution doc

Option 5: Create new skill

User selects this when the solution represents the start of a new learning domain:

Action:

  1. Prompt: "What should the new skill be called? (e.g., stripe-billing, email-processing)"
  2. Run python3 .claude/skills/skill-creator/scripts/init_skill.py [skill-name]
  3. Create initial reference files with this solution as first example
  4. Confirm: "✓ Created new [skill-name] skill with this solution as first example"

Option 6: View documentation

  • Display the created documentation
  • Present decision menu again

Option 7: Other

  • Ask what they'd like to do

</decision_gate>


<integration_protocol>

Integration Points

Invoked by:

  • /compound command (primary interface)
  • Manual invocation in conversation after solution confirmed
  • Can be triggered by detecting confirmation phrases like "that worked", "it's fixed", etc.

Invokes:

  • None (terminal skill - does not delegate to other skills)

Handoff expectations: All context needed for documentation should be present in conversation history before invocation.

</integration_protocol>


<success_criteria>

Success Criteria

Documentation is successful when ALL of the following are true:

  • ✅ YAML frontmatter validated (all required fields, correct formats)
  • ✅ File created in docs/solutions/[category]/[filename].md
  • ✅ Enum values match schema.yaml exactly
  • ✅ Code examples included in solution section
  • ✅ Cross-references added if related issues found
  • ✅ User presented with decision menu and action confirmed

</success_criteria>


Error Handling

Missing context:

  • Ask user for missing details
  • Don't proceed until critical info provided

YAML validation failure:

  • Show specific errors
  • Present retry with corrected values
  • BLOCK until valid

Similar issue ambiguity:

  • Present multiple matches
  • Let user choose: new doc, update existing, or link as duplicate

Module not in modules documentation:

  • Warn but don't block
  • Proceed with documentation
  • Suggest: "Add [Module] to modules documentation if not there"

Execution Guidelines

MUST do:

  • Validate YAML frontmatter (BLOCK if invalid per Step 5 validation gate)
  • Extract exact error messages from conversation
  • Include code examples in solution section
  • Create directories before writing files (mkdir -p)
  • Ask user and WAIT if critical context missing

MUST NOT do:

  • Skip YAML validation (validation gate is blocking)
  • Use vague descriptions (not searchable)
  • Omit code examples or cross-references

Quality Guidelines

Good documentation has:

  • ✅ Exact error messages (copy-paste from output)
  • ✅ Specific file:line references
  • ✅ Observable symptoms (what you saw, not interpretations)
  • ✅ Failed attempts documented (helps avoid wrong paths)
  • ✅ Technical explanation (not just "what" but "why")
  • ✅ Code examples (before/after if applicable)
  • ✅ Prevention guidance (how to catch early)
  • ✅ Cross-references (related issues)

Avoid:

  • ❌ Vague descriptions ("something was wrong")
  • ❌ Missing technical details ("fixed the code")
  • ❌ No context (which version? which file?)
  • ❌ Just code dumps (explain why it works)
  • ❌ No prevention guidance
  • ❌ No cross-references

Example Scenario

User: "That worked! The N+1 query is fixed."

Skill activates:

  1. Detect confirmation: "That worked!" triggers auto-invoke
  2. Gather context:
    • Module: Brief System
    • Symptom: Brief generation taking >5 seconds, N+1 query when loading email threads
    • Failed attempts: Added pagination (didn't help), checked background job performance
    • Solution: Added eager loading with includes(:emails) on Brief model
    • Root cause: Missing eager loading causing separate database query per email thread
  3. Check existing: No similar issue found
  4. Generate filename: n-plus-one-brief-generation-BriefSystem-20251110.md
  5. Validate YAML:
    module: Brief System
    date: 2025-11-10
    problem_type: performance_issue
    component: rails_model
    symptoms:
      - "N+1 query when loading email threads"
      - "Brief generation taking >5 seconds"
    root_cause: missing_include
    severity: high
    tags: [n-plus-one, eager-loading, performance]
    
    ✅ Valid
  6. Create documentation:
    • docs/solutions/performance-issues/n-plus-one-brief-generation-BriefSystem-20251110.md
  7. Cross-reference: None needed (no similar issues)

Output:

✓ Solution documented

File created:
- docs/solutions/performance-issues/n-plus-one-brief-generation-BriefSystem-20251110.md

What's next?
1. Continue workflow (recommended)
2. Add to Required Reading - Promote to critical patterns (critical-patterns.md)
3. Link related issues - Connect to similar problems
4. Add to existing skill - Add to a learning skill (e.g., hotwire-native)
5. Create new skill - Extract into new learning skill
6. View documentation - See what was captured
7. Other

Future Enhancements

Not in Phase 7 scope, but potential:

  • Search by date range
  • Filter by severity
  • Tag-based search interface
  • Metrics (most common issues, resolution time)
  • Export to shareable format (community knowledge sharing)
  • Import community solutions

Related skills

More from everyinc/compound-engineering-plugin and the wider catalog.

DHdhh-rails-style logo

dhh-rails-style

everyinc/compound-engineering-plugin

This skill should be used when writing Ruby and Rails code in DHH's distinctive 37signals style. It applies when writing Ruby code, Rails applications, creating models, controllers, or any Ruby file. Triggers on Ruby/Rails code generation, refactoring requests, code review, or when the user mentions DHH, 37signals, Basecamp, HEY, or Campfire style. Embodies REST purity, fat models, thin controllers, Current attributes, Hotwire patterns, and the "clarity over cleverness" philosophy.

709 installs
FRfrontend-design logo

frontend-design

everyinc/compound-engineering-plugin

Build web interfaces with genuine design quality, not AI slop. Use for any frontend work - landing pages, web apps, dashboards, admin panels, components, interactive experiences. Activates for both greenfield builds and modifications to existing applications. Detects existing design systems and respects them. Covers composition, typography, color, motion, and copy. Verifies results via screenshots before declaring done.

625 installsAudited
GEgemini-imagegen logo

gemini-imagegen

everyinc/compound-engineering-plugin

This skill should be used when generating and editing images using the Gemini API (Nano Banana Pro). It applies when creating images from text prompts, editing existing images, applying style transfers, generating logos with text, creating stickers, product mockups, or any image generation/manipulation task. Supports text-to-image, image editing, multi-turn refinement, and composition from multiple reference images.

625 installs
GIgit-worktree logo

git-worktree

everyinc/compound-engineering-plugin

This skill manages Git worktrees for isolated parallel development. It handles creating, listing, switching, and cleaning up worktrees with a simple interactive interface, following KISS principles.

626 installs
LFlfg logo

lfg

everyinc/compound-engineering-plugin

Run a complete hands-off engineering pipeline from planning through a green PR.

2.2k installs
ANanalyze-logs logo

analyze-logs

evlog.dev

Debug application behavior by analyzing structured logs from evlog's file system drain.

1.7k installs