thachvd-kit 1.0.36 → 1.0.38

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.
Files changed (32) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +240 -0
  3. package/THIRD_PARTY_NOTICES.md +49 -0
  4. package/bin/cli.js +80 -24
  5. package/bin/config.js +164 -0
  6. package/bin/entry.js +11 -1
  7. package/bin/native-skills.js +183 -0
  8. package/bin/spec-doctor.js +251 -0
  9. package/bin/spec-link.js +97 -0
  10. package/bin/spec-recipe.js +74 -0
  11. package/bin/spec-state.js +415 -0
  12. package/bin/spec.js +859 -0
  13. package/bin/upgrade.js +303 -298
  14. package/package.json +5 -3
  15. package/skills/finishing-a-development-branch/SKILL.md +240 -0
  16. package/skills/requesting-code-review/code-reviewer.md +198 -0
  17. package/skills/subagent-driven-development/SKILL.md +574 -0
  18. package/skills/subagent-driven-development/implementer-prompt.md +154 -0
  19. package/skills/subagent-driven-development/re-review-prompt.md +115 -0
  20. package/skills/subagent-driven-development/scripts/review-package +53 -0
  21. package/skills/subagent-driven-development/scripts/review-package.js +52 -0
  22. package/skills/subagent-driven-development/scripts/sdd-workspace +82 -0
  23. package/skills/subagent-driven-development/scripts/sdd-workspace-lib.js +62 -0
  24. package/skills/subagent-driven-development/scripts/sdd-workspace.js +15 -0
  25. package/skills/subagent-driven-development/scripts/task-brief +43 -0
  26. package/skills/subagent-driven-development/scripts/task-brief.js +46 -0
  27. package/skills/subagent-driven-development/task-reviewer-prompt.md +207 -0
  28. package/skills/system-discovery/SKILL.md +140 -0
  29. package/skills/system-reverse-engineer/SKILL.md +208 -0
  30. package/skills/system-spec-review/SKILL.md +177 -0
  31. package/skills/upstream.json +30 -0
  32. package/skills/using-git-worktrees/SKILL.md +175 -0
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 thachvd
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 thachvd
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -27,6 +27,218 @@ thachvd-kit doctor
27
27
 
28
28
  After the first skill install, run `/setup-matt-pocock-skills` once inside your AI client to configure the issue tracker, triage labels, and generated docs location — thachvd-kit does not simulate that skill.
29
29
 
