liteagents 2.9.0 → 2.11.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/CHANGELOG.md +43 -0
- package/README.md +27 -33
- package/installer/cli.js +6 -2
- package/package.json +3 -3
- package/packages/ampcode/AGENT.md +11 -16
- package/packages/ampcode/agents/code-developer.md +11 -12
- package/packages/ampcode/agents/quality-assurance.md +1 -1
- package/packages/{droid/commands/systematic-debugging.md → ampcode/commands/debug-method.md} +9 -9
- package/packages/ampcode/commands/diff-review.md +78 -0
- package/packages/ampcode/commands/friction/friction.js +28 -6
- package/packages/ampcode/commands/optimize.md +45 -4
- package/packages/ampcode/commands/refactor.md +33 -1
- package/packages/ampcode/commands/release.md +88 -0
- package/packages/ampcode/commands/remember.md +34 -3
- package/packages/ampcode/commands/security.md +28 -1
- package/packages/ampcode/commands/stash.md +7 -0
- package/packages/{droid/commands/test-driven-development.md → ampcode/commands/tdd-flow.md} +2 -2
- package/packages/ampcode/commands/test-generate.md +64 -15
- package/packages/{opencode/command/testing-anti-patterns.md → ampcode/commands/test-traps.md} +77 -3
- package/packages/{droid/commands/root-cause-tracing.md → ampcode/commands/trace-back.md} +3 -3
- package/packages/ampcode/commands/{verification-before-completion.md → verify-done.md} +3 -3
- package/packages/claude/CLAUDE.md +10 -15
- package/packages/claude/agents/code-developer.md +11 -12
- package/packages/claude/agents/quality-assurance.md +1 -1
- package/packages/claude/commands/diff-review.md +78 -0
- package/packages/claude/commands/friction/friction.js +28 -6
- package/packages/claude/commands/optimize.md +45 -4
- package/packages/claude/commands/refactor.md +33 -1
- package/packages/claude/commands/release.md +88 -0
- package/packages/claude/commands/remember.md +34 -3
- package/packages/claude/commands/security.md +28 -1
- package/packages/claude/commands/stash.md +7 -0
- package/packages/claude/commands/test-generate.md +64 -15
- package/packages/claude/plugins/live-canvas-marketplace/plugins/live-canvas-channel/package-lock.json +3 -3
- package/packages/claude/skills/{systematic-debugging → debug-method}/CREATION-LOG.md +1 -1
- package/packages/claude/skills/{systematic-debugging → debug-method}/SKILL.md +9 -9
- package/packages/claude/skills/{systematic-debugging → debug-method}/test-academic.md +1 -1
- package/packages/claude/skills/{systematic-debugging → debug-method}/test-pressure-1.md +1 -1
- package/packages/claude/skills/{systematic-debugging → debug-method}/test-pressure-2.md +1 -1
- package/packages/claude/skills/{systematic-debugging → debug-method}/test-pressure-3.md +1 -1
- package/packages/claude/skills/{test-driven-development → tdd-flow}/SKILL.md +3 -3
- package/packages/claude/skills/{testing-anti-patterns → test-traps}/SKILL.md +77 -3
- package/packages/claude/skills/{root-cause-tracing → trace-back}/SKILL.md +3 -3
- package/packages/claude/skills/{verification-before-completion → verify-done}/SKILL.md +3 -3
- package/packages/droid/AGENTS.md +9 -14
- package/packages/{opencode/command/systematic-debugging.md → droid/commands/debug-method.md} +9 -9
- package/packages/droid/commands/diff-review.md +78 -0
- package/packages/droid/commands/friction/friction.js +28 -6
- package/packages/droid/commands/optimize.md +45 -4
- package/packages/droid/commands/refactor.md +33 -1
- package/packages/droid/commands/release.md +88 -0
- package/packages/droid/commands/remember.md +34 -3
- package/packages/droid/commands/security.md +28 -1
- package/packages/droid/commands/stash.md +7 -0
- package/packages/{opencode/command/test-driven-development.md → droid/commands/tdd-flow.md} +2 -2
- package/packages/droid/commands/test-generate.md +64 -15
- package/packages/droid/commands/{testing-anti-patterns.md → test-traps.md} +77 -3
- package/packages/{opencode/command/root-cause-tracing.md → droid/commands/trace-back.md} +3 -3
- package/packages/droid/commands/{verification-before-completion.md → verify-done.md} +3 -3
- package/packages/droid/droids/code-developer.md +11 -12
- package/packages/droid/droids/quality-assurance.md +1 -1
- package/packages/opencode/AGENTS.md +9 -14
- package/packages/opencode/agent/code-developer.md +11 -12
- package/packages/opencode/agent/quality-assurance.md +1 -1
- package/packages/{ampcode/commands/systematic-debugging.md → opencode/command/debug-method.md} +9 -9
- package/packages/opencode/command/diff-review.md +78 -0
- package/packages/opencode/command/friction/friction.js +28 -6
- package/packages/opencode/command/optimize.md +45 -4
- package/packages/opencode/command/refactor.md +33 -1
- package/packages/opencode/command/release.md +88 -0
- package/packages/opencode/command/remember.md +34 -3
- package/packages/opencode/command/security.md +28 -1
- package/packages/opencode/command/stash.md +7 -0
- package/packages/{ampcode/commands/test-driven-development.md → opencode/command/tdd-flow.md} +2 -2
- package/packages/opencode/command/test-generate.md +64 -15
- package/packages/{ampcode/commands/testing-anti-patterns.md → opencode/command/test-traps.md} +77 -3
- package/packages/{ampcode/commands/root-cause-tracing.md → opencode/command/trace-back.md} +3 -3
- package/packages/opencode/command/{verification-before-completion.md → verify-done.md} +3 -3
- package/packages/opencode/opencode.jsonc +16 -36
- package/packages/subagentic-manual.md +56 -51
- package/packages/ampcode/commands/code-review.md +0 -107
- package/packages/ampcode/commands/condition-based-waiting.md +0 -122
- package/packages/ampcode/commands/debug.md +0 -20
- package/packages/ampcode/commands/explain.md +0 -18
- package/packages/ampcode/commands/friction.md +0 -139
- package/packages/ampcode/commands/git-commit.md +0 -14
- package/packages/ampcode/commands/review.md +0 -18
- package/packages/claude/commands/debug.md +0 -20
- package/packages/claude/commands/explain.md +0 -18
- package/packages/claude/commands/friction.md +0 -139
- package/packages/claude/commands/git-commit.md +0 -14
- package/packages/claude/commands/review.md +0 -18
- package/packages/claude/skills/code-review/SKILL.md +0 -107
- package/packages/claude/skills/code-review/code-reviewer.md +0 -146
- package/packages/claude/skills/condition-based-waiting/SKILL.md +0 -122
- package/packages/droid/commands/code-review.md +0 -107
- package/packages/droid/commands/condition-based-waiting.md +0 -122
- package/packages/droid/commands/debug.md +0 -20
- package/packages/droid/commands/explain.md +0 -18
- package/packages/droid/commands/friction.md +0 -139
- package/packages/droid/commands/git-commit.md +0 -14
- package/packages/droid/commands/review.md +0 -18
- package/packages/opencode/command/code-review.md +0 -107
- package/packages/opencode/command/condition-based-waiting.md +0 -122
- package/packages/opencode/command/debug.md +0 -20
- package/packages/opencode/command/explain.md +0 -18
- package/packages/opencode/command/friction.md +0 -139
- package/packages/opencode/command/git-commit.md +0 -14
- package/packages/opencode/command/review.md +0 -18
- /package/packages/ampcode/commands/{condition-based-waiting → test-traps}/example.ts +0 -0
- /package/packages/ampcode/commands/{root-cause-tracing → trace-back}/find-polluter.sh +0 -0
- /package/packages/claude/skills/{condition-based-waiting → test-traps}/example.ts +0 -0
- /package/packages/claude/skills/{root-cause-tracing → trace-back}/find-polluter.sh +0 -0
- /package/packages/droid/commands/{condition-based-waiting → test-traps}/example.ts +0 -0
- /package/packages/droid/commands/{root-cause-tracing → trace-back}/find-polluter.sh +0 -0
- /package/packages/opencode/command/{condition-based-waiting → test-traps}/example.ts +0 -0
- /package/packages/opencode/command/{root-cause-tracing → trace-back}/find-polluter.sh +0 -0
|
@@ -113,58 +113,38 @@
|
|
|
113
113
|
}
|
|
114
114
|
},
|
|
115
115
|
"command": {
|
|
116
|
-
"
|
|
117
|
-
"template": "{file:./command/
|
|
116
|
+
"debug-method": {
|
|
117
|
+
"template": "{file:./command/debug-method.md}",
|
|
118
118
|
"description": "Systematic four-phase debugging framework - investigate root cause before any fixes"
|
|
119
119
|
},
|
|
120
|
-
"
|
|
121
|
-
"template": "{file:./command/
|
|
120
|
+
"verify-done": {
|
|
121
|
+
"template": "{file:./command/verify-done.md}",
|
|
122
122
|
"description": "Verify work meets requirements before marking complete - prevents incomplete deliverables"
|
|
123
123
|
},
|
|
124
124
|
"skill-creator": {
|
|
125
125
|
"template": "{file:./command/skill-creator.md}",
|
|
126
126
|
"description": "Create reusable skills with proper structure, validation, and documentation"
|
|
127
127
|
},
|
|
128
|
-
"
|
|
129
|
-
"template": "{file:./command/
|
|
128
|
+
"tdd-flow": {
|
|
129
|
+
"template": "{file:./command/tdd-flow.md}",
|
|
130
130
|
"description": "Write test first, watch it fail, write minimal code to pass - ensures tests actually verify behavior"
|
|
131
131
|
},
|
|
132
|
-
"
|
|
133
|
-
"template": "{file:./command/
|
|
132
|
+
"test-traps": {
|
|
133
|
+
"template": "{file:./command/test-traps.md}",
|
|
134
134
|
"description": "Identify and avoid common testing anti-patterns that create fragile, useless tests"
|
|
135
135
|
},
|
|
136
|
-
"
|
|
137
|
-
"template": "{file:./command/
|
|
136
|
+
"trace-back": {
|
|
137
|
+
"template": "{file:./command/trace-back.md}",
|
|
138
138
|
"description": "Trace issues to their root cause using systematic investigation techniques"
|
|
139
139
|
},
|
|
140
|
-
"condition-based-waiting": {
|
|
141
|
-
"template": "{file:./command/condition-based-waiting.md}",
|
|
142
|
-
"description": "Implement robust waiting mechanisms based on conditions rather than fixed delays"
|
|
143
|
-
},
|
|
144
140
|
"brainstorming": {
|
|
145
141
|
"template": "{file:./command/brainstorming.md}",
|
|
146
142
|
"description": "Facilitate structured brainstorming sessions with proven techniques and frameworks"
|
|
147
143
|
},
|
|
148
|
-
"code-review": {
|
|
149
|
-
"template": "{file:./command/code-review.md}",
|
|
150
|
-
"description": "Conduct thorough code reviews with focus on quality, security, and maintainability"
|
|
151
|
-
},
|
|
152
144
|
"docs-builder": {
|
|
153
145
|
"template": "{file:./command/docs-builder/SKILL.md}",
|
|
154
146
|
"description": "Create comprehensive project documentation with structured /docs hierarchy"
|
|
155
147
|
},
|
|
156
|
-
"debug": {
|
|
157
|
-
"template": "{file:./command/debug.md}",
|
|
158
|
-
"description": "Debug an issue systematically using structured investigation techniques"
|
|
159
|
-
},
|
|
160
|
-
"explain": {
|
|
161
|
-
"template": "{file:./command/explain.md}",
|
|
162
|
-
"description": "Explain code for someone new to the codebase"
|
|
163
|
-
},
|
|
164
|
-
"git-commit": {
|
|
165
|
-
"template": "{file:./command/git-commit.md}",
|
|
166
|
-
"description": "Analyze changes and create intelligent git commits"
|
|
167
|
-
},
|
|
168
148
|
"live-canvas": {
|
|
169
149
|
"template": "{file:./command/live-canvas.md}",
|
|
170
150
|
"description": "Design UI variations and collect click-to-annotate feedback from the browser (batch mode only on Opencode)"
|
|
@@ -177,8 +157,8 @@
|
|
|
177
157
|
"template": "{file:./command/refactor.md}",
|
|
178
158
|
"description": "Refactor code while maintaining behavior and tests"
|
|
179
159
|
},
|
|
180
|
-
"review": {
|
|
181
|
-
"template": "{file:./command/review.md}",
|
|
160
|
+
"diff-review": {
|
|
161
|
+
"template": "{file:./command/diff-review.md}",
|
|
182
162
|
"description": "Comprehensive code review including quality, tests, and architecture"
|
|
183
163
|
},
|
|
184
164
|
"security": {
|
|
@@ -189,9 +169,9 @@
|
|
|
189
169
|
"template": "{file:./command/ship.md}",
|
|
190
170
|
"description": "Pre-deployment verification checklist"
|
|
191
171
|
},
|
|
192
|
-
"
|
|
193
|
-
"template": "{file:./command/
|
|
194
|
-
"description": "
|
|
172
|
+
"release": {
|
|
173
|
+
"template": "{file:./command/release.md}",
|
|
174
|
+
"description": "Deliver a feature end-to-end: verify, docs, merge, tag (publish stays manual)"
|
|
195
175
|
},
|
|
196
176
|
"remember": {
|
|
197
177
|
"template": "{file:./command/remember.md}",
|
|
@@ -203,7 +183,7 @@
|
|
|
203
183
|
},
|
|
204
184
|
"test-generate": {
|
|
205
185
|
"template": "{file:./command/test-generate.md}",
|
|
206
|
-
"description": "Generate
|
|
186
|
+
"description": "Generate tests, run them, and verify each test actually exercises the code (not just passes)"
|
|
207
187
|
},
|
|
208
188
|
"subagent-spawning": {
|
|
209
189
|
"template": "{file:./command/subagent-spawning.md}",
|
|
@@ -31,10 +31,10 @@ Install for your platform:
|
|
|
31
31
|
|
|
32
32
|
| Platform | Installation | What's Included |
|
|
33
33
|
|----------|--------------|-----------------|
|
|
34
|
-
| **Claude Code** | `cp -r claude/* ~/.claude/` | 11 subagents +
|
|
35
|
-
| **Droid** | `cp -r droid/* ~/.factory/` |
|
|
36
|
-
| **Ampcode** | `cp -r ampcode/* ~/.config/amp/` | 11 subagents +
|
|
37
|
-
| **OpenCode** | `cp -r opencode/* ~/.config/opencode/` |
|
|
34
|
+
| **Claude Code** | `cp -r claude/* ~/.claude/` | 11 subagents + 9 skills + 8 commands + live-canvas-channel plugin |
|
|
35
|
+
| **Droid** | `cp -r droid/* ~/.factory/` | 17 commands (subagent references) |
|
|
36
|
+
| **Ampcode** | `cp -r ampcode/* ~/.config/amp/` | 11 subagents + 9 skills + 8 commands |
|
|
37
|
+
| **OpenCode** | `cp -r opencode/* ~/.config/opencode/` | 17 commands (subagent references) |
|
|
38
38
|
|
|
39
39
|
**Key Difference**:
|
|
40
40
|
- **Claude Code / Ampcode** implement full subagent system with orchestrator
|
|
@@ -50,12 +50,12 @@ Install for your platform:
|
|
|
50
50
|
- 3 Workflow Agents (PRD, Tasks, Implementation)
|
|
51
51
|
- 8 Specialist Agents (UX, QA, Architecture, Product, Development, etc.)
|
|
52
52
|
|
|
53
|
-
**
|
|
54
|
-
-
|
|
55
|
-
- brainstorming,
|
|
53
|
+
**10 Skills** - Auto-triggering + manual workflow components
|
|
54
|
+
- tdd-flow, test-traps, verify-done (auto-trigger)
|
|
55
|
+
- brainstorming, debug-method, docs-builder, live-canvas, etc.
|
|
56
56
|
|
|
57
|
-
**
|
|
58
|
-
-
|
|
57
|
+
**9 Commands** - Simple workflow helpers
|
|
58
|
+
- optimize, refactor, remember, diff-review, security, ship, release, stash, test-generate
|
|
59
59
|
|
|
60
60
|
**Orchestration System**
|
|
61
61
|
- Automatic intent matching to 9 workflow patterns
|
|
@@ -64,7 +64,7 @@ Install for your platform:
|
|
|
64
64
|
|
|
65
65
|
### Droid/OpenCode (Commands Only)
|
|
66
66
|
|
|
67
|
-
**
|
|
67
|
+
**18 Commands** - All workflow capabilities in command form
|
|
68
68
|
- Combines skills + commands into unified command set
|
|
69
69
|
- Same functionality, different invocation model (no auto-triggering)
|
|
70
70
|
- Includes reference documentation for subagents
|
|
@@ -102,38 +102,33 @@ Install for your platform:
|
|
|
102
102
|
|
|
103
103
|
## Commands Reference
|
|
104
104
|
|
|
105
|
-
### Claude Code / Ampcode:
|
|
105
|
+
### Claude Code / Ampcode: 18 Total (9 Skills + 9 Commands)
|
|
106
106
|
|
|
107
107
|
**Auto-Triggering Skills (3)**
|
|
108
|
-
- `
|
|
109
|
-
- `
|
|
110
|
-
- `
|
|
108
|
+
- `tdd-flow` - Write test first, watch fail, minimal passing code
|
|
109
|
+
- `test-traps` - Prevent mocking anti-patterns and test pollution
|
|
110
|
+
- `verify-done` - Run verification before claiming done
|
|
111
111
|
|
|
112
|
-
**Manual Skills (
|
|
112
|
+
**Manual Skills (6)**
|
|
113
113
|
- `brainstorming` - Refine rough ideas through collaborative questioning
|
|
114
|
-
- `code-review` - Review implementation against requirements
|
|
115
|
-
- `condition-based-waiting` - Replace timeouts with condition polling
|
|
116
114
|
- `docs-builder` - Create structured /docs hierarchy
|
|
117
115
|
- `live-canvas` - Design UI variations with click-to-annotate browser feedback. **Claude Code ships a companion MCP channel plugin (`live-canvas-channel`) that enables live mode — each overlay Save streams into the session in real time.** Other tools run in batch mode only. One-time setup required: see `packages/claude/skills/live-canvas/README.md`.
|
|
118
|
-
- `
|
|
116
|
+
- `trace-back` - Trace bugs backward through call stack
|
|
119
117
|
- `skill-creator` - Guide for creating new skills
|
|
120
|
-
- `
|
|
118
|
+
- `debug-method` - Four-phase debugging framework
|
|
121
119
|
|
|
122
|
-
**Simple Commands (
|
|
123
|
-
- `debug` - Systematic investigation techniques
|
|
124
|
-
- `explain` - Explain code for newcomers
|
|
125
|
-
- `friction` - Analyze session logs for failure patterns and behavioral signals
|
|
126
|
-
- `git-commit` - Intelligent commit creation
|
|
120
|
+
**Simple Commands (9)**
|
|
127
121
|
- `optimize` - Performance analysis
|
|
128
122
|
- `refactor` - Maintain behavior while improving code
|
|
129
123
|
- `remember` - Consolidate stashes + friction into project memory
|
|
130
|
-
- `review` -
|
|
124
|
+
- `diff-review` - Review a file, branch, or range; verifies findings before fixing
|
|
131
125
|
- `security` - Vulnerability scanning
|
|
132
126
|
- `ship` - Pre-deployment checklist
|
|
127
|
+
- `release` - Deliver a feature end-to-end: verify → docs → merge → tag (publish stays manual)
|
|
133
128
|
- `stash` - Save session context for compaction recovery or handoffs
|
|
134
129
|
- `test-generate` - Test suite generation
|
|
135
130
|
|
|
136
|
-
### Droid/OpenCode:
|
|
131
|
+
### Droid/OpenCode: 18 Commands
|
|
137
132
|
|
|
138
133
|
Same functionality as skills+commands, but:
|
|
139
134
|
- All invoked as commands (no auto-triggering)
|
|
@@ -142,24 +137,34 @@ Same functionality as skills+commands, but:
|
|
|
142
137
|
- `live-canvas` runs in batch mode only (no channel plugin — that's Claude Code specific)
|
|
143
138
|
|
|
144
139
|
**Command Categories**:
|
|
145
|
-
- **Development & Testing (
|
|
146
|
-
- **Code Operations (6)**: refactor, optimize,
|
|
147
|
-
- **Session & Memory (
|
|
140
|
+
- **Development & Testing (6)**: tdd-flow, test-traps, test-generate, debug-method, trace-back, verify-done
|
|
141
|
+
- **Code Operations (6)**: refactor, optimize, diff-review, security, ship, release
|
|
142
|
+
- **Session & Memory (5)**: brainstorming, skill-creator, docs-builder, stash, remember
|
|
148
143
|
- **Design (1)**: live-canvas
|
|
149
144
|
|
|
150
145
|
---
|
|
151
146
|
|
|
152
147
|
## Hot Memory
|
|
153
148
|
|
|
154
|
-
Lightweight session memory that learns from your usage patterns across sessions.
|
|
149
|
+
Lightweight session memory that learns from your usage patterns across sessions. **`/stash` is
|
|
150
|
+
the only command you actively run — it drives the whole pipeline.** Once a few stashes pile up
|
|
151
|
+
it nudges you to run `/remember`, which does everything else: friction analysis, consolidation,
|
|
152
|
+
and wiring the memory into your agent config file.
|
|
155
153
|
|
|
156
154
|
```
|
|
157
|
-
/stash →
|
|
155
|
+
/stash → (nudge at 5+ unprocessed) → /remember
|
|
158
156
|
```
|
|
159
157
|
|
|
160
|
-
1. **`/stash`** - Snapshot current session context to
|
|
161
|
-
|
|
162
|
-
|
|
158
|
+
1. **`/stash`** - Snapshot current session context to the tool's `…/stash/`. Use before
|
|
159
|
+
compaction, handoffs, or ending complex work. After saving it counts the unprocessed backlog
|
|
160
|
+
(`stash files − .processed entries`) and, at 5+, nudges you to run `/remember`. No counter is
|
|
161
|
+
stored; running `/remember` clears the backlog.
|
|
162
|
+
2. **`/remember`** - Runs friction analysis first (best-effort — scores sessions across *all* your
|
|
163
|
+
projects from the tool's global sessions root, clusters failures into antigens), then
|
|
164
|
+
consolidates stashes + antigens into `…/memory/MEMORY.md` and injects `@MEMORY.md` into the
|
|
165
|
+
**per-tool agent config — `CLAUDE.md` (Claude Code), `AGENTS.md` (Droid / OpenCode), or
|
|
166
|
+
`AGENT.md` (Ampcode)** — so every future session loads it. Each package writes to its own
|
|
167
|
+
tool's config file; the global probe list only governs which logs friction *reads*.
|
|
163
168
|
|
|
164
169
|
**Result:** Project-local memory that accumulates across sessions — no external dependencies, no databases, just markdown.
|
|
165
170
|
|
|
@@ -201,7 +206,7 @@ Orchestrator: "Start systematic implementation?" [Yes/No]
|
|
|
201
206
|
**Bypass Options**:
|
|
202
207
|
- Direct agent: `@quality-assurance review this code`
|
|
203
208
|
- Role syntax: `As system-architect, design the API layer`
|
|
204
|
-
- Skills: `/
|
|
209
|
+
- Skills: `/tdd-flow login-feature`
|
|
205
210
|
|
|
206
211
|
### 9 Pre-Defined Workflow Patterns
|
|
207
212
|
|
|
@@ -220,9 +225,9 @@ Each pattern includes conditional decision points requiring user approval.
|
|
|
220
225
|
### Droid/OpenCode: Direct Command Invocation
|
|
221
226
|
|
|
222
227
|
No orchestrator - invoke commands directly:
|
|
223
|
-
- `/
|
|
228
|
+
- `/diff-review <file-or-branch>`
|
|
224
229
|
- `/refactor <code-section>`
|
|
225
|
-
- `/
|
|
230
|
+
- `/tdd-flow <feature>`
|
|
226
231
|
|
|
227
232
|
Subagent workflows require manual coordination.
|
|
228
233
|
|
|
@@ -257,8 +262,8 @@ Subagent workflows require manual coordination.
|
|
|
257
262
|
~/.claude/
|
|
258
263
|
├── CLAUDE.md # Registry + orchestrator workflows
|
|
259
264
|
├── agents/ # 11 subagent implementations (*.md)
|
|
260
|
-
├── skills/ #
|
|
261
|
-
└── commands/ #
|
|
265
|
+
├── skills/ # 9 skills (subdirectories with SKILL.md)
|
|
266
|
+
└── commands/ # 8 commands (*.md)
|
|
262
267
|
```
|
|
263
268
|
|
|
264
269
|
**Features**:
|
|
@@ -272,8 +277,8 @@ Subagent workflows require manual coordination.
|
|
|
272
277
|
~/.config/amp/
|
|
273
278
|
├── AGENT.md # Reference doc (subagents + commands)
|
|
274
279
|
├── agents/ # 11 subagent implementations (*.md)
|
|
275
|
-
├── skills/ #
|
|
276
|
-
└── commands/ #
|
|
280
|
+
├── skills/ # 9 skills (subdirectories with SKILL.md)
|
|
281
|
+
└── commands/ # 8 commands (*.md)
|
|
277
282
|
```
|
|
278
283
|
|
|
279
284
|
**Features**:
|
|
@@ -285,7 +290,7 @@ Subagent workflows require manual coordination.
|
|
|
285
290
|
```
|
|
286
291
|
~/.factory/
|
|
287
292
|
├── AGENTS.md # Reference doc (subagents + commands)
|
|
288
|
-
└── commands/ #
|
|
293
|
+
└── commands/ # 17 commands (*.md)
|
|
289
294
|
```
|
|
290
295
|
|
|
291
296
|
**Features**:
|
|
@@ -297,7 +302,7 @@ Subagent workflows require manual coordination.
|
|
|
297
302
|
```
|
|
298
303
|
~/.config/opencode/
|
|
299
304
|
├── AGENTS.md # Reference doc (subagents + commands)
|
|
300
|
-
└── command/ #
|
|
305
|
+
└── command/ # 17 commands (*.md)
|
|
301
306
|
```
|
|
302
307
|
|
|
303
308
|
**Features**:
|
|
@@ -326,10 +331,10 @@ color: purple
|
|
|
326
331
|
**Skills** (`skills/*/SKILL.md`):
|
|
327
332
|
```yaml
|
|
328
333
|
---
|
|
329
|
-
id:
|
|
330
|
-
name:
|
|
334
|
+
id: tdd-flow
|
|
335
|
+
name: tdd-flow
|
|
331
336
|
description: Write test first, watch it fail, write minimal code to pass
|
|
332
|
-
usage: /
|
|
337
|
+
usage: /tdd-flow <feature-or-behavior-to-test>
|
|
333
338
|
auto_trigger: true
|
|
334
339
|
---
|
|
335
340
|
```
|
|
@@ -337,11 +342,11 @@ auto_trigger: true
|
|
|
337
342
|
**Commands** (`commands/*.md`):
|
|
338
343
|
```yaml
|
|
339
344
|
---
|
|
340
|
-
id:
|
|
341
|
-
name:
|
|
342
|
-
description:
|
|
343
|
-
usage: /
|
|
344
|
-
argument-hint: [
|
|
345
|
+
id: refactor
|
|
346
|
+
name: refactor
|
|
347
|
+
description: Refactor code while maintaining behavior and tests
|
|
348
|
+
usage: /refactor <code-section>
|
|
349
|
+
argument-hint: [file-or-function]
|
|
345
350
|
---
|
|
346
351
|
```
|
|
347
352
|
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: code-review
|
|
3
|
-
description: Use when completing tasks, implementing major features, or before merging to verify work meets requirements - reviews implementation against plan or requirements before proceeding
|
|
4
|
-
usage: /code-review <review-scope> <focus-areas>
|
|
5
|
-
auto_trigger: false
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Requesting Code Review
|
|
9
|
-
|
|
10
|
-
Review code thoroughly to catch issues before they cascade.
|
|
11
|
-
|
|
12
|
-
**Core principle:** Review early, review often.
|
|
13
|
-
|
|
14
|
-
## When to Request Review
|
|
15
|
-
|
|
16
|
-
**Mandatory:**
|
|
17
|
-
- After each task in subagent-driven development
|
|
18
|
-
- After completing major feature
|
|
19
|
-
- Before merge to main
|
|
20
|
-
|
|
21
|
-
**Optional but valuable:**
|
|
22
|
-
- When stuck (fresh perspective)
|
|
23
|
-
- Before refactoring (baseline check)
|
|
24
|
-
- After fixing complex bug
|
|
25
|
-
|
|
26
|
-
## How to Request
|
|
27
|
-
|
|
28
|
-
**1. Get git SHAs:**
|
|
29
|
-
```bash
|
|
30
|
-
BASE_SHA=$(git rev-parse HEAD~1) # or origin/main
|
|
31
|
-
HEAD_SHA=$(git rev-parse HEAD)
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
**2. Conduct code review:**
|
|
35
|
-
|
|
36
|
-
Review implementation against requirements and plan
|
|
37
|
-
|
|
38
|
-
**Placeholders:**
|
|
39
|
-
- `{WHAT_WAS_IMPLEMENTED}` - What you just built
|
|
40
|
-
- `{PLAN_OR_REQUIREMENTS}` - What it should do
|
|
41
|
-
- `{BASE_SHA}` - Starting commit
|
|
42
|
-
- `{HEAD_SHA}` - Ending commit
|
|
43
|
-
- `{DESCRIPTION}` - Brief summary
|
|
44
|
-
|
|
45
|
-
**3. Act on feedback:**
|
|
46
|
-
- Fix Critical issues immediately
|
|
47
|
-
- Fix Important issues before proceeding
|
|
48
|
-
- Note Minor issues for later
|
|
49
|
-
- Push back if reviewer is wrong (with reasoning)
|
|
50
|
-
|
|
51
|
-
## Example
|
|
52
|
-
|
|
53
|
-
```
|
|
54
|
-
[Just completed Task 2: Add verification function]
|
|
55
|
-
|
|
56
|
-
You: Let me request code review before proceeding.
|
|
57
|
-
|
|
58
|
-
BASE_SHA=$(git log --oneline | grep "Task 1" | head -1 | awk '{print $1}')
|
|
59
|
-
HEAD_SHA=$(git rev-parse HEAD)
|
|
60
|
-
|
|
61
|
-
[Conduct code review]
|
|
62
|
-
WHAT_WAS_IMPLEMENTED: Verification and repair functions for conversation index
|
|
63
|
-
PLAN_OR_REQUIREMENTS: Task 2 from docs/plans/deployment-plan.md
|
|
64
|
-
BASE_SHA: a7981ec
|
|
65
|
-
HEAD_SHA: 3df7661
|
|
66
|
-
DESCRIPTION: Added verifyIndex() and repairIndex() with 4 issue types
|
|
67
|
-
|
|
68
|
-
[Subagent returns]:
|
|
69
|
-
Strengths: Clean architecture, real tests
|
|
70
|
-
Issues:
|
|
71
|
-
Important: Missing progress indicators
|
|
72
|
-
Minor: Magic number (100) for reporting interval
|
|
73
|
-
Assessment: Ready to proceed
|
|
74
|
-
|
|
75
|
-
You: [Fix progress indicators]
|
|
76
|
-
[Continue to Task 3]
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
## Integration with Workflows
|
|
80
|
-
|
|
81
|
-
**Subagent-Driven Development:**
|
|
82
|
-
- Review after EACH task
|
|
83
|
-
- Catch issues before they compound
|
|
84
|
-
- Fix before moving to next task
|
|
85
|
-
|
|
86
|
-
**Executing Plans:**
|
|
87
|
-
- Review after each batch (3 tasks)
|
|
88
|
-
- Get feedback, apply, continue
|
|
89
|
-
|
|
90
|
-
**Ad-Hoc Development:**
|
|
91
|
-
- Review before merge
|
|
92
|
-
- Review when stuck
|
|
93
|
-
|
|
94
|
-
## Red Flags
|
|
95
|
-
|
|
96
|
-
**Never:**
|
|
97
|
-
- Skip review because "it's simple"
|
|
98
|
-
- Ignore Critical issues
|
|
99
|
-
- Proceed with unfixed Important issues
|
|
100
|
-
- Argue with valid technical feedback
|
|
101
|
-
|
|
102
|
-
**If reviewer wrong:**
|
|
103
|
-
- Push back with technical reasoning
|
|
104
|
-
- Show code/tests that prove it works
|
|
105
|
-
- Request clarification
|
|
106
|
-
|
|
107
|
-
See template at: requesting-code-review/code-reviewer.md
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: condition-based-waiting
|
|
3
|
-
description: Use when tests have race conditions, timing dependencies, or inconsistent pass/fail behavior - replaces arbitrary timeouts with condition polling to wait for actual state changes, eliminating flaky tests from timing guesses
|
|
4
|
-
usage: /condition-based-waiting <condition-type> <timeout-specs>
|
|
5
|
-
auto_trigger: false
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Condition-Based Waiting
|
|
9
|
-
|
|
10
|
-
## Overview
|
|
11
|
-
|
|
12
|
-
Flaky tests often guess at timing with arbitrary delays. This creates race conditions where tests pass on fast machines but fail under load or in CI.
|
|
13
|
-
|
|
14
|
-
**Core principle:** Wait for the actual condition you care about, not a guess about how long it takes.
|
|
15
|
-
|
|
16
|
-
## When to Use
|
|
17
|
-
|
|
18
|
-
```dot
|
|
19
|
-
digraph when_to_use {
|
|
20
|
-
"Test uses setTimeout/sleep?" [shape=diamond];
|
|
21
|
-
"Testing timing behavior?" [shape=diamond];
|
|
22
|
-
"Document WHY timeout needed" [shape=box];
|
|
23
|
-
"Use condition-based waiting" [shape=box];
|
|
24
|
-
|
|
25
|
-
"Test uses setTimeout/sleep?" -> "Testing timing behavior?" [label="yes"];
|
|
26
|
-
"Testing timing behavior?" -> "Document WHY timeout needed" [label="yes"];
|
|
27
|
-
"Testing timing behavior?" -> "Use condition-based waiting" [label="no"];
|
|
28
|
-
}
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
**Use when:**
|
|
32
|
-
- Tests have arbitrary delays (`setTimeout`, `sleep`, `time.sleep()`)
|
|
33
|
-
- Tests are flaky (pass sometimes, fail under load)
|
|
34
|
-
- Tests timeout when run in parallel
|
|
35
|
-
- Waiting for async operations to complete
|
|
36
|
-
|
|
37
|
-
**Don't use when:**
|
|
38
|
-
- Testing actual timing behavior (debounce, throttle intervals)
|
|
39
|
-
- Always document WHY if using arbitrary timeout
|
|
40
|
-
|
|
41
|
-
## Core Pattern
|
|
42
|
-
|
|
43
|
-
```typescript
|
|
44
|
-
// ❌ BEFORE: Guessing at timing
|
|
45
|
-
await new Promise(r => setTimeout(r, 50));
|
|
46
|
-
const result = getResult();
|
|
47
|
-
expect(result).toBeDefined();
|
|
48
|
-
|
|
49
|
-
// ✅ AFTER: Waiting for condition
|
|
50
|
-
await waitFor(() => getResult() !== undefined);
|
|
51
|
-
const result = getResult();
|
|
52
|
-
expect(result).toBeDefined();
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
## Quick Patterns
|
|
56
|
-
|
|
57
|
-
| Scenario | Pattern |
|
|
58
|
-
|----------|---------|
|
|
59
|
-
| Wait for event | `waitFor(() => events.find(e => e.type === 'DONE'))` |
|
|
60
|
-
| Wait for state | `waitFor(() => machine.state === 'ready')` |
|
|
61
|
-
| Wait for count | `waitFor(() => items.length >= 5)` |
|
|
62
|
-
| Wait for file | `waitFor(() => fs.existsSync(path))` |
|
|
63
|
-
| Complex condition | `waitFor(() => obj.ready && obj.value > 10)` |
|
|
64
|
-
|
|
65
|
-
## Implementation
|
|
66
|
-
|
|
67
|
-
Generic polling function:
|
|
68
|
-
```typescript
|
|
69
|
-
async function waitFor<T>(
|
|
70
|
-
condition: () => T | undefined | null | false,
|
|
71
|
-
description: string,
|
|
72
|
-
timeoutMs = 5000
|
|
73
|
-
): Promise<T> {
|
|
74
|
-
const startTime = Date.now();
|
|
75
|
-
|
|
76
|
-
while (true) {
|
|
77
|
-
const result = condition();
|
|
78
|
-
if (result) return result;
|
|
79
|
-
|
|
80
|
-
if (Date.now() - startTime > timeoutMs) {
|
|
81
|
-
throw new Error(`Timeout waiting for ${description} after ${timeoutMs}ms`);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
await new Promise(r => setTimeout(r, 10)); // Poll every 10ms
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
See @example.ts for complete implementation with domain-specific helpers (`waitForEvent`, `waitForEventCount`, `waitForEventMatch`) from actual debugging session.
|
|
90
|
-
|
|
91
|
-
## Common Mistakes
|
|
92
|
-
|
|
93
|
-
**❌ Polling too fast:** `setTimeout(check, 1)` - wastes CPU
|
|
94
|
-
**✅ Fix:** Poll every 10ms
|
|
95
|
-
|
|
96
|
-
**❌ No timeout:** Loop forever if condition never met
|
|
97
|
-
**✅ Fix:** Always include timeout with clear error
|
|
98
|
-
|
|
99
|
-
**❌ Stale data:** Cache state before loop
|
|
100
|
-
**✅ Fix:** Call getter inside loop for fresh data
|
|
101
|
-
|
|
102
|
-
## When Arbitrary Timeout IS Correct
|
|
103
|
-
|
|
104
|
-
```typescript
|
|
105
|
-
// Tool ticks every 100ms - need 2 ticks to verify partial output
|
|
106
|
-
await waitForEvent(manager, 'TOOL_STARTED'); // First: wait for condition
|
|
107
|
-
await new Promise(r => setTimeout(r, 200)); // Then: wait for timed behavior
|
|
108
|
-
// 200ms = 2 ticks at 100ms intervals - documented and justified
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
**Requirements:**
|
|
112
|
-
1. First wait for triggering condition
|
|
113
|
-
2. Based on known timing (not guessing)
|
|
114
|
-
3. Comment explaining WHY
|
|
115
|
-
|
|
116
|
-
## Real-World Impact
|
|
117
|
-
|
|
118
|
-
From debugging session (2025-10-03):
|
|
119
|
-
- Fixed 15 flaky tests across 3 files
|
|
120
|
-
- Pass rate: 60% → 100%
|
|
121
|
-
- Execution time: 40% faster
|
|
122
|
-
- No more race conditions
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: debug
|
|
3
|
-
description: Debug issue [issue]
|
|
4
|
-
usage: /debug <issue-description>
|
|
5
|
-
argument-hint: [description of the problem]
|
|
6
|
-
---
|
|
7
|
-
Debug: $ARGUMENTS
|
|
8
|
-
|
|
9
|
-
## Process
|
|
10
|
-
1. Clarify: What's expected vs actual behavior?
|
|
11
|
-
2. Reproduce: What triggers the issue?
|
|
12
|
-
3. Isolate: Which component/function is responsible?
|
|
13
|
-
4. Trace: Follow the data flow
|
|
14
|
-
5. Fix: Implement and verify the solution
|
|
15
|
-
|
|
16
|
-
## Output
|
|
17
|
-
- Root cause
|
|
18
|
-
- Affected code paths
|
|
19
|
-
- Fix with explanation
|
|
20
|
-
- Prevention strategy
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: explain
|
|
3
|
-
description: Explain [code]
|
|
4
|
-
usage: /explain <code-section>
|
|
5
|
-
argument-hint: [file, function, or concept]
|
|
6
|
-
model: claude-3-5-haiku-20241022
|
|
7
|
-
---
|
|
8
|
-
Explain $ARGUMENTS.
|
|
9
|
-
|
|
10
|
-
## Cover
|
|
11
|
-
- What it does (purpose)
|
|
12
|
-
- How it works (step by step)
|
|
13
|
-
- Why it's designed this way
|
|
14
|
-
- Dependencies and side effects
|
|
15
|
-
- Potential gotchas
|
|
16
|
-
|
|
17
|
-
Assume reader knows the language but not this codebase.
|
|
18
|
-
|