nitm-ai-dev-toolkit 3.0.22 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/CHANGELOG.md +15 -2
  2. package/README.md +56 -4
  3. package/bin/cli.js +29 -14
  4. package/package.json +3 -2
  5. package/src/monorepo/.claude/commands/ponytail-audit.md +4 -6
  6. package/src/monorepo/.claude/commands/ponytail-debt.md +3 -5
  7. package/src/monorepo/.claude/commands/ponytail-gain.md +2 -4
  8. package/src/monorepo/.claude/commands/ponytail-help.md +2 -4
  9. package/src/monorepo/.claude/commands/ponytail-review.md +3 -5
  10. package/src/monorepo/.claude/commands/ponytail.md +3 -5
  11. package/src/monorepo/.claude/prompt-snippets/bootstrap-patch.md +37 -17
  12. package/src/monorepo/.claude/prompt-snippets/bootstrap-upgrade.md +76 -51
  13. package/src/monorepo/.claude/prompt-snippets/bootstrap.md +130 -94
  14. package/src/monorepo/.codex/config.toml +6 -0
  15. package/src/monorepo/.github/prompts/review-staged.prompt.md +1 -1
  16. package/src/monorepo/.opencode/agents/admin-portal.md +10 -4
  17. package/src/monorepo/.opencode/agents/api-specialist.md +10 -4
  18. package/src/monorepo/.opencode/agents/backend-architect.md +10 -4
  19. package/src/monorepo/.opencode/agents/documenter.md +10 -4
  20. package/src/monorepo/.opencode/agents/feature-builder.md +13 -5
  21. package/src/monorepo/.opencode/agents/frontend-developer.md +10 -4
  22. package/src/monorepo/.opencode/agents/green.md +10 -4
  23. package/src/monorepo/.opencode/agents/implementer.md +10 -4
  24. package/src/monorepo/.opencode/agents/planner.md +10 -4
  25. package/src/monorepo/.opencode/agents/red.md +10 -4
  26. package/src/monorepo/.opencode/agents/refactor.md +10 -4
  27. package/src/monorepo/.opencode/agents/researcher.md +10 -4
  28. package/src/monorepo/.opencode/agents/reviewer.md +10 -4
  29. package/src/monorepo/.opencode/agents/tdd.md +13 -5
  30. package/src/monorepo/.opencode/opencode.jsonc +8 -10
  31. package/src/monorepo/AGENTS.md +16 -0
  32. package/src/monorepo/CLAUDE.md +1 -1
  33. package/src/monorepo/README.md +22 -0
  34. package/src/repo/.claude/agents/documenter.agent.md +1 -1
  35. package/src/repo/.claude/agents/planner.agent.md +1 -1
  36. package/src/repo/.claude/agents/researcher.agent.md +1 -1
  37. package/src/repo/.claude/agents/reviewer.agent.md +1 -1
  38. package/src/repo/.claude/commands/ponytail-audit.md +4 -6
  39. package/src/repo/.claude/commands/ponytail-debt.md +3 -5
  40. package/src/repo/.claude/commands/ponytail-gain.md +2 -4
  41. package/src/repo/.claude/commands/ponytail-help.md +2 -4
  42. package/src/repo/.claude/commands/ponytail-review.md +3 -5
  43. package/src/repo/.claude/commands/ponytail.md +3 -5
  44. package/src/repo/.claude/prompt-snippets/bootstrap-patch.md +37 -17
  45. package/src/repo/.claude/prompt-snippets/bootstrap-upgrade.md +87 -77
  46. package/src/repo/.claude/prompt-snippets/bootstrap.md +129 -125
  47. package/src/repo/.codex/config.toml +6 -0
  48. package/src/repo/.opencode/agents/admin-portal.md +10 -4
  49. package/src/repo/.opencode/agents/api-specialist.md +10 -4
  50. package/src/repo/.opencode/agents/backend-architect.md +10 -4
  51. package/src/repo/.opencode/agents/documenter.md +10 -4
  52. package/src/repo/.opencode/agents/feature-builder.md +13 -5
  53. package/src/repo/.opencode/agents/frontend-developer.md +10 -4
  54. package/src/repo/.opencode/agents/green.md +10 -4
  55. package/src/repo/.opencode/agents/implementer.md +10 -4
  56. package/src/repo/.opencode/agents/planner.md +10 -4
  57. package/src/repo/.opencode/agents/red.md +10 -4
  58. package/src/repo/.opencode/agents/refactor.md +10 -4
  59. package/src/repo/.opencode/agents/researcher.md +10 -4
  60. package/src/repo/.opencode/agents/reviewer.md +10 -4
  61. package/src/repo/.opencode/agents/tdd.md +13 -5
  62. package/src/repo/.opencode/opencode.jsonc +8 -10
  63. package/src/repo/AGENTS.md +16 -0
  64. package/src/repo/CLAUDE.md +1 -1
  65. package/src/repo/README.md +22 -0
  66. package/src/monorepo/.opencode/plugins/ponytail.mjs +0 -93
  67. package/src/repo/.opencode/plugins/ponytail.mjs +0 -93