30
+ ## Brownfield System Specs
31
+
32
+ This workflow is **opt-in**. Normal `thachvd-kit init/upgrade -> setup -> development` behavior is unchanged unless you run `thachvd-kit spec init`.
33
+
34
+ The same happy path works for **one repository or many**:
35
+
36
+ ```bash
37
+ cd your-repo-or-workspace
38
+
39
+ thachvd-kit spec init --language vi # optional; omit for English
40
+ thachvd-kit spec index
41
+ thachvd-kit spec discover
42
+
43
+ # In your AI client:
44
+ # /system-discovery
45
+
46
+ # Human-review:
47
+ # system-specs/architecture/capability-map.md
48
+
49
+ thachvd-kit spec reverse
50
+
51
+ # In your AI client:
52
+ # /system-reverse-engineer
53
+
54
+ thachvd-kit spec verify
55
+
56
+ # In your AI client:
57
+ # /system-spec-review
58
+
59
+ thachvd-kit spec check
60
+ thachvd-kit spec link
61
+ ```
62
+
63
+ ### Documentation language
64
+
65
+ Use `--language vi` when you want human-facing specs in Vietnamese:
66
+
67
+ ```bash
68
+ thachvd-kit spec init --language vi
69
+ ```
70
+
71
+ If Vietnamese is your normal preference across projects, set it once at user level:
72
+
73
+ ```bash
74
+ thachvd-kit config set spec-language vi
75
+ ```
76
+
77
+ Then plain `thachvd-kit spec init` uses Vietnamese by default. A project-level `--language en|vi` always overrides the user default. Use `thachvd-kit config show` to inspect the current setting.
78
+
79
+ The setting is stored in `.thachvd/system.json` and reused by `/system-discovery`, `/system-reverse-engineer`, and `/system-spec-review`. Only prose/headings/explanations are localized; code identifiers, class/function names, API routes, event/queue names, database/schema names, file paths, commands, and source anchors remain exactly as they appear in source. Default is `en`.
80
+
81
+ ### Analysis profiles
82
+
83
+ Profiles adjust what discovery/reverse/review should inspect most carefully. They do **not** override code/tests and they do not hide behavior outside the selected profile.
84
+
85
+ The default is `auto`, so the normal command remains:
86
+
87
+ ```bash
88
+ thachvd-kit spec init
89
+ ```
90
+
91
+ In `auto` mode, the agent infers a practical profile for each repository from code/config evidence. A multi-repo system can therefore contain a backend API, frontend app, worker and infra repo without forcing one profile across all of them.
92
+
93
+ You can explicitly bias the checklist when a project is known:
94
+
95
+ ```bash
96
+ thachvd-kit spec init --profile backend
97
+ thachvd-kit spec init --profile frontend
98
+ thachvd-kit spec init --profile fullstack
99
+ thachvd-kit spec init --profile mobile
100
+ thachvd-kit spec init --profile infra
101
+ ```
102
+
103
+ Current emphasis:
104
+
105
+ - `backend`: routes/RPC, auth/policies, services/domain, DB/migrations/transactions, queues/jobs/events/schedulers, retries/idempotency/concurrency, external clients and rollback/failure behavior.
106
+ - `frontend`: routes/navigation, components/pages, state/data clients, forms/validation, auth/session, accessibility, analytics, loading/error states, browser storage and runtime/build config.
107
+ - `fullstack`: both sides plus client/server contracts, shared schemas/types, auth propagation, SSR/BFF/server actions and end-to-end failures.
108
+ - `mobile`: app lifecycle/background work, offline/sync, local storage, permissions, push/deep links, auth refresh, platform/device integrations and release config.
109
+ - `infra`: IaC, environments, CI/CD, secrets/IAM/networking, state backends, observability, scaling, deployment order, rollback/recovery and destructive-change safeguards.
110
+
111
+ Set a user default if you frequently work on the same class of project:
112
+
113
+ ```bash
114
+ thachvd-kit config set spec-profile backend
115
+ ```
116
+
117
+ Precedence is: explicit `--profile` → user config → `auto`.
118
+
119
+ ### Automatic repository detection
120
+
121
+ `spec init` does not require `--repo` in the normal case:
122
+
123
+ - if the current directory is a Git repository, it is treated as a single-repo system;
124
+ - otherwise, direct child Git repositories are detected as a multi-repo system;
125
+ - `--repo` remains available only as an override for unusual directory layouts.
126
+
127
+ For a single repo, `system-specs/` lives in that repo. For multiple repos, run from the common workspace directory; that workspace owns `.thachvd/system.json` and `system-specs/`.
128
+
129
+ For team use, make sure the configured `spec_root` is version-controlled. In a single repo this happens naturally. In a multi-repo workspace whose parent directory is not itself a Git worktree, use a dedicated docs/spec Git repository or set `--spec-root` to a location that is committed. `thachvd-kit spec doctor` warns when the spec root is not in a committed Git worktree; the kit does not silently initialize or choose a remote repository for you.
130
+
131
+ `spec init` also installs the bundled `/system-discovery`, `/system-reverse-engineer`, and `/system-spec-review` skills into the workspace so the flow can run from the common parent directory.
132
+
133
+ ### What the AI phases do
134
+
135
+ `/system-discovery` builds the coarse AS-IS map first:
136
+
137
+ - system overview
138
+ - repository responsibilities
139
+ - capability map
140
+ - cross-repository integrations
141
+ - domain glossary
142
+
143
+ A human reviews the capability boundaries before deep documentation begins.
144
+
145
+ Then `thachvd-kit spec reverse` writes the handoff for `/system-reverse-engineer`. With **no capability argument**, one invocation processes the entire approved capability map and creates/updates:
146
+
147
+ - `system-specs/capabilities/<capability>/prd.md`
148
+ - `system-specs/capabilities/<capability>/design.md`
149
+ - real cross-repository flow specs under `system-specs/flows/`
150
+ - real cross-boundary contracts under `system-specs/contracts/`
151
+
152
+ Internally the agent works capability-by-capability, persists progress to `system-specs/_meta/reverse-progress.json`, and resumes incomplete capabilities on later invocations. The user does **not** need to manually run one command per module.
153
+
154
+ A capability argument is only a targeted refresh:
155
+
156
+ ```bash
157
+ thachvd-kit spec reverse booking
158
+ ```
159
+
160
+ Use that later when only Booking changed or needs to be re-documented.
161
+
162
+ ### Independent verification and drift detection
163
+
164
+ After reverse engineering finishes:
165
+
166
+ ```bash
167
+ thachvd-kit spec verify
168
+ # In your AI client: /system-spec-review
169
+ thachvd-kit spec check
170
+ ```
171
+
172
+ `/system-spec-review` independently reconstructs implementation coverage and tries to find missing behavior, unsupported claims, weak/broken source anchors, PRD/design contradictions, and cross-repository contract gaps. It writes:
173
+
174
+ - `system-specs/_meta/review.md`
175
+ - `system-specs/_meta/verification.json`
176
+
177
+ The verification JSON stores a full-system repository snapshot plus **capability-specific `verified_commits` and repository-relative `source_paths`**. `spec check` compares each capability against its own baseline, including committed, staged, unstaged, and untracked changes, so re-verifying one capability cannot accidentally make unrelated specs look current.
178
+
179
+ Use `thachvd-kit spec check --strict` in CI when stale/unknown specs should fail the check.
180
+
181
+ For an incremental refresh:
182
+
183
+ ```bash
184
+ thachvd-kit spec reverse booking
185
+ # /system-reverse-engineer
186
+ thachvd-kit spec verify booking
187
+ # /system-spec-review
188
+ thachvd-kit spec check
189
+ ```
190
+
191
+ Only Booking's verification baseline advances; unrelated capabilities keep their previous verified commits.
192
+
193
+ The reverse author is not allowed to call its own output independently verified; only the review phase may mark a capability `verified`.
194
+
195
+ ### Spec health check
196
+
197
+ `thachvd-kit spec doctor` is read-only and summarizes the documentation system in one place:
198
+
199
+ - configured repos and Git HEAD availability
200
+ - Codebase Memory availability
201
+ - system-spec skills installed on agent surfaces
202
+ - capability map presence
203
+ - reverse checkpoint progress
204
+ - independent verification/review metadata
205
+ - current drift state
206
+ - whether the spec root is version-controlled
207
+ - AGENTS.md links
208
+
209
+ ```bash
210
+ thachvd-kit spec doctor
211
+ thachvd-kit spec doctor --strict
212
+ ```
213
+
214
+ `--strict` exits non-zero when any WARN/ERROR remains, which is useful for CI or release gates.
215
+
216
+ ### Optional Shinpr recipe integration
217
+
218
+ `recipe-reverse-engineer` is no longer part of the required flow. If you use Claude Code and want its extra generate -> verify -> review -> revise loop for individual implementation scopes, install it once:
219
+
220
+ ```bash
221
+ thachvd-kit spec recipe-setup
222
+ ```
223
+
224
+ The bundled `/system-reverse-engineer` skill may use that helper when available, but it still works without it.
225
+
226
+ ### Flow summary
227
+
228
+ 1. `spec init` auto-detects one or many repos and creates the workspace/spec structure.
229
+ 2. `spec index` indexes all configured repos with codebase-memory-mcp.
230
+ 3. `spec discover` creates the handoff for `/system-discovery`.
231
+ 4. Human review confirms the system/capability boundaries.
232
+ 5. `spec reverse` creates/resumes the whole-system `/system-reverse-engineer` checkpoint.
233
+ 6. The author agent writes AS-IS PRD/design/flow/contract docs using fixed templates.
234
+ 7. `spec verify` creates the handoff for independent `/system-spec-review`.
235
+ 8. The reviewer writes machine-readable verification/provenance metadata.
236
+ 9. `spec check` detects code/spec drift deterministically from Git.
237
+ 10. `spec doctor` provides a read-only health summary for the spec system.
238
+ 11. `spec link` adds an idempotent managed block to each repo's `AGENTS.md` so future agents discover and check the reviewed system specs. By default it refuses to link when any capability is not independently `verified`; `--allow-unverified` is an explicit escape hatch.
239
+
240
+ Observed behavior from code/tests and undocumented business rationale must remain distinct. Existing human-edited spec docs are not overwritten by `spec init --yes`.
241
+
30
242
  ## Generated Files
