vinta-ai-workflows 0.2.0-alpha3 → 0.2.0-alpha4
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 +124 -0
- package/README.md +5 -2
- package/package.json +1 -1
- package/schemas/vinta-ai-workflows-config.v1.schema.json +15 -0
- package/skills/vinta-analyze-codebase/SKILL.md +1 -1
- package/skills/vinta-bootstrap-ai-tools/SKILL.md +18 -8
- package/skills/vinta-derive-skills/SKILL.md +84 -39
- package/skills/vinta-derive-skills/resources/foundation-skills/deslop-comments/SKILL.md +148 -0
- package/skills/vinta-derive-skills/resources/foundation-skills/prepare-worktree/SKILL.md +39 -4
- package/skills/vinta-derive-skills/resources/foundation-skills/prepare-worktree/scripts/claude-worktree-write-guard.py +118 -0
- package/skills/vinta-derive-skills/resources/foundation-skills/prepare-worktree/scripts/gen-claude-sandbox-settings.sh +167 -0
- package/skills/vinta-derive-skills/resources/foundation-skills/prepare-worktree/scripts/sandbox-run.sh +3 -1
- package/skills/vinta-derive-skills/resources/foundation-skills/thermo-nuclear-code-quality-review/SKILL.md +129 -0
- package/skills/vinta-derive-skills/resources/plan-execution/README.md +42 -0
- package/skills/vinta-derive-skills/resources/{implement-plan-template-modular-substitutions.md → plan-execution/partials/commit-strategy/modular.md} +38 -70
- package/skills/vinta-derive-skills/resources/plan-execution/partials/commit-strategy/stacked.md +46 -0
- package/skills/vinta-derive-skills/resources/plan-execution/partials/implementer-prompt.md +78 -0
- package/skills/vinta-derive-skills/resources/plan-execution/partials/model-pick.md +19 -0
- package/skills/vinta-derive-skills/resources/plan-execution/partials/pr-context.md +61 -0
- package/skills/vinta-derive-skills/resources/plan-execution/partials/review-layers.md +50 -0
- package/skills/vinta-derive-skills/resources/plan-execution/partials/worktree-seam.md +68 -0
- package/skills/vinta-derive-skills/resources/{amend-plan-template.md → plan-execution/shell/amend-plan-template.md} +48 -42
- package/skills/vinta-derive-skills/resources/plan-execution/shell/implement-phase-template.md +47 -0
- package/skills/vinta-derive-skills/resources/plan-execution/shell/implement-plan-template.md +186 -0
- package/skills/vinta-derive-skills/resources/plan-execution/shell/integrate-phase-template.md +30 -0
- package/skills/vinta-derive-skills/resources/plan-execution/shell/review-phase-template.md +25 -0
- package/skills/vinta-derive-skills/resources/systematic-debugging-template.md +7 -3
- package/skills/vinta-update-project-skills/SKILL.md +1 -1
- package/skills/vinta-derive-skills/resources/implement-plan-template.md +0 -436
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,130 @@ the project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
7
7
|
|
|
8
8
|
## [0.2.0] — YYYY-MM-DD
|
|
9
9
|
|
|
10
|
+
<!-- pre-release: 0.2.0-alpha4 on 2026-07-08 -->
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **`implement-plan` outer-gate test scope is now configurable — and defaults
|
|
15
|
+
to the quick path.** Each phase's outer gate still always runs the repo-wide
|
|
16
|
+
type/build gate, but for tests it now runs **only the scoped suite** covering
|
|
17
|
+
the apps/files that phase touched by default, instead of the whole repo suite
|
|
18
|
+
every phase (new tests still pass individually in the inner loop). This
|
|
19
|
+
**flips the previous default** (full suite every phase → scoped) to make
|
|
20
|
+
multi-phase plans materially faster. Opt back into the full suite per run via
|
|
21
|
+
the new Step 0 question (d), or set the default in
|
|
22
|
+
`.vinta-ai-workflows.yaml` under
|
|
23
|
+
`run_options.implement-plan.full_test_suite: true`. New config field
|
|
24
|
+
(`run_options.implement-plan.full_test_suite`, boolean, default `false`);
|
|
25
|
+
threaded from the conductor into `implement-phase` (outer-gate marker in the
|
|
26
|
+
implementer prompt) and `review-phase` (Layer 1 verifies whichever gate the
|
|
27
|
+
flag selects); recorded in `TRACKING_{plan-id}.md` `run_options`.
|
|
28
|
+
|
|
29
|
+
- **`deslop-comments` foundation skill — Simple-English comment cleanup, now
|
|
30
|
+
part of the review flow.** Rewrites comments + doc blocks touched during a
|
|
31
|
+
task into Simple English (strips AI-slop vocabulary and negative framing;
|
|
32
|
+
comment-only — no renames, no behavior change). Ships at
|
|
33
|
+
[skills/vinta-derive-skills/resources/foundation-skills/deslop-comments/SKILL.md](skills/vinta-derive-skills/resources/foundation-skills/deslop-comments/SKILL.md).
|
|
34
|
+
Wired as an **always-ship** bucket-A skill (new
|
|
35
|
+
`foundation_skills.deslop-comments` enum, added to the derive-skills bucket-A
|
|
36
|
+
table + always-on note, the bootstrap always-copy-verbatim list + outputs
|
|
37
|
+
tree + Step 0.5 YAML, and both foundation-shape replace lists) because
|
|
38
|
+
`review-phase` now depends on it: **Layer 2 gains a comment-hygiene check**
|
|
39
|
+
and the **fix loop dispatches a `fixer` to run `deslop-comments`** on the
|
|
40
|
+
phase's touched files for any comment-slop finding. Also invokable
|
|
41
|
+
standalone ("deslop these comments"). **Consumers**: re-sync to pick up the
|
|
42
|
+
skill and the `review-phase` comment-hygiene step.
|
|
43
|
+
|
|
44
|
+
- **`thermo-nuclear-code-quality-review` foundation skill — opt-in deep
|
|
45
|
+
structural-maintainability audit.** A deliberately harsh, on-demand review
|
|
46
|
+
of a diff (abstraction quality, giant files, spaghetti-condition growth)
|
|
47
|
+
that hunts for "code-judo" reframes collapsing whole branches / helpers /
|
|
48
|
+
modes / layers rather than polishing them. Copy-verbatim foundation skill
|
|
49
|
+
(bucket A), read-only — it reports findings and hands each fix to the
|
|
50
|
+
`fixer` agent. Ships at
|
|
51
|
+
[skills/vinta-derive-skills/resources/foundation-skills/thermo-nuclear-code-quality-review/SKILL.md](skills/vinta-derive-skills/resources/foundation-skills/thermo-nuclear-code-quality-review/SKILL.md).
|
|
52
|
+
Wired as **opt-in / ask-first**: new `foundation_skills.thermo-nuclear-code-quality-review`
|
|
53
|
+
enum in `schemas/vinta-ai-workflows-config.v1.schema.json`, a new
|
|
54
|
+
question 6 in the bootstrap **Optional foundation skills** interview, and
|
|
55
|
+
the derive-skills bucket-A + foundation-shape lists. The `review-phase`
|
|
56
|
+
Layer 3 reviewer now applies a **condensed structural-simplification lens**
|
|
57
|
+
on every phase and escalates to this full audit only when a phase touches
|
|
58
|
+
core architecture, crosses ~1,000 lines, or surfaces a structural smell too
|
|
59
|
+
big to resolve inline — the deep pass never auto-runs on every diff.
|
|
60
|
+
**Consumers**: re-sync; the bootstrap now asks one more optional-skill
|
|
61
|
+
question, and `review-phase` gains the escalation hook.
|
|
62
|
+
|
|
63
|
+
- **`prepare-worktree` — write-guard for *in-process* subagent runtimes
|
|
64
|
+
(claude-code's Task tool).** `sandbox-run.sh` confines a *process*, so it
|
|
65
|
+
only works when the harness spawns subagents as subprocesses (`codex exec`,
|
|
66
|
+
a `claude -p` child). Claude Code runs subagents in-process — same OS
|
|
67
|
+
process, same tool pipeline, no child command to wrap — so a new
|
|
68
|
+
harness-config guard covers it instead. Two bundled scripts:
|
|
69
|
+
`prepare-worktree/scripts/claude-worktree-write-guard.py` (a `PreToolUse`
|
|
70
|
+
hook that fires for the orchestrator **and** every in-process Task subagent,
|
|
71
|
+
blocking the file-editing tools — `Edit`/`Write`/`MultiEdit`/`NotebookEdit`
|
|
72
|
+
— from writing outside the worktree; filesystem-only, no network impact) and
|
|
73
|
+
`prepare-worktree/scripts/gen-claude-sandbox-settings.sh` (generates the
|
|
74
|
+
worktree's `.claude/settings.json` wiring that hook, and optionally
|
|
75
|
+
Claude Code's **native** OS sandbox via `sandbox.filesystem.denyWrite`/
|
|
76
|
+
`allowWrite` under `--os-sandbox` to also block Bash-issued writes — noting
|
|
77
|
+
the native sandbox forces network isolation, so registry + git-remote hosts
|
|
78
|
+
must be allow-listed via `--allow-domain`). Same deny-main/allow-rest model
|
|
79
|
+
as `sandbox-run.sh`. Step 5.5 of `prepare-worktree` gains an *In-process
|
|
80
|
+
runtimes (claude-code)* subsection; `implement-plan` §1c makes the
|
|
81
|
+
previously hand-wavy "in-process runtime" branch concrete. **Consumers**:
|
|
82
|
+
re-sync `prepare-worktree` + `implement-plan` — the two new scripts ship
|
|
83
|
+
with the foundation-skill dir.
|
|
84
|
+
|
|
85
|
+
### Fixed
|
|
86
|
+
|
|
87
|
+
- **`prepare-worktree/scripts/sandbox-run.sh` — two correctness bugs.**
|
|
88
|
+
(1) The macOS profile temp file used `mktemp -t vinta-sandbox`, which fails
|
|
89
|
+
with "too few X's in template" under GNU `mktemp` (present on any machine
|
|
90
|
+
with coreutils on `PATH`, including many macOS setups) — the whole sandbox
|
|
91
|
+
path errored out; now uses an explicit `…/vinta-sandbox.XXXXXX` template
|
|
92
|
+
portable across BSD + GNU `mktemp`. (2) Callers must now pass
|
|
93
|
+
`--allow <main>/.git`: git worktrees write every commit into the main repo's
|
|
94
|
+
`.git` (`.git/worktrees/<name>/index.lock`, shared objects/refs), so a
|
|
95
|
+
deny-main that omits it made the subagent's own `git commit` fail with
|
|
96
|
+
`Operation not permitted`. `implement-plan` §1c's documented invocation +
|
|
97
|
+
checklist + rules are updated to include `<main>/.git` in the allow-set.
|
|
98
|
+
|
|
99
|
+
### Changed
|
|
100
|
+
|
|
101
|
+
- **`implement-plan` / `amend-plan` decomposed into a modular "plan-execution
|
|
102
|
+
unit" of deterministic sub-skills.** The single ~440-line
|
|
103
|
+
`implement-plan-template.md` (and its `implement-plan-template-modular-substitutions.md`
|
|
104
|
+
sister file) are replaced by a thin **conductor** plus three co-shipped
|
|
105
|
+
single-purpose sub-skills, all rendered from
|
|
106
|
+
[skills/vinta-derive-skills/resources/plan-execution/](skills/vinta-derive-skills/resources/plan-execution/)
|
|
107
|
+
(`shell/` templates that `<!-- include -->` shared `partials/`):
|
|
108
|
+
- `implement-plan` — conductor: parse → classify → resolve one `WORKROOT`
|
|
109
|
+
→ per-phase loop (dispatch) → track → report.
|
|
110
|
+
- `implement-phase` — compose prompt + pick model + spawn the implementer.
|
|
111
|
+
- `review-phase` — the three-layer review + fix loop, now shared by
|
|
112
|
+
`implement-plan`, `amend-plan`, **and** `systematic-debugging` (one review
|
|
113
|
+
implementation instead of three).
|
|
114
|
+
- `integrate-phase` — push + open PR via context file, rendered
|
|
115
|
+
commit-strategy-resolved.
|
|
116
|
+
The scattered runtime `if use_worktree` branches collapse into a single
|
|
117
|
+
`WORKROOT` / `BASE_BRANCH` / `SANDBOX_TIER` seam the conductor resolves once
|
|
118
|
+
and passes to every sub-skill as data; only two local, data-driven checks
|
|
119
|
+
remain (the sandbox spawn-wrap in `implement-phase`, the stray-write
|
|
120
|
+
backstop in `review-phase`). Under `commit_strategy = ask`, the former
|
|
121
|
+
dual-rendered branch/commit/PR bodies become **two** rendered
|
|
122
|
+
`integrate-phase-stacked` / `integrate-phase-modular` skills the conductor
|
|
123
|
+
dispatches by name — no more both-paths-in-one-file. `amend-plan` reuses
|
|
124
|
+
`review-phase` verbatim + the shared inner/outer verification loop, and
|
|
125
|
+
picks up the same `WORKROOT` uniformity, while keeping its own
|
|
126
|
+
history-rewriting topology. **Consumers**: re-sync — the target now gets
|
|
127
|
+
five plan-execution SKILL.md files (`implement-plan`, `implement-phase`,
|
|
128
|
+
`review-phase`, `integrate-phase` [or the two `ask` variants], `amend-plan`)
|
|
129
|
+
instead of two. The three new sub-skills are a co-shipped unit: always
|
|
130
|
+
generated with `implement-plan`, not individually opt-in (no new
|
|
131
|
+
`foundation_skills` enum entry, no new interview question). Runtime
|
|
132
|
+
behavior is unchanged; the decomposition is for reviewability + determinism.
|
|
133
|
+
|
|
10
134
|
<!-- pre-release: 0.2.0-alpha3 on 2026-06-23 -->
|
|
11
135
|
|
|
12
136
|
### Added
|
package/README.md
CHANGED
|
@@ -222,8 +222,11 @@ Land at `ai-tools/skills/<name>/SKILL.md`. Always-on unless flagged optional.
|
|
|
222
222
|
| [`plan-feature`](skills/vinta-derive-skills/resources/foundation-skills/plan-feature/SKILL.md) | always | Phased delivery plan from the matching spec → `ai-plans/YYYY-MM-DD-FEATURE_NAME_PLAN.md`. |
|
|
223
223
|
| [`create-qa-use-cases`](skills/vinta-derive-skills/resources/foundation-skills/create-qa-use-cases/SKILL.md) | always | Bootstrap `QA_USE_CASES.md` from the active spec / plan. Called by `plan-feature` when missing. |
|
|
224
224
|
| [`open-pr-from-context`](skills/vinta-derive-skills/resources/foundation-skills/open-pr-from-context/SKILL.md) | always | Publish a `.vinta-ai-workflows/prs-context/<feature>/<phase>.md` file as a real PR + inline comments via `gh` / `glab`. Bundles [`open-pr.sh`](skills/vinta-derive-skills/resources/foundation-skills/open-pr-from-context/scripts/open-pr.sh). |
|
|
225
|
-
| `implement-plan` | always (generated) | Phase-by-phase plan execution. Generated from a template with project commands + branch / PR / co-author policy. |
|
|
226
|
-
| `
|
|
225
|
+
| `implement-plan` | always (generated) | Phase-by-phase plan execution. Thin **conductor**: parses the plan, resolves one `WORKROOT`, and runs a fixed pipeline per phase (`implement-phase` → `review-phase` → `integrate-phase`), tracking + reporting. Generated from a template with project commands + branch / PR / co-author policy. |
|
|
226
|
+
| `implement-phase` | always (unit) | Plan-execution sub-skill co-shipped with `implement-plan`: compose the implementer prompt, pick the model, spawn one implementer subagent for a single phase. |
|
|
227
|
+
| `review-phase` | always (unit) | Plan-execution sub-skill: the three-layer review (mechanical / plan-compliance / independent reviewer) + fix loop. Shared by `implement-plan`, `amend-plan`, and `systematic-debugging`. |
|
|
228
|
+
| `integrate-phase` | always (unit) | Plan-execution sub-skill: push the reviewed phase along the project's commit strategy + open the PR via context file. Under `commit_strategy = ask`, ships as `integrate-phase-stacked` + `integrate-phase-modular`. |
|
|
229
|
+
| `amend-plan` | always (generated) | History-rewriting companion to `implement-plan` — revises in-flight plans, amends prior-phase commits, force-pushes, rebases stacked downstream branches. Reuses `review-phase` + `implement-phase`'s shared prompt loop. |
|
|
227
230
|
| `systematic-debugging` | **opt-in** | Root-cause-first debugging with project-specific repro commands + MCP evidence-gathering (error tracking, traces, logs, metrics, alerts). Renders from a catalogue of observability MCP servers the user declares. |
|
|
228
231
|
| `add-e2e-test` | **opt-in** | Add an e2e test. Body covers e2e framework, page-object pattern, auth/storage-state, seed helpers, tenant scoping, screenshot conventions. |
|
|
229
232
|
| `add-env-var` | **opt-in** | Propagate a new env var through every layer (`.env.example`, build tool envPrefix, build cache hash, app config, AGENTS.md, CI, deploy injection). |
|
package/package.json
CHANGED
|
@@ -212,6 +212,16 @@
|
|
|
212
212
|
"description": "Provision a fully-runnable git worktree for parallel feature work — symlinks dep dirs, copies env files, forks dev / test DBs, namespaces docker-compose project + network, drops a summary YAML for mechanical teardown. Copy-verbatim foundation skill (bucket A). When `enabled`, project-level defaults (worktree root, deps strategy, compose network strategy) live under `skills.prepare-worktree`. Consumed by `implement-plan` when its Step 0 question (c) opts in — the orchestrator runs `prepare-worktree` once at the start of a plan run and threads the worktree path through every subagent's prompt so phases all stack inside the same isolated checkout.",
|
|
213
213
|
"type": "string",
|
|
214
214
|
"enum": ["enabled", "disabled"]
|
|
215
|
+
},
|
|
216
|
+
"thermo-nuclear-code-quality-review": {
|
|
217
|
+
"description": "Opt-in deep structural-maintainability audit of a diff — abstraction quality, giant files, spaghetti-condition growth — harsher than the standard per-phase review. Copy-verbatim foundation skill (bucket A). Read-only; hands each fix to the `fixer` agent. Invoked deliberately by the user, or escalated from the `review-phase` Layer 3 structural-simplification lens; never auto-run on every diff.",
|
|
218
|
+
"type": "string",
|
|
219
|
+
"enum": ["enabled", "disabled"]
|
|
220
|
+
},
|
|
221
|
+
"deslop-comments": {
|
|
222
|
+
"description": "Rewrite comments and doc blocks touched during the current task into Simple English — strip AI-slop vocabulary and negative framing, comment-only (no renames, no behavior change). Copy-verbatim foundation skill (bucket A), always shipped: the `review-phase` Layer 2 comment-hygiene check and fix loop depend on it. Set `disabled` only if a project deliberately opts out of the review flow's comment-hygiene step.",
|
|
223
|
+
"type": "string",
|
|
224
|
+
"enum": ["enabled", "disabled"]
|
|
215
225
|
}
|
|
216
226
|
}
|
|
217
227
|
},
|
|
@@ -250,6 +260,11 @@
|
|
|
250
260
|
"properties": {
|
|
251
261
|
"pause_between_phases": { "type": "boolean", "default": false },
|
|
252
262
|
"generate_inline_comments": { "type": "boolean", "default": false },
|
|
263
|
+
"full_test_suite": {
|
|
264
|
+
"description": "Default answer to Step 0 question (d) — what each phase's outer gate runs for tests. False (default) = quick path: the outer gate runs only the scoped test suite covering the apps/files the phase touched (new tests still pass individually in the inner loop). True = run the full repo test suite in every phase's outer gate, guarding against regressions in untouched code at the cost of slower phases. The repo-wide type/build gate runs every phase either way. Per-run prompt still asks; this is the suggested default shown.",
|
|
265
|
+
"type": "boolean",
|
|
266
|
+
"default": false
|
|
267
|
+
},
|
|
253
268
|
"use_worktree": {
|
|
254
269
|
"description": "Default answer to Step 0 question (c) — whether `implement-plan` should provision an isolated git worktree (via `prepare-worktree`) and run every phase's subagent inside it. False = run in the current checkout. True = create one shared worktree at the start of the plan run; all phase branches stack inside it. Per-run prompt still asks; this is the suggested default shown.",
|
|
255
270
|
"type": "boolean",
|
|
@@ -155,7 +155,7 @@ This is a load-bearing input for the rest of the bootstrap flow — surface ever
|
|
|
155
155
|
For each skill, also classify:
|
|
156
156
|
|
|
157
157
|
- `vinta-managed` — directory name starts with `vinta-` (installed by `vinta-ai-workflows`; can be left alone or refreshed via that CLI).
|
|
158
|
-
- `foundation-shape` — name matches the Vinta foundation set (`plan-feature`, `create-spec`, `create-qa-use-cases`, `implement-plan`, `add-e2e-test`, `add-env-var`).
|
|
158
|
+
- `foundation-shape` — name matches the Vinta foundation set (`plan-feature`, `create-spec`, `create-qa-use-cases`, `implement-plan`, `implement-phase`, `review-phase`, `integrate-phase`, `amend-plan`, `add-e2e-test`, `add-env-var`). `implement-phase` / `review-phase` / `integrate-phase` are the plan-execution sub-skills co-shipped with `implement-plan`.
|
|
159
159
|
- `project-custom` — anything else; written by the team.
|
|
160
160
|
|
|
161
161
|
**Sub-agents** — list every agent file with its name + description:
|
|
@@ -83,7 +83,7 @@ These bleed across sub-skills, so capture once now:
|
|
|
83
83
|
|
|
84
84
|
### D. Optional foundation skills
|
|
85
85
|
|
|
86
|
-
|
|
86
|
+
Six skills are part of the foundation set but aren't always needed. Ask explicitly:
|
|
87
87
|
|
|
88
88
|
1. **`add-e2e-test`** — does the project have e2e tests (Playwright / Cypress / similar) or plan to add them? `AskUserQuestion` options: `Yes — already has them`, `Yes — planning to add`, `No — skip`. If yes, [vinta-derive-skills](../vinta-derive-skills/SKILL.md)'s **Optional — ask the user** bucket follows up to ask whether the user has a template or wants to draft from scratch. **This answer also governs `create-qa-use-cases` and the e2e content inside `plan-feature`**: on `No — skip`, set `foundation_skills.create-qa-use-cases: disabled` too — derive-skills won't ship `create-qa-use-cases` and strips `plan-feature`'s `<!-- e2e:start/end -->` regions so no-e2e projects carry zero Playwright / `QA_USE_CASES.md` / `pr-screenshots/` references. On either `Yes`, set both `add-e2e-test` and `create-qa-use-cases` to `enabled`.
|
|
89
89
|
2. **`add-env-var`** — does the project have a non-trivial env-var propagation flow (multiple files / build configs / CI updates per new var) or a single `.env` file is enough? `AskUserQuestion` options: `Yes — non-trivial flow`, `No — single .env is enough`. Skip if `No`.
|
|
@@ -112,7 +112,9 @@ Five skills are part of the foundation set but aren't always needed. Ask explici
|
|
|
112
112
|
- Do **not** seed the cache file at bootstrap. The first debug run preflights all configured servers and writes the file then. An empty / missing `.vinta-ai-workflows/cache.yaml` is a valid initial state.
|
|
113
113
|
- Mention to the user how to refresh: delete the file to re-preflight everything, or edit one entry's `status` to `dirty` to refresh that one server. Token rotated → cache will catch the auth error on the next call and flip the entry to `dirty` automatically.
|
|
114
114
|
|
|
115
|
-
|
|
115
|
+
6. **`thermo-nuclear-code-quality-review`** — does the team want an opt-in, deliberately harsh structural-maintainability audit available on demand (abstraction quality, giant files, spaghetti-condition growth), separate from the standard per-phase review? `AskUserQuestion` options: `Yes — enable`, `No — skip`. Recommend `Yes` for long-lived codebases where structural drift is a real cost, or teams that already run deep quality passes before merging large work. It ships as a user-invoked skill and is also the escalation target for the `review-phase` Layer 3 structural-simplification lens; it is never auto-run on every diff. No follow-up config — the body is project-agnostic.
|
|
116
|
+
|
|
117
|
+
If the user answers "No" to any of the six, that skill won't ship. If the user answers "Yes" to `add-e2e-test` / `add-env-var` but doesn't have a template, derive-skills drafts one via interview. `systematic-debugging` is always template-rendered — no per-project drafting interview, just the MCP-server inventory above. `add-one-off-script` is copied verbatim from [vinta-derive-skills/resources/foundation-skills/add-one-off-script/](../vinta-derive-skills/resources/foundation-skills/add-one-off-script/) — its body is project-agnostic; the per-project variability lives in the `skills.add-one-off-script.*` config block above and in env vars consumed at runtime. `prepare-worktree` is also copied verbatim from [vinta-derive-skills/resources/foundation-skills/prepare-worktree/](../vinta-derive-skills/resources/foundation-skills/prepare-worktree/) — same pattern: project-agnostic body, per-project defaults under `skills.prepare-worktree.*`. `thermo-nuclear-code-quality-review` is copied verbatim from [vinta-derive-skills/resources/foundation-skills/thermo-nuclear-code-quality-review/](../vinta-derive-skills/resources/foundation-skills/thermo-nuclear-code-quality-review/) with no follow-up config — its body is fully project-agnostic.
|
|
116
118
|
|
|
117
119
|
### E. Existing AI artifacts (per-artifact disposition)
|
|
118
120
|
|
|
@@ -132,7 +134,7 @@ For each artifact, read it (frontmatter + body), then ask the user via `AskUserQ
|
|
|
132
134
|
- `Keep in current vendor path, don't touch` — leaves it where it is. AGENTS.md may reference it; downstream skill setup won't manage it.
|
|
133
135
|
- `Drop` — delete (rare; usually the user wants to migrate).
|
|
134
136
|
|
|
135
|
-
Foundation-shape skills (name matches `plan-feature`, `create-spec`, `create-qa-use-cases`, `implement-plan`, `add-e2e-test`, `add-env-var`, `add-one-off-script`, `prepare-worktree`) get an extra option: `Replace with Vinta foundation version` — overwrites with the canonical foundation content, preserving the user's name. Useful when the existing version is stale.
|
|
137
|
+
Foundation-shape skills (name matches `plan-feature`, `create-spec`, `create-qa-use-cases`, `implement-plan`, `implement-phase`, `review-phase`, `integrate-phase`, `amend-plan`, `add-e2e-test`, `add-env-var`, `add-one-off-script`, `prepare-worktree`, `thermo-nuclear-code-quality-review`, `deslop-comments`) get an extra option: `Replace with Vinta foundation version` — overwrites with the canonical foundation content, preserving the user's name. Useful when the existing version is stale. (`implement-phase` / `review-phase` / `integrate-phase` are the plan-execution sub-skills co-shipped with `implement-plan`; replace them as a unit.)
|
|
136
138
|
|
|
137
139
|
- **Sub-agents** (each under any vendor `agents/` dir):
|
|
138
140
|
- `Migrate to ai-tools/agents/<name>.yaml` — converts vendor-specific format → canonical YAML; `setup-ai-tools.mjs` re-emits per-vendor copies.
|
|
@@ -250,6 +252,8 @@ foundation_skills:
|
|
|
250
252
|
systematic-debugging: <Optional foundation skills → systematic-debugging answer → enabled | disabled>
|
|
251
253
|
add-one-off-script: <Optional foundation skills → add-one-off-script answer → enabled | disabled>
|
|
252
254
|
prepare-worktree: <Optional foundation skills → prepare-worktree answer → enabled | disabled>
|
|
255
|
+
thermo-nuclear-code-quality-review: <Optional foundation skills → thermo-nuclear-code-quality-review answer → enabled | disabled>
|
|
256
|
+
deslop-comments: enabled # always ships — review-phase Layer 2 comment-hygiene + fix loop depend on it
|
|
253
257
|
|
|
254
258
|
foundation_agents:
|
|
255
259
|
implementer: enabled
|
|
@@ -263,6 +267,7 @@ run_options:
|
|
|
263
267
|
implement-plan:
|
|
264
268
|
pause_between_phases: false
|
|
265
269
|
generate_inline_comments: false
|
|
270
|
+
full_test_suite: false # default: each phase's outer gate runs scoped tests only; set true to run the full suite every phase
|
|
266
271
|
use_worktree: <Optional foundation skills → prepare-worktree follow-up → default for Step 0 question (c); false unless team opted in>
|
|
267
272
|
amend-plan:
|
|
268
273
|
blast_radius_signal_threshold: 2
|
|
@@ -340,8 +345,12 @@ ai-tools/
|
|
|
340
345
|
│ ├── plan-feature/SKILL.md ← always (copied verbatim from derive-skills resources)
|
|
341
346
|
│ ├── create-spec/SKILL.md ← always (copied verbatim)
|
|
342
347
|
│ ├── create-qa-use-cases/SKILL.md ← always (copied verbatim)
|
|
343
|
-
│ ├──
|
|
344
|
-
│ ├──
|
|
348
|
+
│ ├── deslop-comments/SKILL.md ← always (copied verbatim; review-phase Layer 2 comment-hygiene + fix loop depend on it)
|
|
349
|
+
│ ├── implement-plan/SKILL.md ← always (conductor; generated from template, project-specific)
|
|
350
|
+
│ ├── implement-phase/SKILL.md ← always (plan-execution unit; co-shipped with implement-plan)
|
|
351
|
+
│ ├── review-phase/SKILL.md ← always (plan-execution unit; shared by implement-plan / amend-plan / systematic-debugging)
|
|
352
|
+
│ ├── integrate-phase/SKILL.md ← always (plan-execution unit; push + PR. Under commit_strategy=ask: integrate-phase-stacked/ + integrate-phase-modular/ instead)
|
|
353
|
+
│ ├── amend-plan/SKILL.md ← always (conductor; generated from template, project-specific)
|
|
345
354
|
│ ├── add-e2e-test/SKILL.md ← optional — only if user opts in
|
|
346
355
|
│ ├── add-env-var/SKILL.md ← optional — only if user opts in
|
|
347
356
|
│ ├── systematic-debugging/SKILL.md ← optional — only if user opts in (template-rendered)
|
|
@@ -351,6 +360,7 @@ ai-tools/
|
|
|
351
360
|
│ │ ├── one_off_script_base.py
|
|
352
361
|
│ │ └── one_off_script_base.ts
|
|
353
362
|
│ ├── prepare-worktree/SKILL.md ← optional — only if user opts in (verbatim copy; project-agnostic body, defaults under skills.prepare-worktree.*)
|
|
363
|
+
│ ├── thermo-nuclear-code-quality-review/SKILL.md ← optional — only if user opts in (verbatim copy; deep structural-maintainability audit, escalation target for review-phase Layer 3)
|
|
354
364
|
│ ├── run-one-off-script-django/ ← optional sister skill — only when stack matches + user supplies template (authors Jupyter notebook / mgmt command runner + JupyterRuntime / DjangoMgmtRuntime adapter in the per-script folder)
|
|
355
365
|
│ ├── run-one-off-script-medplum/ ← optional sister skill — only when stack matches + user supplies template (authors Medplum bot + MedplumBotRuntime adapter in the per-script folder)
|
|
356
366
|
│ └── <stack-specific skills>/SKILL.md ← only if user supplied templates
|
|
@@ -379,9 +389,9 @@ Plus the symlinks + per-vendor generated files, set up by the install step.
|
|
|
379
389
|
|
|
380
390
|
Foundation skills break into three buckets — see [vinta-derive-skills](../vinta-derive-skills/SKILL.md) for the full mechanics:
|
|
381
391
|
|
|
382
|
-
- **Always copy verbatim**: `plan-feature`, `create-spec`, `create-qa-use-cases`. Bundled with the bootstrap skill set; project-agnostic enough to ship as-is (with light path scrubs).
|
|
383
|
-
- **Always generate**: `implement-plan`, `amend-plan
|
|
384
|
-
- **Optional, ask first**: `add-e2e-test`, `add-env-var`, `systematic-debugging`, `add-one-off-script`, `prepare-worktree`. Skipped by default; orchestrator asks via `AskUserQuestion` whether the project has the relevant flow at all. `add-e2e-test` / `add-env-var`: if yes + user has a template → copy + adapt; if yes + no template → draft from scratch via interview; if no → don't ship. `systematic-debugging`: if yes → render the bundled template plus the per-tool MCP catalogue blocks for the observability tools selected in its follow-up; if no → don't ship. `add-one-off-script`: if yes → copy the bundled SKILL.md verbatim plus the language-specific `BaseOneOffScript` template (`one_off_script_base.py` / `one_off_script_base.ts`) chosen via its follow-up; if no → don't ship. `prepare-worktree`: if yes → copy the bundled SKILL.md verbatim, populate `skills.prepare-worktree.*` defaults from its follow-ups, and (when the user opted in via the worktree-default follow-up) flip `run_options.implement-plan.use_worktree` to `true` so `implement-plan`'s Step 0 question (c) defaults to yes; if no → don't ship.
|
|
392
|
+
- **Always copy verbatim**: `plan-feature`, `create-spec`, `create-qa-use-cases`, `deslop-comments`. Bundled with the bootstrap skill set; project-agnostic enough to ship as-is (with light path scrubs). `deslop-comments` always ships because `review-phase`'s Layer 2 comment-hygiene check + fix loop dispatch it.
|
|
393
|
+
- **Always generate**: the plan-execution unit — `implement-plan` (conductor) + its co-shipped sub-skills `implement-phase` / `review-phase` / `integrate-phase`, plus `amend-plan` (conductor). Bodies have too much project-specific content (test commands, branch convention, PR + co-author policy, agent dispatch) — generated from parameterized templates + shared partials using interview answers + inventory. The sub-skills are not independently opt-in; they always ship with the conductors.
|
|
394
|
+
- **Optional, ask first**: `add-e2e-test`, `add-env-var`, `systematic-debugging`, `add-one-off-script`, `prepare-worktree`, `thermo-nuclear-code-quality-review`. Skipped by default; orchestrator asks via `AskUserQuestion` whether the project has the relevant flow at all. `add-e2e-test` / `add-env-var`: if yes + user has a template → copy + adapt; if yes + no template → draft from scratch via interview; if no → don't ship. `systematic-debugging`: if yes → render the bundled template plus the per-tool MCP catalogue blocks for the observability tools selected in its follow-up; if no → don't ship. `add-one-off-script`: if yes → copy the bundled SKILL.md verbatim plus the language-specific `BaseOneOffScript` template (`one_off_script_base.py` / `one_off_script_base.ts`) chosen via its follow-up; if no → don't ship. `prepare-worktree`: if yes → copy the bundled SKILL.md verbatim, populate `skills.prepare-worktree.*` defaults from its follow-ups, and (when the user opted in via the worktree-default follow-up) flip `run_options.implement-plan.use_worktree` to `true` so `implement-plan`'s Step 0 question (c) defaults to yes; if no → don't ship. `thermo-nuclear-code-quality-review`: if yes → copy the bundled SKILL.md verbatim (no follow-up config); if no → don't ship.
|
|
385
395
|
|
|
386
396
|
Stack-specific skills + agents land in the target only when the user provides templates for them. If they don't have templates yet, the orchestrator records the detected stacks + skill categories as a TODO list the user can address later via [vinta-derive-skills](../vinta-derive-skills/SKILL.md) / [vinta-derive-subagents](../vinta-derive-subagents/SKILL.md) standalone runs.
|
|
387
397
|
|
|
@@ -26,7 +26,7 @@ Before drafting any new SKILL.md, walk through every entry in `existing_ai_artif
|
|
|
26
26
|
- **Migrate to `ai-tools/skills/<name>/`** — `git mv` the existing skill folder (with all its resources) into the canonical layout. After move, scan the body for hard-coded vendor paths that no longer apply (`.cursor/skills/...` self-references, etc.) and rewrite to the new path. `setup-ai-tools.mjs` will re-link to the chosen vendors.
|
|
27
27
|
- **Keep in current vendor path, don't touch** — leave it where it is; AGENTS.md may reference it; downstream skill setup won't manage it. **Don't ship a foundation duplicate that would shadow it.**
|
|
28
28
|
- **Drop** — log removal; don't emit anything.
|
|
29
|
-
- **Replace with Vinta foundation version** (foundation-shape only — `plan-feature`, `create-spec`, `create-qa-use-cases`, `implement-plan`, `add-e2e-test`, `add-env-var`, `add-one-off-script`, `prepare-worktree`) — proceed with the bucket A / B / C flow below for that name. The user has explicitly opted into overwriting their version.
|
|
29
|
+
- **Replace with Vinta foundation version** (foundation-shape only — `plan-feature`, `create-spec`, `create-qa-use-cases`, `implement-plan`, `add-e2e-test`, `add-env-var`, `add-one-off-script`, `prepare-worktree`, `thermo-nuclear-code-quality-review`, `deslop-comments`) — proceed with the bucket A / B / C flow below for that name. The user has explicitly opted into overwriting their version.
|
|
30
30
|
- **`vinta-managed`** (any skill whose dir starts with `vinta-`) — leave alone. These come from the `vinta-ai-workflows` CLI; `vinta-derive-skills` doesn't manage them.
|
|
31
31
|
|
|
32
32
|
For each name in the foundation set: only emit it (verbatim copy / generate from template / interview-draft) when no existing skill of that name is being migrated or kept. If the user said `Migrate` or `Keep` for an existing `plan-feature/SKILL.md`, **do not overwrite**.
|
|
@@ -47,14 +47,16 @@ These are project-agnostic enough to ship as-is. Copy from this skill's [resourc
|
|
|
47
47
|
| `create-spec` | [resources/foundation-skills/create-spec/SKILL.md](resources/foundation-skills/create-spec/SKILL.md) | Turn a raw feature prompt into a structured spec doc. |
|
|
48
48
|
| `create-qa-use-cases` | [resources/foundation-skills/create-qa-use-cases/SKILL.md](resources/foundation-skills/create-qa-use-cases/SKILL.md) | Bootstrap a project's `QA_USE_CASES.md` from the active spec/plan. **E2E-gated** — ship only when `foundation_skills.add-e2e-test` is `enabled`; QA use-cases exist to seed e2e specs, so a no-e2e project has no use for it. |
|
|
49
49
|
| `open-pr-from-context` | [resources/foundation-skills/open-pr-from-context/](resources/foundation-skills/open-pr-from-context/) | Thin SKILL.md wrapper around [scripts/open-pr.sh](resources/foundation-skills/open-pr-from-context/scripts/open-pr.sh) — bash script that publishes one `.vinta-ai-workflows/prs-context/{feature}/{phase}.md` file as a real PR + inline comments via the project's PR CLI (`gh` / `glab`). Used by `implement-plan` (when CLI + `yq`/`jq` are available) and standalone (to publish a `pending` file later). |
|
|
50
|
+
| `deslop-comments` | [resources/foundation-skills/deslop-comments/SKILL.md](resources/foundation-skills/deslop-comments/SKILL.md) | Rewrite comments + doc blocks touched during a task into Simple English — strip AI-slop vocabulary and negative framing; comment-only, no renames or behavior change. **Always ships** — the `review-phase` Layer 2 comment-hygiene check + fix loop dispatch it, so it must exist in the target. Also user-invokable standalone ("deslop these comments"). |
|
|
50
51
|
| `prepare-worktree` | [resources/foundation-skills/prepare-worktree/](resources/foundation-skills/prepare-worktree/) | Provision a runnable, isolated git worktree for parallel feature work — symlink dep dirs (or copy / reinstall when the plan churns deps), copy + mutate env files, fork dev + test DBs when migrations are in scope, namespace docker-compose project + network, OS-sandbox the worktree so main-checkout writes are blocked (bundled [scripts/sandbox-run.sh](resources/foundation-skills/prepare-worktree/scripts/sandbox-run.sh) — `sandbox-exec` / `bwrap`), write a teardown-ready summary YAML. Used by `implement-plan` when Step 0 question (c) opts in; standalone for ad-hoc isolation. Opt-in (bucket A + ask-first via the bootstrap's **Optional foundation skills** interview). |
|
|
52
|
+
| `thermo-nuclear-code-quality-review` | [resources/foundation-skills/thermo-nuclear-code-quality-review/SKILL.md](resources/foundation-skills/thermo-nuclear-code-quality-review/SKILL.md) | Opt-in deep structural-maintainability audit of a diff — abstraction quality, giant files, spaghetti-condition growth — harsher than the standard per-phase review; hunts for "code-judo" reframes that collapse branches / helpers / layers rather than polishing them. Read-only; hands each fix to the `fixer` agent. Invoked deliberately by the user, or escalated from the `review-phase` Layer 3 structural-simplification lens. Opt-in (bucket A + ask-first via the bootstrap's **Optional foundation skills** interview). |
|
|
51
53
|
|
|
52
54
|
These reference each other:
|
|
53
55
|
|
|
54
56
|
- `plan-feature` reads spec; dispatches `create-qa-use-cases` when the doc is missing (e2e-enabled projects only — see below).
|
|
55
57
|
- `implement-plan` (bucket B below) writes per-phase PR-context files following [resources/prs-context-template.md](resources/prs-context-template.md), then invokes `open-pr-from-context` when a PR CLI is detected.
|
|
56
58
|
|
|
57
|
-
The **always-on unit** is `plan-feature` + `create-spec` + `open-pr-from-context` — copy all three or none. `create-qa-use-cases` joins the unit **only when `foundation_skills.add-e2e-test` is `enabled`**; when add-e2e-test is disabled (or absent), don't ship it and set `foundation_skills.create-qa-use-cases: disabled` in `.vinta-ai-workflows.yaml` to match.
|
|
59
|
+
The **always-on unit** is `plan-feature` + `create-spec` + `open-pr-from-context` — copy all three or none. `deslop-comments` also always ships (independently — it doesn't cross-reference the trio), because the `review-phase` Layer 2 comment-hygiene check + fix loop dispatch it; a target missing it would leave that review step dangling. `create-qa-use-cases` joins the unit **only when `foundation_skills.add-e2e-test` is `enabled`**; when add-e2e-test is disabled (or absent), don't ship it and set `foundation_skills.create-qa-use-cases: disabled` in `.vinta-ai-workflows.yaml` to match.
|
|
58
60
|
|
|
59
61
|
**E2E stripping in `plan-feature`.** `plan-feature` ships verbatim but carries e2e-only regions delimited by `<!-- e2e:start -->` / `<!-- e2e:end -->` lines. When copying it, run an e2e pass:
|
|
60
62
|
|
|
@@ -64,15 +66,45 @@ The **always-on unit** is `plan-feature` + `create-spec` + `open-pr-from-context
|
|
|
64
66
|
|
|
65
67
|
After copying, scan each for project-specific path references that no longer match the target (the bundled copies may still carry source-repo paths such as `<source-repo>/ai-plans/` or `apps/<service>/`). Replace with the target's paths from the inventory.
|
|
66
68
|
|
|
67
|
-
### B. Generate —
|
|
69
|
+
### B. Generate — the **plan-execution unit** + `systematic-debugging` from templates
|
|
68
70
|
|
|
69
|
-
Project-specific skills, generated from templates because their bodies cite real test commands, branch conventions, agent dispatch table, PR / co-author policy, or selected MCP tools
|
|
71
|
+
Project-specific skills, generated from templates because their bodies cite real test commands, branch conventions, agent dispatch table, PR / co-author policy, or selected MCP tools.
|
|
70
72
|
|
|
71
|
-
-
|
|
72
|
-
- **`amend-plan`** — history rewriting: revises an in-flight plan, amends already-implemented phase commits, force-pushes, rebases stacked downstream branches. From [resources/amend-plan-template.md](resources/amend-plan-template.md). Companion to `implement-plan` — same agents, same review gates, same PR-context flow, opposite git topology direction.
|
|
73
|
-
- **`systematic-debugging`** — root-cause-first debugging flow with project-specific reproduction commands and enforced observability MCP evidence-gathering. From [resources/systematic-debugging-template.md](resources/systematic-debugging-template.md) plus the **MCP-agnostic** evidence-categories block at [resources/systematic-debugging-mcp-tools.md](resources/systematic-debugging-mcp-tools.md) — the rendered SKILL.md instructs the agent to list available MCP tools at runtime and map them to evidence categories (error tracking, traces, logs, metrics, alerts, deploys, dashboards), instead of hardcoding tool names that go stale. **Opt-in** — only generated when `foundation_skills.systematic-debugging` is `enabled` in `.vinta-ai-workflows.yaml`. The free-form list of MCP server identifiers rendered into the body comes from `skills.systematic-debugging.observability_mcp_servers` in the same config.
|
|
73
|
+
The forward-execution + amend flow is decomposed into a **plan-execution unit** — two thin conductors that dispatch to three shared single-purpose sub-skills. All five render from [resources/plan-execution/shell/](resources/plan-execution/shell/), which pulls shared bodies from [resources/plan-execution/partials/](resources/plan-execution/partials/) (see [Rendering the plan-execution unit](#rendering-the-plan-execution-unit) below):
|
|
74
74
|
|
|
75
|
-
|
|
75
|
+
- **`implement-plan`** — thin conductor: parse plan → classify phases → resolve one `WORKROOT` → per-phase loop (dispatch to the three sub-skills) → track → report. From `shell/implement-plan-template.md`.
|
|
76
|
+
- **`amend-plan`** — thin conductor: history rewriting (revise plan, amend commits, force-push, rebase stacked downstreams, refresh PR-context). From `shell/amend-plan-template.md`. Reuses `implement-phase` (for `amend-existing` rewrites) + `review-phase` (verbatim), keeps its own git topology.
|
|
77
|
+
- **`implement-phase`** — compose implementer prompt + pick model + spawn one implementer subagent. From `shell/implement-phase-template.md`.
|
|
78
|
+
- **`review-phase`** — three-layer review + fix loop. From `shell/review-phase-template.md`. **Shared by all three conductors** (implement-plan, amend-plan, systematic-debugging).
|
|
79
|
+
- **`integrate-phase`** — push the reviewed phase + open PR via context file. From `shell/integrate-phase-template.md`, rendered **commit-strategy-resolved** (see the [commit-strategy substitution table](#commit_strategy_-substitution-table)).
|
|
80
|
+
|
|
81
|
+
The five are a **co-shipped unit**: `implement-plan` is always generated, so `implement-phase` / `review-phase` / `integrate-phase` are always generated alongside it (they are its decomposition, not independently opt-in — there is no `foundation_skills` enum entry for them, and the bootstrap interview never asks about them). `amend-plan` is likewise always generated. They are separate `ai-tools/skills/<name>/SKILL.md` files so each can be reviewed and evolved on its own.
|
|
82
|
+
|
|
83
|
+
- **`systematic-debugging`** — root-cause-first debugging flow with project-specific reproduction commands and enforced observability MCP evidence-gathering. From [resources/systematic-debugging-template.md](resources/systematic-debugging-template.md) plus the **MCP-agnostic** evidence-categories block at [resources/systematic-debugging-mcp-tools.md](resources/systematic-debugging-mcp-tools.md) — the rendered SKILL.md instructs the agent to list available MCP tools at runtime and map them to evidence categories (error tracking, traces, logs, metrics, alerts, deploys, dashboards), instead of hardcoding tool names that go stale. **Opt-in** — only generated when `foundation_skills.systematic-debugging` is `enabled` in `.vinta-ai-workflows.yaml`. The free-form list of MCP server identifiers rendered into the body comes from `skills.systematic-debugging.observability_mcp_servers` in the same config. It reuses `review-phase` for its Phase 4 review gate (an `invoke [review-phase]` reference — always resolvable because the plan-execution unit is always shipped).
|
|
84
|
+
|
|
85
|
+
Every plan-execution shell + `systematic-debugging` consumes the placeholder set below — render each by substituting from the inventory + Step 0 interview answers. `systematic-debugging` reuses the same set plus two extra placeholders (`{{OBSERVABILITY_MCP_BLOCK}}`, `{{OBSERVABILITY_MCP_LIST}}`) rendered from the catalogue.
|
|
86
|
+
|
|
87
|
+
#### Rendering the plan-execution unit
|
|
88
|
+
|
|
89
|
+
Shells under `plan-execution/shell/` are thin — most content lives in `plan-execution/partials/` and is spliced in at render time. Per shell, in order:
|
|
90
|
+
|
|
91
|
+
1. **Expand includes.** Replace every include directive with the referenced partial content:
|
|
92
|
+
- `<!-- include: partials/<file>.md -->` — the whole partial body.
|
|
93
|
+
- `<!-- include: partials/<file>.md#BLOCK -->` — only the block between `<!-- block-begin: BLOCK -->` / `<!-- block-end: BLOCK -->` (markers excluded). Includes may nest (e.g. `implementer-prompt.md#FULL` itself includes `#INNER_OUTER_LOOP`) — expand recursively.
|
|
94
|
+
- `<!-- include: partials/commit-strategy/<RESOLVED>.md#BLOCK -->` — bind `<RESOLVED>` to the project's `policies.commit_strategy` (`stacked` → `stacked.md`, `modular` → `modular.md`). For `ask`, see the split below.
|
|
95
|
+
- Ignore the `rendering-guidance` appendix at the bottom of `commit-strategy/modular.md` — it is derive-time reference for the `{{MODULAR_*}}` placeholders, not shippable content.
|
|
96
|
+
2. **Substitute `{{PLACEHOLDER}}`** using the table below (+ the commit-strategy table).
|
|
97
|
+
3. **Write** the fully-expanded, fully-substituted body to `ai-tools/skills/<name>/SKILL.md`. No `<!-- include -->` marker and no `{{...}}` may survive in the shipped file.
|
|
98
|
+
|
|
99
|
+
**The `WORKROOT` seam.** The conductor resolves `WORKROOT` / `BASE_BRANCH` / `SANDBOX_TIER` once (`partials/worktree-seam.md#WORKROOT_RESOLUTION`) and every sub-skill uses them as data — this is why the rendered skills carry no scattered `if use_worktree` branches. `<WORKROOT>` / `<BASE_BRANCH>` / `<main_checkout>` / `<RESOLVED>` are **angle-bracket runtime slots the agent fills at execution time**, not `{{...}}` derive-time placeholders — leave them verbatim in the shipped file.
|
|
100
|
+
|
|
101
|
+
**`ask` → two `integrate-phase` variants, no dual-render.** When `policies.commit_strategy = ask`, render `integrate-phase-template.md` **twice**:
|
|
102
|
+
- `ai-tools/skills/integrate-phase-stacked/SKILL.md` — `<RESOLVED>` = `stacked`, `{{INTEGRATE_PHASE_NAME}}` = `integrate-phase-stacked`.
|
|
103
|
+
- `ai-tools/skills/integrate-phase-modular/SKILL.md` — `<RESOLVED>` = `modular`, `{{INTEGRATE_PHASE_NAME}}` = `integrate-phase-modular`.
|
|
104
|
+
|
|
105
|
+
The conductor's `{{INTEGRATE_PHASE_DISPATCH}}` then renders as a one-line runtime dispatch on `run_options.commit_strategy_resolved` (see the commit-strategy table). For `stacked` / `modular` projects, `integrate-phase-template.md` renders **once** to `ai-tools/skills/integrate-phase/` with a single topology body and no runtime branch.
|
|
106
|
+
|
|
107
|
+
The remaining per-shell placeholders:
|
|
76
108
|
|
|
77
109
|
| Placeholder | Source | Example |
|
|
78
110
|
|---|---|---|
|
|
@@ -99,35 +131,42 @@ Project-specific skills, generated from templates because their bodies cite real
|
|
|
99
131
|
| `{{ANTI_GIT_ADD_ALL_REASON}}` | derived from common artifacts in target | `secrets, .env files, build artifacts, .auth/ live in the tree` |
|
|
100
132
|
| `{{STAGE_PATTERN}}` | derived from monorepo shape | `apps/... lib/... e2e/... ai-plans/...` or `<app>/... tests/... ai-plans/...` |
|
|
101
133
|
| `{{PROJECT_SKILLS_LIST}}` | computed from skills emitted | comma-separated names of the skills the project actually has |
|
|
102
|
-
| `{{AGENT_DISPATCH_TABLE}}` | from [vinta-derive-subagents](../vinta-derive-subagents/SKILL.md) output | markdown table mapping phase shapes → agent type |
|
|
134
|
+
| `{{AGENT_DISPATCH_TABLE}}` | from [vinta-derive-subagents](../vinta-derive-subagents/SKILL.md) output | markdown table mapping phase shapes → agent type. Rendered into `implement-phase`. |
|
|
135
|
+
| `{{INTEGRATE_PHASE_NAME}}` | derived from `policies.commit_strategy` | The integrate-phase skill's own `name:` + dir. `integrate-phase` for `stacked` / `modular`; `integrate-phase-stacked` / `integrate-phase-modular` for the two `ask` renders. |
|
|
136
|
+
| `{{INTEGRATE_PHASE_DISPATCH}}` | derived from `policies.commit_strategy` | How the `implement-plan` conductor names the integrate step. `stacked` / `modular`: `` [integrate-phase](../integrate-phase/SKILL.md) ``. `ask`: `` the resolved integrate-phase variant — [integrate-phase-stacked](../integrate-phase-stacked/SKILL.md) when `run_options.commit_strategy_resolved = stacked-branches`, else [integrate-phase-modular](../integrate-phase-modular/SKILL.md) ``. |
|
|
137
|
+
| `{{INTEGRATE_PHASE_LINK}}` | derived from `policies.commit_strategy` | Path used by `amend-plan`'s PR-template cross-reference. `../integrate-phase/SKILL.md` for `stacked` / `modular`; `../integrate-phase-stacked/SKILL.md` for `ask` (amend-plan only runs under the stacked topology). |
|
|
103
138
|
| `{{OBSERVABILITY_MCP_BLOCK}}` | rendered from [resources/systematic-debugging-mcp-tools.md](resources/systematic-debugging-mcp-tools.md) | the verbatim "Phase 0 evidence categories" block — same content for every project. When `skills.systematic-debugging.observability_mcp_servers` is empty, renders the no-tools fallback paragraph instead. The block is MCP-agnostic on purpose: tool names are discovered at runtime, not baked at generation time. |
|
|
104
139
|
| `{{OBSERVABILITY_MCP_LIST}}` | derived from `skills.systematic-debugging.observability_mcp_servers` | comma-separated MCP server identifiers as the user named them at bootstrap (e.g. `sentry, datadog, our-internal-traces`). Renders `none configured` when empty. |
|
|
105
140
|
| `{{DEPENDENCY_LICENSE_BLOCK}}` | derived from `policies.dependency_licenses` | Top-level `## Adding new third-party dependencies` section. Empty string when `enforcement: off` or the block is absent. When `block` / `warn`: short paragraph naming the enforcement mode + the forbidden SPDX list + the pre-install check (`npm view <pkg> license`, PyPI metadata, etc.) + a one-line pointer to the **Dependency licenses** section in [AGENTS.md](AGENTS.md) for the full table including `allowed_overrides` and `notes`. See [resources/dependency-license-block.md](resources/dependency-license-block.md) for the canonical body. |
|
|
106
141
|
| `{{DEPENDENCY_LICENSE_LAYER1_CHECK}}` | derived from `policies.dependency_licenses` | Layer 1 review checklist item. Empty string when `enforcement: off`. When `block` / `warn`: `6. **Dependency license scan**: \`git diff package.json pyproject.toml ...\` (project-relevant manifests) — for every added dep look up its SPDX license (\`npm view <pkg> license\`, PyPI metadata, repo \`LICENSE\`). A license in \`policies.dependency_licenses.forbidden_spdx\` and not in \`allowed_overrides\` is a BLOCKER (when \`block\`) or a SHOULD-FIX (when \`warn\`). A missing / \`UNKNOWN\` / undeclared license is **always a BLOCKER** regardless of enforcement mode — there is no override to silently bless undisclosed terms.` |
|
|
107
142
|
| `{{DEPENDENCY_LICENSE_RULE_LINE}}` | derived from `policies.dependency_licenses` | Important-rules bullet. Empty string when `enforcement: off`. When `block`: `- **License check before any new dep.** Refuse \`npm add\` / \`pnpm add\` / \`pip install\` / \`poetry add\` / \`uv add\` / \`cargo add\` / \`go get\` when the package's SPDX license is in the forbidden list — see AGENTS.md **Dependency licenses**. User can grant a one-off override after acknowledging the violation; record the override in \`policies.dependency_licenses.allowed_overrides\` before re-running.` When `warn`: same line but `Proceed but record the violation in the phase report` instead of `Refuse`. |
|
|
108
|
-
| `{{COMMIT_STRATEGY_*}}` family (`{{COMMIT_STRATEGY_STEP0_QUESTION}}`, `{{COMMIT_STRATEGY_STEP0_TRAILER}}`, `{{COMMIT_STRATEGY_CONFIRM_NOTE}}`, `{{BRANCH_NAMING_PATTERN_SUMMARY}}`, `{{BRANCH_NAMING_BLOCK}}`, `{{PER_PHASE_COMMIT_BLOCK}}`, `{{PR_OPEN_TIMING_BLOCK}}`, `{{
|
|
143
|
+
| `{{COMMIT_STRATEGY_*}}` family (`{{COMMIT_STRATEGY_STEP0_QUESTION}}`, `{{COMMIT_STRATEGY_STEP0_TRAILER}}`, `{{COMMIT_STRATEGY_CONFIRM_NOTE}}`, `{{BRANCH_NAMING_PATTERN_SUMMARY}}`, `{{BRANCH_NAMING_BLOCK}}`, `{{PER_PHASE_COMMIT_BLOCK}}`, `{{PR_OPEN_TIMING_BLOCK}}`, `{{PRS_CONTEXT_FILE_PATH}}`, `{{TRACKING_BRANCH_FIELD}}`, `{{TRACKING_PHASE_BRANCH_FIELD}}`, `{{FINAL_REPORT_BRANCH_SUMMARY}}`, `{{BRANCH_CHECKLIST_LINE}}`, `{{COMMIT_STRATEGY_CHECKLIST_BLOCK}}`, `{{BRANCH_PUSH_HEADING}}`) | Step 0 (`policies.commit_strategy`) | Render based on the project's commit strategy (`stacked-branches` / `modular-commits` / `ask`). Multi-line blocks now come from the commit-strategy partials; see the substitution table immediately after this row. |
|
|
109
144
|
|
|
110
145
|
### `{{COMMIT_STRATEGY_*}}` substitution table
|
|
111
146
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
|
120
|
-
|
|
121
|
-
| `{{
|
|
122
|
-
| `{{
|
|
123
|
-
| `{{
|
|
124
|
-
| `{{
|
|
125
|
-
| `{{
|
|
126
|
-
| `{{
|
|
127
|
-
| `{{
|
|
128
|
-
| `{{
|
|
129
|
-
|
|
130
|
-
|
|
147
|
+
The multi-line blocks now live in the partials `plan-execution/partials/commit-strategy/{stacked,modular}.md` (marker-delimited blocks). The single-line values are documented in each partial's footer comment. Bind the block/value from the partial matching `policies.commit_strategy`. The `{{MODULAR_EXAMPLE_*}}` + `{{MODULAR_COMMIT_MESSAGE_FORMAT_BLOCK}}` placeholders inside `modular.md`'s `PER_PHASE_COMMIT` block are resolved from that partial's own **rendering-guidance appendix** (driven by `policies.commit_style` — conventional / imperative / other); that appendix is derive-time reference only and is never shipped.
|
|
148
|
+
|
|
149
|
+
**Where each block lands, and how `ask` is handled:**
|
|
150
|
+
- `BRANCH_NAMING` + `PR_OPEN_TIMING` land in **`integrate-phase`**. Under `ask`, `integrate-phase` is rendered **twice** (once per strategy — see [Rendering the plan-execution unit](#rendering-the-plan-execution-unit)); each variant bakes in one strategy's blocks with **no runtime marker**. The conductor dispatches by name via `{{INTEGRATE_PHASE_DISPATCH}}`.
|
|
151
|
+
- `PER_PHASE_COMMIT` lands in **`implement-phase`** (the implementer prompt's working instructions). `implement-phase` is not split, so under `ask` it embeds **both** strategy blocks gated by inline runtime markers (`If \`run_options.commit_strategy_resolved = "modular-commits"\`: … Else (\`stacked-branches\`): …`) — same pattern as `pause_between_phases` / `generate_inline_comments`.
|
|
152
|
+
- `CHECKLIST` + all single-line values land in the single **`implement-plan`** conductor; under `ask` they render dynamically on `run_options.commit_strategy_resolved` (runtime markers for the block, inline `If … Else …` for single-line values).
|
|
153
|
+
|
|
154
|
+
| Placeholder | Lands in | `stacked-branches` | `modular-commits` | `ask` |
|
|
155
|
+
|---|---|---|---|---|
|
|
156
|
+
| `{{COMMIT_STRATEGY_STEP0_QUESTION}}` | implement-plan | empty string | empty string | a third opt-in block analogous to 4a/4b: `\n\n c. **Commit strategy?** *"This project's commit_strategy is set to ask. Pick one for this run: one branch + one PR per phase (stacked), or one branch + one PR for the whole plan with one atomic commit per logical unit (modular)?"* Options: \`Stacked branches — one branch + PR per phase\`, \`Modular commits — atomic commits, one PR for whole plan\`. Cache answer in tracking under \`run_options.commit_strategy_resolved\`.` (starts with `\n\n`; under stacked / modular the placeholder vanishes without a stray blank line) |
|
|
157
|
+
| `{{COMMIT_STRATEGY_STEP0_TRAILER}}` | implement-plan | empty string | empty string | ` Commit-strategy behavior follows \`run_options.commit_strategy_resolved\`.` (leading space) |
|
|
158
|
+
| `{{COMMIT_STRATEGY_CONFIRM_NOTE}}` | implement-plan | empty string | empty string | ` + \`run_options.commit_strategy_resolved\`` (leading ` + `) |
|
|
159
|
+
| `{{BRANCH_NAMING_PATTERN_SUMMARY}}` | implement-plan | `stacked.md` footer value | `modular.md` footer value | ``branch naming pattern (depends on `run_options.commit_strategy_resolved` — resolved at Step 0)`` |
|
|
160
|
+
| `{{BRANCH_NAMING_BLOCK}}` | integrate-phase | `stacked.md#BRANCH_NAMING` | `modular.md#BRANCH_NAMING` | baked per-variant (no runtime marker) |
|
|
161
|
+
| `{{PER_PHASE_COMMIT_BLOCK}}` | implement-phase | `stacked.md#PER_PHASE_COMMIT` | `modular.md#PER_PHASE_COMMIT` | both blocks gated by runtime markers |
|
|
162
|
+
| `{{PR_OPEN_TIMING_BLOCK}}` | integrate-phase | `stacked.md#PR_OPEN_TIMING` | `modular.md#PR_OPEN_TIMING` | baked per-variant (no runtime marker) |
|
|
163
|
+
| `{{PRS_CONTEXT_FILE_PATH}}` | implement-plan + integrate-phase | `stacked.md` footer value | `modular.md` footer value | ``either `.../phase-{phase.id}.md` or `.../plan.md` depending on `run_options.commit_strategy_resolved` `` |
|
|
164
|
+
| `{{TRACKING_BRANCH_FIELD}}` | implement-plan | `stacked.md` footer value (empty) | `modular.md` footer value | both gated by runtime markers |
|
|
165
|
+
| `{{TRACKING_PHASE_BRANCH_FIELD}}` | implement-plan | `stacked.md` footer value (`, branch, base`) | `modular.md` footer value (empty) | both gated by runtime markers |
|
|
166
|
+
| `{{FINAL_REPORT_BRANCH_SUMMARY}}` | implement-plan | `stacked.md` footer value | `modular.md` footer value | dynamic per resolved strategy |
|
|
167
|
+
| `{{BRANCH_CHECKLIST_LINE}}` | implement-plan | `stacked.md` footer value | `modular.md` footer value | dynamic per resolved strategy |
|
|
168
|
+
| `{{COMMIT_STRATEGY_CHECKLIST_BLOCK}}` | implement-plan | `stacked.md#CHECKLIST` (empty) | `modular.md#CHECKLIST` (3 items) | both variants gated by runtime markers |
|
|
169
|
+
| `{{BRANCH_PUSH_HEADING}}` | integrate-phase | `Push stacked branch` | `Push to plan branch` | baked per-variant (`Push stacked branch` / `Push to plan branch`) |
|
|
131
170
|
|
|
132
171
|
### `{{COMMIT_STRATEGY_REFUSAL_BLOCK}}` (amend-plan only)
|
|
133
172
|
|
|
@@ -158,15 +197,20 @@ Amending under modular commits requires rewriting an arbitrary number of inline
|
|
|
158
197
|
Refuse with this guidance; do not proceed.
|
|
159
198
|
```
|
|
160
199
|
|
|
161
|
-
The
|
|
200
|
+
The commit-strategy block bodies (branch naming, per-phase commit, PR-open timing, checklist) for both strategies live in [resources/plan-execution/partials/commit-strategy/](resources/plan-execution/partials/commit-strategy/) — `stacked.md` + `modular.md`. derive-skills reads the one matching `policies.commit_strategy` (both, under `ask`).
|
|
162
201
|
|
|
163
|
-
Render each template
|
|
202
|
+
Render each template (expand includes → substitute placeholders → write), producing:
|
|
164
203
|
|
|
165
|
-
- `ai-tools/skills/implement-plan/SKILL.md` (from `implement-plan-template.md`)
|
|
166
|
-
- `ai-tools/skills/
|
|
204
|
+
- `ai-tools/skills/implement-plan/SKILL.md` (from `plan-execution/shell/implement-plan-template.md`)
|
|
205
|
+
- `ai-tools/skills/implement-phase/SKILL.md` (from `plan-execution/shell/implement-phase-template.md`)
|
|
206
|
+
- `ai-tools/skills/review-phase/SKILL.md` (from `plan-execution/shell/review-phase-template.md`)
|
|
207
|
+
- `ai-tools/skills/integrate-phase/SKILL.md` (from `plan-execution/shell/integrate-phase-template.md`) — **or**, under `ask`, `ai-tools/skills/integrate-phase-stacked/SKILL.md` + `ai-tools/skills/integrate-phase-modular/SKILL.md` (same template rendered twice)
|
|
208
|
+
- `ai-tools/skills/amend-plan/SKILL.md` (from `plan-execution/shell/amend-plan-template.md`)
|
|
167
209
|
- `ai-tools/skills/systematic-debugging/SKILL.md` (from `systematic-debugging-template.md`) — only when `foundation_skills.systematic-debugging: enabled`
|
|
168
210
|
|
|
169
|
-
|
|
211
|
+
The first five are the **plan-execution unit** — render them together (they share partials + placeholders + cross-links); a change to one partial ripples to every shell that includes it.
|
|
212
|
+
|
|
213
|
+
Validate each output before saving: **no `<!-- include: … -->` marker and no `{{PLACEHOLDER}}` may survive** (angle-bracket runtime slots like `<WORKROOT>` / `<BASE_BRANCH>` / `<RESOLVED-already-bound>` are expected to remain — they are execution-time, not derive-time). If a placeholder survives, the shell/partial needs a substitution rule. Cross-link check: the conductor's links to `implement-phase` / `review-phase` / the integrate variant resolve, and `amend-plan` / `systematic-debugging` → `review-phase` resolve. `systematic-debugging` adds the two MCP-related placeholders; if a project picks an observability tool the catalogue doesn't list, ask the user for a free-form snippet (heading, required calls, fields to extract) and inline it before saving — and consider upstreaming the snippet to [resources/systematic-debugging-mcp-tools.md](resources/systematic-debugging-mcp-tools.md).
|
|
170
214
|
|
|
171
215
|
### C. Optional — ask the user
|
|
172
216
|
|
|
@@ -239,8 +283,8 @@ Length: 100–300 lines. Shorter = under-specified. Longer = should probably spl
|
|
|
239
283
|
|
|
240
284
|
- **Don't ship copy-pasted source-project SKILL.md files unchanged.** Run search-and-replace for source project names / paths / commands before saving.
|
|
241
285
|
- **Foundation set is a unit.** Always copy `plan-feature` + `create-spec` + `open-pr-from-context` together — they reference each other. `create-qa-use-cases` joins only when `add-e2e-test` is enabled; when it's not, strip `plan-feature`'s e2e regions (the `<!-- e2e:start/end -->` pass) so no cross-link dangles.
|
|
242
|
-
-
|
|
243
|
-
- **Optional skills (`add-e2e-test`, `add-env-var`, `add-one-off-script`, `prepare-worktree`) are gated by user answer.** Don't ship them by default.
|
|
286
|
+
- **The plan-execution unit is generated, not copied.** `implement-plan` + `implement-phase` + `review-phase` + `integrate-phase` + `amend-plan` all have too much project-specific content for verbatim shipping. They are separate files but a **co-shipped unit** — never emit the conductors without the three sub-skills; a conductor whose `[implement-phase]` / `[review-phase]` / integrate link dangles is a broken skill.
|
|
287
|
+
- **Optional skills (`add-e2e-test`, `add-env-var`, `add-one-off-script`, `prepare-worktree`, `thermo-nuclear-code-quality-review`) are gated by user answer.** Don't ship them by default.
|
|
244
288
|
- **Each skill solves one job.** Two unrelated checklists → split.
|
|
245
289
|
- **Reference real files in the target.** Skill links must point to existing paths.
|
|
246
290
|
- **Skills auto-load by description.** Specific triggers, specific outcomes.
|
|
@@ -248,7 +292,7 @@ Length: 100–300 lines. Shorter = under-specified. Longer = should probably spl
|
|
|
248
292
|
|
|
249
293
|
## Pitfalls
|
|
250
294
|
|
|
251
|
-
- **Forgetting to substitute placeholders in
|
|
295
|
+
- **Forgetting to substitute placeholders (or expand includes) in the plan-execution skills.** A surviving `{{TEST_CMD}}` or `<!-- include: … -->` is a runtime confusion. Expand every include, substitute every `{{…}}`, and validate before saving. (Angle-bracket runtime slots like `<WORKROOT>` are meant to stay.)
|
|
252
296
|
- **Copying foundation skills and forgetting to scrub source-project paths.** Bundled copies may still carry source-repo paths (e.g. `<source-repo>/ai-plans/`, `apps/<service>/`). Replace with the target's paths.
|
|
253
297
|
- **Asking too many questions for optional skills.** If `vinta-analyze-codebase` shows no e2e dir and the user clearly has no e2e setup, it's OK to skip the question and not ship `add-e2e-test`. Use judgment.
|
|
254
298
|
- **Skipping the foundation copy because "the user already has them".** They probably don't. Confirm by reading the target's `ai-tools/skills/` (if it exists at all). If it does have these, ask the user "refresh from bundled copies, or keep what you have?".
|
|
@@ -261,5 +305,6 @@ After all skills written:
|
|
|
261
305
|
2. `name` field matches dir name.
|
|
262
306
|
3. No `{{PLACEHOLDER}}` strings survive in any output skill.
|
|
263
307
|
4. Foundation skills (plan-feature, create-spec, open-pr-from-context — plus create-qa-use-cases when e2e is enabled) reference each other correctly via `[name](../<name>/SKILL.md)` links. When e2e is disabled, confirm `plan-feature` has **no** surviving `<!-- e2e:start/end -->` markers and no dangling link to `create-qa-use-cases` / `add-e2e-test`.
|
|
264
|
-
5.
|
|
265
|
-
6.
|
|
308
|
+
5. **Plan-execution unit intact.** All five files exist; no surviving `<!-- include -->` markers; the conductor's `[implement-phase]` / `[review-phase]` / integrate-phase links resolve, and `amend-plan` + `systematic-debugging` (when shipped) → `[review-phase]` resolve. Under `ask`: both `integrate-phase-stacked` + `integrate-phase-modular` exist and the conductor's dispatch line names both.
|
|
309
|
+
6. `implement-plan` (+ the plan-execution sub-skills) cite real commands + the project's actual code host + branch / PR / co-author policy.
|
|
310
|
+
7. Setup script ([vinta-install-ai-tools-setup](../vinta-install-ai-tools-setup/SKILL.md)) runs cleanly with the new skills in place.
|