@@ -1,6 +1,27 @@
1
- # Bootstrap Upgrade to v3.0
1
+ # Bootstrap Upgrade to v4.0
2
2
 
3
- One-time migration from pre-3.0 inline pattern to 3.0+ snippet-based architecture. Converts all tool directories (`.claude/`, `.github/`, `.cursor/`) to thin wrappers referencing centralized snippets, creates `.opencode/` directory, and cleans up duplicate skills.
3
+ Upgrade to toolkit 4.0.0, including native OpenCode V2 for confirmed OpenCode users. For pre-3.0 installations, also migrate inline content to snippet-based architecture and clean up duplicate skills. Only modify confirmed harness targets; preserve unrelated harness/Codex behavior.
4
+
5
+ ## OpenCode version preflight (before any changes)
6
+
7
+ - Confirm OpenCode use from actual session/runtime evidence or ask the user; directory presence alone is not proof. If only other harnesses are used, skip this preflight and all OpenCode steps.
8
+ - For confirmed OpenCode use, run `opencode --version` before any project writes. Trim output and parse numeric major/minor/patch components, accepting an optional leading `v`; toolkit 4.x requires `major >= 2`.
9
+ - If OpenCode V1 (`major < 2`) is detected, **STOP** before customizing/migrating OpenCode files or writing `.toolkit-version` as `4.0.0`. Ask the user to upgrade OpenCode to V2 or remain on toolkit 3.x.
10
+ - If the CLI is missing, fails, or output is unparseable, **STOP OpenCode steps** and leave the version marker unchanged; ask the user to confirm/install a supported OpenCode version, then rerun this check. Never assume V2.
11
+ - If oh-my-opencode-slim >=3.0.0 is used or planned, require OpenCode >=2.0.7 (compare version components numerically); otherwise **STOP** before changes and ask to upgrade. Proceed only after this gate passes.
12
+
13
+ ## Toolkit version routing (before parallel dispatch)
14
+
15
+ Read `.toolkit-version` and select the route before dispatching agents or changing files; apply only confirmed harness scopes:
16
+
17
+ - **>=4.0.0**: Use bootstrap-patch and **STOP** this upgrade without rewrites or version marking.
18
+ - **v3 (`3.x`)**: **Skip Steps 2–6 and 8–10.** Run only the relevant native OpenCode migration in Step 7 (confirmed OpenCode use only), then applicable approved merge/validation/version/report steps 11–15. Preserve existing snippet bodies/frontmatter and unrelated harness files.
19
+ - **Pre-3.0 or missing marker**: Steps 2–6 and applicable approved legacy steps 8–10 require a verified legacy inline installation. A missing marker alone is not legacy evidence; if snippets already exist or the installed version cannot be verified, **STOP** and ask rather than extracting/rewriting them. Back up before legacy conversion and preserve existing customizations.
20
+ - **Invalid or unverified version**: **STOP** and ask; never guess a route or downgrade.
21
+
22
+ ## OpenCode migration guardrails
23
+
24
+ Back up V1; native-converted files are incompatible with V1. Preserve models/providers/user-global plugins. Templates register the author's native V2 package `@dietrichgebert/ponytail@4.12.0`; obsolete toolkit-local Ponytail copies are replaced only after backup and approval (Step 7), with no API port or bridge. Keep `opentmux` commented as V1-only. Only with approval, merge pinned `"plugins": ["oh-my-opencode-slim@3.0.0"]` locally without replacing other registrations. Slim's separate strict schema retains `prompt`/`permission`/`variant`; do not host-migrate it or silently upgrade the separate external starter. Activate on the next run/restart; plugin/runtime integration is untested and publishing 4.0.0 has not been executed.
4
25
 