31
243
 
32
244
  - `AGENTS.md`: shared project instructions.
@@ -141,12 +353,27 @@ Examples: `rtk git status`, `rtk npm test`, `rtk git log`. If it is not installe
141
353
  thachvd-kit init [--yes]
142
354
  thachvd-kit upgrade [--dry-run]
143
355
  thachvd-kit global [--dry-run] [--antigravity-only|--codex-only]
356
+ thachvd-kit config show
357
+ thachvd-kit config set spec-language en|vi
358
+ thachvd-kit config unset spec-language
359
+ thachvd-kit config set spec-profile auto|backend|frontend|fullstack|mobile|infra
360
+ thachvd-kit config unset spec-profile
144
361
  thachvd-kit setup [--no-setup-mcp] [--no-setup-hook] [--no-install-rtk] [--no-index] [--no-install-skills]
145
362
  thachvd-kit doctor
146
363
  thachvd-kit prompt
147
364
  thachvd-kit skills install [--dry-run]
148
365
  thachvd-kit skills check
149
366
  thachvd-kit skills update [--dry-run]
367
+ thachvd-kit spec init [--name NAME] [--language en|vi] [--profile auto|backend|frontend|fullstack|mobile|infra] [--repo PATH ...] [--spec-root PATH] [--yes]
368
+ thachvd-kit spec index [--repo NAME ...] [--dry-run]
369
+ thachvd-kit spec discover
370
+ thachvd-kit spec reverse [CAPABILITY] [--reset]
371
+ thachvd-kit spec verify [CAPABILITY]
372
+ thachvd-kit spec check [--strict]
373
+ thachvd-kit spec doctor [--strict]
374
+ thachvd-kit spec recipe-setup [--fullstack] [--dry-run] # optional Claude Code helper
375
+ thachvd-kit spec link [--dry-run] [--allow-unverified]
376
+ thachvd-kit spec status
150
377
  thachvd-kit --help
