@every-env/compound-plugin 0.1.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/.claude/commands/triage-prs.md +193 -0
  2. package/.claude-plugin/marketplace.json +2 -2
  3. package/.github/workflows/ci.yml +25 -0
  4. package/README.md +22 -1
  5. package/docs/plans/2026-02-08-feat-pr-triage-and-merge-plan.md +128 -0
  6. package/docs/plans/2026-02-08-refactor-reduce-plugin-context-token-usage-plan.md +212 -0
  7. package/package.json +1 -1
  8. package/plans/grow-your-own-garden-plugin-architecture.md +1 -1
  9. package/plugins/compound-engineering/.claude-plugin/plugin.json +2 -2
  10. package/plugins/compound-engineering/CHANGELOG.md +58 -0
  11. package/plugins/compound-engineering/CLAUDE.md +3 -4
  12. package/plugins/compound-engineering/README.md +19 -7
  13. package/plugins/compound-engineering/agents/design/design-implementation-reviewer.md +16 -1
  14. package/plugins/compound-engineering/agents/design/design-iterator.md +28 -1
  15. package/plugins/compound-engineering/agents/design/figma-design-sync.md +19 -1
  16. package/plugins/compound-engineering/agents/docs/ankane-readme-writer.md +16 -1
  17. package/plugins/compound-engineering/agents/research/best-practices-researcher.md +16 -1
  18. package/plugins/compound-engineering/agents/research/framework-docs-researcher.md +16 -1
  19. package/plugins/compound-engineering/agents/research/git-history-analyzer.md +18 -1
  20. package/plugins/compound-engineering/agents/research/learnings-researcher.md +24 -3
  21. package/plugins/compound-engineering/agents/research/repo-research-analyst.md +22 -1
  22. package/plugins/compound-engineering/agents/review/agent-native-reviewer.md +16 -1
  23. package/plugins/compound-engineering/agents/review/architecture-strategist.md +16 -1
  24. package/plugins/compound-engineering/agents/review/code-simplicity-reviewer.md +17 -1
  25. package/plugins/compound-engineering/agents/review/data-integrity-guardian.md +16 -1
  26. package/plugins/compound-engineering/agents/review/data-migration-expert.md +16 -1
  27. package/plugins/compound-engineering/agents/review/deployment-verification-agent.md +16 -1
  28. package/plugins/compound-engineering/agents/review/dhh-rails-reviewer.md +22 -1
  29. package/plugins/compound-engineering/agents/review/julik-frontend-races-reviewer.md +20 -21
  30. package/plugins/compound-engineering/agents/review/kieran-python-reviewer.md +30 -1
  31. package/plugins/compound-engineering/agents/review/kieran-rails-reviewer.md +30 -1
  32. package/plugins/compound-engineering/agents/review/kieran-typescript-reviewer.md +30 -1
  33. package/plugins/compound-engineering/agents/review/pattern-recognition-specialist.md +16 -1
  34. package/plugins/compound-engineering/agents/review/performance-oracle.md +28 -1
  35. package/plugins/compound-engineering/agents/review/schema-drift-detector.md +154 -0
  36. package/plugins/compound-engineering/agents/review/security-sentinel.md +22 -1
  37. package/plugins/compound-engineering/agents/workflow/bug-reproduction-validator.md +16 -1
  38. package/plugins/compound-engineering/agents/workflow/every-style-editor.md +1 -1
  39. package/plugins/compound-engineering/agents/workflow/pr-comment-resolver.md +16 -1
  40. package/plugins/compound-engineering/agents/workflow/spec-flow-analyzer.md +22 -1
  41. package/plugins/compound-engineering/commands/agent-native-audit.md +1 -0
  42. package/plugins/compound-engineering/commands/changelog.md +1 -0
  43. package/plugins/compound-engineering/commands/create-agent-skill.md +1 -0
  44. package/plugins/compound-engineering/commands/deepen-plan.md +2 -2
  45. package/plugins/compound-engineering/commands/deploy-docs.md +1 -0
  46. package/plugins/compound-engineering/commands/generate_command.md +1 -0
  47. package/plugins/compound-engineering/commands/heal-skill.md +1 -0
  48. package/plugins/compound-engineering/commands/lfg.md +1 -0
  49. package/plugins/compound-engineering/commands/release-docs.md +1 -0
  50. package/plugins/compound-engineering/commands/report-bug.md +1 -0
  51. package/plugins/compound-engineering/commands/reproduce-bug.md +1 -0
  52. package/plugins/compound-engineering/commands/resolve_parallel.md +1 -0
  53. package/plugins/compound-engineering/commands/resolve_todo_parallel.md +2 -0
  54. package/plugins/compound-engineering/commands/slfg.md +32 -0
  55. package/plugins/compound-engineering/commands/technical_review.md +8 -0
  56. package/plugins/compound-engineering/commands/{xcode-test.md → test-xcode.md} +2 -1
  57. package/plugins/compound-engineering/commands/triage.md +1 -0
  58. package/plugins/compound-engineering/commands/workflows/brainstorm.md +11 -2
  59. package/plugins/compound-engineering/commands/workflows/compound.md +64 -27
  60. package/plugins/compound-engineering/commands/workflows/plan.md +9 -9
  61. package/plugins/compound-engineering/commands/workflows/review.md +12 -0
  62. package/plugins/compound-engineering/commands/workflows/work.md +71 -1
  63. package/plugins/compound-engineering/skills/compound-docs/SKILL.md +9 -8
  64. package/plugins/compound-engineering/skills/compound-docs/assets/critical-pattern-template.md +1 -1
  65. package/plugins/compound-engineering/skills/compound-docs/assets/resolution-template.md +3 -3
  66. package/plugins/compound-engineering/skills/compound-docs/references/yaml-schema.md +1 -1
  67. package/plugins/compound-engineering/skills/create-agent-skills/SKILL.md +168 -192
  68. package/plugins/compound-engineering/skills/create-agent-skills/references/official-spec.md +74 -125
  69. package/plugins/compound-engineering/skills/create-agent-skills/references/skill-structure.md +109 -329
  70. package/plugins/compound-engineering/skills/document-review/SKILL.md +87 -0
  71. package/plugins/compound-engineering/skills/file-todos/SKILL.md +1 -0
  72. package/plugins/compound-engineering/skills/git-worktree/scripts/worktree-manager.sh +2 -10
  73. package/plugins/compound-engineering/skills/orchestrating-swarms/SKILL.md +1718 -0
  74. package/plugins/compound-engineering/skills/resolve-pr-parallel/SKILL.md +89 -0
  75. package/plugins/compound-engineering/skills/resolve-pr-parallel/scripts/get-pr-comments +68 -0
  76. package/plugins/compound-engineering/skills/resolve-pr-parallel/scripts/resolve-pr-thread +23 -0
  77. package/plugins/compound-engineering/skills/skill-creator/SKILL.md +1 -0
  78. package/src/commands/sync.ts +84 -0
  79. package/src/converters/claude-to-codex.ts +61 -3
  80. package/src/converters/claude-to-opencode.ts +8 -5
  81. package/src/index.ts +2 -0
  82. package/src/parsers/claude-home.ts +65 -0
  83. package/src/parsers/claude.ts +4 -0
  84. package/src/sync/codex.ts +92 -0
  85. package/src/sync/opencode.ts +75 -0
  86. package/src/targets/codex.ts +7 -2
  87. package/src/targets/opencode.ts +6 -1
  88. package/src/types/claude.ts +3 -1
  89. package/src/utils/files.ts +13 -0
  90. package/src/utils/symlink.ts +43 -0
  91. package/tests/claude-parser.test.ts +24 -2
  92. package/tests/codex-converter.test.ts +121 -0
  93. package/tests/codex-writer.test.ts +32 -0
  94. package/tests/converter.test.ts +15 -0
  95. package/tests/fixtures/sample-plugin/commands/disabled-command.md +7 -0
  96. package/tests/fixtures/sample-plugin/skills/disabled-skill/SKILL.md +7 -0
  97. package/tests/opencode-writer.test.ts +32 -0
  98. package/plugins/compound-engineering/commands/plan_review.md +0 -7
  99. package/plugins/compound-engineering/commands/resolve_pr_parallel.md +0 -49
