@draht/coding-agent 2026.4.25 → 2026.5.12
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 +31 -2
- package/bin/draht-tools.cjs +53 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +2 -2
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/prompts/commands/atomic-commit.md +12 -0
- package/dist/prompts/commands/execute-phase.md +48 -17
- package/dist/prompts/commands/fix.md +86 -23
- package/dist/prompts/commands/map-codebase.md +3 -3
- package/dist/prompts/commands/orchestrate.md +31 -6
- package/dist/prompts/commands/plan-phase.md +39 -6
- package/dist/prompts/commands/quick.md +36 -6
- package/dist/prompts/commands/review.md +28 -11
- package/dist/prompts/commands/verify-work.md +34 -17
- package/package.json +6 -5
- package/prompts/commands/atomic-commit.md +12 -0
- package/prompts/commands/execute-phase.md +48 -17
- package/prompts/commands/fix.md +86 -23
- package/prompts/commands/map-codebase.md +3 -3
- package/prompts/commands/orchestrate.md +31 -6
- package/prompts/commands/plan-phase.md +39 -6
- package/prompts/commands/quick.md +36 -6
- package/prompts/commands/review.md +28 -11
- package/prompts/commands/verify-work.md +34 -17
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "Acceptance testing of completed phase work"
|
|
2
|
+
description: "Acceptance testing of completed phase work (parallel verifier + security-auditor + reviewer + spec-reviewer)"
|
|
3
3
|
---
|
|
4
4
|
|
|
5
5
|
# /verify-work
|
|
6
6
|
|
|
7
|
-
Walk through acceptance testing of completed phase work, using subagents for parallel verification.
|
|
7
|
+
Walk through acceptance testing of completed phase work, using subagents for parallel verification — including a spec-compliance pass against the phase's plan files.
|
|
8
8
|
|
|
9
9
|
## Usage
|
|
10
10
|
```
|
|
@@ -23,30 +23,47 @@ Before verifying, decompose phase acceptance into atomic reasoning units:
|
|
|
23
23
|
3. **Verify correctness** — What tests prove it works? What edge cases must pass? What security concerns exist?
|
|
24
24
|
|
|
25
25
|
**Synthesize verification strategy:**
|
|
26
|
-
- Group parallel verification tasks (test suite, security audit, code review, domain compliance)
|
|
27
|
-
- Map each deliverable to
|
|
26
|
+
- Group parallel verification tasks (test suite, security audit, code review, spec compliance, domain compliance)
|
|
27
|
+
- Map each deliverable to its plan file (the spec)
|
|
28
28
|
- Identify critical vs optional checks
|
|
29
29
|
- Plan fix strategies for potential failures
|
|
30
30
|
|
|
31
31
|
## Steps
|
|
32
32
|
1. Run `draht-tools extract-deliverables $1` to get testable items
|
|
33
|
-
2.
|
|
33
|
+
2. Discover the phase's plan files (`.planning/phases/<N>-*/<N>-NN-PLAN.md`). Each plan is the spec the spec-reviewer evaluates against.
|
|
34
|
+
3. **Run parallel verification via subagents:**
|
|
34
35
|
Use the `subagent` tool in **parallel mode** with these tasks:
|
|
35
|
-
- `verifier` agent: "Run the full test suite for this project. Check package.json for the test command. Record pass/fail counts. Then run any available lint and typecheck commands (e.g. npm run check, npm run lint, npx tsc --noEmit). Report all results with error details. Do NOT run draht, draht-tools, or pi commands."
|
|
36
|
-
- `security-auditor` agent: "Audit the recent code changes (use git log and git diff to
|
|
37
|
-
- `reviewer` agent: "Review the recent code changes
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
4.
|
|
41
|
-
|
|
42
|
-
|
|
36
|
+
- `verifier` agent: "Run the full test suite for this project. Check package.json for the test command. Record pass/fail counts. Then run any available lint and typecheck commands (e.g. npm run check, npm run lint, npx tsc --noEmit). Report all results with error details. End with `STATUS: DONE | DONE_WITH_CONCERNS | NEEDS_CONTEXT | BLOCKED`. Do NOT run draht, draht-tools, or pi commands."
|
|
37
|
+
- `security-auditor` agent: "Audit the recent code changes (use git log and git diff, scoped to this phase's commits). Check for injection risks, auth bypasses, secrets in code, unsafe patterns. Report findings by severity. End with `STATUS: ...`. Do NOT run draht, draht-tools, or pi commands."
|
|
38
|
+
- `reviewer` agent: "Review the recent code changes for this phase. Check domain language compliance against `.planning/DOMAIN.md` if it exists — scan for identifiers not in the glossary and cross-context boundary violations. Report Must fix / Should fix / Consider. End with `STATUS: ...`. Do NOT run draht, draht-tools, or pi commands."
|
|
39
|
+
- `spec-reviewer` agent: "Phase-level spec compliance check for phase $1. The phase has these plan files (each is a spec): <list of .planning/phases/<N>-*/<N>-NN-PLAN.md paths>. For each plan, evaluate whether the phase's commits implement exactly what the plan's <task> elements asked — no missing tasks, no over-builds. Use git log and git diff against the phase commit range. Output a per-plan compliance verdict with omissions and over-builds. End with `STATUS: ...`."
|
|
40
|
+
|
|
41
|
+
4. **Read each subagent's `STATUS:` line.** Treat the phase as failed if any of these is `BLOCKED`:
|
|
42
|
+
- `verifier` (tests / lint / typecheck failed)
|
|
43
|
+
- `security-auditor` (Critical or High findings)
|
|
44
|
+
- `spec-reviewer` (any plan non-compliant)
|
|
45
|
+
- `reviewer` (Must-fix correctness issues)
|
|
46
|
+
|
|
47
|
+
5. Collect results and walk user through each deliverable, incorporating findings.
|
|
48
|
+
6. Record results (pass/fail/partially/skip).
|
|
49
|
+
7. For failures: diagnose and create fix plans via `draht-tools create-fix-plan $1 P`
|
|
43
50
|
- Fix plans MUST include a reproducing test that demonstrates the failure before any implementation
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
51
|
+
- Spec-reviewer omissions become explicit fix-plan tasks (one task per omission)
|
|
52
|
+
8. Write UAT report: `draht-tools write-uat $1`
|
|
53
|
+
- Report must include: test health summary (pass/fail/coverage), security audit results, **spec compliance summary per plan**, domain model status (any glossary violations), deliverable results
|
|
54
|
+
9. If all passed: mark phase complete.
|
|
47
55
|
- If more phases remain in the milestone: tell the user to start a new session and run `/discuss-phase N+1`.
|
|
48
56
|
- If ALL phases in the milestone are complete: tell the user to start a new session and run `/next-milestone`.
|
|
49
|
-
|
|
57
|
+
10. If failures: route to `execute-phase $1 --gaps-only`
|
|
58
|
+
|
|
59
|
+
## Why a phase-level spec-reviewer
|
|
60
|
+
|
|
61
|
+
`/execute-phase` already runs spec-reviewer **per task** before the next task starts. The phase-level pass here catches things the per-task loop can miss:
|
|
62
|
+
- A whole plan was skipped (no implementer ever ran on it)
|
|
63
|
+
- A task's commit was reverted or rebased away
|
|
64
|
+
- Out-of-scope drift that accumulated across multiple tasks
|
|
65
|
+
|
|
66
|
+
Cheap insurance — the diff and plans already exist; the agent maps one to the other.
|
|
50
67
|
|
|
51
68
|
## Workflow
|
|
52
69
|
This is the last step in the per-phase cycle. Each step runs in its own session (`/new` between steps):
|