151
378
  ```
152
379
 
@@ -163,3 +390,16 @@ npm run release:verify
163
390
  ```
164
391
 
165
392
  Release only from a clean, verified, pushed `main` branch. `npm publish` requires valid npm authentication and any configured 2FA code.
393
+
394
+ ## Native Workflow Skills
395
+
396
+ The workflow layer combines Matt Pocock's planning and implementation skills with thachvd-kit's bundled native skills. `thachvd-kit setup` and `thachvd-kit skills install` install the native set to both `.agents/skills/` and `.claude/skills/`.
397
+
398
+ - `/using-git-worktrees` is opt-in workspace isolation; an explicit choice to work on the current branch always wins.
399
+ - `/subagent-driven-development` is an alternative executor to `/implement` for plans with multiple relatively independent tasks. It uses bundled cross-platform Node entrypoints on Windows and falls back to `/implement` when subagent dispatch is unavailable.
400
+ - `/finishing-a-development-branch` verifies and hands off a branch, cleaning only manually managed project-local worktrees safely.
401
+ - `/system-discovery` builds the reviewed AS-IS repo/capability/integration map for a brownfield system with one or many repositories, using Codebase Memory MCP as the primary structural source.
402
+ - `/system-reverse-engineer` turns the approved map into PRD/design/flow/contract specs for the whole system, using a durable checkpoint so large systems can resume safely; a named capability is only a targeted refresh.
403
+ - `/system-spec-review` independently verifies coverage/evidence and writes commit/source-path provenance used by `spec check` for drift detection.
404
+
405
+ `thachvd-kit skills update` refreshes native skills from bundled repository copies and never fetches Superpowers at runtime. See `THIRD_PARTY_NOTICES.md` for recorded upstream provenance.
@@ -0,0 +1,49 @@
1
+ # Third-Party Notices
2
+
3
+ ## Superpowers
4
+
5
+ Repository: https://github.com/obra/superpowers
6
+ Upstream commit: `5bf4e78011075bcfc0dc295f0724994cd123ee71`
7
+
8
+ Portions of the worktree and subagent-driven development workflows are derived from:
9
+
10
+ - `skills/using-git-worktrees/SKILL.md`
11
+ - `skills/subagent-driven-development/`
12
+ - `skills/requesting-code-review/code-reviewer.md`
13
+ - `skills/finishing-a-development-branch/SKILL.md`
14
+
15
+ The vendored source is retained for comparison with the recorded upstream commit. Adapted Windows/runtime entrypoints are documented in the native skill directory and do not replace the upstream source scripts.
16
+
17
+ Copyright (c) 2025 Jesse Vincent
18
+
19
+ MIT License
20
+
21
+ Permission is hereby granted, free of charge, to any person obtaining a copy
22
+ of this software and associated documentation files (the "Software"), to deal
23
+ in the Software without restriction, including without limitation the rights
24
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
25
+ copies of the Software, and to permit persons to whom the Software is
26
+ furnished to do so, subject to the following conditions:
27
+
28
+ The above copyright notice and this permission notice shall be included in all
29
+ copies or substantial portions of the Software.
30
+
31
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
32
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
33
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
34
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
35
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
36
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
37
+ SOFTWARE.
38
+
39
+ ### Vendoring maintenance
40
+
41
+ To refresh these files deliberately:
42
+
43
+ 1. Fetch the latest `obra/superpowers` repository.
44
+ 2. Inspect changes to the recorded upstream files and compare them with the recorded SHA.
45
+ 3. Port relevant upstream changes and reapply only the minimal thachvd-kit adaptations.
46
+ 4. Update `skills/upstream.json` and this notice with the new SHA.
47
+ 5. Run the native-skill regression tests and the full release verification.
48
+
49
+ `thachvd-kit skills update` never fetches Superpowers. Runtime updates use the repository-owned vendored copies.
package/bin/cli.js CHANGED
@@ -7,6 +7,7 @@ const prompts = require('prompts');
7
7
  const pc = require('picocolors');
8
8
  const packageJson = require('../package.json');
9
9
  const mattSkills = require('./matt-skills');