@@ -1,9 +1,30 @@
1
1
  ---
2
2
  name: spec-flow-analyzer
3
- description: "Use this agent when you have a specification, plan, feature description, or technical document that needs user flow analysis and gap identification. This agent should be used proactively when:\\n\\n<example>\\nContext: The user has just finished drafting a specification for OAuth implementation.\\nuser: \"Here's the OAuth spec for our new integration:\\n[OAuth spec details]\"\\nassistant: \"Let me use the spec-flow-analyzer agent to analyze this OAuth specification for user flows and missing elements.\"\\n<commentary>\\nSince the user has provided a specification document, use the Task tool to launch the spec-flow-analyzer agent to identify all user flows, edge cases, and missing clarifications.\\n</commentary>\\n</example>\\n\\n<example>\\nContext: The user is planning a new social sharing feature.\\nuser: \"I'm thinking we should add social sharing to posts. Users can share to Twitter, Facebook, and LinkedIn.\"\\nassistant: \"This sounds like a feature specification that would benefit from flow analysis. Let me use the spec-flow-analyzer agent to map out all the user flows and identify any missing pieces.\"\\n<commentary>\\nThe user is describing a new feature. Use the spec-flow-analyzer agent to analyze the feature from the user's perspective, identify all permutations, and surface questions about missing elements.\\n</commentary>\\n</example>\\n\\n<example>\\nContext: The user has created a plan for a new onboarding flow.\\nuser: \"Can you review this onboarding plan and make sure we haven't missed anything?\"\\nassistant: \"I'll use the spec-flow-analyzer agent to thoroughly analyze this onboarding plan from the user's perspective.\"\\n<commentary>\\nThe user is explicitly asking for review of a plan. Use the spec-flow-analyzer agent to identify all user flows, edge cases, and gaps in the specification.\\n</commentary>\\n</example>\\n\\nCall this agent when:\\n- A user presents a feature specification, plan, or requirements document\\n- A user asks to review or validate a design or implementation plan\\n- A user describes a new feature or integration that needs flow analysis\\n- After initial planning sessions to validate completeness\\n- Before implementation begins on complex user-facing features\\n- When stakeholders need clarity on user journeys and edge cases"
3
+ description: "Analyzes specifications and feature descriptions for user flow completeness and gap identification. Use when a spec, plan, or feature description needs flow analysis, edge case discovery, or requirements validation."
4
4
  model: inherit
