thachvd-kit 1.0.26 → 1.0.27
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/.agent/docs/getting-started.md +81 -0
- package/.agent/docs/project.md +13 -1
- package/.agent/docs/tooling.md +7 -13
- package/.agent/docs/workflow.md +43 -1
- package/.agent/rules/GEMINI.md +22 -7
- package/.agent/workflows/release.md +42 -0
- package/.agent/workflows/simple.md +40 -0
- package/.agent/workflows/task.md +57 -0
- package/README.md +87 -15
- package/bin/cli.js +275 -32
- package/package.json +3 -1
- package/workflows/release.md +42 -0
- package/workflows/simple.md +40 -0
- package/workflows/task.md +57 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Getting Started With This Kit
|
|
2
|
+
|
|
3
|
+
Read this after `thachvd-kit init`. The kit gives every member one entry point, then selects only the process and expertise the task needs.
|
|
4
|
+
|
|
5
|
+
## Start Every Task With /task
|
|
6
|
+
|
|
7
|
+
Use `/task <request>` before editing whenever the route is not already obvious. It must produce:
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
ROUTE: question | simple | feature | bug | review | release | multi-domain
|
|
11
|
+
WORKFLOW: [exact .agent/workflows/<name>.md file]
|
|
12
|
+
SKILLS: [matching skills, or none]
|
|
13
|
+
AGENTS: [matching specialist agents, or none]
|
|
14
|
+
GATE: fast-path | standard
|
|
15
|
+
NEXT: [the next command or action]
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
A workflow is the process and its gates. A skill is the method or checklist. An agent is the specialist role. Chat alone is not a route: the member must select the route and invoke the matching workflow or explicitly choose the question path.
|
|
19
|
+
|
|
20
|
+
## Route Matrix
|
|
21
|
+
|
|
22
|
+
| Situation | Command | Gate | Required next step |
|
|
23
|
+
|---|---|---|---|
|
|
24
|
+
| Explain, inspect, or brainstorm only | direct answer or `/brainstorm` | none | no code until the request becomes actionable |
|
|
25
|
+
| One obvious local fix | `/simple <request>` | fast-path | inspect -> edit -> focused verify |
|
|
26
|
+
| New behavior, multi-file change, unclear scope, or >~30 min | `/task` -> `/brainstorm` -> `/spec` when needed -> `/plan` | standard | wait for approval before implementation |
|
|
27
|
+
| Bug, regression, failing test, or unknown error | `/debug <symptom>` | bug | reproduce -> isolate -> regression test -> fix -> verify |
|
|
28
|
+
| Pre-merge or independent review | `/review` | review | five-axis review; resolve blocking findings |
|
|
29
|
+
| Version, tag, npm publish, or deployment | `/release` | release | release checklist; never fast-path |
|
|
30
|
+
| Frontend + backend + data/security together | `/orchestrate` | standard | plan -> approval -> specialist work -> integration verify |
|
|
31
|
+
|
|
32
|
+
## Standard Feature Flow
|
|
33
|
+
|
|
34
|
+
The gated sequence is Spec -> Plan -> Implement -> Review: `/task` -> `/brainstorm` -> `/spec` when scope is ambiguous or multi-file -> `/plan` -> user approves the plan -> implementation -> `/test` -> `/review` -> final verification -> commit/push.
|
|
35
|
+
|
|
36
|
+
The plan is a gate, not a suggestion. Do not start product-code implementation before explicit approval. Load only the relevant specialist agent and skills, such as `$frontend-design`, `$api-design`, or `$webapp-testing`.
|
|
37
|
+
|
|
38
|
+
## Bug Fix Flow
|
|
39
|
+
|
|
40
|
+
Use `/debug <symptom>`, not the feature flow, when something is failing or the root cause is unknown:
|
|
41
|
+
|
|
42
|
+
1. Capture the exact symptom, environment, reproduction, and expected result.
|
|
43
|
+
2. Inspect the relevant code path with MCP/codegraph when available.
|
|
44
|
+
3. Form and test a small number of hypotheses; do not patch by guesswork.
|
|
45
|
+
4. Add or update a regression test that fails before the fix when practical.
|
|
46
|
+
5. Make the smallest root-cause fix.
|
|
47
|
+
6. Run focused tests, then broader verification when the blast radius is shared.
|
|
48
|
+
7. Use `/review` when the fix touches multiple files, contracts, security, or release behavior.
|
|
49
|
+
|
|
50
|
+
Load `$systematic-debugging`, the `debugger` agent, and `testing-patterns` for this route.
|
|
51
|
+
|
|
52
|
+
## Simple Fast Path
|
|
53
|
+
|
|
54
|
+
Use `/simple <request>` only when the change is one obvious file, the result is unambiguous, and it changes no behavior, API, schema, security, CI, dependency, workflow, or release contract. Before editing, state:
|
|
55
|
+
|
|
56
|
+
```text
|
|
57
|
+
FAST_PATH: simple-fix
|
|
58
|
+
REASON: [why Spec/Plan/Review are not needed]
|
|
59
|
+
SCOPE: [file or narrow area]
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
This bypasses only Spec, Plan, and the feature/refactor Review gate. It never bypasses inspection, focused verification, or reporting evidence. If the scope expands, stop and re-route with `/task`.
|
|
63
|
+
|
|
64
|
+
## Command And Skill Map
|
|
65
|
+
|
|
66
|
+
- `/brainstorm`: clarify intent and tradeoffs; no code.
|
|
67
|
+
- `/spec`: define requirements and acceptance criteria; no code.
|
|
68
|
+
- `/plan`: create an approved implementation plan; no code before approval.
|
|
69
|
+
- `/enhance` or `/create`: implement an approved feature with the relevant specialist agent.
|
|
70
|
+
- `/debug`: systematic root-cause investigation and regression protection.
|
|
71
|
+
- `/test`: add or run tests and assess coverage.
|
|
72
|
+
- `/review`: five-axis review before completion or merge.
|
|
73
|
+
- `/release`: verify, version, tag, publish, and verify npm output.
|
|
74
|
+
- `$clean-code` and `$verification-before-completion`: default implementation hygiene.
|
|
75
|
+
- `$webapp-testing`: browser/UI verification; use Playwright when available.
|
|
76
|
+
|
|
77
|
+
## Enforcement
|
|
78
|
+
|
|
79
|
+
Claude Code has a project Stop hook in `.claude/settings.json` for standard feature/refactor work. An explicit `FAST_PATH: simple-fix` is accepted only when the simple criteria are met; it still requires verification. Codex, Antigravity, and Cursor use the same written rules through `AGENTS.md`, `.cursorrules`, and `.agent/rules/GEMINI.md`.
|
|
80
|
+
|
|
81
|
+
Full details live in `AGENTS.md`, `.agent/docs/workflow.md`, and the matching file under `.agent/workflows/`.
|
package/.agent/docs/project.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Project Rules
|
|
2
2
|
|
|
3
|
-
Generated by thachvd-kit on 2026-
|
|
3
|
+
Generated by thachvd-kit on 2026-08-13.
|
|
4
4
|
|
|
5
5
|
## Summary
|
|
6
6
|
|
|
@@ -26,6 +26,18 @@ Generated by thachvd-kit on 2026-06-16.
|
|
|
26
26
|
- Test: `npm test`
|
|
27
27
|
- Lint: `npm run lint`
|
|
28
28
|
|
|
29
|
+
## Available MCP Tools
|
|
30
|
+
|
|
31
|
+
Use these tools as first-class search and verification methods — prefer them over shell commands or file reads.
|
|
32
|
+
|
|
33
|
+
| MCP | When to Use |
|
|
34
|
+
|-----|-------------|
|
|
35
|
+
| `codegraph` | Explore symbols, trace call chains, find usages — use BEFORE reading files |
|
|
36
|
+
| `context7` | Look up library/framework docs, API signatures, migration guides |
|
|
37
|
+
| `playwright` | Verify UI behavior, take screenshots, test forms and navigation |
|
|
38
|
+
|
|
39
|
+
> Check `.agent/docs/tooling.md` for setup details and additional MCP servers.
|
|
40
|
+
|
|
29
41
|
## Agent Routing
|
|
30
42
|
|
|
31
43
|
| Task Type | Agent | Primary Skills |
|
package/.agent/docs/tooling.md
CHANGED
|
@@ -8,7 +8,7 @@ Use Playwright for browser and UI verification when a task touches web behavior.
|
|
|
8
8
|
|
|
9
9
|
- Check availability: `npx playwright --version`
|
|
10
10
|
- Install browsers: `npx playwright install`
|
|
11
|
-
- Codex MCP CLI setup: `codex mcp add playwright --
|
|
11
|
+
- Codex MCP CLI setup: `codex mcp add playwright -- playwright-mcp`
|
|
12
12
|
- Auto setup: `thachvd-kit`
|
|
13
13
|
- Kit helper: `python .agent/skills/webapp-testing/scripts/playwright_runner.py <url> --screenshot`
|
|
14
14
|
|
|
@@ -18,8 +18,7 @@ Codex `config.toml` example:
|
|
|
18
18
|
|
|
19
19
|
```toml
|
|
20
20
|
[mcp_servers.context7]
|
|
21
|
-
command = "
|
|
22
|
-
args = ["-y", "@upstash/context7-mcp"]
|
|
21
|
+
command = "context7-mcp"
|
|
23
22
|
startup_timeout_sec = 20
|
|
24
23
|
tool_timeout_sec = 120
|
|
25
24
|
|
|
@@ -30,8 +29,7 @@ startup_timeout_sec = 20
|
|
|
30
29
|
tool_timeout_sec = 120
|
|
31
30
|
|
|
32
31
|
[mcp_servers.playwright]
|
|
33
|
-
command = "
|
|
34
|
-
args = ["-y", "@playwright/mcp"]
|
|
32
|
+
command = "playwright-mcp"
|
|
35
33
|
startup_timeout_sec = 20
|
|
36
34
|
tool_timeout_sec = 120
|
|
37
35
|
```
|
|
@@ -70,16 +68,14 @@ Gemini CLI / Antigravity `mcp_config.json` example:
|
|
|
70
68
|
"args": ["serve", "--mcp"]
|
|
71
69
|
},
|
|
72
70
|
"context7": {
|
|
73
|
-
"command": "
|
|
74
|
-
"args": ["-y", "@upstash/context7-mcp"]
|
|
71
|
+
"command": "context7-mcp"
|
|
75
72
|
},
|
|
76
73
|
"filesystem": {
|
|
77
74
|
"command": "npx",
|
|
78
75
|
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/project"]
|
|
79
76
|
},
|
|
80
77
|
"playwright": {
|
|
81
|
-
"command": "
|
|
82
|
-
"args": ["-y", "@playwright/mcp"]
|
|
78
|
+
"command": "playwright-mcp"
|
|
83
79
|
}
|
|
84
80
|
}
|
|
85
81
|
}
|
|
@@ -103,8 +99,7 @@ Claude Code user config example:
|
|
|
103
99
|
},
|
|
104
100
|
"context7": {
|
|
105
101
|
"type": "stdio",
|
|
106
|
-
"command": "
|
|
107
|
-
"args": ["-y", "@upstash/context7-mcp"]
|
|
102
|
+
"command": "context7-mcp"
|
|
108
103
|
},
|
|
109
104
|
"filesystem": {
|
|
110
105
|
"type": "stdio",
|
|
@@ -113,8 +108,7 @@ Claude Code user config example:
|
|
|
113
108
|
},
|
|
114
109
|
"playwright": {
|
|
115
110
|
"type": "stdio",
|
|
116
|
-
"command": "
|
|
117
|
-
"args": ["-y", "@playwright/mcp"]
|
|
111
|
+
"command": "playwright-mcp"
|
|
118
112
|
}
|
|
119
113
|
}
|
|
120
114
|
}
|
package/.agent/docs/workflow.md
CHANGED
|
@@ -4,10 +4,24 @@
|
|
|
4
4
|
|
|
5
5
|
1. Read AGENTS.md.
|
|
6
6
|
2. Read .agent/docs/project.md.
|
|
7
|
-
3.
|
|
7
|
+
3. Route the request with `/task <request>` when the path is not obvious.
|
|
8
8
|
4. Read only the relevant docs under .agent/agents, .agent/skills, .claude/skills, and .agent/workflows.
|
|
9
9
|
5. Check if MCP servers (like `codegraph`) are active/available and prioritize using them as the primary entry point to search and locate files, symbols, and code blocks.
|
|
10
10
|
|
|
11
|
+
## Route Matrix
|
|
12
|
+
|
|
13
|
+
| Situation | Command | Workflow / gate |
|
|
14
|
+
|---|---|---|
|
|
15
|
+
| Question or analysis only | direct answer | no edits |
|
|
16
|
+
| One obvious local fix | `/simple` | `.agent/workflows/simple.md`, fast-path |
|
|
17
|
+
| Bug, regression, failing test, or unknown error | `/debug` | `.agent/workflows/debug.md`, evidence-first |
|
|
18
|
+
| New behavior, multi-file change, or unclear scope | `/brainstorm` -> `/spec` when needed -> `/plan` | spec/plan approval -> implement -> review |
|
|
19
|
+
| Pre-merge review | `/review` | `.agent/workflows/review.md`, five-axis |
|
|
20
|
+
| npm version, tag, publish, or deployment | `/release` | `.agent/workflows/release.md`, release gate |
|
|
21
|
+
| Several specialist domains | `/orchestrate` | plan -> approval -> parallel work -> integration verify |
|
|
22
|
+
|
|
23
|
+
If a task is not clearly simple, use the standard flow. Never use the fast path for behavior, API, schema, security, CI, dependency, workflow, or release changes.
|
|
24
|
+
|
|
11
25
|
## Skill Selection
|
|
12
26
|
|
|
13
27
|
- Prefer native skill discovery when the client exposes it.
|
|
@@ -21,6 +35,16 @@
|
|
|
21
35
|
|
|
22
36
|
## Implementation Flow
|
|
23
37
|
|
|
38
|
+
For `/simple` fixes, state the fast-path decision before editing:
|
|
39
|
+
|
|
40
|
+
```text
|
|
41
|
+
FAST_PATH: simple-fix
|
|
42
|
+
REASON: [why Spec/Plan/Review are not needed]
|
|
43
|
+
SCOPE: [file or narrow area]
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Then:
|
|
47
|
+
|
|
24
48
|
1. State assumptions and success criteria when the task is not trivial.
|
|
25
49
|
2. Inspect dependent files before editing.
|
|
26
50
|
3. Make the smallest coherent change.
|
|
@@ -28,6 +52,24 @@
|
|
|
28
52
|
5. Run verification (prioritize using Playwright MCP for web/UI changes to automate verification and capture screenshots).
|
|
29
53
|
6. Summarize changed files and verification evidence.
|
|
30
54
|
|
|
55
|
+
For bugs, use `/debug` with `$systematic-debugging`, the `debugger` agent, and `testing-patterns`: reproduce, isolate the root cause, add regression protection, make the smallest fix, and verify.
|
|
56
|
+
|
|
57
|
+
For features or refactors, this flow runs *inside* the gated flow defined in AGENTS.md (spec -> plan -> implement -> review) — steps 3-5 above are the "Implement" phase, and step 6 is not a substitute for the mandatory `.agent/workflows/review.md` gate.
|
|
58
|
+
|
|
59
|
+
## Definition of Done (feature or refactor)
|
|
60
|
+
|
|
61
|
+
A feature/refactor task is only complete when all of the following hold — not when code compiles or tests pass:
|
|
62
|
+
|
|
63
|
+
The Spec checkbox may be skipped only when the documented `/simple` fast-path protocol is stated and its criteria are met.
|
|
64
|
+
|
|
65
|
+
- [ ] `.agent/workflows/spec.md` exit criteria met (or explicitly skipped as a trivial/self-contained change)
|
|
66
|
+
- [ ] `.agent/workflows/plan.md` produced a plan file, approved by the user
|
|
67
|
+
- [ ] Tests added/updated for the changed behavior and passing
|
|
68
|
+
- [ ] `.agent/workflows/review.md` five-axis review completed with all 🔴 BLOCKING items resolved or accepted with rationale
|
|
69
|
+
- [ ] Changed files and verification evidence summarized to the user
|
|
70
|
+
|
|
71
|
+
Do not report a feature/refactor task as done if any box above is unchecked — say explicitly which gate is still open.
|
|
72
|
+
|
|
31
73
|
## When To Update Docs
|
|
32
74
|
|
|
33
75
|
- Update .agent/docs/architecture.md when structure, boundaries, or entry points change.
|
package/.agent/rules/GEMINI.md
CHANGED
|
@@ -27,13 +27,28 @@ Antigravity-compatible entry rules for thachvd-kit projects.
|
|
|
27
27
|
|
|
28
28
|
Load only the agent, skill, or workflow files relevant to the current task.
|
|
29
29
|
|
|
30
|
-
## Execution
|
|
31
|
-
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
36
|
-
-
|
|
30
|
+
## Execution
|
|
31
|
+
|
|
32
|
+
- Route every task before editing. Use `/task <request>` when the correct path is not obvious.
|
|
33
|
+
- Questions and analysis: answer directly; do not edit code.
|
|
34
|
+
- Simple fix: use `/simple <request>` only for one-file, unambiguous changes with no behavior or contract change.
|
|
35
|
+
- Bug or failing behavior: use `/debug <symptom>` and follow the evidence-first root-cause flow.
|
|
36
|
+
- Feature or refactor: use `/brainstorm` for discovery, `/spec` for ambiguous or multi-file scope, then `/plan`, wait for approval, implement, test, and `/review`.
|
|
37
|
+
- Pre-merge review: use `/review`.
|
|
38
|
+
- Release or npm publish: use `/release`; never use the simple fast path.
|
|
39
|
+
- UI work: use relevant frontend design skills before editing.
|
|
40
|
+
- Security or deploy work: run the matching checklist before claiming done.
|
|
41
|
+
|
|
42
|
+
### Fast Path (`/simple`)
|
|
43
|
+
|
|
44
|
+
The fast path bypasses only Spec, Plan, and the feature/refactor Review gate for a trivial change. It never bypasses inspection or verification. State `FAST_PATH: simple-fix`, the reason, and the narrow scope before editing. Re-route with `/task` if the scope expands.
|
|
45
|
+
|
|
46
|
+
### Gated Flow (feature or refactor)
|
|
47
|
+
|
|
48
|
+
1. **Spec** — `.agent/workflows/spec.md` when scope is ambiguous, multi-file, or >~30 min. Skip only for single-line/self-contained fixes. Wait for human confirmation at its exit criteria.
|
|
49
|
+
2. **Plan** — `.agent/workflows/plan.md`. Wait for explicit user approval before implementing.
|
|
50
|
+
3. **Implement** — smallest coherent change per the approved plan, with focused tests.
|
|
51
|
+
4. **Review** — `.agent/workflows/review.md` (five-axis). All 🔴 BLOCKING items resolved or explicitly accepted before calling the task done.
|
|
37
52
|
|
|
38
53
|
## Standards
|
|
39
54
|
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Release the thachvd-kit npm package with verification, versioning, tagging, publishing, and registry checks.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /release - Npm Release
|
|
6
|
+
|
|
7
|
+
Use this workflow only after the implementation workflow is complete and the release commit is the only intended change.
|
|
8
|
+
|
|
9
|
+
## Release Gate
|
|
10
|
+
|
|
11
|
+
- [ ] Working tree is clean before starting.
|
|
12
|
+
- [ ] Change is already reviewed and pushed to `main`.
|
|
13
|
+
- [ ] `npm run release:verify` passes.
|
|
14
|
+
- [ ] The next version is correct and has not been published.
|
|
15
|
+
- [ ] npm authentication is available with `npm whoami`.
|
|
16
|
+
- [ ] Rollback/response plan is known: npm versions cannot be overwritten or reused.
|
|
17
|
+
|
|
18
|
+
## Commands
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
git status --short --branch
|
|
22
|
+
npm run release:verify
|
|
23
|
+
npm run release:patch
|
|
24
|
+
git push origin main --follow-tags
|
|
25
|
+
npm whoami
|
|
26
|
+
npm run release:publish
|
|
27
|
+
npm view thachvd-kit version
|
|
28
|
+
npx thachvd-kit@<published-version> --help
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
`npm run release:patch` runs `preversion`, which executes the release verification, then `npm version patch` updates the package metadata and creates the version commit/tag. Do not run `npm publish` until the version and dry-run contents are correct.
|
|
32
|
+
|
|
33
|
+
## Version Rules
|
|
34
|
+
|
|
35
|
+
- Patch: backward-compatible fixes, docs, tests, and internal workflow improvements.
|
|
36
|
+
- Minor: backward-compatible new CLI behavior or user-facing capability.
|
|
37
|
+
- Major: breaking CLI, configuration, package, or generated-artifact contract.
|
|
38
|
+
- Beta/prerelease: publish with a non-`latest` dist-tag, for example `npm publish --tag beta`.
|
|
39
|
+
|
|
40
|
+
## Bypass Rules
|
|
41
|
+
|
|
42
|
+
Questions and simple fixes bypass Spec/Plan/Review only when they do not change behavior or a shared contract. Publishing never bypasses `release:verify`, versioning, tagging, authentication, or registry verification.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Fast path for one-file, unambiguous fixes with no behavior or shared-contract change.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /simple - Fast Path
|
|
6
|
+
|
|
7
|
+
$ARGUMENTS
|
|
8
|
+
|
|
9
|
+
## Use Only When
|
|
10
|
+
|
|
11
|
+
- The change is limited to one obvious file or one tiny local edit.
|
|
12
|
+
- The expected result is unambiguous.
|
|
13
|
+
- No behavior, API, schema, security, CI, dependency, workflow, or release contract changes.
|
|
14
|
+
|
|
15
|
+
## Explicit Bypass
|
|
16
|
+
|
|
17
|
+
Start the response with:
|
|
18
|
+
|
|
19
|
+
```text
|
|
20
|
+
FAST_PATH: simple-fix
|
|
21
|
+
REASON: [why Spec/Plan/Review are not needed]
|
|
22
|
+
SCOPE: [file or narrow area]
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Steps
|
|
26
|
+
|
|
27
|
+
1. Inspect the target and its immediate context.
|
|
28
|
+
2. Make the smallest change.
|
|
29
|
+
3. Run focused verification.
|
|
30
|
+
4. Report the changed file and evidence.
|
|
31
|
+
|
|
32
|
+
Do not create a spec or plan for this route. Do not skip verification. If the scope expands, stop and re-route through `/task` as a feature, bug, or multi-domain task.
|
|
33
|
+
|
|
34
|
+
## Examples
|
|
35
|
+
|
|
36
|
+
```text
|
|
37
|
+
/simple fix a typo in README.md
|
|
38
|
+
/simple update one stale command in a workflow doc
|
|
39
|
+
/simple change one test assertion message
|
|
40
|
+
```
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Route every task to the smallest safe workflow, fast path, bug flow, feature flow, or release flow.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /task - Task Router
|
|
6
|
+
|
|
7
|
+
$ARGUMENTS
|
|
8
|
+
|
|
9
|
+
## Purpose
|
|
10
|
+
|
|
11
|
+
Use `/task` at the start of a task when you are unsure which workflow, skill, or specialist agent applies. This command routes the request before implementation.
|
|
12
|
+
|
|
13
|
+
## Required Output
|
|
14
|
+
|
|
15
|
+
```text
|
|
16
|
+
ROUTE: question | simple | feature | bug | review | release | multi-domain
|
|
17
|
+
WORKFLOW: [exact .agent/workflows/<name>.md file]
|
|
18
|
+
SKILLS: [skills to load, or none]
|
|
19
|
+
AGENTS: [specialist agents to load, or none]
|
|
20
|
+
GATE: fast-path | standard
|
|
21
|
+
NEXT: [the next command or action]
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Do not write code while routing. Ask one concise clarification question if the route cannot be determined safely.
|
|
25
|
+
|
|
26
|
+
## Routing Rules
|
|
27
|
+
|
|
28
|
+
| Signal | Route | Next action |
|
|
29
|
+
|---|---|---|
|
|
30
|
+
| Asking for information or architecture explanation | question | Answer directly; no edits |
|
|
31
|
+
| One obvious file, no behavior or contract change | simple | Use `/simple <request>` |
|
|
32
|
+
| New behavior, multiple files, unclear scope, or >30 minutes | feature | `/brainstorm` -> `/spec` when needed -> `/plan`, then approval |
|
|
33
|
+
| Failing test, regression, error, or unknown root cause | bug | Use `/debug <symptom>` |
|
|
34
|
+
| Review request or pre-merge check | review | Use `/review` |
|
|
35
|
+
| npm version/tag/publish request | release | Use `/release` |
|
|
36
|
+
| Several specialist domains | multi-domain | Use `/orchestrate` |
|
|
37
|
+
|
|
38
|
+
## Workflow And Skill Map
|
|
39
|
+
|
|
40
|
+
- `/simple`: `$clean-code` + `$verification-before-completion`.
|
|
41
|
+
- `/brainstorm`: `brainstorming`; no code.
|
|
42
|
+
- `/spec`: `.agent/workflows/spec.md`; define scope and acceptance criteria, no code.
|
|
43
|
+
- `/plan`: `project-planner` + `plan-writing`; no code before approval.
|
|
44
|
+
- `/enhance` or `/create`: relevant domain agent and implementation skills after approval.
|
|
45
|
+
- `/debug`: `debugger` + `$systematic-debugging` + `testing-patterns`.
|
|
46
|
+
- `/test`: `test-engineer` + `testing-patterns`.
|
|
47
|
+
- `/review`: `$code-review-checklist` + `$verification-before-completion`.
|
|
48
|
+
- `/release`: `release.md` and the npm release scripts; never use the fast path.
|
|
49
|
+
|
|
50
|
+
## Examples
|
|
51
|
+
|
|
52
|
+
```text
|
|
53
|
+
/task add an export button
|
|
54
|
+
/task login returns 500
|
|
55
|
+
/task fix typo in README
|
|
56
|
+
/task publish a new npm version
|
|
57
|
+
```
|
package/README.md
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
# thachvd-kit
|
|
2
|
-
|
|
3
|
-
`thachvd-kit` bootstraps shared project rules for AI coding agents.
|
|
4
|
-
|
|
5
|
-
It creates a compact cross-agent entry setup for Codex, Antigravity, and Claude Code, then stores scan-based project knowledge under `.agent/docs/` so the root instruction files stay small.
|
|
6
|
-
|
|
7
|
-
## Quick Start
|
|
8
|
-
|
|
9
|
-
Install globally:
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
npm install -g thachvd-kit
|
|
13
|
-
```
|
|
14
|
-
|
|
1
|
+
# thachvd-kit
|
|
2
|
+
|
|
3
|
+
`thachvd-kit` bootstraps shared project rules for AI coding agents.
|
|
4
|
+
|
|
5
|
+
It creates a compact cross-agent entry setup for Codex, Antigravity, and Claude Code, then stores scan-based project knowledge under `.agent/docs/` so the root instruction files stay small.
|
|
6
|
+
|
|
7
|
+
## Quick Start
|
|
8
|
+
|
|
9
|
+
Install globally:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install -g thachvd-kit
|
|
13
|
+
```
|
|
14
|
+
|
|
15
15
|
Run inside a project:
|
|
16
16
|
|
|
17
17
|
```bash
|
|
@@ -60,10 +60,48 @@ Skills work best through progressive disclosure: the agent should first see skil
|
|
|
60
60
|
- Keep `.agent/skills` as the complete shared source from the kit.
|
|
61
61
|
- Let `thachvd-kit` copy selected skills to `~/.codex/skills/` for Codex and `.claude/skills` for Claude Code.
|
|
62
62
|
- Make every `SKILL.md` frontmatter `description` specific: include when to use it, trigger phrases, and boundaries.
|
|
63
|
-
- Run `thachvd-kit --help` to see a compact workflow guide without adding that guidance to every agent context. It recommends when to use `/brainstorm`, `/plan`, `/create`, `/enhance`, `/debug`, `/test`, `/preview`, `/deploy`, `/status`, and `/orchestrate`.
|
|
63
|
+
- Run `thachvd-kit --help` to see a compact workflow guide without adding that guidance to every agent context. It recommends when to use `/task`, `/simple`, `/brainstorm`, `/plan`, `/create`, `/enhance`, `/debug`, `/test`, `/preview`, `/deploy`, `/review`, `/release`, `/status`, and `/orchestrate`.
|
|
64
64
|
- Use explicit prompts when implicit matching misses, for example `Use $webapp-testing to verify this UI` or `Use $clean-code before refactoring`.
|
|
65
65
|
- Restart Codex or Claude Code if a newly copied or edited skill does not appear.
|
|
66
66
|
|
|
67
|
+
## Development Workflow
|
|
68
|
+
|
|
69
|
+
After install, every AI client starts at `/task <request>` when the route is not already obvious. `/task` selects the smallest safe workflow and the relevant skills/agents; it does not force the full feature gate onto every request.
|
|
70
|
+
|
|
71
|
+
| Situation | Command | Required flow |
|
|
72
|
+
|---|---|---|
|
|
73
|
+
| Question or analysis | direct answer | no edits |
|
|
74
|
+
| One obvious local fix | `/simple <request>` | inspect → edit → focused verify |
|
|
75
|
+
| Bug or failing behavior | `/debug <symptom>` | reproduce → root cause → regression test → fix → verify |
|
|
76
|
+
| New behavior or refactor | `/task` → `/brainstorm` → `/spec` when needed → `/plan` | approval → implement → test → `/review` |
|
|
77
|
+
| Pre-merge review | `/review` | five-axis review; resolve blocking findings |
|
|
78
|
+
| npm version/tag/publish | `/release` | release verification; never fast path |
|
|
79
|
+
| Several specialist domains | `/orchestrate` | plan → approval → parallel work → integration verify |
|
|
80
|
+
|
|
81
|
+
### Standard Feature Flow
|
|
82
|
+
|
|
83
|
+
`/task` → `/brainstorm` when needed → `/spec` for ambiguous or multi-file scope → `/plan` → explicit user approval → implementation → `/test` → `/review` → final verification → commit/push.
|
|
84
|
+
|
|
85
|
+
Workflow files define process and gates. Skills define methods/checklists. Agents provide specialist ownership. Members should invoke the command, not only describe the work in chat.
|
|
86
|
+
|
|
87
|
+
### Bug Fix Flow
|
|
88
|
+
|
|
89
|
+
Use `/debug` for regressions, failing tests, exceptions, incorrect output, or any symptom with an unknown root cause. Load `$systematic-debugging`, the `debugger` agent, and `testing-patterns`; reproduce the issue, inspect the code path, test hypotheses, add regression protection, make the smallest root-cause fix, and verify. Use `/review` when the change is cross-file or affects a shared contract.
|
|
90
|
+
|
|
91
|
+
### Simple Fast Path
|
|
92
|
+
|
|
93
|
+
Use `/simple` only for one obvious file, an unambiguous result, and no behavior, API, schema, security, CI, dependency, workflow, or release contract change. Before editing, state:
|
|
94
|
+
|
|
95
|
+
```text
|
|
96
|
+
FAST_PATH: simple-fix
|
|
97
|
+
REASON: [why Spec/Plan/Review are not needed]
|
|
98
|
+
SCOPE: [file or narrow area]
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
This bypasses only Spec, Plan, and the feature/refactor Review gate. It never bypasses inspection or verification. If the scope expands, stop and run `/task` again.
|
|
102
|
+
|
|
103
|
+
Claude Code has a Stop hook that checks the standard feature/refactor gate. Codex, Antigravity, and Cursor use the same written routing rules through `AGENTS.md`, `.cursorrules`, and `.agent/rules/GEMINI.md`.
|
|
104
|
+
|
|
67
105
|
## Optional Tooling
|
|
68
106
|
|
|
69
107
|
`init` performs setup and prints what it configured:
|
|
@@ -107,4 +145,38 @@ npm test
|
|
|
107
145
|
npm pack --dry-run
|
|
108
146
|
```
|
|
109
147
|
|
|
148
|
+
## Npm Release Flow
|
|
149
|
+
|
|
150
|
+
An npm release is never a simple fix. Release only from a clean `main` branch after the change has passed the feature/refactor gates and has been pushed to GitHub.
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
# 1. Verify the clean, pushed source
|
|
154
|
+
git status --short --branch
|
|
155
|
+
npm run release:verify
|
|
156
|
+
|
|
157
|
+
# 2. Bump patch version, create the version commit and git tag
|
|
158
|
+
npm run release:patch
|
|
159
|
+
|
|
160
|
+
# 3. Push the version commit and tag
|
|
161
|
+
git push origin main --follow-tags
|
|
162
|
+
|
|
163
|
+
# 4. Confirm npm authentication, then publish
|
|
164
|
+
npm whoami
|
|
165
|
+
npm run release:publish
|
|
166
|
+
|
|
167
|
+
# 5. Verify the registry and the installed CLI
|
|
168
|
+
npm view thachvd-kit version
|
|
169
|
+
npx thachvd-kit@<published-version> --help
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
`npm run release:patch` runs the verification command first through `preversion`; `npm version patch` then updates `package.json`/`package-lock.json`, creates a commit, and creates a git tag. A published `name@version` cannot be reused, so do not publish until the version and tarball are correct. Use `npm publish --tag beta` for a prerelease channel instead of changing `latest`.
|
|
173
|
+
|
|
174
|
+
### Which Flow To Use
|
|
175
|
+
|
|
176
|
+
- **Question/analysis:** answer or inspect only; no files changed, so no spec/plan/review.
|
|
177
|
+
- **Simple fix:** one unambiguous file, no behavior/API/schema/security/CI/release contract change; inspect, edit, run focused verification, summarize.
|
|
178
|
+
- **Feature/refactor:** any new behavior, multiple files, dependency/API/schema/security/CI changes, or work likely over 30 minutes; run Spec → user-approved Plan → Implement → Review → verification.
|
|
179
|
+
- **Multi-domain task:** route through `.agent/workflows/orchestrate.md`.
|
|
180
|
+
- **Release/publish:** only after the relevant implementation flow is complete; run the npm release flow above. Never bypass release verification.
|
|
181
|
+
|
|
110
182
|
The npm package page updates only after `npm publish`.
|
package/bin/cli.js
CHANGED
|
@@ -144,23 +144,34 @@ ${pc.bold('What gets generated:')}
|
|
|
144
144
|
~/.codex/skills/ Selected Codex skills copied to global user dir (shows in $ menu)
|
|
145
145
|
.claude/skills/ Selected Claude Code project skills copied from .agent/skills
|
|
146
146
|
|
|
147
|
-
${pc.bold('Workflow guide:')}
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
147
|
+
${pc.bold('Workflow guide:')}
|
|
148
|
+
Every task /task Classify the request and select the workflow, skill, and agent
|
|
149
|
+
Small obvious fix /simple Fast path; skips spec/plan/review but still verifies
|
|
150
|
+
Idea is fuzzy /brainstorm Explore options, tradeoffs, and recommended direction
|
|
151
|
+
Scope needs a contract /spec Define requirements and acceptance criteria; no code yet
|
|
152
|
+
New app from scratch /create Turn an app idea into plan + implementation flow
|
|
153
|
+
Feature is clear /plan Create docs/PLAN-*.md first, no code yet
|
|
154
|
+
Existing app update /enhance Add or change a feature in an existing codebase
|
|
152
155
|
Bug or failing behavior /debug Investigate symptoms, hypotheses, root cause, fix
|
|
153
156
|
UI / UX work ui-ux-pro-max, frontend-specialist, $frontend-design, $webapp-testing
|
|
154
157
|
Run or add tests /test Generate tests, run tests, check coverage
|
|
155
158
|
Preview locally /preview Start, stop, restart, or health-check dev server
|
|
156
|
-
Deploy / infra /deploy Release, hosting, Docker, cloud, environment setup
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
Use /
|
|
159
|
+
Deploy / infra /deploy Release, hosting, Docker, cloud, environment setup
|
|
160
|
+
Pre-merge review /review Run the five-axis review before calling work complete
|
|
161
|
+
Npm package release /release Verify, version, tag, publish, and verify the package
|
|
162
|
+
Project state /status Summarize stack, progress, preview, pending work
|
|
163
|
+
Multi-domain work /orchestrate Coordinate frontend, backend, data, security, QA
|
|
164
|
+
|
|
165
|
+
${pc.bold('Common explicit skill prompts:')}
|
|
166
|
+
Use /task to route this request before editing.
|
|
167
|
+
Use /simple for a one-file fix with no behavior or contract change.
|
|
168
|
+
Use /brainstorm for this feature idea before planning.
|
|
169
|
+
Use /spec when requirements or scope need an explicit contract.
|
|
170
|
+
Use /plan for this feature; do not write code yet.
|
|
171
|
+
Use /enhance to implement this planned feature.
|
|
172
|
+
Use /debug for this failing behavior and find the root cause before editing.
|
|
173
|
+
Use /review before claiming this feature/refactor complete.
|
|
174
|
+
Use /release for npm versioning and publishing.
|
|
164
175
|
Use $clean-code before editing this module.
|
|
165
176
|
Use $systematic-debugging to investigate this bug.
|
|
166
177
|
Use $webapp-testing to verify the UI with Playwright.
|
|
@@ -906,14 +917,40 @@ Shared operating instructions for Codex, Antigravity, Claude Code, and Cursor.
|
|
|
906
917
|
|
|
907
918
|
If any \`.agent/docs/*.md\` file still contains \`TODO: refine\`, update the docs by scanning the project before making product code changes.
|
|
908
919
|
|
|
909
|
-
## Task Flow
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
-
|
|
914
|
-
-
|
|
915
|
-
-
|
|
916
|
-
|
|
920
|
+
## Task Flow
|
|
921
|
+
|
|
922
|
+
Route every task before editing. Use \`/task <request>\` when the correct path is not obvious.
|
|
923
|
+
|
|
924
|
+
- Questions and analysis: answer directly, cite relevant files when useful, and do not edit code.
|
|
925
|
+
- Simple fix: use \`/simple <request>\` only for one-file, unambiguous changes with no behavior or contract change.
|
|
926
|
+
- Bug or failing behavior: use \`/debug <symptom>\` and follow the evidence-first root-cause flow.
|
|
927
|
+
- Feature or refactor: use \`/brainstorm\` for discovery, \`/spec\` for ambiguous or multi-file scope, then \`/plan\`, wait for approval, implement, test, and \`/review\`.
|
|
928
|
+
- Pre-merge review: use \`/review\` even when the implementation itself was done by another client or member.
|
|
929
|
+
- Release or npm publish: use \`/release\`; release work never uses the simple fast path.
|
|
930
|
+
- Multi-domain work: use \`.agent/workflows/orchestrate.md\` and route to the relevant specialist docs.
|
|
931
|
+
- UI work: read \`.agent/agents/frontend-specialist.md\` and applicable design skills before editing.
|
|
932
|
+
|
|
933
|
+
### Fast Path (\`/simple\`)
|
|
934
|
+
|
|
935
|
+
The fast path intentionally bypasses only Spec, Plan, and the feature/refactor Review gate for a trivial change. It never bypasses inspection, focused verification, or reporting evidence. The agent must state this protocol before editing:
|
|
936
|
+
|
|
937
|
+
\`\`\`text
|
|
938
|
+
FAST_PATH: simple-fix
|
|
939
|
+
REASON: [why the change is one-file and unambiguous]
|
|
940
|
+
SCOPE: [file or narrow area]
|
|
941
|
+
\`\`\`
|
|
942
|
+
|
|
943
|
+
If the scope expands, stop and re-route with \`/task\`. Do not silently skip gates for work that changes behavior, APIs, schemas, security, CI, dependencies, workflows, or release state.
|
|
944
|
+
|
|
945
|
+
### Gated Flow (feature or refactor)
|
|
946
|
+
|
|
947
|
+
1. **Spec** — run \`.agent/workflows/spec.md\` when scope is ambiguous, touches multiple files, or would take more than ~30 minutes. Skip only for single-line/self-contained fixes. Stop at its exit criteria and wait for human confirmation before moving on.
|
|
948
|
+
2. **Plan** — run \`.agent/workflows/plan.md\` (project-planner agent, no code writing). Wait for explicit user approval of the plan file before implementing.
|
|
949
|
+
3. **Implement** — smallest coherent change per the approved plan, with focused tests for changed behavior.
|
|
950
|
+
4. **Review** — run \`.agent/workflows/review.md\` (five-axis review) before the change is considered done. All 🔴 BLOCKING items must be resolved or explicitly accepted with rationale.
|
|
951
|
+
|
|
952
|
+
A feature/refactor task is not "done" until step 4's exit criteria are met — passing tests alone does not satisfy the gate. Simple fixes use the explicit \`/simple\` fast path above. See \`.agent/docs/getting-started.md\` for the complete route guide.
|
|
953
|
+
|
|
917
954
|
## Skill Loading
|
|
918
955
|
|
|
919
956
|
- Treat \`.agent/skills/\` as the shared source of truth for all kit skills.
|
|
@@ -968,7 +1005,7 @@ Read AGENTS.md first, then follow the shared docs under .agent/docs/.
|
|
|
968
1005
|
}
|
|
969
1006
|
|
|
970
1007
|
function generateSharedCursorrules(data) {
|
|
971
|
-
return `# Cursor Rules
|
|
1008
|
+
return `# Cursor Rules
|
|
972
1009
|
|
|
973
1010
|
This repository uses AGENTS.md as the shared cross-agent entry file. Follow the instructions in AGENTS.md and keep Cursor-specific notes here only when they cannot apply to Codex, Antigravity, or Claude Code.
|
|
974
1011
|
|
|
@@ -976,8 +1013,8 @@ Read AGENTS.md first, then follow the shared docs under .agent/docs/.
|
|
|
976
1013
|
|
|
977
1014
|
---
|
|
978
1015
|
|
|
979
|
-
${generateSharedAgentsMd(data)}
|
|
980
|
-
`;
|
|
1016
|
+
${generateSharedAgentsMd(data).trimEnd()}
|
|
1017
|
+
`;
|
|
981
1018
|
}
|
|
982
1019
|
|
|
983
1020
|
function resolveCommands(data) {
|
|
@@ -1148,9 +1185,23 @@ function generateWorkflowDoc() {
|
|
|
1148
1185
|
|
|
1149
1186
|
1. Read AGENTS.md.
|
|
1150
1187
|
2. Read .agent/docs/project.md.
|
|
1151
|
-
3.
|
|
1152
|
-
4. Read only the relevant docs under .agent/agents, .agent/skills, .claude/skills, and .agent/workflows.
|
|
1153
|
-
5. Check if MCP servers (like \`codegraph\`) are active/available and prioritize using them as the primary entry point to search and locate files, symbols, and code blocks.
|
|
1188
|
+
3. Route the request with \`/task <request>\` when the path is not obvious.
|
|
1189
|
+
4. Read only the relevant docs under .agent/agents, .agent/skills, .claude/skills, and .agent/workflows.
|
|
1190
|
+
5. Check if MCP servers (like \`codegraph\`) are active/available and prioritize using them as the primary entry point to search and locate files, symbols, and code blocks.
|
|
1191
|
+
|
|
1192
|
+
## Route Matrix
|
|
1193
|
+
|
|
1194
|
+
| Situation | Command | Workflow / gate |
|
|
1195
|
+
|---|---|---|
|
|
1196
|
+
| Question or analysis only | direct answer | no edits |
|
|
1197
|
+
| One obvious local fix | \`/simple\` | \`.agent/workflows/simple.md\`, fast-path |
|
|
1198
|
+
| Bug, regression, failing test, or unknown error | \`/debug\` | \`.agent/workflows/debug.md\`, evidence-first |
|
|
1199
|
+
| New behavior, multi-file change, or unclear scope | \`/brainstorm\` -> \`/spec\` when needed -> \`/plan\` | spec/plan approval -> implement -> review |
|
|
1200
|
+
| Pre-merge review | \`/review\` | \`.agent/workflows/review.md\`, five-axis |
|
|
1201
|
+
| npm version, tag, publish, or deployment | \`/release\` | \`.agent/workflows/release.md\`, release gate |
|
|
1202
|
+
| Several specialist domains | \`/orchestrate\` | plan -> approval -> parallel work -> integration verify |
|
|
1203
|
+
|
|
1204
|
+
If a task is not clearly simple, use the standard flow. Never use the fast path for behavior, API, schema, security, CI, dependency, workflow, or release changes.
|
|
1154
1205
|
|
|
1155
1206
|
## Skill Selection
|
|
1156
1207
|
|
|
@@ -1165,6 +1216,16 @@ function generateWorkflowDoc() {
|
|
|
1165
1216
|
|
|
1166
1217
|
## Implementation Flow
|
|
1167
1218
|
|
|
1219
|
+
For \`/simple\` fixes, state the fast-path decision before editing:
|
|
1220
|
+
|
|
1221
|
+
\`\`\`text
|
|
1222
|
+
FAST_PATH: simple-fix
|
|
1223
|
+
REASON: [why Spec/Plan/Review are not needed]
|
|
1224
|
+
SCOPE: [file or narrow area]
|
|
1225
|
+
\`\`\`
|
|
1226
|
+
|
|
1227
|
+
Then:
|
|
1228
|
+
|
|
1168
1229
|
1. State assumptions and success criteria when the task is not trivial.
|
|
1169
1230
|
2. Inspect dependent files before editing.
|
|
1170
1231
|
3. Make the smallest coherent change.
|
|
@@ -1172,6 +1233,24 @@ function generateWorkflowDoc() {
|
|
|
1172
1233
|
5. Run verification (prioritize using Playwright MCP for web/UI changes to automate verification and capture screenshots).
|
|
1173
1234
|
6. Summarize changed files and verification evidence.
|
|
1174
1235
|
|
|
1236
|
+
For bugs, use \`/debug\` with \`$systematic-debugging\`, the \`debugger\` agent, and \`testing-patterns\`: reproduce, isolate the root cause, add regression protection, make the smallest fix, and verify.
|
|
1237
|
+
|
|
1238
|
+
For features or refactors, this flow runs *inside* the gated flow defined in AGENTS.md (spec -> plan -> implement -> review) — steps 3-5 above are the "Implement" phase, and step 6 is not a substitute for the mandatory \`.agent/workflows/review.md\` gate.
|
|
1239
|
+
|
|
1240
|
+
## Definition of Done (feature or refactor)
|
|
1241
|
+
|
|
1242
|
+
A feature/refactor task is only complete when all of the following hold — not when code compiles or tests pass:
|
|
1243
|
+
|
|
1244
|
+
The Spec checkbox may be skipped only when the documented \`/simple\` fast-path protocol is stated and its criteria are met.
|
|
1245
|
+
|
|
1246
|
+
- [ ] \`.agent/workflows/spec.md\` exit criteria met (or explicitly skipped as a trivial/self-contained change)
|
|
1247
|
+
- [ ] \`.agent/workflows/plan.md\` produced a plan file, approved by the user
|
|
1248
|
+
- [ ] Tests added/updated for the changed behavior and passing
|
|
1249
|
+
- [ ] \`.agent/workflows/review.md\` five-axis review completed with all 🔴 BLOCKING items resolved or accepted with rationale
|
|
1250
|
+
- [ ] Changed files and verification evidence summarized to the user
|
|
1251
|
+
|
|
1252
|
+
Do not report a feature/refactor task as done if any box above is unchecked — say explicitly which gate is still open.
|
|
1253
|
+
|
|
1175
1254
|
## When To Update Docs
|
|
1176
1255
|
|
|
1177
1256
|
- Update .agent/docs/architecture.md when structure, boundaries, or entry points change.
|
|
@@ -1181,6 +1260,91 @@ function generateWorkflowDoc() {
|
|
|
1181
1260
|
`;
|
|
1182
1261
|
}
|
|
1183
1262
|
|
|
1263
|
+
function generateGettingStartedDoc() {
|
|
1264
|
+
return `# Getting Started With This Kit
|
|
1265
|
+
|
|
1266
|
+
Read this after \`thachvd-kit init\`. The kit gives every member one entry point, then selects only the process and expertise the task needs.
|
|
1267
|
+
|
|
1268
|
+
## Start Every Task With /task
|
|
1269
|
+
|
|
1270
|
+
Use \`/task <request>\` before editing whenever the route is not already obvious. It must produce:
|
|
1271
|
+
|
|
1272
|
+
\`\`\`text
|
|
1273
|
+
ROUTE: question | simple | feature | bug | review | release | multi-domain
|
|
1274
|
+
WORKFLOW: [exact .agent/workflows/<name>.md file]
|
|
1275
|
+
SKILLS: [matching skills, or none]
|
|
1276
|
+
AGENTS: [matching specialist agents, or none]
|
|
1277
|
+
GATE: fast-path | standard
|
|
1278
|
+
NEXT: [the next command or action]
|
|
1279
|
+
\`\`\`
|
|
1280
|
+
|
|
1281
|
+
A workflow is the process and its gates. A skill is the method or checklist. An agent is the specialist role. Chat alone is not a route: the member must select the route and invoke the matching workflow or explicitly choose the question path.
|
|
1282
|
+
|
|
1283
|
+
## Route Matrix
|
|
1284
|
+
|
|
1285
|
+
| Situation | Command | Gate | Required next step |
|
|
1286
|
+
|---|---|---|---|
|
|
1287
|
+
| Explain, inspect, or brainstorm only | direct answer or \`/brainstorm\` | none | no code until the request becomes actionable |
|
|
1288
|
+
| One obvious local fix | \`/simple <request>\` | fast-path | inspect -> edit -> focused verify |
|
|
1289
|
+
| New behavior, multi-file change, unclear scope, or >~30 min | \`/task\` -> \`/brainstorm\` -> \`/spec\` when needed -> \`/plan\` | standard | wait for approval before implementation |
|
|
1290
|
+
| Bug, regression, failing test, or unknown error | \`/debug <symptom>\` | bug | reproduce -> isolate -> regression test -> fix -> verify |
|
|
1291
|
+
| Pre-merge or independent review | \`/review\` | review | five-axis review; resolve blocking findings |
|
|
1292
|
+
| Version, tag, npm publish, or deployment | \`/release\` | release | release checklist; never fast-path |
|
|
1293
|
+
| Frontend + backend + data/security together | \`/orchestrate\` | standard | plan -> approval -> specialist work -> integration verify |
|
|
1294
|
+
|
|
1295
|
+
## Standard Feature Flow
|
|
1296
|
+
|
|
1297
|
+
The gated sequence is Spec -> Plan -> Implement -> Review: \`/task\` -> \`/brainstorm\` -> \`/spec\` when scope is ambiguous or multi-file -> \`/plan\` -> user approves the plan -> implementation -> \`/test\` -> \`/review\` -> final verification -> commit/push.
|
|
1298
|
+
|
|
1299
|
+
The plan is a gate, not a suggestion. Do not start product-code implementation before explicit approval. Load only the relevant specialist agent and skills, such as \`$frontend-design\`, \`$api-design\`, or \`$webapp-testing\`.
|
|
1300
|
+
|
|
1301
|
+
## Bug Fix Flow
|
|
1302
|
+
|
|
1303
|
+
Use \`/debug <symptom>\`, not the feature flow, when something is failing or the root cause is unknown:
|
|
1304
|
+
|
|
1305
|
+
1. Capture the exact symptom, environment, reproduction, and expected result.
|
|
1306
|
+
2. Inspect the relevant code path with MCP/codegraph when available.
|
|
1307
|
+
3. Form and test a small number of hypotheses; do not patch by guesswork.
|
|
1308
|
+
4. Add or update a regression test that fails before the fix when practical.
|
|
1309
|
+
5. Make the smallest root-cause fix.
|
|
1310
|
+
6. Run focused tests, then broader verification when the blast radius is shared.
|
|
1311
|
+
7. Use \`/review\` when the fix touches multiple files, contracts, security, or release behavior.
|
|
1312
|
+
|
|
1313
|
+
Load \`$systematic-debugging\`, the \`debugger\` agent, and \`testing-patterns\` for this route.
|
|
1314
|
+
|
|
1315
|
+
## Simple Fast Path
|
|
1316
|
+
|
|
1317
|
+
Use \`/simple <request>\` only when the change is one obvious file, the result is unambiguous, and it changes no behavior, API, schema, security, CI, dependency, workflow, or release contract. Before editing, state:
|
|
1318
|
+
|
|
1319
|
+
\`\`\`text
|
|
1320
|
+
FAST_PATH: simple-fix
|
|
1321
|
+
REASON: [why Spec/Plan/Review are not needed]
|
|
1322
|
+
SCOPE: [file or narrow area]
|
|
1323
|
+
\`\`\`
|
|
1324
|
+
|
|
1325
|
+
This bypasses only Spec, Plan, and the feature/refactor Review gate. It never bypasses inspection, focused verification, or reporting evidence. If the scope expands, stop and re-route with \`/task\`.
|
|
1326
|
+
|
|
1327
|
+
## Command And Skill Map
|
|
1328
|
+
|
|
1329
|
+
- \`/brainstorm\`: clarify intent and tradeoffs; no code.
|
|
1330
|
+
- \`/spec\`: define requirements and acceptance criteria; no code.
|
|
1331
|
+
- \`/plan\`: create an approved implementation plan; no code before approval.
|
|
1332
|
+
- \`/enhance\` or \`/create\`: implement an approved feature with the relevant specialist agent.
|
|
1333
|
+
- \`/debug\`: systematic root-cause investigation and regression protection.
|
|
1334
|
+
- \`/test\`: add or run tests and assess coverage.
|
|
1335
|
+
- \`/review\`: five-axis review before completion or merge.
|
|
1336
|
+
- \`/release\`: verify, version, tag, publish, and verify npm output.
|
|
1337
|
+
- \`$clean-code\` and \`$verification-before-completion\`: default implementation hygiene.
|
|
1338
|
+
- \`$webapp-testing\`: browser/UI verification; use Playwright when available.
|
|
1339
|
+
|
|
1340
|
+
## Enforcement
|
|
1341
|
+
|
|
1342
|
+
Claude Code has a project Stop hook in \`.claude/settings.json\` for standard feature/refactor work. An explicit \`FAST_PATH: simple-fix\` is accepted only when the simple criteria are met; it still requires verification. Codex, Antigravity, and Cursor use the same written rules through \`AGENTS.md\`, \`.cursorrules\`, and \`.agent/rules/GEMINI.md\`.
|
|
1343
|
+
|
|
1344
|
+
Full details live in \`AGENTS.md\`, \`.agent/docs/workflow.md\`, and the matching file under \`.agent/workflows/\`.
|
|
1345
|
+
`;
|
|
1346
|
+
}
|
|
1347
|
+
|
|
1184
1348
|
function resolveToolingSetup(data) {
|
|
1185
1349
|
const primaryLang = data.primary_language || 'javascript';
|
|
1186
1350
|
const packageManager = data.package_manager || 'npm';
|
|
@@ -1560,6 +1724,78 @@ tool_timeout_sec = 120
|
|
|
1560
1724
|
return { ok: true, message: `configured context7, codegraph, playwright MCP in ${filePath}` };
|
|
1561
1725
|
}
|
|
1562
1726
|
|
|
1727
|
+
const DOD_HOOK_MARKER = 'feature/refactor Definition-of-Done gate';
|
|
1728
|
+
|
|
1729
|
+
function generateDodStopHookPrompt() {
|
|
1730
|
+
return `Input JSON (Stop hook payload): $ARGUMENTS\n\nCheck this project's ${DOD_HOOK_MARKER} (defined in AGENTS.md "Gated Flow" and .agent/docs/workflow.md "Definition of Done"). Use the \`last_assistant_message\` field as the authoritative final response. Use \`transcript_path\` only for additional context because the transcript may not contain the final response yet.\n\nFor a feature or refactor (multi-file change, new behavior, or non-trivial refactor), the work must go through spec -> plan -> implement -> review before being reported as complete:\n- spec: \`.agent/workflows/spec.md\` (skip allowed for trivial/self-contained changes)\n- plan: \`.agent/workflows/plan.md\`, with a plan artifact such as \`docs/PLAN-*.md\` and explicit user approval\n- review: \`.agent/workflows/review.md\` five-axis review, with blocking issues resolved\n\nSimple/self-contained fixes (single-line, typo, or unambiguous one-file change) may use /simple and are explicitly exempt from spec+plan+review only when the final response states FAST_PATH: simple-fix, its reason, and its narrow scope. They should never be blocked when those criteria are met. Verification is still mandatory.\n\nSteps:\n1. If the input JSON has \`stop_hook_active: true\`, allow stopping immediately (already checked once this cycle; never block twice in a row).\n2. Inspect the changed files and the \`last_assistant_message\` field.\n3. If no source files changed, the final response does not claim the task is done/complete, or the final response explicitly contains FAST_PATH: simple-fix and the changed scope is clearly a simple/self-contained fix, allow stopping.\n4. If it is a feature/refactor-scale change and the final response claims completion, verify that a plan artifact exists with evidence of user approval and that a review pass was completed. If either gate is missing, block; a generic statement that the task was simple is not enough.\n5. Return exactly JSON: {"ok": true} to allow stopping, or {"ok": false, "reason": "..."} to block.\n\nWhen blocking, name exactly which gate is missing and instruct the assistant to run the relevant workflow or explicitly state why the task qualifies as a simple fix.`;
|
|
1731
|
+
}
|
|
1732
|
+
|
|
1733
|
+
function isDefinitionOfDoneHook(hook) {
|
|
1734
|
+
const prompt = hook && typeof hook.prompt === 'string' ? hook.prompt : '';
|
|
1735
|
+
return prompt.includes(DOD_HOOK_MARKER) || (
|
|
1736
|
+
prompt.includes('Input JSON (Stop hook payload)') &&
|
|
1737
|
+
prompt.includes('.agent/workflows/spec.md') &&
|
|
1738
|
+
prompt.includes('.agent/workflows/review.md')
|
|
1739
|
+
);
|
|
1740
|
+
}
|
|
1741
|
+
|
|
1742
|
+
function mergeClaudeProjectHooks(filePath) {
|
|
1743
|
+
const data = readJsonFile(filePath);
|
|
1744
|
+
if (data === null) {
|
|
1745
|
+
return { ok: false, message: `${filePath} is not valid JSON; skipped hook setup` };
|
|
1746
|
+
}
|
|
1747
|
+
if (!data.hooks || typeof data.hooks !== 'object') data.hooks = {};
|
|
1748
|
+
if (!Array.isArray(data.hooks.Stop)) data.hooks.Stop = [];
|
|
1749
|
+
|
|
1750
|
+
let primaryHook = null;
|
|
1751
|
+
let definitionHookCount = 0;
|
|
1752
|
+
for (const entry of data.hooks.Stop) {
|
|
1753
|
+
for (const hook of Array.isArray(entry?.hooks) ? entry.hooks : []) {
|
|
1754
|
+
if (isDefinitionOfDoneHook(hook)) {
|
|
1755
|
+
definitionHookCount++;
|
|
1756
|
+
if (!primaryHook) primaryHook = hook;
|
|
1757
|
+
}
|
|
1758
|
+
}
|
|
1759
|
+
}
|
|
1760
|
+
|
|
1761
|
+
if (primaryHook) {
|
|
1762
|
+
primaryHook.prompt = generateDodStopHookPrompt();
|
|
1763
|
+
primaryHook.timeout = 60;
|
|
1764
|
+
primaryHook.statusMessage = 'Checking feature/refactor Definition-of-Done gate...';
|
|
1765
|
+
|
|
1766
|
+
if (definitionHookCount > 1) {
|
|
1767
|
+
data.hooks.Stop = data.hooks.Stop
|
|
1768
|
+
.map(entry => ({
|
|
1769
|
+
...entry,
|
|
1770
|
+
hooks: (Array.isArray(entry?.hooks) ? entry.hooks : [])
|
|
1771
|
+
.filter(hook => !isDefinitionOfDoneHook(hook) || hook === primaryHook)
|
|
1772
|
+
}))
|
|
1773
|
+
.filter(entry => entry.hooks.length > 0);
|
|
1774
|
+
}
|
|
1775
|
+
|
|
1776
|
+
writeJsonFile(filePath, data);
|
|
1777
|
+
return {
|
|
1778
|
+
ok: true,
|
|
1779
|
+
message: definitionHookCount > 1
|
|
1780
|
+
? `consolidated Definition-of-Done Stop hooks in ${filePath}`
|
|
1781
|
+
: `updated Definition-of-Done Stop hook in ${filePath}`
|
|
1782
|
+
};
|
|
1783
|
+
}
|
|
1784
|
+
|
|
1785
|
+
data.hooks.Stop.push({
|
|
1786
|
+
hooks: [
|
|
1787
|
+
{
|
|
1788
|
+
type: 'agent',
|
|
1789
|
+
prompt: generateDodStopHookPrompt(),
|
|
1790
|
+
timeout: 60,
|
|
1791
|
+
statusMessage: 'Checking feature/refactor Definition-of-Done gate...'
|
|
1792
|
+
}
|
|
1793
|
+
]
|
|
1794
|
+
});
|
|
1795
|
+
writeJsonFile(filePath, data);
|
|
1796
|
+
return { ok: true, message: `configured Definition-of-Done Stop hook in ${filePath}` };
|
|
1797
|
+
}
|
|
1798
|
+
|
|
1563
1799
|
function setupMcpServers() {
|
|
1564
1800
|
const results = [];
|
|
1565
1801
|
results.push(ensureCodegraphCli());
|
|
@@ -1694,7 +1930,8 @@ async function main() {
|
|
|
1694
1930
|
[path.join('.agent', 'docs', 'architecture.md'), generateArchitectureDoc(data)],
|
|
1695
1931
|
[path.join('.agent', 'docs', 'conventions.md'), generateConventionsDoc(data)],
|
|
1696
1932
|
[path.join('.agent', 'docs', 'workflow.md'), generateWorkflowDoc()],
|
|
1697
|
-
[path.join('.agent', 'docs', 'tooling.md'), generateToolingDoc(data)]
|
|
1933
|
+
[path.join('.agent', 'docs', 'tooling.md'), generateToolingDoc(data)],
|
|
1934
|
+
[path.join('.agent', 'docs', 'getting-started.md'), generateGettingStartedDoc()]
|
|
1698
1935
|
];
|
|
1699
1936
|
|
|
1700
1937
|
for (const [relativePath, content] of generatedFiles) {
|
|
@@ -1703,6 +1940,10 @@ async function main() {
|
|
|
1703
1940
|
else console.log(` ${pc.yellow('~')} Skipped ${pc.bold(relativePath)}`);
|
|
1704
1941
|
}
|
|
1705
1942
|
|
|
1943
|
+
console.log(`\n${pc.bold(pc.cyan('Configuring Claude Code hooks'))}`);
|
|
1944
|
+
const hookResult = mergeClaudeProjectHooks(path.join(targetDir, '.claude', 'settings.json'));
|
|
1945
|
+
console.log(` ${hookResult.ok ? pc.green('OK') : pc.yellow('~')} ${hookResult.message}`);
|
|
1946
|
+
|
|
1706
1947
|
if (shouldSetupMcp) {
|
|
1707
1948
|
console.log(`\n${pc.bold(pc.cyan('Configuring MCP'))}`);
|
|
1708
1949
|
for (const result of setupMcpServers()) {
|
|
@@ -1721,10 +1962,11 @@ async function main() {
|
|
|
1721
1962
|
- ${pc.bold('CLAUDE.md')} Claude Code entry that imports AGENTS.md
|
|
1722
1963
|
- ${pc.bold('GEMINI.md')} Antigravity entry
|
|
1723
1964
|
- ${pc.bold('.cursorrules')} Cursor entry
|
|
1724
|
-
- ${pc.bold('.agent/docs/')} scan-based project rules
|
|
1965
|
+
- ${pc.bold('.agent/docs/')} scan-based project rules, including ${pc.bold('getting-started.md')} (standard flow vs fast path)
|
|
1725
1966
|
- ${pc.bold('.agent/')} skills, workflows, agents, and rules
|
|
1726
1967
|
- ${pc.bold('~/.codex/skills/')} selected Codex skills installed globally (visible in $ menu)
|
|
1727
1968
|
- ${pc.bold('.claude/skills/')} selected Claude Code native skills
|
|
1969
|
+
- ${pc.bold('.claude/settings.json')} Definition-of-Done Stop hook (Claude Code only — blocks reporting a feature/refactor "done" without a plan + review pass)
|
|
1728
1970
|
|
|
1729
1971
|
${pc.bold('MCP/tooling setup:')}
|
|
1730
1972
|
- Codegraph CLI checked or installed; MCP configured for Codex, Gemini/Antigravity, and Claude Code
|
|
@@ -1734,9 +1976,10 @@ async function main() {
|
|
|
1734
1976
|
- Codegraph index hint: run ${pc.bold('codegraph init -i')} when a project index is missing, then keep ${pc.bold('.codegraph/')} uncommitted
|
|
1735
1977
|
|
|
1736
1978
|
${pc.bold('Next steps:')}
|
|
1737
|
-
1.
|
|
1738
|
-
2.
|
|
1739
|
-
3.
|
|
1979
|
+
1. Read ${pc.bold('.agent/docs/getting-started.md')} for the standard flow vs fast path
|
|
1980
|
+
2. Copy the prompt below into your AI editor and describe what the project does
|
|
1981
|
+
3. Commit ${pc.bold('AGENTS.md')}, ${pc.bold('CLAUDE.md')}, ${pc.bold('GEMINI.md')}, ${pc.bold('.cursorrules')}, ${pc.bold('.agent/')}, and ${pc.bold('.claude/settings.json')}
|
|
1982
|
+
4. Open the project in Codex, Antigravity, Claude Code, or Cursor
|
|
1740
1983
|
|
|
1741
1984
|
${pc.bold('Copy this prompt into your AI editor:')}
|
|
1742
1985
|
${pc.dim('---')}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "thachvd-kit",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.27",
|
|
4
4
|
"description": "Cross-agent project rules bootstrap kit for Codex, Antigravity, and Claude Code",
|
|
5
5
|
"bin": {
|
|
6
6
|
"thachvd-kit": "./bin/cli.js"
|
|
@@ -23,6 +23,8 @@
|
|
|
23
23
|
},
|
|
24
24
|
"scripts": {
|
|
25
25
|
"test": "node test/cli.test.js",
|
|
26
|
+
"release:verify": "npm test && node --check bin/cli.js && npm pack --dry-run",
|
|
27
|
+
"preversion": "npm run release:verify",
|
|
26
28
|
"release:patch": "npm version patch",
|
|
27
29
|
"release:dry-run": "npm pack --dry-run",
|
|
28
30
|
"release:publish": "npm publish"
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Release the thachvd-kit npm package with verification, versioning, tagging, publishing, and registry checks.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /release - Npm Release
|
|
6
|
+
|
|
7
|
+
Use this workflow only after the implementation workflow is complete and the release commit is the only intended change.
|
|
8
|
+
|
|
9
|
+
## Release Gate
|
|
10
|
+
|
|
11
|
+
- [ ] Working tree is clean before starting.
|
|
12
|
+
- [ ] Change is already reviewed and pushed to `main`.
|
|
13
|
+
- [ ] `npm run release:verify` passes.
|
|
14
|
+
- [ ] The next version is correct and has not been published.
|
|
15
|
+
- [ ] npm authentication is available with `npm whoami`.
|
|
16
|
+
- [ ] Rollback/response plan is known: npm versions cannot be overwritten or reused.
|
|
17
|
+
|
|
18
|
+
## Commands
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
git status --short --branch
|
|
22
|
+
npm run release:verify
|
|
23
|
+
npm run release:patch
|
|
24
|
+
git push origin main --follow-tags
|
|
25
|
+
npm whoami
|
|
26
|
+
npm run release:publish
|
|
27
|
+
npm view thachvd-kit version
|
|
28
|
+
npx thachvd-kit@<published-version> --help
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
`npm run release:patch` runs `preversion`, which executes the release verification, then `npm version patch` updates the package metadata and creates the version commit/tag. Do not run `npm publish` until the version and dry-run contents are correct.
|
|
32
|
+
|
|
33
|
+
## Version Rules
|
|
34
|
+
|
|
35
|
+
- Patch: backward-compatible fixes, docs, tests, and internal workflow improvements.
|
|
36
|
+
- Minor: backward-compatible new CLI behavior or user-facing capability.
|
|
37
|
+
- Major: breaking CLI, configuration, package, or generated-artifact contract.
|
|
38
|
+
- Beta/prerelease: publish with a non-`latest` dist-tag, for example `npm publish --tag beta`.
|
|
39
|
+
|
|
40
|
+
## Bypass Rules
|
|
41
|
+
|
|
42
|
+
Questions and simple fixes bypass Spec/Plan/Review only when they do not change behavior or a shared contract. Publishing never bypasses `release:verify`, versioning, tagging, authentication, or registry verification.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Fast path for one-file, unambiguous fixes with no behavior or shared-contract change.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /simple - Fast Path
|
|
6
|
+
|
|
7
|
+
$ARGUMENTS
|
|
8
|
+
|
|
9
|
+
## Use Only When
|
|
10
|
+
|
|
11
|
+
- The change is limited to one obvious file or one tiny local edit.
|
|
12
|
+
- The expected result is unambiguous.
|
|
13
|
+
- No behavior, API, schema, security, CI, dependency, workflow, or release contract changes.
|
|
14
|
+
|
|
15
|
+
## Explicit Bypass
|
|
16
|
+
|
|
17
|
+
Start the response with:
|
|
18
|
+
|
|
19
|
+
```text
|
|
20
|
+
FAST_PATH: simple-fix
|
|
21
|
+
REASON: [why Spec/Plan/Review are not needed]
|
|
22
|
+
SCOPE: [file or narrow area]
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Steps
|
|
26
|
+
|
|
27
|
+
1. Inspect the target and its immediate context.
|
|
28
|
+
2. Make the smallest change.
|
|
29
|
+
3. Run focused verification.
|
|
30
|
+
4. Report the changed file and evidence.
|
|
31
|
+
|
|
32
|
+
Do not create a spec or plan for this route. Do not skip verification. If the scope expands, stop and re-route through `/task` as a feature, bug, or multi-domain task.
|
|
33
|
+
|
|
34
|
+
## Examples
|
|
35
|
+
|
|
36
|
+
```text
|
|
37
|
+
/simple fix a typo in README.md
|
|
38
|
+
/simple update one stale command in a workflow doc
|
|
39
|
+
/simple change one test assertion message
|
|
40
|
+
```
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Route every task to the smallest safe workflow, fast path, bug flow, feature flow, or release flow.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /task - Task Router
|
|
6
|
+
|
|
7
|
+
$ARGUMENTS
|
|
8
|
+
|
|
9
|
+
## Purpose
|
|
10
|
+
|
|
11
|
+
Use `/task` at the start of a task when you are unsure which workflow, skill, or specialist agent applies. This command routes the request before implementation.
|
|
12
|
+
|
|
13
|
+
## Required Output
|
|
14
|
+
|
|
15
|
+
```text
|
|
16
|
+
ROUTE: question | simple | feature | bug | review | release | multi-domain
|
|
17
|
+
WORKFLOW: [exact .agent/workflows/<name>.md file]
|
|
18
|
+
SKILLS: [skills to load, or none]
|
|
19
|
+
AGENTS: [specialist agents to load, or none]
|
|
20
|
+
GATE: fast-path | standard
|
|
21
|
+
NEXT: [the next command or action]
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Do not write code while routing. Ask one concise clarification question if the route cannot be determined safely.
|
|
25
|
+
|
|
26
|
+
## Routing Rules
|
|
27
|
+
|
|
28
|
+
| Signal | Route | Next action |
|
|
29
|
+
|---|---|---|
|
|
30
|
+
| Asking for information or architecture explanation | question | Answer directly; no edits |
|
|
31
|
+
| One obvious file, no behavior or contract change | simple | Use `/simple <request>` |
|
|
32
|
+
| New behavior, multiple files, unclear scope, or >30 minutes | feature | `/brainstorm` -> `/spec` when needed -> `/plan`, then approval |
|
|
33
|
+
| Failing test, regression, error, or unknown root cause | bug | Use `/debug <symptom>` |
|
|
34
|
+
| Review request or pre-merge check | review | Use `/review` |
|
|
35
|
+
| npm version/tag/publish request | release | Use `/release` |
|
|
36
|
+
| Several specialist domains | multi-domain | Use `/orchestrate` |
|
|
37
|
+
|
|
38
|
+
## Workflow And Skill Map
|
|
39
|
+
|
|
40
|
+
- `/simple`: `$clean-code` + `$verification-before-completion`.
|
|
41
|
+
- `/brainstorm`: `brainstorming`; no code.
|
|
42
|
+
- `/spec`: `.agent/workflows/spec.md`; define scope and acceptance criteria, no code.
|
|
43
|
+
- `/plan`: `project-planner` + `plan-writing`; no code before approval.
|
|
44
|
+
- `/enhance` or `/create`: relevant domain agent and implementation skills after approval.
|
|
45
|
+
- `/debug`: `debugger` + `$systematic-debugging` + `testing-patterns`.
|
|
46
|
+
- `/test`: `test-engineer` + `testing-patterns`.
|
|
47
|
+
- `/review`: `$code-review-checklist` + `$verification-before-completion`.
|
|
48
|
+
- `/release`: `release.md` and the npm release scripts; never use the fast path.
|
|
49
|
+
|
|
50
|
+
## Examples
|
|
51
|
+
|
|
52
|
+
```text
|
|
53
|
+
/task add an export button
|
|
54
|
+
/task login returns 500
|
|
55
|
+
/task fix typo in README
|
|
56
|
+
/task publish a new npm version
|
|
57
|
+
```
|