npx claudepluginhub adamfeldman/compound-workflows --plugin compound-workflowsThis skill uses the workspace's default tool permissions.
Capture problem solutions while context is fresh. Uses parallel subagents with disk persistence.
Creates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
Capture problem solutions while context is fresh. Uses parallel subagents with disk persistence.
/do:compound # Document the most recent fix
/do:compound [brief context] # Provide additional context hint
Assess whether this is a code solution or analytical/strategic finding:
| Signal | Code Solution | Analytical/Strategic |
|---|---|---|
| Artifacts | Code changes, config fixes, test results | Documents, models, research findings, decisions |
| Verification | Tests pass, bug no longer reproduces | Evidence checked against primary sources, logic validated |
| Value | "Next time this breaks, do X" | "Next time this question comes up, here's what we found" |
If analytical/strategic: Use the modified agent prompts and doc template described below. The same Phase 1->2->3 structure applies, but agents focus on different things.
Derive a short topic stem from the problem or finding being compounded (e.g., redis-cache-invalidation or api-versioning-strategy). Use lowercase, hyphens, 3-6 words max.
Resolve main root for .workflows/ paths: Run git worktree list --porcelain | head -1 | sed 's/^worktree //' to get the main repo root. Set WORKFLOWS_ROOT=<main-root>/.workflows. All .workflows/ paths in this skill use $WORKFLOWS_ROOT, NOT relative .workflows/. This ensures artifacts survive worktree lifecycle transitions and are shared across sessions.
mkdir -p $WORKFLOWS_ROOT/compound-research/<topic-stem>/agents
Launch 5 subagents in parallel with run_in_background: true:
1. Context Analyzer
Task general-purpose (run_in_background: true): "
You are a context analyzer specializing in problem classification and root cause identification. Analyze the conversation history. Identify problem type, component, symptoms.
Validate against schema categories: build-errors, test-failures, runtime-errors,
performance-issues, database-issues, security-issues, ui-bugs, integration-issues, logic-errors.
=== OUTPUT INSTRUCTIONS (MANDATORY) ===
Write YAML frontmatter skeleton to: $WORKFLOWS_ROOT/compound-research/<topic-stem>/agents/context.md
Return ONLY a 2-3 sentence summary.
"
2. Solution Extractor
Task general-purpose (run_in_background: true): "
You are a solution extractor specializing in distilling actionable knowledge from problem-solving sessions. Extract the key solution, evidence chain, alternatives considered and why they were rejected, and the decision rationale.
=== OUTPUT INSTRUCTIONS (MANDATORY) ===
Write findings to: $WORKFLOWS_ROOT/compound-research/<topic-stem>/agents/solution.md
Return ONLY a 2-3 sentence summary.
"
3. Related Docs Finder
Task general-purpose (run_in_background: true): "
You are a documentation researcher specializing in connecting new findings to existing institutional knowledge. Find related brainstorms, plans, solutions, and prior analyses. Map how this finding connects to existing knowledge.
=== OUTPUT INSTRUCTIONS (MANDATORY) ===
Write findings to: $WORKFLOWS_ROOT/compound-research/<topic-stem>/agents/related-docs.md
Return ONLY a 2-3 sentence summary.
"
4. Prevention Strategist
Task general-purpose (run_in_background: true): "
You are a prevention strategist specializing in root cause analysis and recurrence prevention. Identify: How could this have been caught earlier? What systemic changes would prevent recurrence? What monitoring or tests should be added?
=== OUTPUT INSTRUCTIONS (MANDATORY) ===
Write findings to: $WORKFLOWS_ROOT/compound-research/<topic-stem>/agents/prevention.md
Return ONLY a 2-3 sentence summary.
"
5. Category Classifier
Task general-purpose (run_in_background: true): "
You are a knowledge classifier specializing in taxonomizing technical findings for future retrieval. Classify the problem type and determine the best category directory for the solution document.
=== OUTPUT INSTRUCTIONS (MANDATORY) ===
Write findings to: $WORKFLOWS_ROOT/compound-research/<topic-stem>/agents/category.md
Return ONLY a 2-3 sentence summary.
"
Monitor completion via file existence. DO NOT call TaskOutput.
When in analytical/strategic mode, the same 5 agents run but with adapted focus:
After all Phase 1 agents complete:
$WORKFLOWS_ROOT/compound-research/<topic-stem>/agents/origin_plan: docs/plans/YYYY-MM-DD-<name>-plan.md # if traceable
origin_brainstorm: docs/brainstorms/YYYY-MM-DD-<name>-brainstorm.md # if traceable
Trace the origin chain: check recent git log, beads issues, or conversation context for the plan and brainstorm that led to this solution. If not traceable, omit the fields.mkdir -p docs/solutions/[category]/docs/solutions/[category]/[filename].mdBased on problem type, optionally run specialized review agents:
Task performance-oracle (run_in_background: true): "You are a performance specialist. Review the solution for performance implications, scalability concerns, and optimization opportunities.
Read the solution doc at: docs/solutions/[category]/[filename].md
=== OUTPUT INSTRUCTIONS (MANDATORY) ===
Write findings to: $WORKFLOWS_ROOT/compound-research/<topic-stem>/agents/perf-review.md
Return ONLY a 2-3 sentence summary."
Task security-sentinel (run_in_background: true): "You are a security reviewer. Review the solution for security implications, vulnerability exposure, and hardening opportunities.
Read the solution doc at: docs/solutions/[category]/[filename].md
=== OUTPUT INSTRUCTIONS (MANDATORY) ===
Write findings to: $WORKFLOWS_ROOT/compound-research/<topic-stem>/agents/security-review.md
Return ONLY a 2-3 sentence summary."
Task data-integrity-guardian (run_in_background: true): "You are a data integrity specialist. Review the solution for data consistency, migration safety, and schema implications.
Read the solution doc at: docs/solutions/[category]/[filename].md
=== OUTPUT INSTRUCTIONS (MANDATORY) ===
Write findings to: $WORKFLOWS_ROOT/compound-research/<topic-stem>/agents/data-review.md
Return ONLY a 2-3 sentence summary."
Run only the agents relevant to the problem type. Read output files and incorporate significant findings into the solution doc.
Do NOT delete research outputs. The research directory at $WORKFLOWS_ROOT/compound-research/<topic-stem>/ is retained for traceability and learning.
Single file: docs/solutions/[category]/[filename].md
Each documented solution compounds knowledge:
Each unit of engineering work should make subsequent units easier — not harder.