5
5
  ---
6
6
 
7
+ <examples>
8
+ <example>
9
+ Context: The user has just finished drafting a specification for OAuth implementation.
10
+ user: "Here's the OAuth spec for our new integration: [OAuth spec details]"
11
+ assistant: "Let me use the spec-flow-analyzer agent to analyze this OAuth specification for user flows and missing elements."
12
+ <commentary>Since the user has provided a specification document, use the Task tool to launch the spec-flow-analyzer agent to identify all user flows, edge cases, and missing clarifications.</commentary>
13
+ </example>
14
+ <example>
15
+ Context: The user is planning a new social sharing feature.
16
+ user: "I'm thinking we should add social sharing to posts. Users can share to Twitter, Facebook, and LinkedIn."
17
+ assistant: "This sounds like a feature specification that would benefit from flow analysis. Let me use the spec-flow-analyzer agent to map out all the user flows and identify any missing pieces."
18
+ <commentary>The user is describing a new feature. Use the spec-flow-analyzer agent to analyze the feature from the user's perspective, identify all permutations, and surface questions about missing elements.</commentary>
19
+ </example>
20
+ <example>
21
+ Context: The user has created a plan for a new onboarding flow.
22
+ user: "Can you review this onboarding plan and make sure we haven't missed anything?"
23
+ assistant: "I'll use the spec-flow-analyzer agent to thoroughly analyze this onboarding plan from the user's perspective."
24
+ <commentary>The user is explicitly asking for review of a plan. Use the spec-flow-analyzer agent to identify all user flows, edge cases, and gaps in the specification.</commentary>
25
+ </example>
26
+ </examples>
27
+
7
28
  You are an elite User Experience Flow Analyst and Requirements Engineer. Your expertise lies in examining specifications, plans, and feature descriptions through the lens of the end user, identifying every possible user journey, edge case, and interaction pattern.
8
29
 
9
30
  Your primary mission is to:
@@ -2,6 +2,7 @@
2
2
  name: agent-native-audit
3
3
  description: Run comprehensive agent-native architecture review with scored principles
4
4
  argument-hint: "[optional: specific principle to audit]"
5
+ disable-model-invocation: true
5
6
  ---
6
7
 
7
8
  # Agent-Native Architecture Audit
@@ -2,6 +2,7 @@
2
2
  name: changelog
3
3
  description: Create engaging changelogs for recent merges to main branch
4
4
  argument-hint: "[optional: daily|weekly, or time period in days]"
5
+ disable-model-invocation: true
5
6
  ---
6
7
 
7
8
  You are a witty and enthusiastic product marketer tasked with creating a fun, engaging change log for an internal development team. Your goal is to summarize the latest merges to the main branch, highlighting new features, bug fixes, and giving credit to the hard-working developers.
@@ -3,6 +3,7 @@ name: create-agent-skill
3
3
  description: Create or edit Claude Code skills with expert guidance on structure and best practices
4
4
  allowed-tools: Skill(create-agent-skills)
5
5
  argument-hint: [skill description or requirements]
6
+ disable-model-invocation: true
6
7
  ---
7
8
 
8
9
  Invoke the create-agent-skills skill for: $ARGUMENTS
@@ -480,14 +480,14 @@ After writing the enhanced plan, use the **AskUserQuestion tool** to present the
480
480
 
481
481
  **Options:**
482
482
  1. **View diff** - Show what was added/changed
483
- 2. **Run `/plan_review`** - Get feedback from reviewers on enhanced plan
483
+ 2. **Run `/technical_review`** - Get feedback from reviewers on enhanced plan
484
484
  3. **Start `/workflows:work`** - Begin implementing this enhanced plan
485
485
  4. **Deepen further** - Run another round of research on specific sections
486
486
  5. **Revert** - Restore original plan (if backup exists)
487
487
 
488
488
  Based on selection:
489
489
  - **View diff** → Run `git diff [plan_path]` or show before/after
490
- - **`/plan_review`** → Call the /plan_review command with the plan file path
490
+ - **`/technical_review`** → Call the /technical_review command with the plan file path
491
491
  - **`/workflows:work`** → Call the /workflows:work command with the plan file path
492
492
  - **Deepen further** → Ask which sections need more research, then re-run those agents
493
493
  - **Revert** → Restore from git or backup
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: deploy-docs
3
3
  description: Validate and prepare documentation for GitHub Pages deployment
4
+ disable-model-invocation: true
4
5
  ---
5
6
 
6
7
  # Deploy Documentation Command
