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.
- package/CHANGELOG.md +15 -2
- package/README.md +56 -4
- package/bin/cli.js +29 -14
- package/package.json +3 -2
- package/src/monorepo/.claude/commands/ponytail-audit.md +4 -6
- package/src/monorepo/.claude/commands/ponytail-debt.md +3 -5
- package/src/monorepo/.claude/commands/ponytail-gain.md +2 -4
- package/src/monorepo/.claude/commands/ponytail-help.md +2 -4
- package/src/monorepo/.claude/commands/ponytail-review.md +3 -5
- package/src/monorepo/.claude/commands/ponytail.md +3 -5
- package/src/monorepo/.claude/prompt-snippets/bootstrap-patch.md +37 -17
- package/src/monorepo/.claude/prompt-snippets/bootstrap-upgrade.md +76 -51
- package/src/monorepo/.claude/prompt-snippets/bootstrap.md +130 -94
- package/src/monorepo/.codex/config.toml +6 -0
- package/src/monorepo/.github/prompts/review-staged.prompt.md +1 -1
- package/src/monorepo/.opencode/agents/admin-portal.md +10 -4
- package/src/monorepo/.opencode/agents/api-specialist.md +10 -4
- package/src/monorepo/.opencode/agents/backend-architect.md +10 -4
- package/src/monorepo/.opencode/agents/documenter.md +10 -4
- package/src/monorepo/.opencode/agents/feature-builder.md +13 -5
- package/src/monorepo/.opencode/agents/frontend-developer.md +10 -4
- package/src/monorepo/.opencode/agents/green.md +10 -4
- package/src/monorepo/.opencode/agents/implementer.md +10 -4
- package/src/monorepo/.opencode/agents/planner.md +10 -4
- package/src/monorepo/.opencode/agents/red.md +10 -4
- package/src/monorepo/.opencode/agents/refactor.md +10 -4
- package/src/monorepo/.opencode/agents/researcher.md +10 -4
- package/src/monorepo/.opencode/agents/reviewer.md +10 -4
- package/src/monorepo/.opencode/agents/tdd.md +13 -5
- package/src/monorepo/.opencode/opencode.jsonc +8 -10
- package/src/monorepo/AGENTS.md +16 -0
- package/src/monorepo/CLAUDE.md +1 -1
- package/src/monorepo/README.md +22 -0
- package/src/repo/.claude/agents/documenter.agent.md +1 -1
- package/src/repo/.claude/agents/planner.agent.md +1 -1
- package/src/repo/.claude/agents/researcher.agent.md +1 -1
- package/src/repo/.claude/agents/reviewer.agent.md +1 -1
- package/src/repo/.claude/commands/ponytail-audit.md +4 -6
- package/src/repo/.claude/commands/ponytail-debt.md +3 -5
- package/src/repo/.claude/commands/ponytail-gain.md +2 -4
- package/src/repo/.claude/commands/ponytail-help.md +2 -4
- package/src/repo/.claude/commands/ponytail-review.md +3 -5
- package/src/repo/.claude/commands/ponytail.md +3 -5
- package/src/repo/.claude/prompt-snippets/bootstrap-patch.md +37 -17
- package/src/repo/.claude/prompt-snippets/bootstrap-upgrade.md +87 -77
- package/src/repo/.claude/prompt-snippets/bootstrap.md +129 -125
- package/src/repo/.codex/config.toml +6 -0
- package/src/repo/.opencode/agents/admin-portal.md +10 -4
- package/src/repo/.opencode/agents/api-specialist.md +10 -4
- package/src/repo/.opencode/agents/backend-architect.md +10 -4
- package/src/repo/.opencode/agents/documenter.md +10 -4
- package/src/repo/.opencode/agents/feature-builder.md +13 -5
- package/src/repo/.opencode/agents/frontend-developer.md +10 -4
- package/src/repo/.opencode/agents/green.md +10 -4
- package/src/repo/.opencode/agents/implementer.md +10 -4
- package/src/repo/.opencode/agents/planner.md +10 -4
- package/src/repo/.opencode/agents/red.md +10 -4
- package/src/repo/.opencode/agents/refactor.md +10 -4
- package/src/repo/.opencode/agents/researcher.md +10 -4
- package/src/repo/.opencode/agents/reviewer.md +10 -4
- package/src/repo/.opencode/agents/tdd.md +13 -5
- package/src/repo/.opencode/opencode.jsonc +8 -10
- package/src/repo/AGENTS.md +16 -0
- package/src/repo/CLAUDE.md +1 -1
- package/src/repo/README.md +22 -0
- package/src/monorepo/.opencode/plugins/ponytail.mjs +0 -93
- package/src/repo/.opencode/plugins/ponytail.mjs +0 -93
package/CHANGELOG.md
CHANGED
|
@@ -7,8 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
### Migration
|
|
11
|
+
|
|
12
|
+
- Toolkit v4 / package 4.0.0 requires native OpenCode V2 for OpenCode use; oh-my-opencode-slim >=3.0.0 requires OpenCode >=2.0.7. Native host config uses plural maps, ordered permissions, skill directories, and `mcp.servers`. Back up V1 (converted files are incompatible with it), preserve user/global settings and Slim's separate strict schema, leave the external starter unchanged, and activate on the next run/restart. Config `instructions` are ignored, ambient `AGENTS.md` works, `@refs` require explicit reads, and `request.body.temperature` is preserved but not currently sent by the runner. Preserve `lsp: true`; use project checks, not unavailable V2 LSP tools. Plugin/runtime integration is untested; publishing has not been executed.
|
|
13
|
+
- Removed all three local Ponytail plugin copies (root, repo template, monorepo template). Both templates register the author's native V2 `@dietrichgebert/ponytail@4.12.0` package locally; `opentmux` remains commented as V1-only. No API port or bridge was added. The toolkit root alone omits `plugins` to inherit existing user/global registrations; no global config was changed. Existing targets remove only known obsolete toolkit Ponytail `.js`/`.mjs`/`.ts` copies after backup and approval, preserving unrelated plugins and deduplicating upstream registration locally.
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- All six repo/monorepo bootstrap flows now require a fail-closed `opencode --version` preflight before changes for confirmed OpenCode use: accept an optional leading `v`, reject V1 before OpenCode customization/migration or toolkit 4.0.0 marking, and stop on a missing CLI or unparseable version. Slim >=3.0.0 enforces OpenCode >=2.0.7; other-harness-only setup is unaffected. Focused instruction-order/version-metadata regression checks cover the guard.
|
|
18
|
+
- Bootstrap audit/creation examples are explicitly conditional on confirmed Copilot use; completion reports describe performed harness-specific checks without assuming OpenCode configuration, Codex trust/loading, or Copilot/Cursor readiness. Codex-scoped install documentation now includes linked standards and their wrapper sources without implying other harness activation.
|
|
19
|
+
|
|
10
20
|
### Added
|
|
11
21
|
|
|
22
|
+
- Native Codex support for repo and monorepo templates: shared `AGENTS.md` and `.agents/skills/`, plus optional comment-only `.codex/config.toml` preserving inherited defaults and requiring explicit user trust
|
|
23
|
+
- Codex setup documentation and native bootstrap/patch guidance, including `.nitm/BOOTSTRAP.md` handoff, manual snippet fallback, and native MCP TOML configuration
|
|
12
24
|
- Custom agent templates (`.agent.md`) for subagent orchestration workflows
|
|
13
25
|
- Feature Builder coordinator agent for end-to-end feature development
|
|
14
26
|
- TDD coordinator agent with Red-Green-Refactor cycle
|
|
@@ -26,7 +38,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
26
38
|
- `bkt-cli` skill — Bitbucket CLI (`bkt`) command reference for repo and monorepo templates
|
|
27
39
|
- `glab-cli` skill — GitLab CLI (`glab`) command reference for repo and monorepo templates
|
|
28
40
|
- Ponytail skill bundle — 6 YAGNI/stdlib/native/minimum-discipline skills (`ponytail`, `ponytail-audit`, `ponytail-debt`, `ponytail-gain`, `ponytail-help`, `ponytail-review`)
|
|
29
|
-
- Ponytail OpenCode plugin (
|
|
41
|
+
- Author's upstream Ponytail OpenCode plugin registration (`@dietrichgebert/ponytail@4.12.0`) in both template configs; no bundled local plugin source
|
|
30
42
|
- 7 ponytail hooks in `hooks/` (`ponytail-activate`, `ponytail-config`, `ponytail-instructions`, `ponytail-mode-tracker`, `ponytail-runtime`, `ponytail-statusline.sh`, `ponytail-statusline.ps1`), plus 2 hook configuration files for Claude/Codex and Copilot (`claude-codex-hooks.json`, `copilot-hooks.json`)
|
|
31
43
|
- Ponytail rule in `.agents/rules/` and `.cursor/rules/` for ambient agent context
|
|
32
44
|
- 6 ponytail commands (`ponytail`, `ponytail-audit`, `ponytail-debt`, `ponytail-gain`, `ponytail-help`, `ponytail-review`) with thin-wrapper sources in `.claude/prompt-snippets/`
|
|
@@ -40,6 +52,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
40
52
|
|
|
41
53
|
### Changed
|
|
42
54
|
|
|
55
|
+
- CLI default-install documentation and package metadata now include Codex; bootstrap uses actual runtime harness evidence or asks rather than inferring use from scaffolded directories
|
|
56
|
+
- Bootstrap skill commands use confirmed harness flags without hardcoded Copilot/Cursor overrides
|
|
43
57
|
- `install` now aborts if target files already exist (instead of silently skipping) and tells the user to pass `--force` to overwrite or run `patch` to add only missing files
|
|
44
58
|
- `patch` is documented as add-missing-only (never overwrites existing customizations) and re-emits the bootstrap handoff
|
|
45
59
|
- `omo-slim-starter install` now delegates to the published `npx nitm-opencode-starter install` (guides the user if unavailable) instead of cloning the repo and wiring scripts
|
|
@@ -66,7 +80,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
66
80
|
- Added missing templates referenced in templates/README.md
|
|
67
81
|
- `scripts/pre-commit-check.sh` — early-exit when no files are staged so the CHANGELOG check no longer fires on empty commits (PR #20 review)
|
|
68
82
|
- `scripts/check-parity.sh` — removed duplicate `check_body_match` call for the cursor ↔ github prompt body (PR #20 review)
|
|
69
|
-
- `.opencode/plugins/ponytail.mjs` — wrapped `writeMode` in a try/catch so an unwritable state directory no longer crashes the plugin (PR #20 review)
|
|
70
83
|
- `ponytail-help` SKILL.md and prompt snippet — added missing `ponytail-audit`, `ponytail-debt`, and `/ponytail-gain` entries; corrected OpenCode slash-command count to six; rewrote the Claude-Code-specific Update section to describe the template update flow (PR #20 review)
|
|
71
84
|
- `ponytail-gain` SKILL.md and prompt snippet (repo, monorepo, root) — replaced the phantom `benchmarks/` source reference with the upstream `DietrichGebert/ponytail` repo link (PR #20 review)
|
|
72
85
|
- `README.md` — corrected "8 activation hooks" to "7 activation hooks" to match CHANGELOG and the actual hook count (PR #20 review)
|
package/README.md
CHANGED
|
@@ -11,6 +11,7 @@ This repository serves as a **template source** for AI development instructions
|
|
|
11
11
|
- **GitHub Copilot instructions** (`.github/copilot-instructions.md`)
|
|
12
12
|
- **GitHub prompts** (`.github/prompts/`) for reusable prompt templates
|
|
13
13
|
- **AGENTS.md** files for AI agent context
|
|
14
|
+
- **Native Codex setup** using `AGENTS.md`, `.agents/skills/`, and an optional comment-only `.codex/config.toml`
|
|
14
15
|
- **Skills recommendations** from [skills.sh](https://skills.sh/) for enhanced AI capabilities
|
|
15
16
|
|
|
16
17
|
## Repository Structure
|
|
@@ -19,6 +20,7 @@ This repository serves as a **template source** for AI development instructions
|
|
|
19
20
|
/
|
|
20
21
|
├── src/
|
|
21
22
|
│ ├── repo/ # Templates for single repositories
|
|
23
|
+
│ │ ├── .codex/ # Optional native Codex config (comment-only)
|
|
22
24
|
│ │ ├── .cursor/ # Cursor IDE configuration
|
|
23
25
|
│ │ │ ├── agents/ # Custom agent templates (subagents)
|
|
24
26
|
│ │ │ ├── rules/ # IDE behavior rules
|
|
@@ -39,6 +41,7 @@ This repository serves as a **template source** for AI development instructions
|
|
|
39
41
|
│ │ └── README.md # Project README template
|
|
40
42
|
│ │
|
|
41
43
|
│ └── monorepo/ # Templates for monorepos
|
|
44
|
+
│ ├── .codex/ # Optional native Codex config (comment-only)
|
|
42
45
|
│ ├── .cursor/ # Root-level Cursor config
|
|
43
46
|
│ │ ├── agents/ # Custom agent templates (subagents)
|
|
44
47
|
│ │ ├── rules/ # IDE behavior rules
|
|
@@ -62,7 +65,7 @@ This repository serves as a **template source** for AI development instructions
|
|
|
62
65
|
├── .cursor/ # This toolkit's own Cursor config
|
|
63
66
|
├── .github/ # This toolkit's own GitHub config
|
|
64
67
|
├── .opencode/ # This toolkit's own OpenCode config
|
|
65
|
-
│ └── plugins/ # OpenCode plugins (
|
|
68
|
+
│ └── plugins/ # Other local OpenCode plugins (Ponytail uses upstream)
|
|
66
69
|
├── hooks/ # Claude Code / Copilot activation hooks (ponytail, etc.)
|
|
67
70
|
└── AGENTS.md # This toolkit's agent context
|
|
68
71
|
```
|
|
@@ -77,6 +80,8 @@ This repository serves as a **template source** for AI development instructions
|
|
|
77
80
|
cp -r src/repo/.cursor /path/to/your/project/
|
|
78
81
|
cp -r src/repo/.github /path/to/your/project/
|
|
79
82
|
cp -r src/repo/.agents /path/to/your/project/
|
|
83
|
+
cp -r src/repo/.claude /path/to/your/project/ # Shared snippet sources
|
|
84
|
+
cp -r src/repo/.codex /path/to/your/project/ # Optional Codex config
|
|
80
85
|
cp src/repo/AGENTS.md /path/to/your/project/
|
|
81
86
|
```
|
|
82
87
|
|
|
@@ -88,6 +93,7 @@ Open your project in Cursor IDE or VS Code with GitHub Copilot, then run:
|
|
|
88
93
|
|
|
89
94
|
- **Cursor IDE**: Use the `/bootstrap` command
|
|
90
95
|
- **GitHub Copilot**: Use the `bootstrap.prompt.md` prompt (`/bootstrap`)
|
|
96
|
+
- **Codex**: Ask it to read and follow `.claude/prompt-snippets/bootstrap.md` as a task document (manual copies have no `.nitm/BOOTSTRAP.md`). Do not use `/bootstrap` as a native Codex command.
|
|
91
97
|
|
|
92
98
|
The bootstrap process will:
|
|
93
99
|
|
|
@@ -108,6 +114,8 @@ After bootstrapping, review the generated files and add any project-specific pat
|
|
|
108
114
|
cp -r src/monorepo/.cursor /path/to/your/project/
|
|
109
115
|
cp -r src/monorepo/.github /path/to/your/project/
|
|
110
116
|
cp -r src/monorepo/.agents /path/to/your/project/
|
|
117
|
+
cp -r src/monorepo/.claude /path/to/your/project/ # Shared snippet sources
|
|
118
|
+
cp -r src/monorepo/.codex /path/to/your/project/ # Optional Codex config
|
|
111
119
|
cp src/monorepo/AGENTS.md /path/to/your/project/
|
|
112
120
|
# Optionally copy app/package templates
|
|
113
121
|
cp -r src/monorepo/apps/app-template /path/to/your/project/apps/
|
|
@@ -122,6 +130,7 @@ Open your project in Cursor IDE or VS Code with GitHub Copilot, then run:
|
|
|
122
130
|
|
|
123
131
|
- **Cursor IDE**: Use the `/bootstrap` command
|
|
124
132
|
- **GitHub Copilot**: Use the `bootstrap.prompt.md` prompt (`/bootstrap`)
|
|
133
|
+
- **Codex**: Ask it to read and follow `.claude/prompt-snippets/bootstrap.md` as a task document (manual copies have no `.nitm/BOOTSTRAP.md`). Do not use `/bootstrap` as a native Codex command.
|
|
125
134
|
|
|
126
135
|
The bootstrap process will:
|
|
127
136
|
|
|
@@ -142,7 +151,7 @@ After bootstrapping:
|
|
|
142
151
|
|
|
143
152
|
## CLI (npx)
|
|
144
153
|
|
|
145
|
-
Scaffold AI agent config into any repo, then hand off to your AI agent to finish setup (replace `{{PLACEHOLDER}}`s, calibrate
|
|
154
|
+
Scaffold AI agent config into any repo, then hand off to your AI agent to finish setup (replace `{{PLACEHOLDER}}`s, calibrate native instructions). The CLI scaffolds config for **all** supported harnesses (Claude Code, GitHub Copilot, Cursor, OpenCode, Codex) by default, so you normally don't need `--env`. Scaffolding does not prove a harness is installed or active: bootstrap uses actual runtime information or asks which harnesses you use. `install` aborts if files already exist — use `--force` to overwrite, or `patch` to add only missing files.
|
|
146
155
|
|
|
147
156
|
```bash
|
|
148
157
|
# Scaffold AI config into the current repo (auto-detects repo vs monorepo)
|
|
@@ -155,6 +164,7 @@ npx nitm-ai-dev-toolkit install --repo
|
|
|
155
164
|
|
|
156
165
|
# Optional: scaffold only one harness (e.g. you only use Cursor)
|
|
157
166
|
npx nitm-ai-dev-toolkit install --env cursor
|
|
167
|
+
npx nitm-ai-dev-toolkit install --env codex
|
|
158
168
|
|
|
159
169
|
# Add only missing files (never overwrites existing ones) + re-emit the bootstrap handoff
|
|
160
170
|
npx nitm-ai-dev-toolkit patch
|
|
@@ -169,7 +179,49 @@ npx nitm-ai-dev-toolkit upgrade
|
|
|
169
179
|
npx nitm-ai-dev-toolkit omo-slim-starter install
|
|
170
180
|
```
|
|
171
181
|
|
|
172
|
-
After `install`,
|
|
182
|
+
After `install`, ask your AI agent to read and follow `.nitm/BOOTSTRAP.md`. Harnesses that supply a toolkit `/bootstrap` wrapper can also use it; **Codex has no native toolkit `/bootstrap` command**. Use `doctor` to verify the result.
|
|
183
|
+
|
|
184
|
+
### Native OpenCode V2 (toolkit 4.0.0)
|
|
185
|
+
|
|
186
|
+
Toolkit v4 requires **OpenCode V2 (major >=2)** for OpenCode use; **oh-my-opencode-slim >=3.0.0** requires **OpenCode >=2.0.7**. All repo/monorepo bootstrap, patch, and upgrade flows run `opencode --version` before changes, accepting an optional leading `v`. V1 must stop before OpenCode customization/migration or marking toolkit 4.0.0: upgrade OpenCode or remain on toolkit 3.x. A missing CLI or unparseable version stops OpenCode steps and version marking until the user confirms/installs a supported version. Confirm harness use from runtime evidence or ask; scaffold directories are not proof. Other-harness-only setup is unaffected.
|
|
187
|
+
|
|
188
|
+
Publishing 4.0.0 has not been executed. The external `nitm-opencode-starter` is a separate package, not automatically upgraded.
|
|
189
|
+
|
|
190
|
+
With user approval, merge this reproducible registration without replacing user/global plugins:
|
|
191
|
+
|
|
192
|
+
```jsonc
|
|
193
|
+
{ "plugins": ["oh-my-opencode-slim@3.0.0"] }
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
The toolkit root deliberately omits `plugins` to inherit user/global registrations; its existing upstream Ponytail registration is unchanged. Both target templates register the author's native V2 package `@dietrichgebert/ponytail@4.12.0` in their local `plugins` arrays, alongside `opencode-mem` and `@tarquinen/opencode-dcp@latest`; `opentmux` remains commented as V1-only. The local `ponytail.mjs` files are removed from the toolkit root and both templates; no local API port or bridge replaces them.
|
|
197
|
+
|
|
198
|
+
For existing targets, back up and obtain approval before removing only known obsolete toolkit `.opencode/plugins/ponytail.js`, `.mjs`, or `.ts` copies. Preserve unrelated local plugins; merge/deduplicate upstream package registration locally where appropriate, without editing or overwriting global plugins. Native local plugins are discovered automatically, so do not register them twice. Slim's separate strict schema keeps its own `prompt`, `permission`, and `variant`: do not host-migrate plugin-owned fields. The root's no-`plugins` policy is specific to this toolkit repository, not target templates.
|
|
199
|
+
|
|
200
|
+
| Setting | Native V2 form |
|
|
201
|
+
| --- | --- |
|
|
202
|
+
| Agents | `agents`, JSON `system` (Markdown body for file agents), `request.body.temperature`, model `provider/model#variant` |
|
|
203
|
+
| Permissions | Ordered `permissions` with `action`, `resource`, `effect`; `shell`/`subagent` actions; last match wins |
|
|
204
|
+
| Commands | `commands`; delegated commands use `subagent` |
|
|
205
|
+
| Plugins | `plugins`; options use `{ "package": "…", "options": {} }` |
|
|
206
|
+
| Skills | Directory-path array, e.g. `[".agents/skills"]`, not Markdown globs |
|
|
207
|
+
| MCP | `mcp.servers`; `disabled` inverts legacy `enabled`; `timeout.catalog`/`timeout.execution` |
|
|
208
|
+
|
|
209
|
+
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 `https://opencode.ai/config.json` schema may describe V1; it is not native V2 validation authority.
|
|
210
|
+
|
|
211
|
+
**Runtime limits:** config `instructions` entries are accepted but not loaded; ambient `AGENTS.md` works. `@refs` are ordinary text, not automatic attachments: agents must read referenced snippets explicitly. `request.body.temperature` remains in config, but the current runner does not send it. Plugin/runtime integration has not been tested. Preserve `lsp: true`, but V2 currently exposes no LSP tools or diagnostics: use project lint/typecheck/compiler commands.
|
|
212
|
+
|
|
213
|
+
`--env opencode` includes minimal shared references for wrappers and AGENTS-linked standards without activating other harnesses. Merge, don't clobber: back up V1, preserve models/providers and user/global plugins, and ask before changes. Native-converted files are **incompatible with V1**. Activate on the next run/restart, then check behavior with the installed V2 runtime. `doctor` checks scaffold files/placeholders, not runtime behavior; do not substitute a V1 API/schema fetch or claim checks that were not run.
|
|
214
|
+
|
|
215
|
+
### Native Codex
|
|
216
|
+
|
|
217
|
+
- `--env codex` includes `.codex/`, `.agents/`, and shared context, plus `.github/instructions/` and `.claude/rules-snippets/` solely to supply the standards linked from `AGENTS.md` and those standards' wrapper source content. It does not install other harness command, agent, or config directories. These reference files neither establish Copilot/Claude use nor load automatically as Codex rules; other harness scopes are unchanged.
|
|
218
|
+
- Codex reads `AGENTS.md` and discovers `.agents/skills/*/SKILL.md` natively. Monorepos can use more-specific nested `AGENTS.md` files for app/package guidance. Linked standards are references to read as needed, not automatically loaded Claude/Copilot rules.
|
|
219
|
+
- The optional `.codex/config.toml` is deliberately comment-only: it preserves the user's inherited defaults. Codex loads project config only after the user explicitly trusts the project; the toolkit does not grant trust or set model/provider, approval, sandbox, security, or feature overrides.
|
|
220
|
+
- For manual copies without `.nitm/`, provide `.claude/prompt-snippets/bootstrap.md` to Codex directly. For incremental AI-guided merges, provide `.claude/prompt-snippets/bootstrap-patch.md` as a task document; the CLI `patch` command only adds missing files.
|
|
221
|
+
- Codex MCP configuration uses native `[mcp_servers.name]` TOML in Codex config, **not `.mcp.json`**. No MCP servers are activated by the Codex template. Configure only user-approved servers using the native docs; do not copy credentials or activate other harness hooks automatically.
|
|
222
|
+
- Existing `.claude/agents/`, `.github/agents/`, and `.opencode/agents/` formats are tool-specific, not Codex custom agents. This toolkit does not translate their frontmatter or permissions into Codex configuration. Use only delegation capabilities actually available in your running harness.
|
|
223
|
+
|
|
224
|
+
Official Codex docs: [basic configuration](https://learn.chatgpt.com/docs/config-file/config-basic) · [configuration reference](https://learn.chatgpt.com/docs/config-file/config-reference) · [AGENTS.md](https://learn.chatgpt.com/docs/agent-configuration/agents-md) · [skills](https://learn.chatgpt.com/docs/build-skills) · [MCP](https://learn.chatgpt.com/docs/extend/mcp?surface=cli).
|
|
173
225
|
|
|
174
226
|
## Placeholder Reference
|
|
175
227
|
|
|
@@ -680,7 +732,7 @@ This toolkit includes **32 pre-installed universal skills** in the `.agents/skil
|
|
|
680
732
|
|
|
681
733
|
**These skills are ready to use immediately after copying the templates.** No `npx -y skills add -a <agent> <owner/repo> --skill '*' --agent github-copilot cursor` commands needed.
|
|
682
734
|
|
|
683
|
-
The **ponytail** skill bundle is an integrated optional skill set from [DietrichGebert/ponytail](https://github.com/DietrichGebert/ponytail) that adds YAGNI/stdlib/native/one-line/minimum discipline to your AI agents. It includes 6 skills, 6 commands,
|
|
735
|
+
The **ponytail** skill bundle is an integrated optional skill set from [DietrichGebert/ponytail](https://github.com/DietrichGebert/ponytail) that adds YAGNI/stdlib/native/one-line/minimum discipline to your AI agents. It includes 6 skills, 6 commands, 7 activation hooks, and ambient agent rules. OpenCode uses the author's upstream `@dietrichgebert/ponytail@4.12.0` package, not a bundled local plugin. See [native setup](#native-opencode-v2-toolkit-400); scaffolding alone does not establish activation.
|
|
684
736
|
|
|
685
737
|
### Additional Recommended Skills
|
|
686
738
|
|
package/bin/cli.js
CHANGED
|
@@ -13,15 +13,20 @@ const { execSync, spawnSync } = require('child_process');
|
|
|
13
13
|
const PKG_ROOT = path.join(__dirname, '..');
|
|
14
14
|
const SRC_DIR = path.join(PKG_ROOT, 'src');
|
|
15
15
|
|
|
16
|
-
// Platform config dirs per harness. `.agents`
|
|
16
|
+
// Platform config dirs per harness. Claude and Codex share `.agents` (universal skills).
|
|
17
17
|
const ENV_DIRS = {
|
|
18
18
|
claude: ['.claude', '.agents'],
|
|
19
|
+
codex: ['.codex', '.agents', path.join('.github', 'instructions'), path.join('.claude', 'rules-snippets')],
|
|
19
20
|
copilot: ['.github', '.vscode'],
|
|
20
21
|
cursor: ['.cursor'],
|
|
21
|
-
|
|
22
|
+
// Shared reference sources, not other harnesses' active config/agent wrappers.
|
|
23
|
+
opencode: ['.opencode', path.join('.agents', 'skills'),
|
|
24
|
+
path.join('.claude', 'agents-snippets'), path.join('.claude', 'prompt-snippets'),
|
|
25
|
+
path.join('.claude', 'rules-snippets'), path.join('.github', 'instructions')],
|
|
22
26
|
};
|
|
23
27
|
const ENV_INFO = {
|
|
24
28
|
claude: { name: 'Claude Code', command: '/bootstrap (Claude Code command in .claude/commands/)' },
|
|
29
|
+
codex: { name: 'OpenAI Codex', command: 'read and follow .nitm/BOOTSTRAP.md' },
|
|
25
30
|
copilot: { name: 'GitHub Copilot', command: '/bootstrap (Copilot prompt in .github/prompts/bootstrap.prompt.md)' },
|
|
26
31
|
cursor: { name: 'Cursor', command: '/bootstrap (Cursor command in .cursor/commands/)' },
|
|
27
32
|
opencode: { name: 'OpenCode', command: 'the bootstrap command in .opencode/commands/' },
|
|
@@ -84,9 +89,12 @@ function templateFiles(type) {
|
|
|
84
89
|
function scopeFiles(files, env) {
|
|
85
90
|
if (!env || !ENV_DIRS[env]) return files;
|
|
86
91
|
const allowed = new Set([...SHARED_ROOT, ...SHARED_DIRS, ...ENV_DIRS[env]]);
|
|
92
|
+
const dirs = [...SHARED_DIRS, ...ENV_DIRS[env]].map((dir) => path.normalize(dir));
|
|
87
93
|
return files.filter((rel) => {
|
|
88
|
-
const
|
|
89
|
-
|
|
94
|
+
const normalized = path.normalize(rel);
|
|
95
|
+
const top = normalized.split(path.sep)[0];
|
|
96
|
+
return allowed.has(top) || allowed.has(normalized)
|
|
97
|
+
|| dirs.some((dir) => normalized.startsWith(dir + path.sep));
|
|
90
98
|
});
|
|
91
99
|
}
|
|
92
100
|
|
|
@@ -137,8 +145,10 @@ function envHeader(type, env) {
|
|
|
137
145
|
'2. Calibrate each agent\'s tools for your environment (see the Agent Tool & Permission Calibration section).',
|
|
138
146
|
'3. Verify with `npx nitm-ai-dev-toolkit doctor`.',
|
|
139
147
|
'',
|
|
140
|
-
'The
|
|
141
|
-
'
|
|
148
|
+
'The default scaffold includes Claude Code, OpenAI Codex, GitHub Copilot, Cursor, and OpenCode.',
|
|
149
|
+
'Ask your AI agent to read and follow `.nitm/BOOTSTRAP.md`.',
|
|
150
|
+
'Claude Code, GitHub Copilot, Cursor, and OpenCode also have harness-specific bootstrap commands.',
|
|
151
|
+
'For OpenAI Codex, use the handoff file directly; no native `/bootstrap` command is provided.',
|
|
142
152
|
'',
|
|
143
153
|
'The full bootstrap procedure follows.',
|
|
144
154
|
].join('\n');
|
|
@@ -147,7 +157,7 @@ function envHeader(type, env) {
|
|
|
147
157
|
return [
|
|
148
158
|
`# Bootstrap handoff — environment: ${info.name}`,
|
|
149
159
|
'',
|
|
150
|
-
`
|
|
160
|
+
`Bootstrap entry point: ${info.command}`,
|
|
151
161
|
'',
|
|
152
162
|
'Then ask your AI agent to run the full bootstrap flow (procedure below). Key steps:',
|
|
153
163
|
'1. Replace all `{{PLACEHOLDER}}` values in the AI instruction files.',
|
|
@@ -168,12 +178,15 @@ function handoff(type, cwd, env) {
|
|
|
168
178
|
fs.writeFileSync(path.join(nitmDir, 'BOOTSTRAP.md'), header + '\n\n' + body);
|
|
169
179
|
if (env && ENV_INFO[env]) {
|
|
170
180
|
info(`Scaffold complete (tailored to ${ENV_INFO[env].name}). Hand off to your AI agent:`);
|
|
171
|
-
console.log(`
|
|
181
|
+
console.log(` Bootstrap entry point: ${ENV_INFO[env].command}`);
|
|
172
182
|
} else {
|
|
173
183
|
info('Scaffold complete. Hand off to your AI agent to finish setup:');
|
|
174
184
|
}
|
|
175
|
-
console.log(' 1.
|
|
176
|
-
|
|
185
|
+
console.log(' 1. Ask your AI agent to read and follow `.nitm/BOOTSTRAP.md`.');
|
|
186
|
+
if (!env || !ENV_INFO[env]) {
|
|
187
|
+
console.log(' Includes Claude Code, OpenAI Codex, GitHub Copilot, Cursor, and OpenCode.');
|
|
188
|
+
console.log(' Other harnesses also have bootstrap commands; Codex uses the handoff file directly.');
|
|
189
|
+
}
|
|
177
190
|
console.log(' 2. Run `npx nitm-ai-dev-toolkit doctor' + (env ? ` --env ${env}` : '') + '` to verify the install.');
|
|
178
191
|
}
|
|
179
192
|
|
|
@@ -319,7 +332,7 @@ function usage() {
|
|
|
319
332
|
console.log(`nitm-ai-dev-toolkit — scaffold AI agent config into any repo, then hand off to your AI agent.
|
|
320
333
|
|
|
321
334
|
Usage:
|
|
322
|
-
npx nitm-ai-dev-toolkit install [--monorepo|--repo] [--env <claude|copilot|cursor|opencode>] [--force]
|
|
335
|
+
npx nitm-ai-dev-toolkit install [--monorepo|--repo] [--env <claude|codex|copilot|cursor|opencode>] [--force]
|
|
323
336
|
Scaffold AI config into the current repo (auto-detects repo vs monorepo),
|
|
324
337
|
tailored to your harness, then hand off to your AI agent to run the bootstrap flow.
|
|
325
338
|
If files already exist, install aborts (use --force to overwrite, or \`patch\` to add missing).
|
|
@@ -341,9 +354,11 @@ Usage:
|
|
|
341
354
|
|
|
342
355
|
Options:
|
|
343
356
|
--env <env> Optional. Limit the scaffold to ONE harness:
|
|
344
|
-
claude | copilot | cursor | opencode
|
|
345
|
-
Omit to scaffold ALL environments
|
|
346
|
-
|
|
357
|
+
claude | codex | copilot | cursor | opencode
|
|
358
|
+
Omit to scaffold ALL environments, including OpenAI Codex.
|
|
359
|
+
Ask your agent to read and follow .nitm/BOOTSTRAP.md.
|
|
360
|
+
Other harnesses also have bootstrap commands; Codex uses the handoff
|
|
361
|
+
file directly (no native /bootstrap command is provided).
|
|
347
362
|
--monorepo Force monorepo template
|
|
348
363
|
--repo Force single-repo template
|
|
349
364
|
--force Overwrite existing files
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nitm-ai-dev-toolkit",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "Scaffold AI agent config (Cursor, GitHub Copilot, Claude Code, OpenCode) into any repo, then hand off to your AI agent to finish setup.",
|
|
3
|
+
"version": "4.0.0",
|
|
4
|
+
"description": "Scaffold AI agent config (Cursor, GitHub Copilot, Claude Code, OpenCode, Codex) into any repo, then hand off to your AI agent to finish setup.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"nitm-ai-dev-toolkit": "bin/cli.js"
|
|
7
7
|
},
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"cursor",
|
|
23
23
|
"copilot",
|
|
24
24
|
"opencode",
|
|
25
|
+
"codex",
|
|
25
26
|
"bootstrap",
|
|
26
27
|
"subagents"
|
|
27
28
|
],
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Audit the whole repo for over-engineering
|
|
3
|
-
allowed-tools: "Read, Grep
|
|
2
|
+
description: Audit the whole repo for over-engineering — find what can be deleted
|
|
3
|
+
allowed-tools: "Read, Grep"
|
|
4
4
|
argument-hint: "no arguments required"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
# Ponytail Audit
|
|
8
8
|
|
|
9
|
+
## Agent Dispatch
|
|
9
10
|
> **Recommended agent:** `oracle`
|
|
10
11
|
> Whole-repo over-engineering analysis
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
# Ponytail Audit
|
|
14
|
-
|
|
15
13
|
Follow the prompt defined in [.claude/prompt-snippets/ponytail-audit.md](../prompt-snippets/ponytail-audit.md).
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: "Harvest ponytail: comments into a tracked debt ledger"
|
|
3
|
-
allowed-tools: "Read, Grep
|
|
3
|
+
allowed-tools: "Read, Grep"
|
|
4
4
|
argument-hint: "no arguments required"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
# Ponytail Debt
|
|
8
8
|
|
|
9
|
+
## Agent Dispatch
|
|
9
10
|
> **Recommended agent:** `fixer`
|
|
10
11
|
> Debt ledger harvesting
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
# Ponytail Debt
|
|
14
|
-
|
|
15
13
|
Follow the prompt defined in [.claude/prompt-snippets/ponytail-debt.md](../prompt-snippets/ponytail-debt.md).
|
|
@@ -4,12 +4,10 @@ allowed-tools: "Read"
|
|
|
4
4
|
argument-hint: "no arguments required"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
# Ponytail Gain
|
|
8
8
|
|
|
9
|
+
## Agent Dispatch
|
|
9
10
|
> **Recommended agent:** `fixer`
|
|
10
11
|
> Impact scoreboard display
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
# Ponytail Gain
|
|
14
|
-
|
|
15
13
|
Follow the prompt defined in [.claude/prompt-snippets/ponytail-gain.md](../prompt-snippets/ponytail-gain.md).
|
|
@@ -4,12 +4,10 @@ allowed-tools: "Read"
|
|
|
4
4
|
argument-hint: "no arguments required"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
# Ponytail Help
|
|
8
8
|
|
|
9
|
+
## Agent Dispatch
|
|
9
10
|
> **Recommended agent:** `fixer`
|
|
10
11
|
> Quick-reference display
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
# Ponytail Help
|
|
14
|
-
|
|
15
13
|
Follow the prompt defined in [.claude/prompt-snippets/ponytail-help.md](../prompt-snippets/ponytail-help.md).
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Review changes for over-engineering
|
|
2
|
+
description: Review changes for over-engineering — find what can be deleted
|
|
3
3
|
allowed-tools: "Read, Grep"
|
|
4
4
|
argument-hint: "no arguments required"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
# Ponytail Review
|
|
8
8
|
|
|
9
|
+
## Agent Dispatch
|
|
9
10
|
> **Recommended agent:** `oracle`
|
|
10
11
|
> Diff-level over-engineering review
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
# Ponytail Review
|
|
14
|
-
|
|
15
13
|
Follow the prompt defined in [.claude/prompt-snippets/ponytail-review.md](../prompt-snippets/ponytail-review.md).
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Switch ponytail intensity level (lite/full/ultra/off)
|
|
3
|
-
allowed-tools: "Read, Grep
|
|
3
|
+
allowed-tools: "Read, Grep"
|
|
4
4
|
argument-hint: "optional level (lite/full/ultra/off)"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
# Ponytail
|
|
8
8
|
|
|
9
|
+
## Agent Dispatch
|
|
9
10
|
> **Recommended agent:** `fixer`
|
|
10
11
|
> Apply YAGNI/stdlib discipline
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
# Ponytail
|
|
14
|
-
|
|
15
13
|
Follow the prompt defined in [.claude/prompt-snippets/ponytail.md](../prompt-snippets/ponytail.md).
|
|
@@ -1,9 +1,17 @@
|
|
|
1
|
-
You are helping to patch AI instructions
|
|
1
|
+
You are helping to patch AI instructions by comparing against supported toolkit v4.x templates from the ai-assisted-dev-toolkit repository's `v4.x` branch and merging updates into this project.
|
|
2
|
+
|
|
3
|
+
## OpenCode version preflight (before any changes)
|
|
4
|
+
|
|
5
|
+
- 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.
|
|
6
|
+
- 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`.
|
|
7
|
+
- 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.
|
|
8
|
+
- 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.
|
|
9
|
+
- 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.
|
|
2
10
|
|
|
3
11
|
## Orchestrator Checkpoint
|
|
4
12
|
|
|
5
13
|
> **🛑 Before starting**: This command involves fetching, diffing, and applying changes across many files.
|
|
6
|
-
>
|
|
14
|
+
> Complete Step 1's source/version gates before dispatching parallel diff agents for independent file groups (rules, commands, prompts, instructions, skills, agents).
|
|
7
15
|
> See `.claude/rules-snippets/subagent-workflow.md` for patterns.
|
|
8
16
|
|
|
9
17
|
## Usage
|
|
@@ -17,15 +25,22 @@ You are helping to patch AI instructions in this project by comparing against th
|
|
|
17
25
|
|
|
18
26
|
## Process
|
|
19
27
|
|
|
28
|
+
**Codex invocation and scope:** `/bootstrap-patch` is not a native Codex command. Ask Codex to read and follow this snippet as a task document. Identify the actual harness from session/runtime evidence or ask; scaffold directories do not prove use. Codex targets root/nested `AGENTS.md`, `.agents/skills/`, and optional `.codex/config.toml`. Include `.github/instructions/` and `.claude/rules-snippets/` solely as AGENTS-linked standards and their wrapper sources for Codex-scoped installs, not automatically loaded rules or evidence of Copilot/Claude use. Only include other harness command, agent, and config categories when those harnesses are confirmed in use.
|
|
29
|
+
|
|
30
|
+
**Codex merge guardrails:** preserve existing TOML and inherited user defaults. The shipped `.codex/config.toml` is comment-only; parse it as TOML, do not add model/provider, approval, sandbox, security, feature, self-trust, or active MCP settings. Project config is loaded only after explicit user trust. MCP uses native `[mcp_servers.name]` TOML, not `.mcp.json`; do not migrate or activate servers automatically. Claude/Copilot frontmatter and OpenCode permission blocks are not Codex agent definitions; no Codex custom-agent format is shipped here.
|
|
31
|
+
|
|
20
32
|
1. **Fetch Latest Templates**:
|
|
21
33
|
|
|
22
|
-
|
|
34
|
+
Fetch only the supported `v4.x` source branch:
|
|
23
35
|
|
|
24
36
|
```bash
|
|
37
|
+
set -e
|
|
25
38
|
TOOLKIT_TEMP=$(mktemp -d)
|
|
26
|
-
git clone --depth 1 https://github.com/ninjasitm/ai-assisted-dev-toolkit.git "$TOOLKIT_TEMP"
|
|
39
|
+
git clone --depth 1 --branch v4.x https://github.com/ninjasitm/ai-assisted-dev-toolkit.git "$TOOLKIT_TEMP"
|
|
27
40
|
```
|
|
28
41
|
|
|
42
|
+
**Source availability gate:** If the clone fails or `v4.x` is unavailable (for example, not yet published), **STOP** before diff/apply/version marking. Do not fall back to the default branch or V3, and do not push/publish a branch to unblock this task; ask for an approved available v4.x source.
|
|
43
|
+
|
|
29
44
|
Determine the correct source path based on project structure:
|
|
30
45
|
- **Single repo**: Use `$TOOLKIT_TEMP/src/repo/`
|
|
31
46
|
- **Monorepo**: Use `$TOOLKIT_TEMP/src/monorepo/`
|
|
@@ -38,9 +53,11 @@ You are helping to patch AI instructions in this project by comparing against th
|
|
|
38
53
|
|
|
39
54
|
Check for a `.toolkit-version` file in the project root:
|
|
40
55
|
- If exists: Read the version string (e.g., `2.0.10`, `3.0.0`)
|
|
41
|
-
- If missing:
|
|
56
|
+
- If missing: Verify the installed version or legacy state with the user; absence alone does not prove a pre-3.0 installation
|
|
57
|
+
|
|
58
|
+
Read the toolkit's version from the `version` field in `$TOOLKIT_TEMP/package.json` to compare; `.toolkit-version` tracks the target project's installed version.
|
|
42
59
|
|
|
43
|
-
|
|
60
|
+
**Source version guard (before diff/apply/version marking):** Parse source/target versions as SemVer and compare them (major/minor/patch numerically). If the fetched package's major is not `4`, or its version is older than the target `.toolkit-version`, **STOP** without diffing, applying changes, or updating the marker. Unknown/unparseable versions must also **STOP** and ask rather than guess. Never auto-downgrade.
|
|
44
61
|
|
|
45
62
|
**Version Comparison:**
|
|
46
63
|
- **Same version**: No structural changes expected
|
|
@@ -63,6 +80,7 @@ You are helping to patch AI instructions in this project by comparing against th
|
|
|
63
80
|
| **Claude Agents** | `.claude/agents/*.agent.md` | `src/{type}/.claude/agents/*.agent.md` |
|
|
64
81
|
| **Skills** | `.agents/skills/*/SKILL.md` | `src/{type}/.agents/skills/*/SKILL.md` |
|
|
65
82
|
| **AGENTS.md** | `AGENTS.md` | `src/{type}/AGENTS.md` |
|
|
83
|
+
| **Codex Config** | `.codex/config.toml` | `src/{type}/.codex/config.toml` |
|
|
66
84
|
| **CLAUDE.md** | `CLAUDE.md` | `src/{type}/CLAUDE.md` |
|
|
67
85
|
| **Claude Rules Snippets** | `.claude/rules-snippets/*.md` | `src/{type}/.claude/rules-snippets/*.md` |
|
|
68
86
|
| **Claude Prompt Snippets** | `.claude/prompt-snippets/*.md` | `src/{type}/.claude/prompt-snippets/*.md` |
|
|
@@ -71,20 +89,20 @@ You are helping to patch AI instructions in this project by comparing against th
|
|
|
71
89
|
| **OpenCode Commands** | `.opencode/commands/*.md` | `src/{type}/.opencode/commands/*.md` |
|
|
72
90
|
| **OpenCode Rules** | `.opencode/rules/*.md` | `src/{type}/.opencode/rules/*.md` |
|
|
73
91
|
| **OpenCode Agents** | `.opencode/agents/*.md` | `src/{type}/.opencode/agents/*.md` |
|
|
74
|
-
| **OpenCode Plugins**
|
|
92
|
+
| **OpenCode Local Plugins** | `.opencode/plugins/*.{js,mjs,ts}` | Inventory only; preserve unrelated plugins |
|
|
75
93
|
| **Hooks** | `hooks/*.{js,sh,ps1}` | `src/{type}/hooks/*.{js,sh,ps1}` |
|
|
76
94
|
| **Agent Rules** | `.agents/rules/*.md` | `src/{type}/.agents/rules/*.md` |
|
|
77
|
-
| **Toolkit Version** | `.toolkit-version` |
|
|
78
|
-
|
|
79
|
-
**⚠️ OpenCode `opencode.jsonc` Schema Validation:**
|
|
80
|
-
|
|
81
|
-
When patching `.opencode/opencode.jsonc`, **only add or modify supported top-level keys**. The schema is defined at `https://opencode.ai/config.json`. Do NOT add unsupported keys.
|
|
95
|
+
| **Toolkit Version** | `.toolkit-version` | `package.json` `version` (toolkit root) |
|
|
82
96
|
|
|
83
|
-
**
|
|
97
|
+
**OpenCode native V2 merge checks (confirmed OpenCode use only):**
|
|
84
98
|
|
|
85
|
-
|
|
99
|
+
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; neither it nor a V1 API fetch validates native V2. Plural keys are intentional.
|
|
86
100
|
|
|
87
|
-
|
|
101
|
+
- Use `agents`/`system`, `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`.
|
|
102
|
+
- The version preflight must pass before changes. Back up V1 before native conversion (converted files are incompatible with V1). Preserve models/providers/user-global plugins. Only with approval, merge `"plugins": ["oh-my-opencode-slim@3.0.0"]` locally. Slim's separate strict schema keeps `prompt`/`permission`/`variant`; do not host-migrate it or silently upgrade the separate external starter.
|
|
103
|
+
- **Ponytail replacement (plan here; apply after backup and approval in Step 5):** Remove only known obsolete toolkit-owned `.opencode/plugins/ponytail.js`, `.opencode/plugins/ponytail.mjs`, and `.opencode/plugins/ponytail.ts` copies. Preserve unrelated local plugins. Merge/deduplicate the author's native V2 `@dietrichgebert/ponytail@4.12.0` registration in the local `plugins` array where appropriate, retaining other registrations/options; do not edit global config. Keep `opentmux` commented as V1-only. Do not port local APIs or add bridges; runtime integration is untested. Native local discovery needs no duplicate registration.
|
|
104
|
+
- `instructions` entries are accepted but not loaded; ambient root/nested `AGENTS.md` works. `@refs` are ordinary text: explicitly read snippets. `request.body.temperature` remains in config, but the current runner does not send it. Preserve `lsp: true`; use workspace lint/typecheck/compiler commands (no V2 LSP tools/diagnostics currently).
|
|
105
|
+
- `--env opencode` supplies minimal shared references without other harness activation. Activate on the next run/restart and report only installed-V2 checks actually run, not assumed runtime validation. Publishing 4.0.0 has not been executed.
|
|
88
106
|
|
|
89
107
|
3. **Diff Analysis** (parallelizable — dispatch one subagent per category):
|
|
90
108
|
|
|
@@ -95,7 +113,7 @@ You are helping to patch AI instructions in this project by comparing against th
|
|
|
95
113
|
- **📝 Updated**: Exists in both but template has newer content → candidate for merge
|
|
96
114
|
- **✅ Current**: Exists in both and content matches → no action needed
|
|
97
115
|
- **🔧 Customized**: Exists in both, project version has non-placeholder customizations → careful merge
|
|
98
|
-
- **⚠️ Missing in Template**: Exists in project but not in template → project-specific, keep as-is
|
|
116
|
+
- **⚠️ Missing in Template**: Exists in project but not in template → project-specific, keep as-is except the approved obsolete toolkit Ponytail removal above
|
|
99
117
|
|
|
100
118
|
b. **For updated files, generate a structured diff**:
|
|
101
119
|
- Preserve project-specific `{{PLACEHOLDER}}` replacements (already-bootstrapped values)
|
|
@@ -156,7 +174,9 @@ You are helping to patch AI instructions in this project by comparing against th
|
|
|
156
174
|
a. **New files**: Copy directly from template
|
|
157
175
|
b. **Updated files (no customization)**: Replace with template version
|
|
158
176
|
c. **Updated files (customized)**: Apply structural additions while preserving project values
|
|
159
|
-
d. **
|
|
177
|
+
d. **OpenCode plugins**: Apply only the approved Ponytail replacement above after backing up the known obsolete toolkit copies and local config; preserve all unrelated local/global plugins.
|
|
178
|
+
e. **Toolkit version**: Update `.toolkit-version` to the fetched toolkit version (`4.0.0` for this migration) only after the approved migration and OpenCode preflight pass (or OpenCode is confirmed out of scope).
|
|
179
|
+
f. **Git commit**: Stage and commit all changes with message:
|
|
160
180
|
```bash
|
|
161
181
|
git add -A
|
|
162
182
|
git commit -m "chore: patch AI instructions from toolkit [$(date +%Y-%m-%d)]"
|