10
+ const nativeSkills = require('./native-skills');
10
11
  const {
11
12
  QUALITY_FLOOR_SECTION,
12
13
  AGENT_RULES_SECTION,
@@ -47,12 +48,16 @@ ${pc.bold('Usage:')}
47
48
  thachvd-kit init [--yes]
48
49
  thachvd-kit upgrade [--dry-run]
49
50
  thachvd-kit global [--dry-run] [--antigravity-only|--codex-only]
51
+ thachvd-kit config show
52
+ thachvd-kit config set spec-language en|vi
53
+ thachvd-kit config set spec-profile auto|backend|frontend|fullstack|mobile|infra
50
54
  thachvd-kit setup [--yes] [--no-install-skills]
51
55
  thachvd-kit doctor
52
56
  thachvd-kit prompt
53
57
  thachvd-kit skills install [--dry-run]
54
58
  thachvd-kit skills check
55
59
  thachvd-kit skills update [--dry-run]
60
+ thachvd-kit spec --help
56
61
  thachvd-kit --version
57
62
  thachvd-kit --help
58
63
 
@@ -60,10 +65,12 @@ ${pc.bold('Commands:')}
60
65
  init Generate project context files and documentation (new projects)
61
66
  upgrade Safely add/update thachvd-kit's managed policy blocks in an existing project (does not rescan or regenerate)
62
67
  global Patch a managed tool-routing block into the current user's Antigravity/Codex global instructions
68
+ config Read or update user-level spec defaults such as language and analysis profile
63
69
  setup Install/configure MCP, Matt Pocock skills, and recommended local tooling
64
70
  doctor Check project context and local integrations
65
71
  prompt Print the saved project-indexing prompt again
66
72
  skills Install, check, or update the promoted Matt Pocock skill set
73
+ spec Brownfield system documentation for one or many repositories
67
74
 
68
75
  ${pc.bold('Options:')}
69
76
  --yes Overwrite generated files or accept setup defaults
@@ -71,7 +78,7 @@ ${pc.bold('Options:')}
71
78
  --no-setup-hook Skip the Claude Code Definition-of-Done Stop hook during setup
72
79
  --no-install-rtk Skip auto-installing rtk via cargo during setup
73
80
  --no-index Skip auto-indexing the repository with codebase-memory-mcp during setup
74
- --no-install-skills Skip installing Matt Pocock skills during setup
81
+ --no-install-skills Skip installing Matt Pocock and thachvd-kit native skills during setup
75
82
  --dry-run Preview a change without writing it (upgrade/global/skills install/skills update)
76
83
  --antigravity-only Limit global to the Antigravity global instructions
77
84
  --codex-only Limit global to the Codex global instructions
@@ -86,10 +93,12 @@ ${pc.bold('What gets generated:')}
86
93
  .agent/docs/ Project context, architecture, workflow, tooling, and durable onboarding prompt
87
94
 
88
95
  ${pc.bold('Workflow:')}
89
- Matt Pocock's promoted skills (installed under .agents/skills/) are the
90
- workflow layer. Use the matching skill when a specialized workflow is
91
- useful; if unsure which one, use /ask-matt. Do not invoke a heavyweight
92
- skill for a localized, obvious change.
96
+ Matt Pocock's promoted skills plus thachvd-kit's native worktree/SDD skills
97
+ form the workflow layer. Use /using-git-worktrees only when isolation is
98
+ intended; choose /implement or /subagent-driven-development as alternative
99
+ executors for a plan, then finish with /code-review and
100
+ /finishing-a-development-branch.
101
+ Unsure which planning or implementation skill fits? Use /ask-matt.
93
102
 
94
103
  ${pc.bold('Tip:')}
95
104
  Run thachvd-kit setup to install the promoted skill set and configure
@@ -1018,7 +1027,7 @@ ${QUALITY_FLOOR_SECTION}
1018
1027
  function generateWorkflowDoc() {
1019
1028
  return `# Agent Workflow
1020
1029
 
1021
- This project uses Matt Pocock's promoted skills (installed under .agents/skills/ by \`thachvd-kit setup\`) as the workflow layer. thachvd-kit only provides project context, the skill manifest, and integration setup; it is not a second workflow engine.
1030
+ This project uses Matt Pocock's promoted skills plus thachvd-kit's native workflow skills (installed under .agents/skills/ and .claude/skills/ by \`thachvd-kit setup\`) as the workflow layer. Native skills add opt-in workspace isolation, subagent-driven execution, and branch finishing; they do not replace Matt's planning, implementation, testing, or review skills.
1022
1031
 
1023
1032
  ## Before Every Task
1024
1033
 
@@ -1035,8 +1044,8 @@ This project uses Matt Pocock's promoted skills (installed under .agents/skills/
1035
1044
  | Question or research only | direct answer or research | no product-code edits |
1036
1045
  | Clear, localized change | fast path (no skill) | inspect -> edit -> focused verify |
1037
1046
  | Ambiguous feature or design | /grill-with-docs, then optionally /to-spec | durable contract before implementation when useful |
1038
- | Normal feature | /grill-with-docs -> /to-spec -> /implement | spec agreed before implementation |
1039
- | Large feature needing decomposition | /grill-with-docs -> /to-spec -> /to-tickets -> /implement | tickets agreed before implementation |
1047
+ | Normal feature | /grill-with-docs -> /to-spec -> choose workspace -> /implement | spec agreed before implementation |
1048
+ | Large feature needing decomposition | /grill-with-docs -> /to-spec -> /to-tickets -> choose workspace -> executor | tickets agreed before implementation |
1040
1049
  | Huge, multi-session uncertainty | /wayfinder | shared decision map before implementation |
1041
1050
  | Bug or failing behavior | /diagnosing-bugs | reproduce -> root cause -> regression protection -> fix -> verify |
1042
1051
  | Test-driven implementation | /tdd | red -> green -> refactor per slice |
@@ -1047,7 +1056,9 @@ Not sure which row applies? Run /ask-matt instead of guessing.
1047
1056
 
1048
1057
  ## Standard Feature Flow
1049
1058
 
1050
- /grill-with-docs -> /to-spec -> (/to-tickets for large work) -> /implement (with /tdd where it helps) -> /code-review.
1059
+ /grill-with-docs -> /to-spec -> (/to-tickets for large work) -> choose workspace -> choose executor (/implement or /subagent-driven-development) -> /code-review -> /finishing-a-development-branch.
1060
+
1061
+ Choose the current branch/workspace when the user explicitly wants to work there. Use /using-git-worktrees only when isolation is requested or appropriate workspace isolation already exists. SDD is for plans with multiple relatively independent tasks and falls back to /implement when subagent dispatch is unavailable; it never forces a worktree.
1051
1062
 
1052
1063
  ${FAST_PATH_SECTION}
1053
1064
 
@@ -1063,13 +1074,13 @@ ${FAST_PATH_SECTION}
1063
1074
  function generateGettingStartedDoc() {
1064
1075
  return `# Getting Started
1065
1076
 
1066
- thachvd-kit creates project context. Matt Pocock's promoted skills own the development workflow.
1077
+ thachvd-kit creates project context. Matt Pocock's promoted and thachvd-kit native skills own the development workflow.
1067
1078
 
1068
1079
  ## Setup
1069
1080
 
1070
1081
  1. Run \`thachvd-kit init\` in the repository.
1071
1082
  2. Open or print \`.agent/docs/index-project-prompt.md\` with \`thachvd-kit prompt\`.
1072
- 3. Run \`thachvd-kit setup\` (installs the promoted skill set by default; add \`--no-install-skills\` to skip) and RTK.
1083
+ 3. Run \`thachvd-kit setup\` (installs promoted and native skill sets by default; add \`--no-install-skills\` to skip) and RTK.
1073
1084
  4. Inside the AI client, run \`/setup-matt-pocock-skills\` once to configure the issue tracker, triage labels, and doc layout.
1074
1085
  5. Run \`thachvd-kit doctor\` and restart the AI client.
1075
1086
 
@@ -1116,9 +1127,9 @@ function generateToolingDoc(data) {
1116
1127
 
1117
1128
  Run \`thachvd-kit doctor\` to check the current machine.
1118
1129
 
1119
- ## Matt Pocock Skills
1130
+ ## Matt Pocock Skills + Native Workflow Skills
1120
1131
 
1121
- Matt Pocock's promoted engineering and productivity skills are the workflow layer for this project, installed project-locally under \`.agents/skills/\` (never globally):
1132
+ Matt Pocock's promoted engineering and productivity skills are installed project-locally under \`.agents/skills/\` (never globally). thachvd-kit also bundles native workflow skills to both \`.agents/skills/\` and \`.claude/skills/\`:
1122
1133
 
1123
1134
  - Install the promoted set: \`thachvd-kit skills install\` (\`--dry-run\` to preview the command without running it)
1124
1135
  - Check what is installed: \`thachvd-kit skills check\` (read-only)
@@ -1126,6 +1137,8 @@ Matt Pocock's promoted engineering and productivity skills are the workflow laye
1126
1137
  - The full manifest lives in \`bin/matt-skills.js\` (\`PROMOTED_SKILLS\`); it mirrors upstream's \`skills/engineering/\` + \`skills/productivity/\` catalog and never includes \`in-progress\`, \`misc\`, or \`deprecated\` skills.
1127
1138
  - After the first install, run \`/setup-matt-pocock-skills\` once inside the AI client to configure the issue tracker, triage labels, and generated docs location. thachvd-kit does not simulate that skill.
1128
1139
  - Unsure which skill fits a task? Run \`/ask-matt\`.
1140
+ - Native skills: \`/using-git-worktrees\` (opt-in isolation), \`/subagent-driven-development\` (alternative executor for multi-task plans), and \`/finishing-a-development-branch\`.
1141
+ - SDD's upstream shell scripts are retained for provenance; cross-platform Node entrypoints are used by the adapted workflow on Windows.
1129
1142
 
1130
1143
  ${TOOL_ROUTING_SECTION}
1131
1144
 
@@ -1213,6 +1226,17 @@ function runDoctor() {
1213
1226
  }
1214
1227
  const setupSkillOk = mattSkills.isSkillInstalled(targetDir, mattSkills.SETUP_SKILL_NAME);
1215
1228
  console.log(` ${setupSkillOk ? pc.green('OK') : pc.yellow('WARN')} ${mattSkills.SETUP_SKILL_NAME} available`);
1229
+ console.log(`\n${pc.bold('thachvd-kit native skills')}`);
1230
+ const nativeStatus = nativeSkills.checkNativeSkills(targetDir);
1231
+ for (const name of nativeSkills.NATIVE_SKILLS) {
1232
+ const status = nativeStatus.skills[name];
1233
+ console.log(` ${status.agents && status.claude ? pc.green('OK') : pc.yellow('WARN')} ${name} (.agents: ${status.agents ? 'installed' : 'missing'}, .claude: ${status.claude ? 'installed' : 'missing'})`);
1234
+ }
1235
+ for (const surface of nativeSkills.NATIVE_SKILL_SURFACES) {
1236
+ const support = nativeStatus.surfaces[surface.id].support;
1237
+ const status = support.missing.length === 0 ? pc.green('OK') : pc.yellow('WARN');
1238
+ console.log(` ${status} support files (${surface.relativeDir}: ${support.missing.length === 0 ? 'installed' : 'missing'})`);
1239
+ }
1216
1240
  const contextMdExists = fs.existsSync(path.join(targetDir, 'CONTEXT.md'));
1217
1241
  const docsAdrExists = fs.existsSync(path.join(targetDir, 'docs', 'adr'));
1218
1242
  console.log(` ${pc.dim('-')} CONTEXT.md ${contextMdExists ? 'detected' : 'not created yet (informational only)'}`);
@@ -1243,8 +1267,18 @@ async function runSetup(args) {
1243
1267
  console.log(` ${skillsMarker} ${skillsResult.message}`);
1244
1268
  }
1245
1269
  printMattSkillsSetupReminder();
1270
+ console.log(`\n${pc.bold('thachvd-kit native skills')}`);
1271
+ const nativeStatus = nativeSkills.checkNativeSkills(targetDir);
1272
+ if (nativeStatus.allInstalled) {
1273
+ console.log(` ${pc.green('OK')} native skill set already installed (${nativeStatus.total}/${nativeStatus.total})`);
1274
+ } else {
1275
+ const nativeResult = nativeSkills.installNativeSkills(targetDir);
1276
+ const nativeMarker = nativeResult.ok ? pc.green('OK') : pc.yellow('WARN');
1277
+ console.log(` ${nativeMarker} ${nativeResult.message}`);
1278
+ }
1246
1279
  } else {
1247
1280
  console.log(`${pc.bold('Matt Pocock skills')}\n ${pc.dim('skipped (--no-install-skills)')}`);
1281
+ console.log(`${pc.bold('thachvd-kit native skills')}\n ${pc.dim('skipped (--no-install-skills)')}`);
1248
1282
  }
1249
1283
  if (!skipMcpSetup) {
1250
1284
  console.log(pc.bold('MCP setup'));
@@ -1527,37 +1561,60 @@ function runSkillsCommand(args) {
1527
1561
 
1528
1562
  if (subcommand === 'install') {
1529
1563
  console.log(pc.bold(pc.cyan('thachvd-kit skills install')));
1530
- const result = mattSkills.installSkills(targetDir, { dryRun });
1531
- console.log(` ${result.ok ? pc.green('OK') : pc.yellow('WARN')} ${result.message}`);
1532
- if (!dryRun && result.ok) printMattSkillsSetupReminder();
1533
- if (!result.ok) process.exitCode = 1;
1564
+ const mattResult = mattSkills.installSkills(targetDir, { dryRun });
1565
+ console.log(`\n${pc.bold('Matt Pocock skills')}`);
1566
+ console.log(` ${mattResult.ok ? pc.green('OK') : pc.yellow('WARN')} ${mattResult.message}`);
1567
+ const nativeResult = nativeSkills.installNativeSkills(targetDir, { dryRun });
1568
+ console.log(`\n${pc.bold('thachvd-kit native skills')}`);
1569
+ if (dryRun) for (const item of nativeResult.operations) console.log(` ${pc.dim('would copy')} ${item.relativePath} -> ${item.surface}`);
1570
+ console.log(` ${nativeResult.ok ? pc.green('OK') : pc.yellow('WARN')} ${nativeResult.message}`);
1571
+ if (!dryRun && mattResult.ok) printMattSkillsSetupReminder();
1572
+ if (!mattResult.ok || !nativeResult.ok) process.exitCode = 1;
1534
1573
  return;
1535
1574
  }
1536
1575
 
1537
1576
  if (subcommand === 'check') {
1538
1577
  console.log(pc.bold(pc.cyan('thachvd-kit skills check')));
1539
1578
  const status = mattSkills.checkSkills(targetDir);
1579
+ console.log(`\n${pc.bold('Matt Pocock skills')}`);
1540
1580
  for (const name of mattSkills.PROMOTED_SKILLS) {
1541
1581
  const installed = status.installed.includes(name);
1542
1582
  console.log(` ${installed ? pc.green('OK') : pc.yellow('WARN')} ${name}`);
1543
1583
  }
1544
1584
  console.log(`\n ${status.installed.length}/${status.total} promoted skills installed in ${mattSkills.SKILLS_RELATIVE_DIR}`);
1545
- if (status.missing.length > 0) {
1546
- console.log(` Run: ${pc.bold('thachvd-kit skills install')}`);
1585
+ if (status.missing.length > 0) console.log(` Run: ${pc.bold('thachvd-kit skills install')}`);
1586
+ console.log(`\n${pc.bold('thachvd-kit native skills')}`);
1587
+ const nativeStatus = nativeSkills.checkNativeSkills(targetDir);
1588
+ for (const name of nativeSkills.NATIVE_SKILLS) {
1589
+ const item = nativeStatus.skills[name];
1590
+ console.log(` ${item.agents && item.claude ? pc.green('OK') : pc.yellow('WARN')} ${name}`);
1591
+ console.log(` .agents: ${item.agents ? 'installed' : 'missing'}`);
1592
+ console.log(` .claude: ${item.claude ? 'installed' : 'missing'}`);
1593
+ }
1594
+ for (const surface of nativeSkills.NATIVE_SKILL_SURFACES) {
1595
+ const support = nativeStatus.surfaces[surface.id].support;
1596
+ const status = support.missing.length === 0 ? pc.green('OK') : pc.yellow('WARN');
1597
+ console.log(` ${status} support files (${surface.relativeDir}: ${support.missing.length === 0 ? 'installed' : 'missing'})`);
1547
1598
  }
1599
+ if (!nativeStatus.allInstalled) console.log(` Run: ${pc.bold('thachvd-kit skills install')}`);
1548
1600
  return;
1549
1601
  }
1550
1602
 
1551
1603
  if (subcommand === 'update') {
1552
1604
  console.log(pc.bold(pc.cyan('thachvd-kit skills update')));
1553
1605
  const result = mattSkills.updateSkills(targetDir, { dryRun });
1606
+ console.log(`\n${pc.bold('Matt Pocock skills')}`);
1554
1607
  if (dryRun) {
1555
1608
  for (const item of result.results) console.log(` ${pc.dim('would run')} ${item.command}`);
1556
1609
  } else {
1557
1610
  for (const item of result.results) console.log(` ${item.ok ? pc.green('OK') : pc.yellow('WARN')} ${item.name}`);
1558
1611
  }
1559
1612
  console.log(`\n ${result.ok ? pc.green('OK') : pc.yellow('WARN')} ${result.message}`);
1560
- if (!result.ok) process.exitCode = 1;
1613
+ const nativeResult = nativeSkills.updateNativeSkills(targetDir, { dryRun });
1614
+ console.log(`\n${pc.bold('thachvd-kit native skills')}`);
1615
+ if (dryRun) for (const item of nativeResult.operations) console.log(` ${pc.dim('would copy')} ${item.relativePath} -> ${item.surface}`);
1616
+ console.log(` ${nativeResult.ok ? pc.green('OK') : pc.yellow('WARN')} ${nativeResult.message}`);
1617
+ if (!result.ok || !nativeResult.ok) process.exitCode = 1;
1561
1618
  return;
1562
1619
  }
1563
1620
 
@@ -1712,12 +1769,12 @@ async function main() {
1712
1769
  - ${pc.bold('.agent/docs/index-project-prompt.md')} durable onboarding prompt
1713
1770
 
1714
1771
  ${pc.bold('MCP/tooling setup:')}
1715
- - Matt Pocock's promoted skills (.agents/skills/) are the workflow layer
1716
- - Run ${pc.bold('thachvd-kit setup')} to install them and configure codebase-memory MCP and recommended RTK
1772
+ - Matt Pocock's promoted and thachvd-kit native skills are the workflow layer
1773
+ - Run ${pc.bold('thachvd-kit setup')} to install both groups and configure codebase-memory MCP and recommended RTK
1717
1774
 
1718
1775
  ${pc.bold('Next steps:')}
1719
1776
  1. Run ${pc.bold('thachvd-kit prompt')} and paste the saved prompt into your AI editor
1720
- 2. Run ${pc.bold('thachvd-kit setup')} to install the promoted skill set and RTK
1777
+ 2. Run ${pc.bold('thachvd-kit setup')} to install promoted and native skill sets and RTK
1721
1778
  3. Run ${pc.bold('thachvd-kit doctor')} to verify the machine
1722
1779
  4. Re-run ${pc.bold('thachvd-kit prompt')} whenever you need the onboarding prompt again
1723
1780
 
@@ -1732,4 +1789,3 @@ main().catch(err => {
1732
1789
  console.error(pc.red('\nError during init:'), err);
1733
1790
  process.exit(1);
1734
1791
  });
1735
-