@@ -2,6 +2,7 @@
2
2
  name: generate_command
3
3
  description: Create a new custom slash command following conventions and best practices
4
4
  argument-hint: "[command purpose and requirements]"
5
+ disable-model-invocation: true
5
6
  ---
6
7
 
7
8
  # Create a Custom Claude Code Command
@@ -3,6 +3,7 @@ name: heal-skill
3
3
  description: Fix incorrect SKILL.md files when a skill has wrong instructions or outdated API references
4
4
  argument-hint: [optional: specific issue to fix]
5
5
  allowed-tools: [Read, Edit, Bash(ls:*), Bash(git:*)]
6
+ disable-model-invocation: true
6
7
  ---
7
8
 
8
9
  <objective>
@@ -2,6 +2,7 @@
2
2
  name: lfg
3
3
  description: Full autonomous engineering workflow
4
4
  argument-hint: "[feature description]"
5
+ disable-model-invocation: true
5
6
  ---
6
7
 
7
8
  Run these slash commands in order. Do not do anything else.
@@ -2,6 +2,7 @@
2
2
  name: release-docs
3
3
  description: Build and update the documentation site with current plugin components
4
4
  argument-hint: "[optional: --dry-run to preview changes without writing]"
5
+ disable-model-invocation: true
5
6
  ---
6
7
 
7
8
  # Release Documentation Command
@@ -2,6 +2,7 @@
2
2
  name: report-bug
3
3
  description: Report a bug in the compound-engineering plugin
4
4
  argument-hint: "[optional: brief description of the bug]"
5
+ disable-model-invocation: true
5
6
  ---
6
7
 
7
8
  # Report a Compounding Engineering Plugin Bug
@@ -2,6 +2,7 @@
2
2
  name: reproduce-bug
3
3
  description: Reproduce and investigate a bug using logs, console inspection, and browser screenshots
4
4
  argument-hint: "[GitHub issue number]"
5
+ disable-model-invocation: true
5
6
  ---
6
7
 
7
8
  # Reproduce Bug Command
@@ -2,6 +2,7 @@
2
2
  name: resolve_parallel
3
3
  description: Resolve all TODO comments using parallel processing
4
4
  argument-hint: "[optional: specific TODO pattern or file]"
5
+ disable-model-invocation: true
5
6
  ---
6
7
 
7
8
  Resolve all TODO comments using parallel processing.
@@ -12,6 +12,8 @@ Resolve all TODO comments using parallel processing.
12
12
 
13
13
  Get all unresolved TODOs from the /todos/\*.md directory
14
14
 
15
+ If any todo recommends deleting, removing, or gitignoring files in `docs/plans/` or `docs/solutions/`, skip it and mark it as `wont_fix`. These are compound-engineering pipeline artifacts that are intentional and permanent.
16
+
15
17
  ### 2. Plan
16
18
 
17
19
  Create a TodoWrite list of all unresolved items grouped by type.Make sure to look at dependencies that might occur and prioritize the ones needed by others. For example, if you need to change a name, you must wait to do the others. Output a mermaid flow diagram showing how we can do this. Can we do everything in parallel? Do we need to do one first that leads to others in parallel? I'll put the to-dos in the mermaid diagram flow‑wise so the agent knows how to proceed in order.
@@ -0,0 +1,32 @@
1
+ ---
2
+ name: slfg
3
+ description: Full autonomous engineering workflow using swarm mode for parallel execution
4
+ argument-hint: "[feature description]"
5
+ disable-model-invocation: true
6
+ ---
7
+
8
+ Swarm-enabled LFG. Run these steps in order, parallelizing where indicated.
9
+
10
+ ## Sequential Phase
11
+
12
+ 1. `/ralph-wiggum:ralph-loop "finish all slash commands" --completion-promise "DONE"`
13
+ 2. `/workflows:plan $ARGUMENTS`
14
+ 3. `/compound-engineering:deepen-plan`
15
+ 4. `/workflows:work` — **Use swarm mode**: Make a Task list and launch an army of agent swarm subagents to build the plan
16
+
17
+ ## Parallel Phase
18
+
19
+ After work completes, launch steps 5 and 6 as **parallel swarm agents** (both only need code to be written):
20
+
21
+ 5. `/workflows:review` — spawn as background Task agent
22
+ 6. `/compound-engineering:test-browser` — spawn as background Task agent
23
+
24
+ Wait for both to complete before continuing.
25
+
26
+ ## Finalize Phase
27
+
28
+ 7. `/compound-engineering:resolve_todo_parallel` — resolve any findings from the review
29
+ 8. `/compound-engineering:feature-video` — record the final walkthrough and add to PR
30
+ 9. Output `<promise>DONE</promise>` when video is in PR
31
+
32
+ Start with step 1 now.
@@ -0,0 +1,8 @@
1
+ ---
2
+ name: technical_review
3
+ description: Have multiple specialized agents review the technical approach and architecture of a plan in parallel
4
+ argument-hint: "[plan file path or plan content]"
5
+ disable-model-invocation: true
6
+ ---
7
+
8
+ Have @agent-dhh-rails-reviewer @agent-kieran-rails-reviewer @agent-code-simplicity-reviewer review the technical approach in this plan in parallel.
@@ -1,7 +1,8 @@
1
1
  ---