5
26
  ## Usage
6
27
 
@@ -17,7 +38,7 @@ One-time migration from pre-3.0 inline pattern to 3.0+ snippet-based architectur
17
38
  ## Orchestrator Checkpoint
18
39
 
19
40
  > **🛑 Before starting**: This command modifies files across 5+ directory trees (`.claude/`, `.github/`, `.cursor/`, `.opencode/`, `.agents/`).
20
- > Steps 3–6 are **parallelizable** — dispatch one subagent per directory tree (rules, commands, agents, instructions, prompts).
41
+ > Complete version routing above before parallel dispatch; only the verified legacy route may dispatch Steps 3–6, for confirmed harnesses.
21
42
  > See `.claude/rules-snippets/subagent-workflow.md` for patterns.
22
43
 
23
44
  ## Process
@@ -30,33 +51,25 @@ Run all checks before making any changes:
30
51
  - If `apps/` and `packages/` directories exist at root → `monorepo` (use `src/monorepo/` templates)
31
52
  - Otherwise → `repo` (use `src/repo/` templates)
32
53
 
33
- 2. **Check toolkit version**:
34
- - If `.toolkit-version` exists and contains `3.0.0` or higher → **abort** with message: "Project already on v3.0+. Run `/bootstrap-patch` for incremental updates."
35
- - If `.toolkit-version` exists with a version below `3.0.0` → migration needed
36
- - If `.toolkit-version` is missing → migration needed (legacy project)
54
+ 2. **Check toolkit version**: Apply the route selected above; inventory and confirm only its applicable steps and confirmed harness targets.
37
55
 
38
56
  3. **Confirm migration scope**:
39
57
 
40
58
  ```markdown
41
- ## 🔄 Bootstrap Upgrade: pre-3.0 → 3.0+
42
-
43
- **Project type**: repo | monorepo
44
- **Current version**: <version or "none (legacy)">
45
-
46
- ### What will happen:
47
-
48
- 1. Create snippet directories: `.claude/rules-snippets/`, `.claude/prompt-snippets/`, `.claude/agents-snippets/`
49
- 2. Extract content from `.claude/` files → snippet files
50
- 3. Convert `.claude/` files to thin wrappers
51
- 4. Convert `.github/` files to thin wrappers
52
- 5. Convert `.cursor/` files to thin wrappers
53
- 6. Create `.opencode/` directory with config and wrappers
54
- 7. Install pre-commit hook (CHANGELOG/Zone.Identifier/secrets enforcement)
55
- 8. Install project hooks (runtime hooks and ponytail support)
56
- 9. Clean up duplicate skill directories
57
- 10. Update `CLAUDE.md` with multi-tool sections
58
- 11. Create `.toolkit-version` with `3.0.0`
59
- 12. Commit all changes
59
+ ## 🔄 Bootstrap Upgrade: toolkit v4.0.0
60
+
61
+ **Project type**: repo | monorepo
62
+ **Current version**: <version or "none (legacy)">
63
+ **Selected route**: verified legacy | v3 native OpenCode
64
+
65
+ ### What will happen (omit skipped steps for the selected route):
66
+
67
+ 1. Verified legacy only: create missing snippet directories, extract inline content, and convert confirmed harness wrappers (Steps 2–6)
68
+ 2. Confirmed OpenCode only: merge native V2 host files and approved missing wrappers (Step 7)
69
+ 3. Verified legacy only: approved hook installation and verified identical duplicate skill cleanup (Steps 8–10); preserve custom skills
70
+ 4. Merge only applicable missing documentation and validate the selected route; v3 keeps existing snippet bodies/frontmatter unchanged
71
+ 5. Create `.toolkit-version` with `4.0.0` after the approved migration
72
+ 6. Commit all changes
60
73
 
61
74
  Proceed? (Y/n)
62
75
  ```
