liteagents 2.9.0 → 2.10.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 +33 -0
- package/README.md +25 -31
- package/installer/cli.js +6 -2
- package/package.json +3 -3
- package/packages/ampcode/AGENT.md +9 -15
- 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/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 +9 -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/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 +8 -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/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 +8 -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/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 +13 -37
- package/packages/subagentic-manual.md +55 -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
|
@@ -1,18 +1,67 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: test-generate
|
|
3
|
-
description: Generate tests [file]
|
|
4
|
-
usage: /test-generate <
|
|
5
|
-
argument-hint: [file
|
|
3
|
+
description: Generate and run tests [file]
|
|
4
|
+
usage: /test-generate <file>
|
|
5
|
+
argument-hint: [file or symbol to test]
|
|
6
|
+
allowed-tools: Read, Edit, Write, Grep, Glob, Bash(npm test *), Bash(npx jest *), Bash(npx vitest *), Bash(pnpm test *), Bash(yarn test *), Bash(pytest *), Bash(python *), Bash(go test *), Bash(cargo test *), Bash(make test *)
|
|
6
7
|
---
|
|
7
|
-
Generate tests for $ARGUMENTS.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
8
|
+
Generate tests for $ARGUMENTS, then run them. This is a generate → run →
|
|
9
|
+
verify loop, not just file generation.
|
|
10
|
+
|
|
11
|
+
## 1. Discover
|
|
12
|
+
- Detect the test framework already in use (look for `jest.config*`,
|
|
13
|
+
`vitest.config*`, `pytest.ini` / `pyproject.toml [tool.pytest]`, Go's
|
|
14
|
+
`_test.go` convention, `Cargo.toml [dev-dependencies]`, etc.). **Never
|
|
15
|
+
add a new framework or runner.**
|
|
16
|
+
- Skim 1–2 existing test files near the target to mirror style, fixtures,
|
|
17
|
+
setup/teardown, assertion style, and naming convention.
|
|
18
|
+
|
|
19
|
+
## 2. Generate
|
|
20
|
+
Cover:
|
|
21
|
+
- **Happy path** (expected usage)
|
|
22
|
+
- **Edges** (empty / null / boundary / malformed)
|
|
23
|
+
- **Errors** (invalid input, IO / network / DB failures)
|
|
24
|
+
|
|
25
|
+
Match existing patterns:
|
|
26
|
+
- Same framework, same fixture style, same naming convention.
|
|
27
|
+
- Reuse existing setup/teardown helpers; do **not** add new mock libraries
|
|
28
|
+
or new test-runner config.
|
|
29
|
+
- Do **not** add test-only public methods or exports to production code to
|
|
30
|
+
make a test possible — if the test wants a hook the prod code doesn't
|
|
31
|
+
expose, stop and ask (`test-traps` territory).
|
|
32
|
+
|
|
33
|
+
## 3. Run
|
|
34
|
+
Execute the project's real test command, scoped to just the new tests
|
|
35
|
+
(`-t <name>`, `--testPathPattern`, `pytest path/to/test.py`, `go test
|
|
36
|
+
./pkg`, etc.). Report:
|
|
37
|
+
- Pass / fail counts.
|
|
38
|
+
- Any failure with the assertion message and `file:line`.
|
|
39
|
+
|
|
40
|
+
## 4. Verify the tests BITE
|
|
41
|
+
A test that passes is not the same as a test that **exercises** the code.
|
|
42
|
+
For each new test, confirm:
|
|
43
|
+
- It would fail if the function under test returned the wrong value.
|
|
44
|
+
Mentally swap a broken impl — does the assertion actually catch it?
|
|
45
|
+
- It isn't `expect(true).toBe(true)`, `expect(fn).toBeDefined()`, or a
|
|
46
|
+
mock asserting itself.
|
|
47
|
+
- It isn't passing only because the setup masked the real call.
|
|
48
|
+
|
|
49
|
+
Mark each new test **biting** or **superficial** (with reason).
|
|
50
|
+
Superficial tests count as a failure to ship — either fix or delete.
|
|
51
|
+
|
|
52
|
+
## 5. Report
|
|
53
|
+
- Files added / modified.
|
|
54
|
+
- Pass / fail.
|
|
55
|
+
- Biting vs superficial breakdown.
|
|
56
|
+
- What was deliberately **not** tested, and why (third-party shims,
|
|
57
|
+
trivial getters/setters, generated code). Documented gaps beat fake
|
|
58
|
+
coverage.
|
|
59
|
+
|
|
60
|
+
**Stop and ask** when:
|
|
61
|
+
- A meaningful test would require a non-obvious design change to
|
|
62
|
+
production code (don't pollute prod to make tests pass — present the
|
|
63
|
+
options instead).
|
|
64
|
+
- The existing test setup has multiple reasonable patterns and it's
|
|
65
|
+
unclear which to mirror.
|
|
66
|
+
- An existing dependency would need to be mocked in a way the project
|
|
67
|
+
doesn't currently do (introducing a new mock style is a design choice).
|
package/packages/{ampcode/commands/testing-anti-patterns.md → opencode/command/test-traps.md}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: test-traps
|
|
3
3
|
description: Use when writing or changing tests, adding mocks, or tempted to add test-only methods to production code - prevents testing mock behavior, production pollution with test-only methods, and mocking without understanding dependencies
|
|
4
|
-
usage: /
|
|
4
|
+
usage: /test-traps <testing-scenario>
|
|
5
5
|
auto_trigger: true
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
#
|
|
8
|
+
# Test Traps
|
|
9
9
|
|
|
10
10
|
## Overview
|
|
11
11
|
|
|
@@ -253,6 +253,79 @@ TDD cycle:
|
|
|
253
253
|
4. THEN claim complete
|
|
254
254
|
```
|
|
255
255
|
|
|
256
|
+
## Anti-Pattern 6: Timeout-Based Waiting
|
|
257
|
+
|
|
258
|
+
**The violation:**
|
|
259
|
+
```typescript
|
|
260
|
+
// Wait an arbitrary amount of time, then check
|
|
261
|
+
await new Promise(r => setTimeout(r, 50));
|
|
262
|
+
const result = getResult();
|
|
263
|
+
expect(result).toBeDefined();
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
```python
|
|
267
|
+
time.sleep(0.5)
|
|
268
|
+
assert get_result() is not None
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
**Why this is wrong:**
|
|
272
|
+
- Passes on fast machines, fails in CI under load (or vice versa).
|
|
273
|
+
- Either too short (flaky) or too long (slow suite) — every value is wrong somewhere.
|
|
274
|
+
- Hides the actual condition the test cares about.
|
|
275
|
+
- A real bug in the async machinery looks identical to a "too-short sleep."
|
|
276
|
+
|
|
277
|
+
**The fix — poll for the actual condition:**
|
|
278
|
+
```typescript
|
|
279
|
+
await waitFor(() => getResult() !== undefined);
|
|
280
|
+
const result = getResult();
|
|
281
|
+
expect(result).toBeDefined();
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
| Scenario | Pattern |
|
|
285
|
+
|----------|---------|
|
|
286
|
+
| Wait for event | `waitFor(() => events.find(e => e.type === 'DONE'))` |
|
|
287
|
+
| Wait for state | `waitFor(() => machine.state === 'ready')` |
|
|
288
|
+
| Wait for count | `waitFor(() => items.length >= 5)` |
|
|
289
|
+
| Wait for file | `waitFor(() => fs.existsSync(path))` |
|
|
290
|
+
| Complex condition | `waitFor(() => obj.ready && obj.value > 10)` |
|
|
291
|
+
|
|
292
|
+
Minimal generic poller:
|
|
293
|
+
```typescript
|
|
294
|
+
async function waitFor<T>(
|
|
295
|
+
condition: () => T | undefined | null | false,
|
|
296
|
+
description = 'condition',
|
|
297
|
+
timeoutMs = 5000
|
|
298
|
+
): Promise<T> {
|
|
299
|
+
const start = Date.now();
|
|
300
|
+
while (true) {
|
|
301
|
+
const result = condition();
|
|
302
|
+
if (result) return result;
|
|
303
|
+
if (Date.now() - start > timeoutMs) {
|
|
304
|
+
throw new Error(`Timeout waiting for ${description} after ${timeoutMs}ms`);
|
|
305
|
+
}
|
|
306
|
+
await new Promise(r => setTimeout(r, 10));
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
See `example.ts` for domain-specific helpers (`waitForEvent`, `waitForEventCount`, `waitForEventMatch`) drawn from a real debugging session.
|
|
312
|
+
|
|
313
|
+
**Polling pitfalls:**
|
|
314
|
+
- **Polling too fast** (`setTimeout(check, 1)`) wastes CPU. **Fix:** poll every ~10ms.
|
|
315
|
+
- **No timeout** means a never-met condition hangs the suite forever. **Fix:** always include a timeout with a descriptive error.
|
|
316
|
+
- **Stale data** — if you read state once before the loop, you'll never see updates. **Fix:** call the getter *inside* the loop.
|
|
317
|
+
|
|
318
|
+
**When an arbitrary timeout IS correct:**
|
|
319
|
+
```typescript
|
|
320
|
+
// Tool ticks every 100ms; observe 2 ticks of partial output.
|
|
321
|
+
await waitForEvent(manager, 'TOOL_STARTED'); // condition first
|
|
322
|
+
await new Promise(r => setTimeout(r, 200)); // then a documented, calculated wait
|
|
323
|
+
// 200ms = 2 ticks at the documented 100ms cadence
|
|
324
|
+
```
|
|
325
|
+
Requirements: (1) wait for the triggering condition first, (2) the delay is based on a *known* interval (not a guess), (3) a comment explains why a sleep is correct here.
|
|
326
|
+
|
|
327
|
+
**Real-world impact** (debugging session, 2025-10-03): 15 flaky tests across 3 files, pass rate 60% → 100%, suite 40% faster, race conditions gone.
|
|
328
|
+
|
|
256
329
|
## When Mocks Become Too Complex
|
|
257
330
|
|
|
258
331
|
**Warning signs:**
|
|
@@ -284,6 +357,7 @@ TDD cycle:
|
|
|
284
357
|
| Mock without understanding | Understand dependencies first, mock minimally |
|
|
285
358
|
| Incomplete mocks | Mirror real API completely |
|
|
286
359
|
| Tests as afterthought | TDD - tests first |
|
|
360
|
+
| Timeout-based waiting | Poll for the actual condition with `waitFor()` |
|
|
287
361
|
| Over-complex mocks | Consider integration tests |
|
|
288
362
|
|
|
289
363
|
## Red Flags
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: trace-back
|
|
3
3
|
description: Use when errors occur deep in execution and you need to trace back to find the original trigger - systematically traces bugs backward through call stack, adding instrumentation when needed, to identify source of invalid data or incorrect behavior
|
|
4
|
-
usage: /
|
|
4
|
+
usage: /trace-back <issue-description>
|
|
5
5
|
auto_trigger: false
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
#
|
|
8
|
+
# Trace Back
|
|
9
9
|
|
|
10
10
|
## Overview
|
|
11
11
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: verify-done
|
|
3
3
|
description: Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always
|
|
4
|
-
usage: /
|
|
4
|
+
usage: /verify-done <work-to-verify>
|
|
5
5
|
auto_trigger: true
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
#
|
|
8
|
+
# Verify Done
|
|
9
9
|
|
|
10
10
|
## Auto-Trigger
|
|
11
11
|
|
|
@@ -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,10 +169,6 @@
|
|
|
189
169
|
"template": "{file:./command/ship.md}",
|
|
190
170
|
"description": "Pre-deployment verification checklist"
|
|
191
171
|
},
|
|
192
|
-
"friction": {
|
|
193
|
-
"template": "{file:./command/friction.md}",
|
|
194
|
-
"description": "Analyze session logs for failure patterns and behavioral signals"
|
|
195
|
-
},
|
|
196
172
|
"remember": {
|
|
197
173
|
"template": "{file:./command/remember.md}",
|
|
198
174
|
"description": "Consolidate stashes + friction into project memory"
|
|
@@ -203,7 +179,7 @@
|
|
|
203
179
|
},
|
|
204
180
|
"test-generate": {
|
|
205
181
|
"template": "{file:./command/test-generate.md}",
|
|
206
|
-
"description": "Generate
|
|
182
|
+
"description": "Generate tests, run them, and verify each test actually exercises the code (not just passes)"
|
|
207
183
|
},
|
|
208
184
|
"subagent-spawning": {
|
|
209
185
|
"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
|
+
**8 Commands** - Simple workflow helpers
|
|
58
|
+
- optimize, refactor, remember, diff-review, security, ship, 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,32 @@ 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 (8)**
|
|
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
|
|
133
127
|
- `stash` - Save session context for compaction recovery or handoffs
|
|
134
128
|
- `test-generate` - Test suite generation
|
|
135
129
|
|
|
136
|
-
### Droid/OpenCode:
|
|
130
|
+
### Droid/OpenCode: 17 Commands
|
|
137
131
|
|
|
138
132
|
Same functionality as skills+commands, but:
|
|
139
133
|
- All invoked as commands (no auto-triggering)
|
|
@@ -142,24 +136,34 @@ Same functionality as skills+commands, but:
|
|
|
142
136
|
- `live-canvas` runs in batch mode only (no channel plugin — that's Claude Code specific)
|
|
143
137
|
|
|
144
138
|
**Command Categories**:
|
|
145
|
-
- **Development & Testing (
|
|
146
|
-
- **Code Operations (
|
|
147
|
-
- **Session & Memory (
|
|
139
|
+
- **Development & Testing (6)**: tdd-flow, test-traps, test-generate, debug-method, trace-back, verify-done
|
|
140
|
+
- **Code Operations (5)**: refactor, optimize, diff-review, security, ship
|
|
141
|
+
- **Session & Memory (5)**: brainstorming, skill-creator, docs-builder, stash, remember
|
|
148
142
|
- **Design (1)**: live-canvas
|
|
149
143
|
|
|
150
144
|
---
|
|
151
145
|
|
|
152
146
|
## Hot Memory
|
|
153
147
|
|
|
154
|
-
Lightweight session memory that learns from your usage patterns across sessions.
|
|
148
|
+
Lightweight session memory that learns from your usage patterns across sessions. **`/stash` is
|
|
149
|
+
the only command you actively run — it drives the whole pipeline.** Once a few stashes pile up
|
|
150
|
+
it nudges you to run `/remember`, which does everything else: friction analysis, consolidation,
|
|
151
|
+
and wiring the memory into your agent config file.
|
|
155
152
|
|
|
156
153
|
```
|
|
157
|
-
/stash →
|
|
154
|
+
/stash → (nudge at 5+ unprocessed) → /remember
|
|
158
155
|
```
|
|
159
156
|
|
|
160
|
-
1. **`/stash`** - Snapshot current session context to
|
|
161
|
-
|
|
162
|
-
|
|
157
|
+
1. **`/stash`** - Snapshot current session context to the tool's `…/stash/`. Use before
|
|
158
|
+
compaction, handoffs, or ending complex work. After saving it counts the unprocessed backlog
|
|
159
|
+
(`stash files − .processed entries`) and, at 5+, nudges you to run `/remember`. No counter is
|
|
160
|
+
stored; running `/remember` clears the backlog.
|
|
161
|
+
2. **`/remember`** - Runs friction analysis first (best-effort — scores sessions across *all* your
|
|
162
|
+
projects from the tool's global sessions root, clusters failures into antigens), then
|
|
163
|
+
consolidates stashes + antigens into `…/memory/MEMORY.md` and injects `@MEMORY.md` into the
|
|
164
|
+
**per-tool agent config — `CLAUDE.md` (Claude Code), `AGENTS.md` (Droid / OpenCode), or
|
|
165
|
+
`AGENT.md` (Ampcode)** — so every future session loads it. Each package writes to its own
|
|
166
|
+
tool's config file; the global probe list only governs which logs friction *reads*.
|
|
163
167
|
|
|
164
168
|
**Result:** Project-local memory that accumulates across sessions — no external dependencies, no databases, just markdown.
|
|
165
169
|
|
|
@@ -201,7 +205,7 @@ Orchestrator: "Start systematic implementation?" [Yes/No]
|
|
|
201
205
|
**Bypass Options**:
|
|
202
206
|
- Direct agent: `@quality-assurance review this code`
|
|
203
207
|
- Role syntax: `As system-architect, design the API layer`
|
|
204
|
-
- Skills: `/
|
|
208
|
+
- Skills: `/tdd-flow login-feature`
|
|
205
209
|
|
|
206
210
|
### 9 Pre-Defined Workflow Patterns
|
|
207
211
|
|
|
@@ -220,9 +224,9 @@ Each pattern includes conditional decision points requiring user approval.
|
|
|
220
224
|
### Droid/OpenCode: Direct Command Invocation
|
|
221
225
|
|
|
222
226
|
No orchestrator - invoke commands directly:
|
|
223
|
-
- `/
|
|
227
|
+
- `/diff-review <file-or-branch>`
|
|
224
228
|
- `/refactor <code-section>`
|
|
225
|
-
- `/
|
|
229
|
+
- `/tdd-flow <feature>`
|
|
226
230
|
|
|
227
231
|
Subagent workflows require manual coordination.
|
|
228
232
|
|
|
@@ -257,8 +261,8 @@ Subagent workflows require manual coordination.
|
|
|
257
261
|
~/.claude/
|
|
258
262
|
├── CLAUDE.md # Registry + orchestrator workflows
|
|
259
263
|
├── agents/ # 11 subagent implementations (*.md)
|
|
260
|
-
├── skills/ #
|
|
261
|
-
└── commands/ #
|
|
264
|
+
├── skills/ # 9 skills (subdirectories with SKILL.md)
|
|
265
|
+
└── commands/ # 8 commands (*.md)
|
|
262
266
|
```
|
|
263
267
|
|
|
264
268
|
**Features**:
|
|
@@ -272,8 +276,8 @@ Subagent workflows require manual coordination.
|
|
|
272
276
|
~/.config/amp/
|
|
273
277
|
├── AGENT.md # Reference doc (subagents + commands)
|
|
274
278
|
├── agents/ # 11 subagent implementations (*.md)
|
|
275
|
-
├── skills/ #
|
|
276
|
-
└── commands/ #
|
|
279
|
+
├── skills/ # 9 skills (subdirectories with SKILL.md)
|
|
280
|
+
└── commands/ # 8 commands (*.md)
|
|
277
281
|
```
|
|
278
282
|
|
|
279
283
|
**Features**:
|
|
@@ -285,7 +289,7 @@ Subagent workflows require manual coordination.
|
|
|
285
289
|
```
|
|
286
290
|
~/.factory/
|
|
287
291
|
├── AGENTS.md # Reference doc (subagents + commands)
|
|
288
|
-
└── commands/ #
|
|
292
|
+
└── commands/ # 17 commands (*.md)
|
|
289
293
|
```
|
|
290
294
|
|
|
291
295
|
**Features**:
|
|
@@ -297,7 +301,7 @@ Subagent workflows require manual coordination.
|
|
|
297
301
|
```
|
|
298
302
|
~/.config/opencode/
|
|
299
303
|
├── AGENTS.md # Reference doc (subagents + commands)
|
|
300
|
-
└── command/ #
|
|
304
|
+
└── command/ # 17 commands (*.md)
|
|
301
305
|
```
|
|
302
306
|
|
|
303
307
|
**Features**:
|
|
@@ -326,10 +330,10 @@ color: purple
|
|
|
326
330
|
**Skills** (`skills/*/SKILL.md`):
|
|
327
331
|
```yaml
|
|
328
332
|
---
|
|
329
|
-
id:
|
|
330
|
-
name:
|
|
333
|
+
id: tdd-flow
|
|
334
|
+
name: tdd-flow
|
|
331
335
|
description: Write test first, watch it fail, write minimal code to pass
|
|
332
|
-
usage: /
|
|
336
|
+
usage: /tdd-flow <feature-or-behavior-to-test>
|
|
333
337
|
auto_trigger: true
|
|
334
338
|
---
|
|
335
339
|
```
|
|
@@ -337,11 +341,11 @@ auto_trigger: true
|
|
|
337
341
|
**Commands** (`commands/*.md`):
|
|
338
342
|
```yaml
|
|
339
343
|
---
|
|
340
|
-
id:
|
|
341
|
-
name:
|
|
342
|
-
description:
|
|
343
|
-
usage: /
|
|
344
|
-
argument-hint: [
|
|
344
|
+
id: refactor
|
|
345
|
+
name: refactor
|
|
346
|
+
description: Refactor code while maintaining behavior and tests
|
|
347
|
+
usage: /refactor <code-section>
|
|
348
|
+
argument-hint: [file-or-function]
|
|
345
349
|
---
|
|
346
350
|
```
|
|
347
351
|
|
|
@@ -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
|