2
- name: xcode-test
2
+ name: test-xcode
3
3
  description: Build and test iOS apps on simulator using XcodeBuildMCP
4
4
  argument-hint: "[scheme name or 'current' to use default]"
5
+ disable-model-invocation: true
5
6
  ---
6
7
 
7
8
  # Xcode Test Command
@@ -2,6 +2,7 @@
2
2
  name: triage
3
3
  description: Triage and categorize findings for the CLI todo system
4
4
  argument-hint: "[findings list or source type]"
5
+ disable-model-invocation: true
5
6
  ---
6
7
 
7
8
  - First set the /model to Haiku
@@ -85,10 +85,19 @@ Use **AskUserQuestion tool** to present next steps:
85
85
  **Question:** "Brainstorm captured. What would you like to do next?"
86
86
 
87
87
  **Options:**
88
- 1. **Proceed to planning** - Run `/workflows:plan` (will auto-detect this brainstorm)
89
- 2. **Refine design further** - Continue exploring
88
+ 1. **Review and refine** - Improve the document through structured self-review
89
+ 2. **Proceed to planning** - Run `/workflows:plan` (will auto-detect this brainstorm)
90
90
  3. **Done for now** - Return later
91
91
 
92
+ **If user selects "Review and refine":**
93
+
94
+ Load the `document-review` skill and apply it to the brainstorm document.
95
+
96
+ When document-review returns "Review complete", present next steps:
97
+
98
+ 1. **Move to planning** - Continue to `/workflows:plan` with this document
99
+ 2. **Done for now** - Brainstorming complete. To start planning later: `/workflows:plan [document-path]`
100
+
92
101
  ## Output Summary
93
102
 
94
103
  When complete, display:
@@ -21,53 +21,83 @@ Captures problem solutions while context is fresh, creating structured documenta
21
21
  /workflows:compound [brief context] # Provide additional context hint
22
22
  ```
23
23
 
24
- ## Execution Strategy: Parallel Subagents
24
+ ## Execution Strategy: Two-Phase Orchestration
25
25
 
26
- This command launches multiple specialized subagents IN PARALLEL to maximize efficiency:
26
+ <critical_requirement>
27
+ **Only ONE file gets written - the final documentation.**
27
28
 
28
- ### 1. **Context Analyzer** (Parallel)
29
+ Phase 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.
30
+ </critical_requirement>
31
+
32
+ ### Phase 1: Parallel Research
33
+
34
+ <parallel_tasks>
35
+
36
+ Launch these subagents IN PARALLEL. Each returns text data to the orchestrator.
37
+
38
+ #### 1. **Context Analyzer**
29
39
  - Extracts conversation history
30
40
  - Identifies problem type, component, symptoms
31
- - Validates against CORA schema
41
+ - Validates against schema
32
42
  - Returns: YAML frontmatter skeleton
33
43
 
34
- ### 2. **Solution Extractor** (Parallel)
44
+ #### 2. **Solution Extractor**
35
45
  - Analyzes all investigation steps
36
46
  - Identifies root cause
37
47
  - Extracts working solution with code examples
38
48
  - Returns: Solution content block
39
49
 
40
- ### 3. **Related Docs Finder** (Parallel)
50
+ #### 3. **Related Docs Finder**
41
51
  - Searches `docs/solutions/` for related documentation
42
52
  - Identifies cross-references and links
43
53
  - Finds related GitHub issues
44
54
  - Returns: Links and relationships
45
55
 
46
- ### 4. **Prevention Strategist** (Parallel)
56
+ #### 4. **Prevention Strategist**
47
57
  - Develops prevention strategies
48
58
  - Creates best practices guidance
49
59
  - Generates test cases if applicable
50
60
  - Returns: Prevention/testing content
51
61
 
52
- ### 5. **Category Classifier** (Parallel)
62
+ #### 5. **Category Classifier**
53
63
  - Determines optimal `docs/solutions/` category
54
64
  - Validates category against schema
55
65
  - Suggests filename based on slug
56
66
  - Returns: Final path and filename
57
67
 
58
- ### 6. **Documentation Writer** (Parallel)
59
- - Assembles complete markdown file
60
- - Validates YAML frontmatter
61
- - Formats content for readability
62
- - Creates the file in correct location
68
+ </parallel_tasks>
69
+
70
+ ### Phase 2: Assembly & Write
71
+
72
+ <sequential_tasks>
73
+
74
+ **WAIT for all Phase 1 subagents to complete before proceeding.**
75
+
76
+ The orchestrating agent (main conversation) performs these steps:
77
+
78
+ 1. Collect all text results from Phase 1 subagents
79
+ 2. Assemble complete markdown file from the collected pieces
80
+ 3. Validate YAML frontmatter against schema
81
+ 4. Create directory if needed: `mkdir -p docs/solutions/[category]/`
82
+ 5. Write the SINGLE final file: `docs/solutions/[category]/[filename].md`
63
83
 
64
- ### 7. **Optional: Specialized Agent Invocation** (Post-Documentation)
65
- Based on problem type detected, automatically invoke applicable agents:
66
- - **performance_issue** `performance-oracle`
67
- - **security_issue** → `security-sentinel`
68
- - **database_issue** `data-integrity-guardian`
69
- - **test_failure** → `cora-test-reviewer`
70
- - Any code-heavy issue → `kieran-rails-reviewer` + `code-simplicity-reviewer`
84
+ </sequential_tasks>
85
+
86
+ ### Phase 3: Optional Enhancement
87
+
88
+ **WAIT for Phase 2 to complete before proceeding.**
89
+
90
+ <parallel_tasks>
91
+
92
+ Based on problem type, optionally invoke specialized agents to review the documentation:
93
+
94
+ - **performance_issue** → `performance-oracle`
95
+ - **security_issue** → `security-sentinel`
96
+ - **database_issue** → `data-integrity-guardian`
97
+ - **test_failure** → `cora-test-reviewer`
98
+ - Any code-heavy issue → `kieran-rails-reviewer` + `code-simplicity-reviewer`
99
+
100
+ </parallel_tasks>
71
101
 
72
102
  ## What It Captures
73
103
 
@@ -110,18 +140,25 @@ This command launches multiple specialized subagents IN PARALLEL to maximize eff
110
140
  - integration-issues/
111
141
  - logic-errors/
112
142
 
143
+ ## Common Mistakes to Avoid
144
+
145
+ | ❌ Wrong | ✅ Correct |
146
+ |----------|-----------|
147
+ | Subagents write files like `context-analysis.md`, `solution-draft.md` | Subagents return text data; orchestrator writes one final file |
148
+ | Research and assembly run in parallel | Research completes → then assembly runs |
149
+ | Multiple files created during workflow | Single file: `docs/solutions/[category]/[filename].md` |
150
+
113
151
  ## Success Output
114
152
 
115
153
  ```