@@ -65,6 +78,8 @@ Run all checks before making any changes:
65
78
 
66
79
  ### 2. Create Snippet Directories
67
80
 
81
+ **Steps 2–6 are verified-legacy-only.** Skip this entire block for v3; never extract or rewrite existing snippet bodies/frontmatter. Process only confirmed harness targets.
82
+
68
83
  ```bash
69
84
  mkdir -p .claude/rules-snippets
70
85
  mkdir -p .claude/prompt-snippets
@@ -150,35 +165,37 @@ Same pattern as Steps 4–5 — preserve frontmatter, replace body with referenc
150
165
 
151
166
  For `.cursor/rules/*.mdc`: preserve the original frontmatter exactly (it may use different field names than `.claude/` rules).
152
167
 
153
- ### 7. Create `.opencode/` Directory
168
+ ### 7. Create `.opencode/` Directory (confirmed OpenCode use only)
169
+
170
+ For the v3 route, merge only relevant native OpenCode host fields; preserve existing wrapper bodies, modes, unrelated frontmatter, and shared snippet bodies/frontmatter. The wrapper examples below apply only to approved missing files, not replacement of existing wrappers.
154
171
 
155
- 1. **Create `.opencode/opencode.jsonc`** using only supported schema keys:
172
+ 1. **Merge `.opencode/opencode.jsonc`** using native V2 fields:
156
173
 
157
174
  ```json
158
175
  {
159
- "$schema": "https://opencode.ai/config.json",
160
- "instructions": ["AGENTS.md", ".opencode/rules/*.md"],
161
- "skills": {
162
- "paths": [".agents/skills/**/*.md", ".claude/skills/**/*.md"]
163
- },
164
- "lsp": true
176
+ "$schema": "https://opencode.ai/config.json",
177
+ "instructions": ["AGENTS.md", ".opencode/rules/*.md"],
178
+ "skills": [".agents/skills"],
179
+ "plugins": ["@dietrichgebert/ponytail@4.12.0"],
180
+ "lsp": true
165
181
  }
