@every-env/compound-plugin 0.1.1 → 0.2.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.
- package/.claude/commands/triage-prs.md +193 -0
- package/.claude-plugin/marketplace.json +2 -2
- package/.github/workflows/ci.yml +25 -0
- package/README.md +22 -1
- package/docs/plans/2026-02-08-feat-pr-triage-and-merge-plan.md +128 -0
- package/package.json +1 -1
- package/plans/grow-your-own-garden-plugin-architecture.md +1 -1
- package/plugins/compound-engineering/.claude-plugin/plugin.json +2 -2
- package/plugins/compound-engineering/CHANGELOG.md +32 -0
- package/plugins/compound-engineering/CLAUDE.md +3 -4
- package/plugins/compound-engineering/README.md +19 -7
- package/plugins/compound-engineering/agents/research/git-history-analyzer.md +2 -0
- package/plugins/compound-engineering/agents/research/learnings-researcher.md +2 -2
- package/plugins/compound-engineering/agents/review/code-simplicity-reviewer.md +1 -0
- package/plugins/compound-engineering/agents/review/schema-drift-detector.md +139 -0
- package/plugins/compound-engineering/commands/deepen-plan.md +2 -2
- package/plugins/compound-engineering/commands/resolve_todo_parallel.md +2 -0
- package/plugins/compound-engineering/commands/slfg.md +31 -0
- package/plugins/compound-engineering/commands/technical_review.md +7 -0
- package/plugins/compound-engineering/commands/workflows/brainstorm.md +11 -2
- package/plugins/compound-engineering/commands/workflows/compound.md +64 -27
- package/plugins/compound-engineering/commands/workflows/plan.md +9 -9
- package/plugins/compound-engineering/commands/workflows/review.md +12 -0
- package/plugins/compound-engineering/commands/workflows/work.md +71 -1
- package/plugins/compound-engineering/skills/compound-docs/SKILL.md +8 -8
- package/plugins/compound-engineering/skills/compound-docs/assets/critical-pattern-template.md +1 -1
- package/plugins/compound-engineering/skills/compound-docs/assets/resolution-template.md +3 -3
- package/plugins/compound-engineering/skills/compound-docs/references/yaml-schema.md +1 -1
- package/plugins/compound-engineering/skills/create-agent-skills/SKILL.md +168 -192
- package/plugins/compound-engineering/skills/create-agent-skills/references/official-spec.md +74 -125
- package/plugins/compound-engineering/skills/create-agent-skills/references/skill-structure.md +109 -329
- package/plugins/compound-engineering/skills/document-review/SKILL.md +87 -0
- package/plugins/compound-engineering/skills/git-worktree/scripts/worktree-manager.sh +2 -10
- package/plugins/compound-engineering/skills/orchestrating-swarms/SKILL.md +1717 -0
- package/plugins/compound-engineering/skills/resolve-pr-parallel/SKILL.md +89 -0
- package/plugins/compound-engineering/skills/resolve-pr-parallel/scripts/get-pr-comments +68 -0
- package/plugins/compound-engineering/skills/resolve-pr-parallel/scripts/resolve-pr-thread +23 -0
- package/src/commands/sync.ts +84 -0
- package/src/converters/claude-to-codex.ts +59 -2
- package/src/converters/claude-to-opencode.ts +7 -5
- package/src/index.ts +2 -0
- package/src/parsers/claude-home.ts +65 -0
- package/src/sync/codex.ts +92 -0
- package/src/sync/opencode.ts +75 -0
- package/src/targets/codex.ts +7 -2
- package/src/targets/opencode.ts +6 -1
- package/src/types/claude.ts +1 -1
- package/src/utils/files.ts +13 -0
- package/src/utils/symlink.ts +43 -0
- package/tests/codex-converter.test.ts +83 -0
- package/tests/codex-writer.test.ts +32 -0
- package/tests/opencode-writer.test.ts +32 -0
- package/plugins/compound-engineering/commands/plan_review.md +0 -7
- package/plugins/compound-engineering/commands/resolve_pr_parallel.md +0 -49
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: schema-drift-detector
|
|
3
|
+
description: "Use this agent when reviewing PRs that include db/schema.rb changes to detect unrelated schema modifications. This agent compares schema.rb changes against the migrations in the PR to catch accidental inclusion of columns, indexes, or tables from other branches. Essential before merging any PR with database changes. <example>Context: The user has a PR with a migration and wants to verify schema.rb is clean. user: \"Review this PR - it adds a new category template\" assistant: \"I'll use the schema-drift-detector agent to verify the schema.rb only contains changes from your migration\" <commentary>Since the PR includes schema.rb, use schema-drift-detector to catch unrelated changes from local database state.</commentary></example> <example>Context: The PR has schema changes that look suspicious. user: \"The schema.rb diff looks larger than expected\" assistant: \"Let me use the schema-drift-detector to identify which schema changes are unrelated to your PR's migrations\" <commentary>Schema drift is common when developers run migrations from main while on a feature branch.</commentary></example>"
|
|
4
|
+
model: inherit
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
You are a Schema Drift Detector. Your mission is to prevent accidental inclusion of unrelated schema.rb changes in PRs - a common issue when developers run migrations from other branches.
|
|
8
|
+
|
|
9
|
+
## The Problem
|
|
10
|
+
|
|
11
|
+
When developers work on feature branches, they often:
|
|
12
|
+
1. Pull main and run `db:migrate` to stay current
|
|
13
|
+
2. Switch back to their feature branch
|
|
14
|
+
3. Run their new migration
|
|
15
|
+
4. Commit the schema.rb - which now includes columns from main that aren't in their PR
|
|
16
|
+
|
|
17
|
+
This pollutes PRs with unrelated changes and can cause merge conflicts or confusion.
|
|
18
|
+
|
|
19
|
+
## Core Review Process
|
|
20
|
+
|
|
21
|
+
### Step 1: Identify Migrations in the PR
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
# List all migration files changed in the PR
|
|
25
|
+
git diff main --name-only -- db/migrate/
|
|
26
|
+
|
|
27
|
+
# Get the migration version numbers
|
|
28
|
+
git diff main --name-only -- db/migrate/ | grep -oE '[0-9]{14}'
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### Step 2: Analyze Schema Changes
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
# Show all schema.rb changes
|
|
35
|
+
git diff main -- db/schema.rb
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Step 3: Cross-Reference
|
|
39
|
+
|
|
40
|
+
For each change in schema.rb, verify it corresponds to a migration in the PR:
|
|
41
|
+
|
|
42
|
+
**Expected schema changes:**
|
|
43
|
+
- Version number update matching the PR's migration
|
|
44
|
+
- Tables/columns/indexes explicitly created in the PR's migrations
|
|
45
|
+
|
|
46
|
+
**Drift indicators (unrelated changes):**
|
|
47
|
+
- Columns that don't appear in any PR migration
|
|
48
|
+
- Tables not referenced in PR migrations
|
|
49
|
+
- Indexes not created by PR migrations
|
|
50
|
+
- Version number higher than the PR's newest migration
|
|
51
|
+
|
|
52
|
+
## Common Drift Patterns
|
|
53
|
+
|
|
54
|
+
### 1. Extra Columns
|
|
55
|
+
```diff
|
|
56
|
+
# DRIFT: These columns aren't in any PR migration
|
|
57
|
+
+ t.text "openai_api_key"
|
|
58
|
+
+ t.text "anthropic_api_key"
|
|
59
|
+
+ t.datetime "api_key_validated_at"
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### 2. Extra Indexes
|
|
63
|
+
```diff
|
|
64
|
+
# DRIFT: Index not created by PR migrations
|
|
65
|
+
+ t.index ["complimentary_access"], name: "index_users_on_complimentary_access"
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### 3. Version Mismatch
|
|
69
|
+
```diff
|
|
70
|
+
# PR has migration 20260205045101 but schema version is higher
|
|
71
|
+
-ActiveRecord::Schema[7.2].define(version: 2026_01_29_133857) do
|
|
72
|
+
+ActiveRecord::Schema[7.2].define(version: 2026_02_10_123456) do
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Verification Checklist
|
|
76
|
+
|
|
77
|
+
- [ ] Schema version matches the PR's newest migration timestamp
|
|
78
|
+
- [ ] Every new column in schema.rb has a corresponding `add_column` in a PR migration
|
|
79
|
+
- [ ] Every new table in schema.rb has a corresponding `create_table` in a PR migration
|
|
80
|
+
- [ ] Every new index in schema.rb has a corresponding `add_index` in a PR migration
|
|
81
|
+
- [ ] No columns/tables/indexes appear that aren't in PR migrations
|
|
82
|
+
|
|
83
|
+
## How to Fix Schema Drift
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
# Option 1: Reset schema to main and re-run only PR migrations
|
|
87
|
+
git checkout main -- db/schema.rb
|
|
88
|
+
bin/rails db:migrate
|
|
89
|
+
|
|
90
|
+
# Option 2: If local DB has extra migrations, reset and only update version
|
|
91
|
+
git checkout main -- db/schema.rb
|
|
92
|
+
# Manually edit the version line to match PR's migration
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Output Format
|
|
96
|
+
|
|
97
|
+
### Clean PR
|
|
98
|
+
```
|
|
99
|
+
✅ Schema changes match PR migrations
|
|
100
|
+
|
|
101
|
+
Migrations in PR:
|
|
102
|
+
- 20260205045101_add_spam_category_template.rb
|
|
103
|
+
|
|
104
|
+
Schema changes verified:
|
|
105
|
+
- Version: 2026_01_29_133857 → 2026_02_05_045101 ✓
|
|
106
|
+
- No unrelated tables/columns/indexes ✓
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### Drift Detected
|
|
110
|
+
```
|
|
111
|
+
⚠️ SCHEMA DRIFT DETECTED
|
|
112
|
+
|
|
113
|
+
Migrations in PR:
|
|
114
|
+
- 20260205045101_add_spam_category_template.rb
|
|
115
|
+
|
|
116
|
+
Unrelated schema changes found:
|
|
117
|
+
|
|
118
|
+
1. **users table** - Extra columns not in PR migrations:
|
|
119
|
+
- `openai_api_key` (text)
|
|
120
|
+
- `anthropic_api_key` (text)
|
|
121
|
+
- `gemini_api_key` (text)
|
|
122
|
+
- `complimentary_access` (boolean)
|
|
123
|
+
|
|
124
|
+
2. **Extra index:**
|
|
125
|
+
- `index_users_on_complimentary_access`
|
|
126
|
+
|
|
127
|
+
**Action Required:**
|
|
128
|
+
Run `git checkout main -- db/schema.rb` and then `bin/rails db:migrate`
|
|
129
|
+
to regenerate schema with only PR-related changes.
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## Integration with Other Reviewers
|
|
133
|
+
|
|
134
|
+
This agent should be run BEFORE other database-related reviewers:
|
|
135
|
+
- Run `schema-drift-detector` first to ensure clean schema
|
|
136
|
+
- Then run `data-migration-expert` for migration logic review
|
|
137
|
+
- Then run `data-integrity-guardian` for integrity checks
|
|
138
|
+
|
|
139
|
+
Catching drift early prevents wasted review time on unrelated changes.
|
|
@@ -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 `/
|
|
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
|
-
- **`/
|
|
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
|
|
@@ -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,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: slfg
|
|
3
|
+
description: Full autonomous engineering workflow using swarm mode for parallel execution
|
|
4
|
+
argument-hint: "[feature description]"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Swarm-enabled LFG. Run these steps in order, parallelizing where indicated.
|
|
8
|
+
|
|
9
|
+
## Sequential Phase
|
|
10
|
+
|
|
11
|
+
1. `/ralph-wiggum:ralph-loop "finish all slash commands" --completion-promise "DONE"`
|
|
12
|
+
2. `/workflows:plan $ARGUMENTS`
|
|
13
|
+
3. `/compound-engineering:deepen-plan`
|
|
14
|
+
4. `/workflows:work` — **Use swarm mode**: Make a Task list and launch an army of agent swarm subagents to build the plan
|
|
15
|
+
|
|
16
|
+
## Parallel Phase
|
|
17
|
+
|
|
18
|
+
After work completes, launch steps 5 and 6 as **parallel swarm agents** (both only need code to be written):
|
|
19
|
+
|
|
20
|
+
5. `/workflows:review` — spawn as background Task agent
|
|
21
|
+
6. `/compound-engineering:test-browser` — spawn as background Task agent
|
|
22
|
+
|
|
23
|
+
Wait for both to complete before continuing.
|
|
24
|
+
|
|
25
|
+
## Finalize Phase
|
|
26
|
+
|
|
27
|
+
7. `/compound-engineering:resolve_todo_parallel` — resolve any findings from the review
|
|
28
|
+
8. `/compound-engineering:feature-video` — record the final walkthrough and add to PR
|
|
29
|
+
9. Output `<promise>DONE</promise>` when video is in PR
|
|
30
|
+
|
|
31
|
+
Start with step 1 now.
|
|
@@ -0,0 +1,7 @@
|
|
|
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
|
+
---
|
|
6
|
+
|
|
7
|
+
Have @agent-dhh-rails-reviewer @agent-kieran-rails-reviewer @agent-code-simplicity-reviewer review the technical approach in this plan in parallel.
|
|
@@ -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. **
|
|
89
|
-
2. **
|
|
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:
|
|
24
|
+
## Execution Strategy: Two-Phase Orchestration
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
<critical_requirement>
|
|
27
|
+
**Only ONE file gets written - the final documentation.**
|
|
27
28
|
|
|
28
|
-
|
|
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
|
|
41
|
+
- Validates against schema
|
|
32
42
|
- Returns: YAML frontmatter skeleton
|
|
33
43
|
|
|
34
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
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
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
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
|
-
✓
|
|
154
|
+
✓ Documentation complete
|
|
117
155
|
|
|
118
|
-
|
|
156
|
+
Subagent Results:
|
|
119
157
|
✓ Context Analyzer: Identified performance_issue in brief_system
|
|
120
|
-
✓ Solution Extractor:
|
|
121
|
-
✓ Related Docs Finder:
|
|
122
|
-
✓ Prevention Strategist:
|
|
123
|
-
✓ Category Classifier:
|
|
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 `/
|
|
502
|
-
4. **
|
|
503
|
-
5. **Start `/workflows:work
|
|
504
|
-
6. **
|
|
505
|
-
7. **
|
|
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
|
-
- **`/
|
|
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 `/
|
|
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 `/
|
|
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 (
|
|
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
|
|
@@ -61,7 +61,7 @@ Extract from conversation history:
|
|
|
61
61
|
|
|
62
62
|
**Required information:**
|
|
63
63
|
|
|
64
|
-
- **Module name**: Which
|
|
64
|
+
- **Module name**: Which module or component had the problem
|
|
65
65
|
- **Symptom**: Observable error/behavior (exact error messages)
|
|
66
66
|
- **Investigation attempts**: What didn't work and why
|
|
67
67
|
- **Root cause**: Technical explanation of actual problem
|
|
@@ -249,7 +249,7 @@ But **NEVER auto-promote**. User decides via decision menu (Option 2).
|
|
|
249
249
|
|
|
250
250
|
**Template for critical pattern addition:**
|
|
251
251
|
|
|
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/
|
|
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/critical-patterns.md`.
|
|
253
253
|
</step>
|
|
254
254
|
|
|
255
255
|
</critical_sequence>
|
|
@@ -270,7 +270,7 @@ File created:
|
|
|
270
270
|
|
|
271
271
|
What's next?
|
|
272
272
|
1. Continue workflow (recommended)
|
|
273
|
-
2. Add to Required Reading - Promote to critical patterns (
|
|
273
|
+
2. Add to Required Reading - Promote to critical patterns (critical-patterns.md)
|
|
274
274
|
3. Link related issues - Connect to similar problems
|
|
275
275
|
4. Add to existing skill - Add to a learning skill (e.g., hotwire-native)
|
|
276
276
|
5. Create new skill - Extract into new learning skill
|
|
@@ -295,7 +295,7 @@ User selects this when:
|
|
|
295
295
|
Action:
|
|
296
296
|
1. Extract pattern from the documentation
|
|
297
297
|
2. Format as ❌ WRONG vs ✅ CORRECT with code examples
|
|
298
|
-
3. Add to `docs/solutions/patterns/
|
|
298
|
+
3. Add to `docs/solutions/patterns/critical-patterns.md`
|
|
299
299
|
4. Add cross-reference back to this doc
|
|
300
300
|
5. Confirm: "✓ Added to Required Reading. All subagents will see this pattern before code generation."
|
|
301
301
|
|
|
@@ -317,7 +317,7 @@ Action:
|
|
|
317
317
|
4. Confirm: "✓ Added to [skill-name] skill in [file]"
|
|
318
318
|
|
|
319
319
|
Example: For Hotwire Native Tailwind variants solution:
|
|
320
|
-
- Add to `hotwire-native/references/resources.md` under "
|
|
320
|
+
- Add to `hotwire-native/references/resources.md` under "Project-Specific Resources"
|
|
321
321
|
- Add to `hotwire-native/references/examples.md` with link to solution doc
|
|
322
322
|
|
|
323
323
|
**Option 5: Create new skill**
|
|
@@ -397,11 +397,11 @@ Documentation is successful when ALL of the following are true:
|
|
|
397
397
|
- Present multiple matches
|
|
398
398
|
- Let user choose: new doc, update existing, or link as duplicate
|
|
399
399
|
|
|
400
|
-
**Module not in
|
|
400
|
+
**Module not in modules documentation:**
|
|
401
401
|
|
|
402
402
|
- Warn but don't block
|
|
403
403
|
- Proceed with documentation
|
|
404
|
-
- Suggest: "Add [Module] to
|
|
404
|
+
- Suggest: "Add [Module] to modules documentation if not there"
|
|
405
405
|
|
|
406
406
|
---
|
|
407
407
|
|
|
@@ -488,7 +488,7 @@ File created:
|
|
|
488
488
|
|
|
489
489
|
What's next?
|
|
490
490
|
1. Continue workflow (recommended)
|
|
491
|
-
2. Add to Required Reading - Promote to critical patterns (
|
|
491
|
+
2. Add to Required Reading - Promote to critical patterns (critical-patterns.md)
|
|
492
492
|
3. Link related issues - Connect to similar problems
|
|
493
493
|
4. Add to existing skill - Add to a learning skill (e.g., hotwire-native)
|
|
494
494
|
5. Create new skill - Extract into new learning skill
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
module: [Module name or "
|
|
2
|
+
module: [Module name or "System" for system-wide]
|
|
3
3
|
date: [YYYY-MM-DD]
|
|
4
4
|
problem_type: [build_error|test_failure|runtime_error|performance_issue|database_issue|security_issue|ui_bug|integration_issue|logic_error]
|
|
5
5
|
component: [rails_model|rails_controller|rails_view|service_object|background_job|database|frontend_stimulus|hotwire_turbo|email_processing|brief_system|assistant|authentication|payments]
|
|
@@ -19,7 +19,7 @@ tags: [keyword1, keyword2, keyword3]
|
|
|
19
19
|
[1-2 sentence clear description of the issue and what the user experienced]
|
|
20
20
|
|
|
21
21
|
## Environment
|
|
22
|
-
- Module: [Name or "
|
|
22
|
+
- Module: [Name or "System-wide"]
|
|
23
23
|
- Rails Version: [e.g., 7.1.2]
|
|
24
24
|
- Affected Component: [e.g., "Email Processing model", "Brief System service", "Authentication controller"]
|
|
25
25
|
- Date: [YYYY-MM-DD when this was solved]
|
|
@@ -78,7 +78,7 @@ tags: [keyword1, keyword2, keyword3]
|
|
|
78
78
|
|
|
79
79
|
## Prevention
|
|
80
80
|
|
|
81
|
-
[How to avoid this problem in future
|
|
81
|
+
[How to avoid this problem in future development:]
|
|
82
82
|
- [Specific coding practice, check, or pattern to follow]
|
|
83
83
|
- [What to watch out for]
|
|
84
84
|
- [How to catch this early]
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## Required Fields
|
|
6
6
|
|
|
7
|
-
- **module** (string): Module name (e.g., "EmailProcessing") or "
|
|
7
|
+
- **module** (string): Module name (e.g., "EmailProcessing") or "System" for system-wide issues
|
|
8
8
|
- **date** (string): ISO 8601 date (YYYY-MM-DD)
|
|
9
9
|
- **problem_type** (enum): One of [build_error, test_failure, runtime_error, performance_issue, database_issue, security_issue, ui_bug, integration_issue, logic_error, developer_experience, workflow_issue, best_practice, documentation_gap]
|
|
10
10
|
- **component** (enum): One of [rails_model, rails_controller, rails_view, service_object, background_job, database, frontend_stimulus, hotwire_turbo, email_processing, brief_system, assistant, authentication, payments, development_workflow, testing_framework, documentation, tooling]
|