@draht/coding-agent 2026.3.3 → 2026.3.5
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 +144 -0
- package/README.md +1 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +1 -0
- package/dist/cli/args.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +5 -0
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +0 -7
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +0 -12
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session.d.ts +14 -4
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +167 -49
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/auth-storage.d.ts +1 -1
- package/dist/core/auth-storage.d.ts.map +1 -1
- package/dist/core/auth-storage.js +2 -1
- package/dist/core/auth-storage.js.map +1 -1
- package/dist/core/builtins/subagent.d.ts +14 -0
- package/dist/core/builtins/subagent.d.ts.map +1 -0
- package/dist/core/builtins/subagent.js +492 -0
- package/dist/core/builtins/subagent.js.map +1 -0
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +4 -1
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/export-html/tool-renderer.d.ts.map +1 -1
- package/dist/core/export-html/tool-renderer.js +6 -0
- package/dist/core/export-html/tool-renderer.js.map +1 -1
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +19 -8
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +1 -0
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +8 -2
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/model-registry.d.ts +1 -0
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +9 -6
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +35 -5
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +1 -10
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/prompt-templates.d.ts.map +1 -1
- package/dist/core/prompt-templates.js +4 -2
- package/dist/core/prompt-templates.js.map +1 -1
- package/dist/core/resource-loader.d.ts +2 -0
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +5 -1
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/sdk.d.ts +1 -1
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/settings-manager.d.ts +3 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +4 -0
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/system-prompt.d.ts +4 -0
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +34 -12
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/tools/edit-diff.js.map +1 -1
- package/dist/core/tools/path-utils.js.map +1 -1
- package/dist/gsd/domain-validator.d.ts +18 -0
- package/dist/gsd/domain-validator.d.ts.map +1 -0
- package/dist/gsd/domain-validator.js +61 -0
- package/dist/gsd/domain-validator.js.map +1 -0
- package/dist/gsd/domain.d.ts +12 -0
- package/dist/gsd/domain.d.ts.map +1 -0
- package/dist/gsd/domain.js +113 -0
- package/dist/gsd/domain.js.map +1 -0
- package/dist/gsd/git.d.ts +20 -0
- package/dist/gsd/git.d.ts.map +1 -0
- package/dist/gsd/git.js +59 -0
- package/dist/gsd/git.js.map +1 -0
- package/dist/gsd/hook-utils.d.ts +22 -0
- package/dist/gsd/hook-utils.d.ts.map +1 -0
- package/dist/gsd/hook-utils.js +100 -0
- package/dist/gsd/hook-utils.js.map +1 -0
- package/dist/gsd/index.d.ts +9 -0
- package/dist/gsd/index.d.ts.map +1 -0
- package/dist/gsd/index.js +8 -0
- package/dist/gsd/index.js.map +1 -0
- package/dist/gsd/planning.d.ts +20 -0
- package/dist/gsd/planning.d.ts.map +1 -0
- package/dist/gsd/planning.js +167 -0
- package/dist/gsd/planning.js.map +1 -0
- package/dist/hooks/gsd/draht-post-task.js +44 -11
- package/dist/hooks/gsd/draht-quality-gate.js +99 -57
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +5 -5
- package/dist/main.js.map +1 -1
- package/dist/migrations.js.map +1 -1
- package/dist/modes/interactive/components/armin.js.map +1 -1
- package/dist/modes/interactive/components/config-selector.js.map +1 -1
- package/dist/modes/interactive/components/daxnuts.js.map +1 -1
- package/dist/modes/interactive/components/dynamic-border.js.map +1 -1
- package/dist/modes/interactive/components/extension-editor.d.ts +5 -2
- package/dist/modes/interactive/components/extension-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-editor.js +9 -1
- package/dist/modes/interactive/components/extension-editor.js.map +1 -1
- package/dist/modes/interactive/components/extension-selector.js.map +1 -1
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
- package/dist/modes/interactive/components/login-dialog.js +1 -1
- package/dist/modes/interactive/components/login-dialog.js.map +1 -1
- package/dist/modes/interactive/components/model-selector.d.ts +1 -1
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-selector.js.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.js +1 -1
- package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -1
- package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector.js +1 -1
- package/dist/modes/interactive/components/session-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts +2 -0
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +28 -3
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/components/tree-selector.js.map +1 -1
- package/dist/modes/interactive/components/user-message-selector.js.map +1 -1
- package/dist/modes/interactive/components/user-message.d.ts +1 -0
- package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message.js +11 -0
- package/dist/modes/interactive/components/user-message.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +29 -28
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +5 -0
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/prompts/agents/build.md +5 -1
- package/dist/prompts/agents/plan.md +5 -1
- package/dist/prompts/agents/verify.md +5 -1
- package/dist/prompts/commands/atomic-commit.md +8 -16
- package/dist/prompts/commands/discuss-phase.md +9 -3
- package/dist/prompts/commands/execute-phase.md +15 -8
- package/dist/prompts/commands/fix.md +35 -0
- package/dist/prompts/commands/init-project.md +55 -0
- package/dist/prompts/commands/map-codebase.md +7 -1
- package/dist/prompts/commands/new-project.md +8 -2
- package/dist/prompts/commands/next-milestone.md +48 -0
- package/dist/prompts/commands/pause-work.md +4 -0
- package/dist/prompts/commands/plan-phase.md +11 -5
- package/dist/prompts/commands/progress.md +4 -0
- package/dist/prompts/commands/quick.md +8 -2
- package/dist/prompts/commands/resume-work.md +4 -0
- package/dist/prompts/commands/review.md +32 -0
- package/dist/prompts/commands/verify-work.md +10 -4
- package/docs/custom-provider.md +10 -2
- package/docs/extensions.md +20 -1
- package/docs/providers.md +3 -1
- package/docs/settings.md +1 -0
- package/examples/extensions/README.md +1 -0
- package/examples/extensions/antigravity-image-gen.ts +3 -1
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/custom-provider-qwen-cli/package.json +1 -1
- package/examples/extensions/dynamic-tools.ts +74 -0
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/hooks/gsd/draht-post-task.js +44 -11
- package/hooks/gsd/draht-quality-gate.js +99 -57
- package/package.json +9 -8
- package/prompts/agents/build.md +5 -1
- package/prompts/agents/plan.md +5 -1
- package/prompts/agents/verify.md +5 -1
- package/prompts/commands/atomic-commit.md +8 -16
- package/prompts/commands/discuss-phase.md +9 -3
- package/prompts/commands/execute-phase.md +15 -8
- package/prompts/commands/fix.md +35 -0
- package/prompts/commands/init-project.md +55 -0
- package/prompts/commands/map-codebase.md +7 -1
- package/prompts/commands/new-project.md +8 -2
- package/prompts/commands/next-milestone.md +48 -0
- package/prompts/commands/pause-work.md +4 -0
- package/prompts/commands/plan-phase.md +11 -5
- package/prompts/commands/progress.md +4 -0
- package/prompts/commands/quick.md +8 -2
- package/prompts/commands/resume-work.md +4 -0
- package/prompts/commands/review.md +32 -0
- package/prompts/commands/verify-work.md +10 -4
- package/dist/extensions/gsd-commands.ts +0 -403
- package/dist/extensions/subagent.ts +0 -515
- package/extensions/gsd-commands.ts +0 -403
- package/extensions/subagent.ts +0 -515
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Diagnose and fix a bug with TDD discipline"
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /fix
|
|
6
|
+
|
|
7
|
+
Diagnose and fix a specific bug or failing task with TDD discipline.
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
```
|
|
11
|
+
/fix [description of what's broken]
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Issue: $ARGUMENTS
|
|
15
|
+
|
|
16
|
+
## Steps
|
|
17
|
+
1. **Diagnose**: Read the relevant code and error output to identify the root cause
|
|
18
|
+
- If a test is failing, run it first to see the actual error
|
|
19
|
+
- If a runtime bug, reproduce it and capture the error
|
|
20
|
+
2. **Write a reproducing test**: Before touching any implementation:
|
|
21
|
+
- Write a test that demonstrates the bug (it must fail)
|
|
22
|
+
- Commit: `draht-tools commit-docs "red: reproduce bug"`
|
|
23
|
+
3. **Minimal fix**: Write the smallest change that makes the test pass
|
|
24
|
+
- Do not refactor or add features — just fix the bug
|
|
25
|
+
- Run the full test suite to check for regressions
|
|
26
|
+
- Commit: `draht-tools commit-docs "green: fix description"`
|
|
27
|
+
4. **Refactor** (if needed): Clean up without changing behavior
|
|
28
|
+
- Tests must stay green after every change
|
|
29
|
+
- Commit: `draht-tools commit-docs "refactor: description"`
|
|
30
|
+
5. **Update state**: `draht-tools update-state`
|
|
31
|
+
|
|
32
|
+
## Rules
|
|
33
|
+
- Always reproduce before fixing — a fix without a test is a guess
|
|
34
|
+
- One bug, one fix, one commit. Do not bundle unrelated changes.
|
|
35
|
+
- If the root cause spans multiple files, explain the chain in the commit message
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Initialize planning for an existing project"
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /init-project
|
|
6
|
+
|
|
7
|
+
Initialize planning framework for an existing project: codebase mapping → questioning → domain model → requirements → roadmap.
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
```
|
|
11
|
+
/init-project [focus area or goal]
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Focus: $ARGUMENTS
|
|
15
|
+
|
|
16
|
+
Use this when you have an existing codebase and want to add structured planning.
|
|
17
|
+
For greenfield projects, use `/new-project` instead.
|
|
18
|
+
|
|
19
|
+
## Steps
|
|
20
|
+
1. Run `draht-tools init` to check preconditions (git repo, etc.)
|
|
21
|
+
2. Run `draht-tools map-codebase` to build a structural map of the existing code
|
|
22
|
+
3. Analyze the codebase map to understand architecture, tech stack, and conventions
|
|
23
|
+
4. Deep questioning phase (3-7 rounds, 1-2 questions at a time):
|
|
24
|
+
- What is this project? Who uses it?
|
|
25
|
+
- What are the current pain points or goals?
|
|
26
|
+
- What is MVP vs aspirational scope?
|
|
27
|
+
- What constraints exist (infra, team size, deadlines)?
|
|
28
|
+
5. Run `draht-tools create-project` with gathered info
|
|
29
|
+
6. Run `draht-tools create-domain-model` to define bounded contexts, entities, and ubiquitous language
|
|
30
|
+
7. Create `.planning/DOMAIN.md` with:
|
|
31
|
+
- `## Bounded Contexts` — each context with name, responsibility, and brief description
|
|
32
|
+
- `## Ubiquitous Language` — glossary of domain terms agreed with the user (term → definition)
|
|
33
|
+
- `## Context Map` — how bounded contexts relate to each other (upstream/downstream, shared kernel, ACL)
|
|
34
|
+
- `## Aggregates` — aggregates and their root entities per context
|
|
35
|
+
- `## Domain Events` — named events that cross context boundaries
|
|
36
|
+
8. Create `.planning/TEST-STRATEGY.md` with:
|
|
37
|
+
- `## Test Framework` — chosen framework and rationale
|
|
38
|
+
- `## Directory Conventions` — where test files live relative to source
|
|
39
|
+
- `## Coverage Goals` — target coverage percentage and which paths are critical
|
|
40
|
+
- `## Testing Levels` — what is tested at unit level vs integration vs e2e, with examples
|
|
41
|
+
- `## Excluded` — what is explicitly not tested and why (config files, generated code, etc.)
|
|
42
|
+
9. Optional research phase via `draht-tools research`
|
|
43
|
+
10. Run `draht-tools create-requirements` with v1/v2/out-of-scope (map requirements to bounded contexts)
|
|
44
|
+
11. Run `draht-tools create-roadmap` with phases
|
|
45
|
+
12. Run `draht-tools init-state`
|
|
46
|
+
13. Git commit via `draht-tools commit-docs "initialize project planning"`
|
|
47
|
+
|
|
48
|
+
## Rules
|
|
49
|
+
- Ask 1-2 questions at a time, never dump 10 at once
|
|
50
|
+
- Follow threads based on answers
|
|
51
|
+
- Use examples ("Like Stripe Checkout, or custom?")
|
|
52
|
+
- Confirm, don't assume
|
|
53
|
+
- 3-7 follow-up rounds typical
|
|
54
|
+
- Respect what already exists — do not propose rewriting working code
|
|
55
|
+
- Stop when you have: current state, goals, MVP scope, constraints, success criteria
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Analyze existing codebase before planning"
|
|
3
|
+
---
|
|
4
|
+
|
|
1
5
|
# /map-codebase
|
|
2
6
|
|
|
3
7
|
Analyze existing codebase before planning.
|
|
@@ -7,8 +11,10 @@ Analyze existing codebase before planning.
|
|
|
7
11
|
/map-codebase [directory]
|
|
8
12
|
```
|
|
9
13
|
|
|
14
|
+
Directory: $1
|
|
15
|
+
|
|
10
16
|
## Steps
|
|
11
|
-
1. Run `draht-tools map-codebase
|
|
17
|
+
1. Run `draht-tools map-codebase $1`
|
|
12
18
|
2. Tool generates: STACK.md, ARCHITECTURE.md, CONVENTIONS.md, CONCERNS.md
|
|
13
19
|
3. Review output, supplement with your own analysis if needed
|
|
14
20
|
4. Identify implicit bounded contexts from directory structure:
|
|
@@ -1,12 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Initialize a new project with structured planning"
|
|
3
|
+
---
|
|
4
|
+
|
|
1
5
|
# /new-project
|
|
2
6
|
|
|
3
|
-
Initialize a new
|
|
7
|
+
Initialize a new project: questioning → research → requirements → roadmap.
|
|
4
8
|
|
|
5
9
|
## Usage
|
|
6
10
|
```
|
|
7
11
|
/new-project [description]
|
|
8
12
|
```
|
|
9
13
|
|
|
14
|
+
Description: $ARGUMENTS
|
|
15
|
+
|
|
10
16
|
## Steps
|
|
11
17
|
1. Run `draht-tools init` to check preconditions
|
|
12
18
|
2. If existing code detected, run `draht-tools map-codebase` first
|
|
@@ -29,7 +35,7 @@ Initialize a new GSD project: questioning → research → requirements → road
|
|
|
29
35
|
9. Run `draht-tools create-requirements` with v1/v2/out-of-scope (map requirements to bounded contexts)
|
|
30
36
|
10. Run `draht-tools create-roadmap` with phases
|
|
31
37
|
11. Run `draht-tools init-state`
|
|
32
|
-
12. Git commit via `draht-tools commit-docs "initialize
|
|
38
|
+
12. Git commit via `draht-tools commit-docs "initialize project planning"`
|
|
33
39
|
|
|
34
40
|
## Rules
|
|
35
41
|
- Ask 1-2 questions at a time, never dump 10 at once
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Plan the next milestone after current one completes"
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /next-milestone
|
|
6
|
+
|
|
7
|
+
Plan the next milestone after the current one is complete.
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
```
|
|
11
|
+
/next-milestone
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Prerequisites
|
|
15
|
+
- `.planning/ROADMAP.md` must exist
|
|
16
|
+
- Current milestone should be complete or nearly complete
|
|
17
|
+
|
|
18
|
+
## Steps
|
|
19
|
+
1. Load project context:
|
|
20
|
+
- Read `.planning/ROADMAP.md` — identify the completed milestone and its phases
|
|
21
|
+
- Read `.planning/STATE.md` — understand current status
|
|
22
|
+
- Read `.planning/REQUIREMENTS.md` — check which requirements are satisfied
|
|
23
|
+
- Read `.planning/DOMAIN.md` (if exists) — review domain model for evolution needs
|
|
24
|
+
2. Review completed work:
|
|
25
|
+
- Scan `.planning/phases/` for all UAT reports (`*-UAT.md`) and summaries (`*-SUMMARY.md`)
|
|
26
|
+
- Note what was built, what worked well, what had issues
|
|
27
|
+
3. Assess requirements:
|
|
28
|
+
- Which v1 requirements are now satisfied?
|
|
29
|
+
- Which v1 requirements remain?
|
|
30
|
+
- Should any v2 requirements be promoted based on what we learned?
|
|
31
|
+
- Are there new requirements discovered during implementation?
|
|
32
|
+
4. Propose next milestone:
|
|
33
|
+
- Define 3-5 phases, each with a clear goal (outcome, not activity)
|
|
34
|
+
- Order phases by dependency
|
|
35
|
+
- Map each phase to specific requirements
|
|
36
|
+
- Estimate relative complexity
|
|
37
|
+
5. Present the proposed milestone for user approval before writing files
|
|
38
|
+
6. After approval:
|
|
39
|
+
- Update `ROADMAP.md` with the new milestone and phases
|
|
40
|
+
- Update `STATE.md` to reflect milestone transition
|
|
41
|
+
- Update `REQUIREMENTS.md` if requirements changed
|
|
42
|
+
- Update `DOMAIN.md` if domain model needs evolution
|
|
43
|
+
- Commit: `draht-tools commit-docs "plan next milestone"`
|
|
44
|
+
|
|
45
|
+
## Rules
|
|
46
|
+
- Always review what was actually built, not just what was planned
|
|
47
|
+
- Be honest about requirements that slipped or changed scope
|
|
48
|
+
- Each phase goal must be testable — "user can X" not "implement Y"
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Create atomic execution plans for a roadmap phase"
|
|
3
|
+
---
|
|
4
|
+
|
|
1
5
|
# /plan-phase
|
|
2
6
|
|
|
3
7
|
Create atomic execution plans for a roadmap phase.
|
|
@@ -7,18 +11,20 @@ Create atomic execution plans for a roadmap phase.
|
|
|
7
11
|
/plan-phase [N]
|
|
8
12
|
```
|
|
9
13
|
|
|
14
|
+
Phase: $1
|
|
15
|
+
|
|
10
16
|
## Steps
|
|
11
|
-
1. Run `draht-tools load-phase-context
|
|
12
|
-
2. Optional: `draht-tools research-phase
|
|
17
|
+
1. Run `draht-tools load-phase-context $1` to gather all context
|
|
18
|
+
2. Optional: `draht-tools research-phase $1` for domain research
|
|
13
19
|
3. Goal-backward planning:
|
|
14
20
|
a. State the goal (outcome, not activity)
|
|
15
21
|
b. Derive observable truths (3-7 from user perspective)
|
|
16
22
|
c. From each observable truth, derive the test scenarios that would prove it (specific inputs → expected outputs or state changes)
|
|
17
23
|
d. Map to required artifacts (files, endpoints, schemas)
|
|
18
24
|
e. Break into atomic tasks (2-5 per plan)
|
|
19
|
-
4. Write plans: `draht-tools create-plan
|
|
20
|
-
5. Validate: `draht-tools validate-plans
|
|
21
|
-
6. Commit: `draht-tools commit-docs "create phase
|
|
25
|
+
4. Write plans: `draht-tools create-plan $1 P`
|
|
26
|
+
5. Validate: `draht-tools validate-plans $1`
|
|
27
|
+
6. Commit: `draht-tools commit-docs "create phase $1 plans"`
|
|
22
28
|
|
|
23
29
|
## Plan Format
|
|
24
30
|
Plans use XML task format:
|
|
@@ -1,15 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Execute a small ad-hoc task with tracking"
|
|
3
|
+
---
|
|
4
|
+
|
|
1
5
|
# /quick
|
|
2
6
|
|
|
3
|
-
Execute a small ad-hoc task with
|
|
7
|
+
Execute a small ad-hoc task with tracking.
|
|
4
8
|
|
|
5
9
|
## Usage
|
|
6
10
|
```
|
|
7
11
|
/quick [description]
|
|
8
12
|
```
|
|
9
13
|
|
|
14
|
+
Task: $ARGUMENTS
|
|
15
|
+
|
|
10
16
|
## Steps
|
|
11
17
|
1. Run `draht-tools next-quick-number` to get task number
|
|
12
|
-
2. Create quick plan: `draht-tools create-quick-plan NNN "
|
|
18
|
+
2. Create quick plan: `draht-tools create-quick-plan NNN "$ARGUMENTS"`
|
|
13
19
|
3. Execute tasks following the TDD cycle:
|
|
14
20
|
- **🔴 RED** — Write a failing test that describes the desired behaviour
|
|
15
21
|
- **🟢 GREEN** — Write the minimum implementation to make it pass
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Code review and security audit of recent changes"
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /review
|
|
6
|
+
|
|
7
|
+
Ad-hoc code review and security audit of recent changes or a specific scope.
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
```
|
|
11
|
+
/review [scope]
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Scope: $ARGUMENTS
|
|
15
|
+
|
|
16
|
+
If no scope given, reviews all recent uncommitted changes.
|
|
17
|
+
|
|
18
|
+
## Steps
|
|
19
|
+
1. Identify the scope:
|
|
20
|
+
- If argument given: review those files/directories/description
|
|
21
|
+
- If no argument: run `git diff --stat` and `git diff --cached --stat` to find changes
|
|
22
|
+
2. For each changed file, examine:
|
|
23
|
+
- Correctness: logic errors, off-by-one, null handling, error paths
|
|
24
|
+
- Type safety: any `as` casts, `any` types, missing null checks
|
|
25
|
+
- Conventions: naming, file organization, import style
|
|
26
|
+
- Security: injection risks, auth bypasses, secrets in code, unsafe deserialization
|
|
27
|
+
- Performance: unnecessary allocations, missing indexes, N+1 queries
|
|
28
|
+
3. Produce a prioritized findings report:
|
|
29
|
+
- **Critical** — must fix before merge (security, data loss, crashes)
|
|
30
|
+
- **Important** — should fix (bugs, type issues, missing error handling)
|
|
31
|
+
- **Minor** — style, naming, or optional improvements
|
|
32
|
+
4. For each finding: cite the exact file and line, explain the issue, suggest the fix
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Acceptance testing of completed phase work"
|
|
3
|
+
---
|
|
4
|
+
|
|
1
5
|
# /verify-work
|
|
2
6
|
|
|
3
7
|
Walk through acceptance testing of completed phase work.
|
|
@@ -7,6 +11,8 @@ Walk through acceptance testing of completed phase work.
|
|
|
7
11
|
/verify-work [N]
|
|
8
12
|
```
|
|
9
13
|
|
|
14
|
+
Phase: $1
|
|
15
|
+
|
|
10
16
|
## Steps
|
|
11
17
|
1. Run full test suite and capture results:
|
|
12
18
|
- Execute all tests (`bun test` or project-specific runner)
|
|
@@ -16,12 +22,12 @@ Walk through acceptance testing of completed phase work.
|
|
|
16
22
|
- Scan source files for PascalCase identifiers not present in the glossary
|
|
17
23
|
- Flag any bounded context boundary violations (cross-context direct imports)
|
|
18
24
|
3. Run quality gate: `draht-tools quality-gate --strict`
|
|
19
|
-
4. Run `draht-tools extract-deliverables
|
|
25
|
+
4. Run `draht-tools extract-deliverables $1` to get testable items
|
|
20
26
|
5. Walk user through each deliverable one at a time
|
|
21
27
|
6. Record results (pass/fail/partially/skip)
|
|
22
|
-
7. For failures: diagnose and create fix plans via `draht-tools create-fix-plan
|
|
28
|
+
7. For failures: diagnose and create fix plans via `draht-tools create-fix-plan $1 P`
|
|
23
29
|
- Fix plans MUST include a reproducing test that demonstrates the failure before any implementation
|
|
24
|
-
8. Write UAT report: `draht-tools write-uat
|
|
30
|
+
8. Write UAT report: `draht-tools write-uat $1`
|
|
25
31
|
- Report must include: test health summary (pass/fail/coverage), domain model status (any glossary violations), deliverable results
|
|
26
32
|
9. If all passed: mark phase complete
|
|
27
|
-
10. If failures: route to `execute-phase
|
|
33
|
+
10. If failures: route to `execute-phase $1 --gaps-only`
|