116
- Parallel documentation generation complete
154
+ Documentation complete
117
155
 
118
- Primary Subagent Results:
156
+ Subagent Results:
119
157
  ✓ Context Analyzer: Identified performance_issue in brief_system
120
- ✓ Solution Extractor: Extracted 3 code fixes
121
- ✓ Related Docs Finder: Found 2 related issues
122
- ✓ Prevention Strategist: Generated test cases
123
- ✓ Category Classifier: docs/solutions/performance-issues/
124
- ✓ Documentation Writer: Created complete markdown
158
+ ✓ Solution Extractor: 3 code fixes
159
+ ✓ Related Docs Finder: 2 related issues
160
+ ✓ Prevention Strategist: Prevention strategies, test suggestions
161
+ ✓ Category Classifier: `performance-issues`
125
162
 
126
163
  Specialized Agent Reviews (Auto-Triggered):
127
164
  ✓ performance-oracle: Validated query optimization approach
@@ -498,25 +498,25 @@ After writing the plan file, use the **AskUserQuestion tool** to present these o
498
498
  **Options:**
499
499
  1. **Open plan in editor** - Open the plan file for review
500
500
  2. **Run `/deepen-plan`** - Enhance each section with parallel research agents (best practices, performance, UI)
501
- 3. **Run `/plan_review`** - Get feedback from reviewers (DHH, Kieran, Simplicity)
502
- 4. **Start `/workflows:work`** - Begin implementing this plan locally
503
- 5. **Start `/workflows:work` on remote** - Begin implementing in Claude Code on the web (use `&` to run in background)
504
- 6. **Create Issue** - Create issue in project tracker (GitHub/Linear)
505
- 7. **Simplify** - Reduce detail level
501
+ 3. **Run `/technical_review`** - Technical feedback from code-focused reviewers (DHH, Kieran, Simplicity)
502
+ 4. **Review and refine** - Improve the document through structured self-review
503
+ 5. **Start `/workflows:work`** - Begin implementing this plan locally
504
+ 6. **Start `/workflows:work` on remote** - Begin implementing in Claude Code on the web (use `&` to run in background)
505
+ 7. **Create Issue** - Create issue in project tracker (GitHub/Linear)
506
506
 
507
507
  Based on selection:
508
508
  - **Open plan in editor** → Run `open docs/plans/<plan_filename>.md` to open the file in the user's default editor
509
509
  - **`/deepen-plan`** → Call the /deepen-plan command with the plan file path to enhance with research
510
- - **`/plan_review`** → Call the /plan_review command with the plan file path
510
+ - **`/technical_review`** → Call the /technical_review command with the plan file path
511
+ - **Review and refine** → Load `document-review` skill.
511
512
  - **`/workflows:work`** → Call the /workflows:work command with the plan file path
512
513
  - **`/workflows:work` on remote** → Run `/workflows:work docs/plans/<plan_filename>.md &` to start work in background for Claude Code web
513
514
  - **Create Issue** → See "Issue Creation" section below
514
- - **Simplify** → Ask "What should I simplify?" then regenerate simpler version
515
515
  - **Other** (automatically provided) → Accept free text for rework or specific changes