166
182
  ```
167
183
 
168
- **⚠️ Schema Validation:** Only use supported top-level keys from `https://opencode.ai/config.json`. Do NOT add unsupported keys like `rules`, `commands`, or `agents` as top-level entries — OpenCode discovers these via the `.opencode/` directory structure and the `instructions`/`skills` config arrays.
184
+ Follow official V2 [migration](https://opencode.ai/v2/docs/migrate-v1), [config](https://opencode.ai/v2/docs/config), [agents](https://opencode.ai/v2/docs/agents), and [plugins](https://opencode.ai/v2/docs/build/plugins) docs. The published schema may describe V1; do not use it or a V1 API fetch as native V2 validation authority. Use `agents`/JSON `system` (Markdown bodies for file agents), `request.body.temperature`, ordered `permissions` (`action`/`resource`/`effect`, `shell`/`subagent`, last match wins), `commands`/`subagent`, `plugins` with `{ "package": "…", "options": {} }`, skill-directory arrays, and `mcp.servers` with inverse `disabled` and `timeout.catalog`/`timeout.execution`.
169
185
 
170
- **Supported top-level keys:** `$schema`, `instructions`, `skills`, `agent`, `default_agent`, `model`, `small_model`, `provider`, `mcp`, `tools`, `permission`, `lsp`, `formatter`, `server`, `shell`, `command`, `plugin`, `watcher`, `snapshot`, `share`, `autoupdate`, `compaction`, `attachment`, `logLevel`, `disabled_providers`, `enabled_providers`, `tool_output`, `enterprise`, `experimental`
186
+ `instructions` entries are accepted but not loaded; ambient `AGENTS.md` works. `@refs` are ordinary text, not attachments: wrappers must explicitly tell agents to read referenced snippets. `request.body.temperature` remains in config, but the current runner does not send it. Preserve `lsp: true`; use project lint/typecheck/compiler commands (no current V2 LSP tools/diagnostics). `--env opencode` supplies minimal shared references without other harness activation. Verify using installed V2 after the next run/restart; report only checks actually run.
171
187
 
172
- 2. **Copy OpenCode plugins**:
173
- - Copy any `.opencode/plugins/*.mjs` files from the template
188
+ 2. **Replace obsolete toolkit Ponytail (backup and approval only)**:
189
+ - Back up the local config and known obsolete toolkit-owned `.opencode/plugins/ponytail.js`, `.opencode/plugins/ponytail.mjs`, and `.opencode/plugins/ponytail.ts` copies; obtain approval before removing only those copies. Preserve unrelated local plugins.
190
+ - Merge/deduplicate the author's native V2 `@dietrichgebert/ponytail@4.12.0` package in the local `plugins` array where appropriate, preserving other registrations/options. Do not edit global config or overwrite global plugins. Keep `opentmux` commented as V1-only; do not copy local Ponytail source, port APIs, or introduce bridges. Native local discovery needs no duplicate explicit registration; runtime integration remains untested.
174
191
 
175
- 3. **Create wrappers using `@` import syntax** — one file per snippet:
192
+ 3. **Create wrappers with explicit snippet-read instructions** — one file per snippet:
176
193
 
177
194
  | Directory | Source Snippets | Wrapper Body |
178
195
  | ------------------------- | -------------------------- | ------------------------------------ |
179
- | `.opencode/commands/*.md` | `.claude/prompt-snippets/` | `@.claude/prompt-snippets/<name>.md` |
180
- | `.opencode/rules/*.md` | `.claude/rules-snippets/` | `@.claude/rules-snippets/<name>.md` |
181
- | `.opencode/agents/*.md` | `.claude/agents-snippets/` | `@.claude/agents-snippets/<name>.md` |
196
+ | `.opencode/commands/*.md` | `.claude/prompt-snippets/` | `Read and follow .claude/prompt-snippets/<name>.md` |
197
+ | `.opencode/rules/*.md` | `.claude/rules-snippets/` | `Read and follow .claude/rules-snippets/<name>.md` |
198
+ | `.opencode/agents/*.md` | `.claude/agents-snippets/` | `Read and follow .claude/agents-snippets/<name>.md` |
182
199
 
183
200
  Wrapper format for all three:
184
201
 
@@ -189,7 +206,7 @@ For `.cursor/rules/*.mdc`: preserve the original frontmatter exactly (it may use
189
206
 
190
207
  # <Title>
191
208
 
192
- @.claude/<snippet-type>/<name>.md
209
+ Read and follow `.claude/<snippet-type>/<name>.md` before performing this task.
193
210
  ```
194
211
 
195
212
  ### 8. Install Pre-Commit Hook
@@ -220,24 +237,14 @@ Use `git commit --no-verify` to bypass.
220
237
 
221
238
  ### 10. Clean Up Duplicate Skills
222
239
 
223
- - Copy `.agents/rules/*.md` from the template
224
-
225
- **Source of truth**: `.agents/skills/` — all other skill directories are duplicates.
226
- **Parallelizable with Steps 3–6**: Skill cleanup is independent of file conversion.
227
-
228
- ```bash
229
- # Remove duplicate skill subdirs (keep README.md if present)
230
- find .claude/skills -mindepth 1 -maxdepth 1 -type d -exec rm -rf {} +
231
- find .cursor/skills -mindepth 1 -maxdepth 1 -type d -exec rm -rf {} +
232
- find .github/skills -mindepth 1 -maxdepth 1 -type d -exec rm -rf {} +
233
-
234
- # Remove nested duplicates (e.g., subagent-driven-development/subagent-driven-development/)
235
- rm -rf .agents/skills/subagent-driven-development/subagent-driven-development/
236
- ```
240
+ - Merge approved `.agents/rules/*.md` additions without overwriting custom content; skip this step on the v3 route.
241
+ - Preserve custom, unmatched, modified, and nested skill content; name or location alone does not prove duplication.
242
+ - A candidate in a confirmed harness skill directory may be removed only after the same-name canonical `.agents/skills/<skill-name>/` copy exists and a complete recursive comparison (`diff -qr` or equivalent, including nested content) proves them identical. Missing canonical copy, differences, or comparison errors mean preserve and report, not delete.
243
+ - Back up the verified identical duplicate and obtain explicit approval before removing only that duplicate; keep the canonical copy intact. No bulk deletion or name/location-based nested cleanup.
237
244
 
238
245
  ### 11. Update `CLAUDE.md`
239
246
 
240
- If `CLAUDE.md` is a thin redirect to `AGENTS.md`, add these sections if missing:
247
+ If `CLAUDE.md` is an applicable confirmed harness target and a thin redirect to `AGENTS.md`, merge only missing relevant sections; preserve existing bodies/frontmatter:
241
248
 
242
249
  1. **Snippet Directories** section with links to `rules-snippets/`, `prompt-snippets/`, `agents-snippets/`
243
250
  2. **Multi-Tool Support** section with links to `.github/`, `.cursor/`, `.opencode/`
@@ -247,13 +254,15 @@ See existing `CLAUDE.md` in the toolkit template (`src/repo/CLAUDE.md`) for the
247
254
 
248
255
  ### 12. Create `.toolkit-version` File
249
256
 
257
+ Only after the approved migration and OpenCode preflight pass (or OpenCode is confirmed out of scope):
258
+
250
259
  ```bash
251
- echo "3.0.0" > .toolkit-version
260
+ echo "4.0.0" > .toolkit-version
252
261
  ```
253
262
 
254
263
  ### 13. Validation
255
264
 
256
- Run all checks after writing files:
265
+ Run only checks applicable to the selected route and confirmed harnesses; on v3 compare retained snippet bodies/frontmatter to backups:
257
266
 
258
267
  | Check | Method | Pass Criteria |
259
268
  | ------------------------------------- | ---------------------------------------------------------------------------------------- | --------------------------------------------- |
@@ -262,19 +271,20 @@ Run all checks after writing files:
262
271
  | No `{{PLACEHOLDER}}` lost | `grep -r '{{' .claude/*-snippets/` | Count matches original files |
263
272
  | No broken relative paths | For each wrapper, verify linked snippet exists | All links resolve |
264
273
  | `.opencode/` complete | Check `opencode.jsonc` + one file per snippet in commands/, rules/, agents/ | Counts match |
265
- | Duplicate skills removed | No subdirs in `.claude/skills/`, `.cursor/skills/`, `.github/skills/` (except README.md) | Clean |
274
+ | Custom skills preserved | Compare the before/after inventory and any removed duplicate against its canonical copy | Only approved verified identical duplicates removed |
266
275
 
267
276
  If `--verbose`: log each check result with file paths.
268
277
 
269
278
  ### 14. Generate Upgrade Report
270
279
 
271
- Output the report to stdout (and optionally to `docs/upgrade-report-v3.md`):
280
+ Output the report to stdout (and optionally to `docs/upgrade-report-v4.md`). Include only operations/checks actually performed for the selected route; omit legacy extraction/cleanup rows on v3 and never pre-mark skipped checks as passed:
272
281
 
273
282
  ```markdown
274
283
  ## 🚀 Bootstrap Upgrade Report
275
284
 
276
- **From**: pre-3.0 (inline pattern)
277
- **To**: 3.0+ (snippet-based architecture)
285
+ **From**: detected installed version (include inline extraction only for pre-3.0)
286
+ **To**: 4.0.0 (native V2 for confirmed OpenCode use; snippet conversion only for verified legacy)
287
+ **Selected route**: verified legacy | v3 native OpenCode
278
288
  **Date**: {{DATE}}
279
289
  **Dry run**: yes | no
280
290
 
@@ -302,21 +312,21 @@ Output the report to stdout (and optionally to `docs/upgrade-report-v3.md`):
302
312
 
303
313
  ### Cleanup
304
314
 
305
- - Removed X duplicate skill directories
306
- - Removed X nested duplicates
315
+ - Removed X verified identical duplicates after comparison, backup, and approval (if performed)
316
+ - Preserved custom, unmatched, and nested skill content and canonical copies
307
317
 
308
318
  ### Files Created
309
319
 
310
- - `.toolkit-version` — 3.0.0
320
+ - `.toolkit-version` — 4.0.0
311
321
 
312
322
  ### Validation
313
323
 
314
- - [x] All snippet files exist and have content
315
- - [x] All thin wrappers reference correct snippets
316
- - [x] No {{PLACEHOLDER}} syntax lost
317
- - [x] No broken relative paths
318
- - [x] .opencode/ directory complete
319
- - [x] Duplicate skills removed
324
+ - [ ] Applicable snippet files exist and have content
325
+ - [ ] Applicable thin wrappers reference correct snippets
326
+ - [ ] No {{PLACEHOLDER}} syntax lost; v3 snippet bodies/frontmatter unchanged
327
+ - [ ] No broken relative paths
328
+ - [ ] .opencode/ checks passed (confirmed OpenCode use only)
329
+ - [ ] Custom skills preserved; any duplicate removal met the safety checks
320
330
  ```
321
331
 
322
332
  If `--verbose`: include a file-by-file log of every operation.
@@ -327,14 +337,14 @@ If not `--dry-run`, stage and commit all changes:
327
337
 
328
338
  ```bash
329
339
  git add -A
330
- git commit -m "chore: upgrade AI instructions to toolkit v3.0.0 (snippet architecture)"
340
+ git commit -m "chore: upgrade AI instructions to toolkit v4.0.0"
331
341
  ```
332
342
 
333
343
  If `--dry-run`: skip commit, note in report: "Dry run — no changes committed."
334
344
 
335
345
  ## Parallelization Summary
336
346
 
337
- Steps that can run in parallel (dispatch subagents):
347
+ Only after route selection, verified-legacy steps may run in parallel for confirmed harnesses:
338
348
 
339
349
  | Step | Parallelizable Groups |
340
350
  | ---- | ------------------------------------------------------------- |
@@ -344,13 +354,13 @@ Steps that can run in parallel (dispatch subagents):
344
354
  | 6 | rules wrappers ‖ commands wrappers ‖ agents wrappers |
345
355
  | 10 | Independent of 3–6 — can run in parallel with file conversion |
346
356
 
347
- Steps that must be sequential: 1 → 2 → (3‖4‖5‖6‖10) → 7 → 8 → 9 → 11 → 12 → 13 → 14 → 15.
357
+ Verified legacy sequence: 1 → 2 → (3‖4‖5‖6‖10) → 7 → 8 → 9 → 11 → 12 → 13 → 14 → 15, skipping unconfirmed scopes/unapproved operations. V3 sequence: 1 → applicable 7 → applicable 11–15; never run Steps 2–6 or 8–10.
348
358
 
349
359
  ## Error Handling
350
360
 
351
361
  - If a file has no frontmatter: treat entire file as body content, create wrapper with empty frontmatter fields
352
362
  - If a snippet file already exists: **skip** with warning (do not overwrite)
353
- - If `.opencode/` already exists: merge — add missing files, skip existing ones
363
+ - If `.opencode/` already exists: merge — add missing files and propose native V2 conversion of existing host files; preserve customizations and skip files already migrated
354
364
  - If git commit fails: show error, suggest manual commit
355
365
  - If any validation check fails: report the failure but continue with remaining checks
356
366