516
516
 
517
517
  **Note:** If running `/workflows:plan` with ultrathink enabled, automatically run `/deepen-plan` after plan creation for maximum depth and grounding.
518
518
 
519
- Loop back to options after Simplify or Other changes until user selects `/workflows:work` or `/plan_review`.
519
+ Loop back to options after Simplify or Other changes until user selects `/workflows:work` or `/technical_review`.
520
520
 
521
521
  ## Issue Creation
522
522
 
@@ -546,6 +546,6 @@ When user selects "Create Issue", detect their project tracker from CLAUDE.md:
546
546
 
547
547
  5. **After creation:**
548
548
  - Display the issue URL
549
- - Ask if they want to proceed to `/workflows:work` or `/plan_review`
549
+ - Ask if they want to proceed to `/workflows:work` or `/technical_review`
550
550
 
551
551
  NEVER CODE! Just research and write the plan.
@@ -48,6 +48,17 @@ Ensure that the code is ready for analysis (either in worktree or on current bra
48
48
 
49
49
  </task_list>
50
50
 
51
+ #### Protected Artifacts
52
+
53
+ <protected_artifacts>
54
+ The following paths are compound-engineering pipeline artifacts and must never be flagged for deletion, removal, or gitignore by any review agent:
55
+
56
+ - `docs/plans/*.md` — Plan files created by `/workflows:plan`. These are living documents that track implementation progress (checkboxes are checked off by `/workflows:work`).
57
+ - `docs/solutions/*.md` — Solution documents created during the pipeline.
58
+
59
+ If a review agent flags any file in these directories for cleanup or removal, discard that finding during synthesis. Do not create a todo for it.
60
+ </protected_artifacts>
61
+
51
62
  #### Parallel Agents to review the PR:
52
63
 
53
64
  <parallel_tasks>
@@ -207,6 +218,7 @@ Remove duplicates, prioritize by severity and impact.
207
218
  <synthesis_tasks>
208
219
 
209
220
  - [ ] Collect findings from all parallel agents
221
+ - [ ] Discard any findings that recommend deleting or gitignoring files in `docs/plans/` or `docs/solutions/` (see Protected Artifacts above)
210
222
  - [ ] Categorize by type: security, performance, architecture, quality, etc.
211
223
  - [ ] Assign severity levels: 🔴 CRITICAL (P1), 🟡 IMPORTANT (P2), 🔵 NICE-TO-HAVE (P3)
212
224
  - [ ] Remove duplicate or overlapping findings
@@ -181,7 +181,7 @@ This command takes a work document (plan, specification, or todo file) and execu
181
181
  - **kieran-rails-reviewer**: Verify Rails conventions (Rails projects)
182
182
  - **performance-oracle**: Check for performance issues
183
183
  - **security-sentinel**: Scan for security vulnerabilities
184
- - **cora-test-reviewer**: Review test quality (CORA projects)
184
+ - **cora-test-reviewer**: Review test quality (Rails projects with comprehensive test coverage)
185
185
 
186
186
  Run reviewers in parallel with Task tool:
187
187
 
@@ -292,6 +292,76 @@ This command takes a work document (plan, specification, or todo file) and execu
292
292
 
293
293
  ---
294
294
 
295
+ ## Swarm Mode (Optional)
296
+
297
+ For complex plans with multiple independent workstreams, enable swarm mode for parallel execution with coordinated agents.
298
+
299
+ ### When to Use Swarm Mode
300
+
301
+ | Use Swarm Mode when... | Use Standard Mode when... |
302
+ |------------------------|---------------------------|
303
+ | Plan has 5+ independent tasks | Plan is linear/sequential |
304
+ | Multiple specialists needed (review + test + implement) | Single-focus work |
305
+ | Want maximum parallelism | Simpler mental model preferred |
306
+ | Large feature with clear phases | Small feature or bug fix |
307
+
308
+ ### Enabling Swarm Mode
309
+
310
+ To trigger swarm execution, say:
311
+
312
+ > "Make a Task list and launch an army of agent swarm subagents to build the plan"
313
+
314
+ Or explicitly request: "Use swarm mode for this work"
315
+
316
+ ### Swarm Workflow
317
+
318
+ When swarm mode is enabled, the workflow changes:
319
+
320
+ 1. **Create Team**
321
+ ```
322
+ Teammate({ operation: "spawnTeam", team_name: "work-{timestamp}" })
323
+ ```
324
+
325
+ 2. **Create Task List with Dependencies**
326
+ - Parse plan into TaskCreate items
327
+ - Set up blockedBy relationships for sequential dependencies
328
+ - Independent tasks have no blockers (can run in parallel)
329
+
330
+ 3. **Spawn Specialized Teammates**
331
+ ```
332
+ Task({
333
+ team_name: "work-{timestamp}",
334
+ name: "implementer",
335
+ subagent_type: "general-purpose",
336
+ prompt: "Claim implementation tasks, execute, mark complete",
337
+ run_in_background: true
338
+ })
339
+
340
+ Task({
341
+ team_name: "work-{timestamp}",
342
+ name: "tester",
343
+ subagent_type: "general-purpose",
344
+ prompt: "Claim testing tasks, run tests, mark complete",
345
+ run_in_background: true
346
+ })
347
+ ```
348
+
349
+ 4. **Coordinate and Monitor**
350
+ - Team lead monitors task completion
351
+ - Spawn additional workers as phases unblock
352
+ - Handle plan approval if required
353
+
354
+ 5. **Cleanup**
355
+ ```
356
+ Teammate({ operation: "requestShutdown", target_agent_id: "implementer" })
357
+ Teammate({ operation: "requestShutdown", target_agent_id: "tester" })
358
+ Teammate({ operation: "cleanup" })
359
+ ```
360
+
361
+ See the `orchestrating-swarms` skill for detailed swarm patterns and best practices.
362
+
363
+ ---
364
+
295
365
  ## Key Principles
296
366
 
297
367
  ### Start Fast, Execute Faster
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: compound-docs
3
3
  description: Capture solved problems as categorized documentation with YAML frontmatter for fast lookup
4
+ disable-model-invocation: true
4
5
  allowed-tools:
5
6
  - Read # Parse conversation context
6
7
  - Write # Create resolution docs
@@ -61,7 +62,7 @@ Extract from conversation history:
61
62
 
62
63
  **Required information:**
63
64
 
64
- - **Module name**: Which CORA module had the problem
65
+ - **Module name**: Which module or component had the problem
65
66
  - **Symptom**: Observable error/behavior (exact error messages)
66
67
  - **Investigation attempts**: What didn't work and why
67
68
  - **Root cause**: Technical explanation of actual problem
@@ -249,7 +250,7 @@ But **NEVER auto-promote**. User decides via decision menu (Option 2).
249
250
 
250
251
  **Template for critical pattern addition:**
251
252
 
252
- 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/cora-critical-patterns.md`.
253
+ 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`.
253
254
  </step>
254
255
 
255
256
  </critical_sequence>
@@ -270,7 +271,7 @@ File created:
270
271
 
271
272
  What's next?
272
273
  1. Continue workflow (recommended)
273
- 2. Add to Required Reading - Promote to critical patterns (cora-critical-patterns.md)
274
+ 2. Add to Required Reading - Promote to critical patterns (critical-patterns.md)
274
275
  3. Link related issues - Connect to similar problems
275
276
  4. Add to existing skill - Add to a learning skill (e.g., hotwire-native)
276
277
  5. Create new skill - Extract into new learning skill
@@ -295,7 +296,7 @@ User selects this when:
295
296
  Action:
296
297
  1. Extract pattern from the documentation
297
298
  2. Format as ❌ WRONG vs ✅ CORRECT with code examples
298
- 3. Add to `docs/solutions/patterns/cora-critical-patterns.md`
299
+ 3. Add to `docs/solutions/patterns/critical-patterns.md`
299
300
  4. Add cross-reference back to this doc
300
301
  5. Confirm: "✓ Added to Required Reading. All subagents will see this pattern before code generation."
301
302
 
@@ -317,7 +318,7 @@ Action:
317
318
  4. Confirm: "✓ Added to [skill-name] skill in [file]"
318
319
 
319
320
  Example: For Hotwire Native Tailwind variants solution:
320
- - Add to `hotwire-native/references/resources.md` under "CORA-Specific Resources"
321
+ - Add to `hotwire-native/references/resources.md` under "Project-Specific Resources"
321
322
  - Add to `hotwire-native/references/examples.md` with link to solution doc
322
323
 
323
324
  **Option 5: Create new skill**
@@ -397,11 +398,11 @@ Documentation is successful when ALL of the following are true:
397
398
  - Present multiple matches
398
399
  - Let user choose: new doc, update existing, or link as duplicate
399
400
 
400
- **Module not in CORA-MODULES.md:**
401
+ **Module not in modules documentation:**
401
402
 
402
403
  - Warn but don't block
403
404
  - Proceed with documentation
404
- - Suggest: "Add [Module] to CORA-MODULES.md if not there"
405
+ - Suggest: "Add [Module] to modules documentation if not there"
405
406
 
406
407
  ---
407
408
 
@@ -488,7 +489,7 @@ File created:
488
489
 
489
490
  What's next?
490
491
  1. Continue workflow (recommended)
491
- 2. Add to Required Reading - Promote to critical patterns (cora-critical-patterns.md)
492
+ 2. Add to Required Reading - Promote to critical patterns (critical-patterns.md)
492
493
  3. Link related issues - Connect to similar problems
493
494
  4. Add to existing skill - Add to a learning skill (e.g., hotwire-native)
494
495
  5. Create new skill - Extract into new learning skill
@@ -1,6 +1,6 @@
1
1
  # Critical Pattern Template
2
2
 
3
- Use this template when adding a pattern to `docs/solutions/patterns/cora-critical-patterns.md`:
3
+ Use this template when adding a pattern to `docs/solutions/patterns/critical-patterns.md`:
4
4
 
5
5
  ---
6
6