@sabaiway/agent-workflow-kit 1.25.0 → 1.27.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 +75 -0
- package/README.md +13 -7
- package/SKILL.md +88 -28
- package/bin/install.mjs +74 -29
- package/capability.json +1 -1
- package/package.json +1 -1
- package/references/agents/changelog-skeleton.md +23 -0
- package/references/agents/gate-triage.md +23 -0
- package/references/agents/mechanical-sweep.md +20 -0
- package/references/contracts.md +1 -0
- package/references/scripts/archive-decisions.mjs +424 -0
- package/references/scripts/archive-decisions.test.mjs +365 -0
- package/references/scripts/install-git-hooks.mjs +1 -0
- package/references/templates/agent_rules.md +1 -0
- package/references/templates/gates.json +4 -0
- package/tools/cheap-agents.mjs +239 -0
- package/tools/commands.mjs +29 -6
- package/tools/family-members.mjs +2 -1
- package/tools/family-registry.mjs +111 -13
- package/tools/known-footprint.mjs +3 -0
- package/tools/labels.mjs +13 -0
- package/tools/procedures.mjs +19 -0
- package/tools/recipes.mjs +56 -17
- package/tools/renderers.mjs +12 -1
- package/tools/run-gates.mjs +299 -0
- package/tools/semver-lite.mjs +23 -0
- package/tools/setup-backends.mjs +143 -6
- package/tools/view-model.mjs +11 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,81 @@ Semantically versioned ([semver](https://semver.org)), newest first. The `versio
|
|
|
4
4
|
is the current release. `upgrade` mode reads a project's `docs/ai/.workflow-version` and applies
|
|
5
5
|
every `migrations/<version>-<slug>.md` newer than it, in semver order.
|
|
6
6
|
|
|
7
|
+
## 1.27.0 — Cost-tiered execution: the `gates` runner + the `agents` cheap-lane writer
|
|
8
|
+
|
|
9
|
+
A **feature** release (ships the bundled bridges unchanged at **2.1.0**). Two new modes move
|
|
10
|
+
mechanical work off the frontier lane — one batches every project gate into a single exit code,
|
|
11
|
+
the other places cheap-model subagents for extraction work:
|
|
12
|
+
|
|
13
|
+
- **`/agent-workflow-kit gates`** (`tools/run-gates.mjs`) — the **generic project gate runner**:
|
|
14
|
+
reads the project-declared `docs/ai/gates.json` (`{ id, title, cmd }`, strict schema, unknown
|
|
15
|
+
keys rejected — the declaration names WHAT to check, never who executes it), runs each `cmd`
|
|
16
|
+
as ONE bash line from the project root, prints a per-gate PASS/FAIL table + one
|
|
17
|
+
machine-readable summary line, exits 0 iff all green. A failing gate's own output is preserved
|
|
18
|
+
verbatim; `--only <id>` re-runs a subset; **honest distinct outcomes** for a missing (exit 3,
|
|
19
|
+
recovery named), empty (4), or malformed (5) declaration and a bash-less host (6) — never a
|
|
20
|
+
silent green. Trust posture stated: it executes the project's OWN declared commands — a
|
|
21
|
+
batching convenience, not a sandbox. 33 hermetic tests + one real-spawn brace-glob fixture.
|
|
22
|
+
- **`/agent-workflow-kit agents`** (`tools/cheap-agents.mjs`) — the opt-in **cheap-lane subagent
|
|
23
|
+
writer** (the second `.claude/` writer, on the velocity discipline: dry-run default,
|
|
24
|
+
deployment-gated `--apply`, symlink STOPs, never `settings*.json`, never commits). Places
|
|
25
|
+
three bundled vehicles (`references/agents/`): `mechanical-sweep`, `changelog-skeleton`,
|
|
26
|
+
`gate-triage` — each pinned `model: haiku` + `effort: low` + read-only tools (content-tested).
|
|
27
|
+
A diverged existing file is **preserved and reported, never overwritten**. Claude-Code-specific,
|
|
28
|
+
like velocity.
|
|
29
|
+
- **`gates.json` seeded everywhere** — `references/templates/gates.json` ships byte-identical in
|
|
30
|
+
kit + memory (template-parity guard); bootstrap seeds it; upgrade **ensures-if-missing from
|
|
31
|
+
the kit's OWN twin** (a stale memory never silently loses the feature) and preserves an
|
|
32
|
+
existing declaration byte-for-byte. Also new on upgrade: a stamp-independent
|
|
33
|
+
**enforcement-script ensure** seeds a missing `archive-decisions.mjs` pair into deployed
|
|
34
|
+
projects (the kit's byte-identical fallback mirror of the memory canon — pinned by the new
|
|
35
|
+
`test/scripts-mirror.test.mjs` across ALL shared reference scripts).
|
|
36
|
+
- **The advisor now routes by cost** — `procedures.mjs` renders an unconditional **cost-lanes**
|
|
37
|
+
block (L0 script · L1 cheap subagent · L2 bridge · L3 frontier; cheapest adequate executor; no
|
|
38
|
+
guardrail → no down-move; the red lines) + an additive `costLanes` field in `--json`,
|
|
39
|
+
drift-guarded against the engine canon on both sides. One byte-identical cost-lane bullet
|
|
40
|
+
joined both `agent_rules.md` templates (lens-mirror tokens + an injected red→green non-vacuity
|
|
41
|
+
proof).
|
|
42
|
+
- **Footprint registries** — `KNOWN_FOOTPRINT` += `/.claude/agents/` (the vehicles stay
|
|
43
|
+
invisible in a hidden deployment); `KIT_OWN_PATHS` += the two deployed decisions copies;
|
|
44
|
+
snapshots + the `contracts.md` mirror row updated in lockstep. Tarball re-pinned (92 files,
|
|
45
|
+
reverse pins for every new asset).
|
|
46
|
+
|
|
47
|
+
## 1.26.0 — Deterministic bridge freshness & delivery; machine-composed status line; honest installer messaging
|
|
48
|
+
|
|
49
|
+
A **feature** release (ships the bundled bridges unchanged at **2.1.0**). One architecture across
|
|
50
|
+
four fixes: **the registry computes, the tools speak, the agent pastes** — no factual line on these
|
|
51
|
+
surfaces is agent-composed anymore.
|
|
52
|
+
|
|
53
|
+
- **Bridge freshness is now visible.** `family-registry` compares each placed bridge against the
|
|
54
|
+
kit-bundled mirror (both local files — nothing checks npm): behind → a plain caveat + the runnable
|
|
55
|
+
`/agent-workflow-kit setup` recommend + `refresh.behind:true` in `--json`, reaching the
|
|
56
|
+
bootstrap/upgrade footers and the welcome mat (priority 1 is now caveat-generic and quotes the
|
|
57
|
+
firing note's OWN recovery verbatim); uncheckable → an explicit unknown note (never "current",
|
|
58
|
+
never "behind"); zero-behind → the TOOL prints a checked-scope verdict (`all N checked members are
|
|
59
|
+
current` — any unknown blocks the all-current claim). New dependency-free `tools/semver-lite.mjs`.
|
|
60
|
+
- **Placed bridges refresh on `init` and `upgrade`.** A refresh-only driver in `setup-backends.mjs`
|
|
61
|
+
(`--refresh-placed`) refreshes proven-managed placed bridges and NEVER places an absent one —
|
|
62
|
+
placement stays opt-in via `/agent-workflow-kit setup`. `npx … init` calls it best-effort (a miss
|
|
63
|
+
is a loud warning + a recovery command composed from the resolved install target + exit 0;
|
|
64
|
+
`--no-bridges` opts out; win32 is a stated skip); `Mode: upgrade` runs it as a fourth
|
|
65
|
+
stamp-independent reconcile and pastes the output verbatim. **Never-downgrade:** a placed bridge
|
|
66
|
+
NEWER than the bundle is a stated keep + "update the kit", enforced at both the plan and the write
|
|
67
|
+
boundary (TOCTOU re-inspect at apply); an unparseable version is treated as legacy repair, stated.
|
|
68
|
+
- **The one-line backend status is machine-composed.** `tools/recipes.mjs --status-line` emits the
|
|
69
|
+
exact line (deterministic order, one alias table; additive `statusLine` in `--json`; strict argv —
|
|
70
|
+
an unknown flag exits loudly instead of masquerading as the human render); SKILL.md now says run
|
|
71
|
+
the tool and paste its line verbatim — the realistic example that once got echoed as fact is
|
|
72
|
+
replaced by an explicitly-placeholder template.
|
|
73
|
+
- **The installer speaks facts.** The final verb is keyed on the OBSERVED version comparison
|
|
74
|
+
(installed / updated / refreshed-the-already-current / downgraded-under-`--allow-downgrade`); the
|
|
75
|
+
same-version note states that the copy ran (a re-run repairs locally modified files) + a
|
|
76
|
+
CONDITIONAL `@latest` hint; the false "npx likely served a cached build" accusation is gone. One
|
|
77
|
+
message contract with the engine installer (engine `1.9.0`).
|
|
78
|
+
- Lens sync everywhere — "placed by `setup` (opt-in), refreshed by `init`/`upgrade` once placed" —
|
|
79
|
+
across SKILL.md, both READMEs and `family-members.mjs`, guarded by the new region+token
|
|
80
|
+
`test/init-refresh-lens.test.mjs` (non-vacuous, injected red→green proven).
|
|
81
|
+
|
|
7
82
|
## 1.25.0 — The bridge driving contract at the point of use (advisor render + wrapper `--help`)
|
|
8
83
|
|
|
9
84
|
A **feature** release (additive; ships the bundled bridges at **2.1.0**). An agent told to run a
|
package/README.md
CHANGED
|
@@ -139,8 +139,9 @@ npx @sabaiway/agent-workflow-kit@latest init
|
|
|
139
139
|
```
|
|
140
140
|
|
|
141
141
|
`init` installs/refreshes the skill at `~/.claude/skills/agent-workflow-kit/` and wires launchers for
|
|
142
|
-
any Claude Code / Codex / Devin Desktop it finds. It **does not** deploy into a project, and **
|
|
143
|
-
|
|
142
|
+
any Claude Code / Codex / Devin Desktop it finds. It **does not** deploy into a project, and **never
|
|
143
|
+
places** the optional bridges — **once placed** (by `/agent-workflow-kit setup`) it **refreshes** them
|
|
144
|
+
from its bundled copies (never a downgrade; skip with `--no-bridges`).
|
|
144
145
|
|
|
145
146
|
### 2. Deploy into a project — once per repo
|
|
146
147
|
|
|
@@ -202,11 +203,13 @@ refreshes the other npm core members so a returning `init` leaves **no stale cor
|
|
|
202
203
|
| `~/.claude/skills/agent-workflow-kit/` | the kit itself (refreshed on every `init`) |
|
|
203
204
|
| `~/.claude/skills/agent-workflow-memory/` | the **memory substrate**, refreshed via `npx @sabaiway/agent-workflow-memory@latest init` — **best-effort:** a failure is a **loud degraded success** (warning + the exact recovery command + exit 0), never silent; skip with `--no-memory` |
|
|
204
205
|
| `~/.claude/skills/agent-workflow-engine/` | the **methodology engine** the kit reads live, refreshed via `npx @sabaiway/agent-workflow-engine@latest init` — **required** (the live read STOPs without it); skip with `--no-engine` |
|
|
206
|
+
| `~/.claude/skills/{codex,antigravity}-cli-bridge/` | the placed **bridges**, refreshed from the kit's bundled copies (local files, no network) — **only if `/agent-workflow-kit setup` already placed them**: an absent bridge is never placed, a newer one never downgraded; skip with `--no-bridges` |
|
|
205
207
|
| `~/.codex/skills/agent-workflow-kit` | a symlink — only if you have Codex |
|
|
206
208
|
| `…/global_workflows/agent-workflow-kit.md` | a managed file — only if you have Devin Desktop |
|
|
207
209
|
|
|
208
|
-
The **execution-backend bridges** (`codex` / `agy`) are **
|
|
209
|
-
demand with `/agent-workflow-kit setup
|
|
210
|
+
The **execution-backend bridges** (`codex` / `agy`) are never first **placed** by `init` — set one up
|
|
211
|
+
on demand with `/agent-workflow-kit setup`; after that, a returning `init` keeps the placed copy
|
|
212
|
+
fresh (the table row above). Your other Codex skills and Devin Desktop workflows are
|
|
210
213
|
never touched. If one of those exact slots already holds a file the kit didn't write, it is **left
|
|
211
214
|
alone** and you're told — re-run with `--force` to replace it (the original is first copied to
|
|
212
215
|
`*.bak.<timestamp>` and the restore command is printed).
|
|
@@ -222,9 +225,10 @@ file), or run the guarded `/agent-workflow-kit uninstall`.
|
|
|
222
225
|
| Command | When | What happens |
|
|
223
226
|
|---------|------|--------------|
|
|
224
227
|
| `/agent-workflow-kit` | new / empty project | recon → **asks visible-or-hidden** + **conversational language** + **agent attribution** (default off) → deploys `AGENTS.md` + `docs/ai/` filled with real recon data → installs enforcement → **asks before committing** |
|
|
225
|
-
| `/agent-workflow-kit upgrade` | existing deployment | reads `docs/ai/.workflow-version`, shows the changelog diff, preserves your authored memory, applies migrations, re-stamps — then prints a **read-only** one-line backend-status line (what's set up vs missing); never installs a
|
|
228
|
+
| `/agent-workflow-kit upgrade` | existing deployment | reads `docs/ai/.workflow-version`, shows the changelog diff, preserves your authored memory, applies migrations, re-stamps — then prints a **read-only** one-line backend-status line (what's set up vs missing); refreshes the already-placed bridges from the kit's bundled copies (never installs a new one — set one up with `/agent-workflow-kit setup`) |
|
|
226
229
|
| `/agent-workflow-kit help` | any time | **read-only command index** — every command, grouped (Inspect / Configure / Orchestrate / Lifecycle) and tagged read-only / writer / guarded. The discoverable entry point, and where any unrecognized invocation lands (always read-only — a garbage invocation never writes). Never writes, never commits, never runs a subscription CLI. |
|
|
227
230
|
| `/agent-workflow-kit backends` | any time | **read-only** check of the optional execution-backends (the `codex` / `agy` bridges): what's set up vs missing and the next step. Never writes, never commits, never runs a subscription CLI (credentials = marker-file presence, not a live login). |
|
|
231
|
+
| `/agent-workflow-kit gates` | any time | **project gate runner** — runs the verification commands **your project itself declares** in `docs/ai/gates.json` (seeded at deploy; hand-editable `{ id, title, cmd }` entries, each `cmd` one bash line) as one batch: a per-gate **PASS/FAIL table** + one machine-readable summary line, exit 0 iff all green; a failing gate's own output is shown verbatim; `--only <id>` re-runs one. Honest distinct outcomes for a missing / empty / malformed declaration — never a silent green. The runner writes nothing and never commits; it executes only your own declared commands (a batching convenience, not a sandbox). |
|
|
228
232
|
| `/agent-workflow-kit setup [backend]` | opt-in, any time | **link-only** auto-setup of a bridge: places the bundled bridge skill (only into an absent / empty / managed dir — never overwrites an unmanaged one) + links its wrappers onto `PATH` via managed symlinks (idempotent; refuses to clobber a non-symlink; try `--dry-run` to preview). The binary install + the one-time subscription login stay **manual**: it prints the exact **login** command and points the binary install at each bridge's `setup/README.md`. POSIX wrappers — on Windows use WSL. Never commits, never runs a subscription CLI. |
|
|
229
233
|
| `/agent-workflow-kit status` | any time | **read-only** single view of **versions + deployment + settings + bridges**: which members (kit / memory / engine / the two bridges) are installed and at what version (with an honest "installed on this machine" note when one is behind) and — in a project — what's deployed (`docs/ai`, the version stamps, and the **visibility**: visible / hidden / unclear), plus your settings (orchestration recipes, attribution, velocity) and the bridges' readiness. The two version axes (package number vs deployment-structure head) stay decoupled. Never writes, never commits, never runs a subscription CLI. |
|
|
230
234
|
| `/agent-workflow-kit recipes` | any time | **read-only** orchestration advisor: presents four named recipes for composing the bridges into plan → execute → review — **Solo / Reviewed / Council / Delegated** — plans + recommends one for your environment (degrading with a stated reason when a backend isn't ready), and offers the choice. The orchestrator runs it via the bridge skills and **always commits**; the kit never executes a recipe, never runs a subscription CLI, never commits. |
|
|
@@ -232,6 +236,7 @@ file), or run the guarded `/agent-workflow-kit uninstall`.
|
|
|
232
236
|
| `/agent-workflow-kit set-recipe` | any time | **config writer** for `docs/ai/orchestration.json`: tell the agent your preference in plain language and it maps it to explicit `--set <activity>.<slot>=<recipe>` / `--unset` ops; the kit validates, **previews by default**, and writes only on `--write` (deployment-gated, atomic, symlink/TOCTOU-safe), resolving the effective recipe vs live readiness. Writes **only** that file — **never runs a backend, never commits**; hand-editing stays fully supported. |
|
|
233
237
|
| `/agent-workflow-kit uninstall` | opt-in, any time | **guarded teardown** — the inverse of `init` / `setup`. Removes only what's **provably ours** (managed skill dirs + bridge wrappers; in a project, the hidden-mode git-ignore block it added + the pre-commit hook it installed); **never deletes** your `docs/ai` / `AGENTS.md` (prints the exact `rm` to run by hand) or your `.claude/settings.json` (prints an **edit** — remove the attribution key, review any velocity `permissions.*` — never an `rm`). Always `--dry-run` first; preflight-then-mutate; never commits. |
|
|
234
238
|
| `/agent-workflow-kit velocity` | Claude Code · opt-in | **onboarding velocity profile** — seeds a fixed, audited **read-only** allowlist into `.claude/settings.json` so routine read-only commands stop idling on approval prompts while you're away; opt-in `acceptEdits`; plus a **read-only advisory** of likely project gate commands to add by hand. Writes **only** `.claude/settings.json` — **never** allowlists commit/push/publish, never writes `settings.local.json`, never commits. A seeded entry is a **trust posture, not a sandbox** (a redirection/command-substitution residual remains, closed by a deferred hook); a direct commit/push/publish still asks. `--dry-run` first. |
|
|
239
|
+
| `/agent-workflow-kit agents` | Claude Code · opt-in | **cheap-lane subagents** — places bundled subagent definitions (`.claude/agents/`) pinned to a **cheap model** (haiku, low effort, read-only tools) for mechanical work: extraction sweeps, changelog fact-skeletons, gate-failure triage. Judgment, review, and real code stay on your main lane — these vehicles only extract and draft, and their output is verified. Preview by default (`--apply` writes); an existing customized file is **preserved, never overwritten**; never touches `settings*.json`, never commits. |
|
|
235
240
|
|
|
236
241
|
It **never auto-commits** and **never overwrites** an existing `AGENTS.md` without asking.
|
|
237
242
|
|
|
@@ -274,8 +279,9 @@ agent-workflow-kit — the composition root (installed via npx … init)
|
|
|
274
279
|
**orchestration recipes** (Solo / Reviewed / Council / Delegated) — read **live** from the installed
|
|
275
280
|
**`agent-workflow-engine`** (the canonical narrative; a published member, never one of the shipped
|
|
276
281
|
backends). `/agent-workflow-kit recipes` surfaces + plans a recipe for your environment, read-only.
|
|
277
|
-
- **Detects & (opt-in) sets up** the optional `codex` / `agy` **bridges** — agent skills (not npm
|
|
278
|
-
|
|
282
|
+
- **Detects & (opt-in) sets up** the optional `codex` / `agy` **bridges** — agent skills (not npm;
|
|
283
|
+
never first placed by `init` — `setup` places them, and once placed `init`/`upgrade` refresh
|
|
284
|
+
them). They plug into the workflow's **execute** and **review** phases — for *what
|
|
279
285
|
each adds and why*, see the
|
|
280
286
|
[family front door](https://github.com/sabaiway/agent-workflow#readme). `/agent-workflow-kit backends`
|
|
281
287
|
reports readiness **read-only**;
|
package/SKILL.md
CHANGED
|
@@ -3,7 +3,7 @@ name: agent-workflow-kit
|
|
|
3
3
|
description: Deploy or upgrade a portable AI-agent memory-and-workflow system in any project. Use when the user wants to bootstrap `docs/ai/` + an entry-point `AGENTS.md` (+ `CLAUDE.md` alias) + cap/archive/index enforcement in a new or existing repo, set up the Memory Map and session protocols, install the docs-rotation pre-commit hook, or run `/agent-workflow-kit` / `/agent-workflow-kit upgrade`. Triggers on phrases like "set up the memory system", "deploy the AI workflow here", "bootstrap docs/ai", "upgrade the workflow".
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
metadata:
|
|
6
|
-
version: '1.
|
|
6
|
+
version: '1.27.0'
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# agent-workflow-kit
|
|
@@ -31,7 +31,10 @@ runtime dependency placed by `init` and read live; see *Methodology slot reconci
|
|
|
31
31
|
`init` also **refreshes the installed memory substrate** (best-effort — a miss is a loud DEGRADED
|
|
32
32
|
success: a warning with the exact recovery command + exit 0, never silent, never the engine's hard
|
|
33
33
|
STOP; `--no-memory` skips it), so a returning `init` leaves **no stale core member**. The
|
|
34
|
-
execution-backend bridges are still **
|
|
34
|
+
execution-backend bridges are still never **placed** by `init` (placed on demand by `setup`, opt-in);
|
|
35
|
+
**once placed**, `init` **refreshes** them from the kit's own bundled copies (refresh-only, local
|
|
36
|
+
files, never a downgrade; `--no-bridges` skips it) — so a returning `init` leaves no stale placed
|
|
37
|
+
bridge either.
|
|
35
38
|
|
|
36
39
|
**Detection (kit-owned, decided BEFORE any project write).** Run the kit's **own shipped**
|
|
37
40
|
validator — `node ${CLAUDE_SKILL_DIR}/tools/manifest/validate.mjs <memory-skill-dir>` — never a
|
|
@@ -106,15 +109,17 @@ Pick the mode from the user's invocation. Auto-detect an existing `docs/ai/` to
|
|
|
106
109
|
|
|
107
110
|
- **`/agent-workflow-kit`** (default) — bootstrap a new or empty project. If `docs/ai/` already exists, stop and ask whether they meant `upgrade`.
|
|
108
111
|
- **`/agent-workflow-kit upgrade`** — upgrade an existing deployment to the skill's current `version`.
|
|
109
|
-
- **`/agent-workflow-kit help`** — read-only **command index**: enumerate every command, grouped (Inspect / Configure / Orchestrate / Lifecycle) and tagged read-only / writer / guarded. The single discoverable entry point, and the landing spot for any unrecognized invocation. Never writes, never commits, never runs a subscription CLI.
|
|
112
|
+
- **`/agent-workflow-kit help`** — read-only **command index**: enumerate every command, grouped (Inspect / Configure / Orchestrate / Lifecycle) and tagged read-only / writer / guarded / runs-project-commands. The single discoverable entry point, and the landing spot for any unrecognized invocation. Never writes, never commits, never runs a subscription CLI.
|
|
113
|
+
- **`/agent-workflow-kit gates`** — run the **project's own declared gate commands** (`docs/ai/gates.json`) as one batch: per-gate PASS/FAIL table + one machine-readable summary line, exit 0 iff all green. The runner itself writes nothing and never commits; what it executes is the project's own declaration (trust posture — a batching convenience, not a sandbox). See *Mode: gates*.
|
|
110
114
|
- **`/agent-workflow-kit backends`** — read-only environment check: which optional **execution-backends** (the `codex` / `agy` bridges) are set up vs missing. Never writes, never commits, never runs a subscription CLI.
|
|
111
|
-
- **`/agent-workflow-kit setup [backend]`** — the **link-only**, opt-in companion to `backends`: place the bundled bridge skill + link its wrappers onto `PATH`. **In-agent only** — `init` (npx) never places bridges. The binary install + the interactive subscription login stay **manual** (it prints the exact commands); idempotent; refuses to clobber a non-symlink; never commits, never runs a subscription CLI.
|
|
115
|
+
- **`/agent-workflow-kit setup [backend]`** — the **link-only**, opt-in companion to `backends`: place the bundled bridge skill + link its wrappers onto `PATH`. **In-agent only** — `init` (npx) never *places* bridges; once placed, `init`/`upgrade` refresh them (refresh-only). The binary install + the interactive subscription login stay **manual** (it prints the exact commands); idempotent; refuses to clobber a non-symlink; never commits, never runs a subscription CLI.
|
|
112
116
|
- **`/agent-workflow-kit status`** — read-only view of the **whole family**: which members (kit / memory / engine / the two bridges) are installed, at what version, and — in a project — what is deployed (`docs/ai`, the version stamps, the hidden-mode fence). Never writes, never commits, never runs a subscription CLI.
|
|
113
117
|
- **`/agent-workflow-kit recipes`** — read-only **orchestration advisor**: present the four recipes (Solo / Reviewed / Council / Delegated) over the bridges' role vocabulary, plan + recommend one for the current environment, and offer the choice. **The orchestrator executes the chosen recipe via the bridge skills and always commits** — the kit only surfaces/selects/plans it; it never executes a recipe, never runs a subscription CLI, never commits.
|
|
114
118
|
- **`/agent-workflow-kit procedures <activity>`** — read-only **activity-procedures advisor**: print the ordered steps of a named activity (`plan-authoring` / `plan-execution`) read **live** from the installed engine (`references/procedures.md`), and the **resolved effective recipe per slot** from the per-project `docs/ai/orchestration.json` (strict JSON; agent-writable via `set-recipe` or hand-edit) + backend readiness (default = Reviewed when a backend is ready, Council on request, slot-aware incl. Delegated; graceful default vs loud override degradation) — plus, for every dispatched backend, the **full driving contract at the point of use**: the exact copy-pasteable invocation descriptor(s), the grounding levers (agy `--facts`/`--decided`), the round-2 `--continue` delta, and the guarded passthrough tiers, rendered verbatim from the bridge manifests (drift-guarded; each wrapper's `--help` prints the same contract). A per-run `--override <slot>=<recipe>` overrides one slot. Composes with `recipes` (which stays read-only); never writes, never commits, never runs a subscription CLI.
|
|
115
119
|
- **`/agent-workflow-kit set-recipe`** — the **config writer** for `docs/ai/orchestration.json`: turn the user's plain language into explicit `--set <activity>.<slot>=<recipe>` / `--unset` ops; the kit validates, merges, **previews by default**, and writes only on `--write` (deployment-gated, atomic, symlink/TOCTOU-safe). Resolves the effective recipe vs live readiness (degradation honesty on both paths). **Writes only `docs/ai/orchestration.json`; never runs a backend, never commits.** Hand-editing the file stays fully supported.
|
|
116
120
|
- **`/agent-workflow-kit uninstall`** — the **guarded teardown** companion to `init`/`setup`. Removes what they placed — installed skill dirs + the bridge wrappers — and, in a project, reverses the hidden-mode fence + the marker pre-commit hook. **Never deletes user-authored content**: it prints the exact `rm` for `docs/ai` / `AGENTS.md` and an **edit** for `.claude/settings.json` (the `includeCoAuthoredBy` key + any velocity `permissions.*`), for you to run by hand. `--dry-run` first, always; preflight-then-mutate; never commits.
|
|
117
121
|
- **`/agent-workflow-kit velocity`** — opt-in onboarding **velocity profile**: seed a fixed, audited **read-only** Claude Code allowlist into `.claude/settings.json` so routine read-only commands stop idling on approval prompts; opt-in `acceptEdits`; plus a **read-only advisory** of likely project gate commands to add by hand. **Writes only `.claude/settings.json`, never allowlists commit/push/publish, never writes `settings.local.json`, never commits.** `--dry-run` first.
|
|
122
|
+
- **`/agent-workflow-kit agents`** — opt-in **cheap-lane subagent placement**: place the bundled haiku/low-effort, read-only-tool subagent definitions (mechanical sweeps, changelog skeletons, gate triage) into the project's `.claude/agents/` so mechanical work stops defaulting to a frontier model. **Writes only under `.claude/agents/`, never overwrites a customized file, never touches `settings*.json`, never commits.** Claude-Code-specific; `--dry-run` first. See *Mode: agents*.
|
|
118
123
|
|
|
119
124
|
### Version status & the two axes — the internal routing check
|
|
120
125
|
|
|
@@ -124,7 +129,7 @@ Before acting, read `docs/ai/.workflow-version` (the project's stamp) to decide
|
|
|
124
129
|
|
|
125
130
|
- **absent** → bootstrap (a fresh deployment).
|
|
126
131
|
- **stamp < `1.3.0`** (the deployment-lineage head) → `upgrade`.
|
|
127
|
-
- **stamp == `1.3.0`** → already current; only the stamp-independent reconciles may run
|
|
132
|
+
- **stamp == `1.3.0`** → already current; only the stamp-independent reconciles may run — the FULL set lives in *Mode: upgrade* step 3 (pointer slots · hidden-mode footprint · both `.json` config ensures · the enforcement-script ensure · the placed-bridge refresh); run step 3 rather than enumerating from memory.
|
|
128
133
|
- **stamp > head / unparseable** → STOP — never-downgrade gate (see *Mode: upgrade* step 2).
|
|
129
134
|
|
|
130
135
|
**Two independent version axes — never conflate them:**
|
|
@@ -137,29 +142,32 @@ Before acting, read `docs/ai/.workflow-version` (the project's stamp) to decide
|
|
|
137
142
|
### The one-line backend-status line (shared by bootstrap + upgrade)
|
|
138
143
|
|
|
139
144
|
Bootstrap (step 11) and **every** successful `upgrade` exit (steps 4 + 8) print the **same**
|
|
140
|
-
read-only, one-line summary of the optional execution-backends.
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
`
|
|
145
|
-
|
|
145
|
+
read-only, one-line summary of the optional execution-backends. The line is **machine-composed** —
|
|
146
|
+
run the status-line composer and **paste its single emitted line verbatim**:
|
|
147
|
+
`node ${CLAUDE_SKILL_DIR}/tools/recipes.mjs --status-line`
|
|
148
|
+
The tool runs the backend detector and appends the recipe recommendation itself
|
|
149
|
+
(`composeStatusLine`); the agent **composes nothing factual** — no readiness token, no glyph, no
|
|
150
|
+
recipe clause of its own, ever.
|
|
151
|
+
|
|
152
|
+
- **Placeholder template (structure only — never copy this example; paste the tool's line):**
|
|
153
|
+
`backends: <alias> <✓|✗> <readiness> · <alias> <✓|✗> <readiness> — run /agent-workflow-kit backends · recipes: <recommendation clause> — see /agent-workflow-kit recipes`
|
|
146
154
|
- The **`recipes:` clause is appended after** the `— run /agent-workflow-kit backends` pointer (never
|
|
147
155
|
replacing it) and routes to the read-only `recipes` mode (`see /agent-workflow-kit recipes`). It is
|
|
148
156
|
**never blank**: both backends ready → *"Council available, Reviewed the everyday default"*; one
|
|
149
157
|
ready → *"Reviewed available (via …)"*; **none installed → *"Solo — run /agent-workflow-kit setup to
|
|
150
158
|
add a backend"***; a backend present-but-not-ready → Solo with that backend's specific remedy.
|
|
151
|
-
(
|
|
159
|
+
(Composed by `recommendRecipe` inside the same tool run — never by the agent.)
|
|
152
160
|
- **Invariants:** **read-only · never blocks the commit gate · never runs a subscription CLI · the
|
|
153
161
|
pointer is the in-agent `backends` mode, never a network fetch · the appended `recipes:` clause
|
|
154
|
-
routes to the in-agent `recipes` mode the same way · `init`/npx
|
|
155
|
-
|
|
156
|
-
- **
|
|
162
|
+
routes to the in-agent `recipes` mode the same way · `init`/npx never *places* bridges (it
|
|
163
|
+
refreshes only what `setup` already placed, AD-011 §5).**
|
|
164
|
+
- **Composer unavailable → skip with a stated reason, never silently.** The composer is a Node script
|
|
157
165
|
the **agent host** runs (not the target project), so the only skip condition is "**the agent host
|
|
158
|
-
can't run it**" — `node` is not on the agent's PATH, or the
|
|
166
|
+
can't run it**" — `node` is not on the agent's PATH, or the tool itself errors — **not** "the
|
|
159
167
|
project has no Node runtime". On that condition, skip the line and say so **with the concrete
|
|
160
|
-
reason**, e.g. *"Couldn't run the backend
|
|
161
|
-
I'm skipping the backend-status line."* — never a silent skip (Hard Constraint — no
|
|
162
|
-
failures).
|
|
168
|
+
reason**, e.g. *"Couldn't run the backend status-line composer here (node is not on the agent host
|
|
169
|
+
PATH), so I'm skipping the backend-status line."* — never a silent skip (Hard Constraint — no
|
|
170
|
+
silent failures).
|
|
163
171
|
|
|
164
172
|
### The version block + welcome mat (shared by bootstrap + upgrade)
|
|
165
173
|
|
|
@@ -206,8 +214,12 @@ the rest of the report — and the commit gate — proceeds.
|
|
|
206
214
|
line, print *"Run `/agent-workflow-kit help` to see every command."* then **one** recommended next
|
|
207
215
|
step, chosen **caveat-aware** from signals already in hand (the version block's notes + the
|
|
208
216
|
backend-status line — no new helper call) in this priority order:
|
|
209
|
-
1. a member is **behind** (
|
|
210
|
-
|
|
217
|
+
1. a member is **behind** (a behind-class `installed[].notes` caveat fired — any member, the bridges
|
|
218
|
+
included) → *refresh the behind member first*, quoting **that note's own recovery command
|
|
219
|
+
verbatim** (a memory/engine note carries its `npx …@latest init` + restart the session; a bridge
|
|
220
|
+
note carries `/agent-workflow-kit setup`). An **uncheckable** member ("couldn't be checked" — an
|
|
221
|
+
unknown-freshness note) is **never** a refresh trigger: only a behind note fires this step — the
|
|
222
|
+
uncheckable note already appears in the version block, add nothing more;
|
|
211
223
|
2. else **no backend is ready** (the backend-status line shows none ready) → *set one up with
|
|
212
224
|
`/agent-workflow-kit setup`*;
|
|
213
225
|
3. else **a backend is ready but the orchestration config is still all-Solo** (no `reviewed` /
|
|
@@ -245,10 +257,24 @@ or on an explicit ask.
|
|
|
245
257
|
|
|
246
258
|
Read-only. The single discoverable **command index** — it answers *"what can `/agent-workflow-kit` do, and which commands change things?"* It **never writes, never commits, and never runs a subscription CLI**.
|
|
247
259
|
|
|
248
|
-
Run `node ${CLAUDE_SKILL_DIR}/tools/commands.mjs` (add `--json` for the machine-readable catalog) and present its grouped index — **Inspect / Configure / Orchestrate / Lifecycle**, each command tagged **read-only / writer / guarded** — in the user's conversational language. That catalog is the **single source of truth** for the command surface (the same one the bootstrap / upgrade report footers point at); `routeInvocation(token)` in the same file is the executable contract for which invocation maps to which mode.
|
|
260
|
+
Run `node ${CLAUDE_SKILL_DIR}/tools/commands.mjs` (add `--json` for the machine-readable catalog) and present its grouped index — **Inspect / Configure / Orchestrate / Lifecycle**, each command tagged **read-only / writer / guarded / runs-project-commands** (the last: the kit writes nothing, but the mode executes the project's OWN declared commands — the `gates` runner) — in the user's conversational language. That catalog is the **single source of truth** for the command surface (the same one the bootstrap / upgrade report footers point at); `routeInvocation(token)` in the same file is the executable contract for which invocation maps to which mode.
|
|
249
261
|
|
|
250
262
|
`help` is also the landing spot for any **unrecognized or ambiguous** invocation — and that path is **always read-only** (the safe-routing rule under *Version status & the two axes*). When you arrive here that way, render the index and, in plain language, note that the invocation wasn't recognized so nothing was changed.
|
|
251
263
|
|
|
264
|
+
### Mode: gates
|
|
265
|
+
|
|
266
|
+
The **generic project gate runner** — it batches the project's OWN declared verification commands into one run. The runner itself **writes nothing, never commits, and never runs a subscription CLI**; what it EXECUTES is the project's own declaration, with the caller's privileges (trust posture: a batching convenience over commands the project already runs by hand — **not a sandbox**).
|
|
267
|
+
|
|
268
|
+
Run `node ${CLAUDE_SKILL_DIR}/tools/run-gates.mjs [--cwd <project>] [--only <id>]…`:
|
|
269
|
+
|
|
270
|
+
1. **Reads `docs/ai/gates.json`** (strict JSON, hand-editable; seeded from `references/templates/gates.json`). Each gate is `{ id, title, cmd }` — `id` a unique kebab handle, `cmd` **ONE bash command line** (brace/glob expansion works; a host without bash gets a loud preflight error, exit 6 — never a silent reinterpretation under another shell). The declaration names **WHAT to check, never who executes it** — the schema has no lane/model/routing fields and rejects unknown keys loudly.
|
|
271
|
+
2. **Runs each gate from the project root** and prints a per-gate **PASS/FAIL table** plus **one machine-readable summary line** as the last line (`[run-gates] status=… gates=… passed=… failed=… failed_ids=…`). A failing gate's own output is preserved **verbatim** (triage without re-running); a green gate's output is not echoed; gates after a failure still run. **Exit 0 iff all selected gates are green.**
|
|
272
|
+
3. **Honest outcomes, each distinct — never a silent green:** a **missing** declaration (exit 3 — the report names the recovery: create `docs/ai/gates.json` from the template; `upgrade` re-seeds a missing one), an **empty** `gates` list (exit 4), a **malformed/invalid** declaration (exit 5, loud `path: reason`). Repeatable **`--only <id>`** re-runs a subset; an unknown id is a loud usage error (exit 2).
|
|
273
|
+
|
|
274
|
+
The declaration is **seeded at bootstrap** (the template loop, step 6) and **ensured-if-missing on upgrade** from THIS kit's own template twin (*Mode: upgrade* step 3) — independent of the installed memory substrate's age; an existing file is always **preserved byte-for-byte**. It is deliberately **not** a delegation-required memory asset: gates are optional, and absence is an honest runner outcome, not a deployment failure.
|
|
275
|
+
|
|
276
|
+
**Invariants:** the runner writes nothing · never commits · never runs a subscription CLI · executes only the project's OWN declared commands (never a kit-invented one) · the bash contract fails loud, never reinterprets.
|
|
277
|
+
|
|
252
278
|
### Mode: bootstrap
|
|
253
279
|
|
|
254
280
|
> Bundled sources below (templates, scripts) live in **this skill's own directory** — `${CLAUDE_SKILL_DIR}/` in Claude Code, or the folder containing this `SKILL.md` in Codex / other agents. Use that as the copy/read source; the working directory is the **target project**, not the skill.
|
|
@@ -267,7 +293,7 @@ Run `node ${CLAUDE_SKILL_DIR}/tools/commands.mjs` (add `--json` for the machine-
|
|
|
267
293
|
3. **Choose conversational language — ASK the user explicitly and wait for the answer.** Which language should the agent *talk to them* in — questions, explanations, summaries, status updates? Offer the language they're already writing in as the default. Carry the answer into the `{{COMM_LANGUAGE}}` slot of the *Communication language* block when `AGENTS.md` is created (step 5). See [Communication contract](references/contracts.md#communication-contract). This sets the **dialogue** language only — never the files.
|
|
268
294
|
4. **Choose agent attribution — ASK the user explicitly and wait for the answer.** May the agent attribute work to itself / to AI — `Co-Authored-By` trailers, "Generated with …" footers, "AI"/agent/model mentions in code, comments, commit messages, PR titles/bodies, or docs? **Default to `off`** (no agent/AI mention anywhere) unless they opt in — people are routinely surprised to find an AI listed as a repo contributor. Carry the answer into the `{{AGENT_ATTRIBUTION}}` slot of the *Attribution* block when `AGENTS.md` is created (step 5). **If `off` and the project uses Claude Code**, also set `"includeCoAuthoredBy": false` in the project's `.claude/settings.json` (create it if absent) — the trailer is added by the harness, so a doc directive alone won't stop it. See [Attribution contract](references/contracts.md#attribution-contract).
|
|
269
295
|
5. **Entry-point doc.** If `AGENTS.md` / `CLAUDE.md` already exist (step-1 recon), do **not** overwrite — show the user and ask whether to merge or replace. Otherwise create `AGENTS.md` (the cross-agent standard — Codex / Cursor / Devin Desktop / Copilot read it natively) from `${CLAUDE_SKILL_DIR}/references/templates/AGENTS.md`, and symlink `CLAUDE.md -> AGENTS.md` (`ln -s AGENTS.md CLAUDE.md`) for Claude Code — single source, no duplication. For nested context, add a subdir `AGENTS.md` (+ a `CLAUDE.md` symlink beside it for Claude Code).
|
|
270
|
-
6. **Deploy `docs/ai/`.** Create every `docs/ai/` file + `pages/` from `${CLAUDE_SKILL_DIR}/references/templates/` (the template loop deploys each non-`AGENTS.md` template — the `.md` docs **and** the seeded, user-editable **`docs/ai/orchestration.json`**
|
|
296
|
+
6. **Deploy `docs/ai/`.** Create every `docs/ai/` file + `pages/` from `${CLAUDE_SKILL_DIR}/references/templates/` (the template loop deploys each non-`AGENTS.md` template — the `.md` docs **and** the two seeded, user-editable strict-JSON configs: **`docs/ai/orchestration.json`** (the per-project recipe defaults the `procedures` advisor reads) and **`docs/ai/gates.json`** (the project's gate declaration — an empty list to fill with its own verification commands, consumed by *Mode: gates*)). Keep each `.md` file's frontmatter (`type / lastUpdated / scope / staleAfter / owner / maxLines`); the `.json` seeds carry no frontmatter (the docs cap-validator globs `*.md` only, so they are inherently skipped).
|
|
271
297
|
7. **Fill templates** per the table below.
|
|
272
298
|
8. **Install enforcement (Node projects).** Copy `${CLAUDE_SKILL_DIR}/references/scripts/*.mjs` (+ `*.test.mjs`) into the project's `scripts/`. They self-configure (project name from `package.json`, hierarchical/on-demand sections auto-discovered). **If the project has no Node runtime** (step-1 recon), skip this step and the hook in step 9 — follow the cap/archive/index policy manually, or port the scripts to the project's language.
|
|
273
299
|
9. **Wire / hide** per visibility (see [Visibility contract](references/contracts.md#visibility-contract)). Install the pre-commit hook (Node projects): `node scripts/install-git-hooks.mjs`. If the installer reports a pre-existing non-marker hook, stop and ask the user to merge it manually rather than overwriting.
|
|
@@ -316,15 +342,31 @@ Fill strategy:
|
|
|
316
342
|
**Hidden-mode footprint reconcile — stamp-independent, same gate, BEFORE the equal-head short-circuit (D9 / AD-014).** A deployment does not record whether it chose `hidden`, so first **infer visibility**: `node ${CLAUDE_SKILL_DIR}/tools/hide-footprint.mjs --dir <project> --reconcile --dry-run` (writes **zero bytes**). It reports one of — **visible** (the entry point is tracked) → nothing to do; **ambiguous** (untracked but not ignored — could be a fresh uncommitted repo, or a hide that broke) → **ASK** the user which it is, never guess; **hidden** → re-run without `--dry-run` to migrate any older **machine-global** hide to the **project-local** `.git/info/exclude` (one managed block; folds in the legacy `.claude/skills/` line), idempotently (a clean re-run is zero-diff). Handle its surfaced paths exactly as bootstrap step 9 (already-committed → show `git rm --cached`, ask before `--include`; generic-name present file → ask; **leftover machine-wide ignore block → ASK before `--remove-global`**, default keep + report). No Node on the agent host / Windows → as step 9. This runs on **every** hidden upgrade, like the methodology slot — no lineage-head bump, no migration file.
|
|
317
343
|
|
|
318
344
|
**Orchestration config ensure (seed-or-refresh) — stamp-independent, same gate, BEFORE the equal-head short-circuit.** Ensure `docs/ai/orchestration.json` exists **and its onboarding note is current**: **create it from the template if missing**; **if it already exists, preserve every activity/slot the user set, and refresh ONLY the `_README` note when the existing one still matches a known prior canonical** — the tested `refreshIfCanonical` / `refreshReadme` in `tools/orchestration-config.mjs` is the source of truth for that decision (normalize CRLF/whitespace before comparing; a *customized* `_README` is preserved verbatim; a *malformed* existing config is **preserved + a loud warning**, never clobbered or silently skipped). The current note points at `/agent-workflow-kit set-recipe` (the config is now agent-writable — no more "never written for you"). **The refresh helper is kit-owned** — in the **delegated** path memory only seeds/preserves the file (memory upgrade step 2) and the **kit** then applies the `_README` refresh; in the **fallback** path the kit seeds-or-refreshes directly from `${CLAUDE_SKILL_DIR}/references/templates/orchestration.json`. (Memory stays standalone — it never depends on this helper.) Like the pointer slots + the footprint reconcile, this reaches an equal-head (`1.3.0`) deployment **without a lineage-head bump or a migration file** (it is a `.json`, inherently outside the docs cap-validator). Report it in the step 4 / step 8 success report (config *seeded* / *note refreshed* / *already current* / *customized — preserved*).
|
|
345
|
+
|
|
346
|
+
**Gate-declaration ensure (seed-if-missing) — stamp-independent, same gate, BEFORE the equal-head short-circuit.** Ensure `docs/ai/gates.json` exists: **create it from `${CLAUDE_SKILL_DIR}/references/templates/gates.json` if missing** — the kit's OWN template twin, so this works even when the installed memory substrate predates the gates feature (a stale memory never silently loses it); **an existing file is preserved byte-for-byte** (a project's declared gate matrix is authored content — never clobbered, never refreshed in place; unlike the orchestration `_README` there is no note-refresh here). Report it in the step 4 / step 8 success report (*seeded* / *already present*). Like the config ensure, this reaches an equal-head deployment without a lineage-head bump or a migration file (a `.json`, inherently outside the docs cap-validator).
|
|
347
|
+
|
|
348
|
+
**Enforcement-script ensure (seed-if-missing) — stamp-independent, same gate, BEFORE the equal-head short-circuit.** A deployment older than the ADR-cascade feature has no `scripts/archive-decisions.mjs`, and an equal-head exit would otherwise never deliver it. Ensure the pair exists in the project's `scripts/`: **copy `archive-decisions.mjs` + `archive-decisions.test.mjs` from `${CLAUDE_SKILL_DIR}/references/scripts/` if missing** (the kit's own fallback copies — byte-identical to the memory canon by the mirror guard); **an existing file is preserved, never overwritten** (drift repair belongs to a lineage migration, not this ensure). The deployed pre-commit hook gains the `archive-decisions.mjs --check` line only when the hook itself is next refreshed (re-run `node scripts/install-git-hooks.mjs` after the ensure and it will refuse a non-marker hook as always); an OLD hook without the line stays consistent-safe — the decisions gate is simply not enforced yet, never a broken hook. Skip this ensure on a No-Node project (the scripts are Node enforcement). Report it in the step 4 / step 8 success report (*added* / *already present*).
|
|
349
|
+
|
|
350
|
+
**Placed-bridge refresh — stamp-independent, same gate, BEFORE the equal-head short-circuit.** Run
|
|
351
|
+
`node ${CLAUDE_SKILL_DIR}/tools/setup-backends.mjs --refresh-placed` and **paste its per-bridge
|
|
352
|
+
output lines verbatim** — every outcome line is composed by the tool (*refreshed* / *already
|
|
353
|
+
current* / *skipped — not placed* / *could not refresh* + its recovery); you compose nothing
|
|
354
|
+
factual. It is **refresh-only**: it refreshes a bridge **`setup` already placed** from this kit's
|
|
355
|
+
bundled copies and re-links its wrappers; an **absent** bridge is a stated skip, **never a first
|
|
356
|
+
placement** (placement stays the opt-in *Mode: setup* — AD-009/AD-011 honesty intact), and a
|
|
357
|
+
placed bridge **newer** than the bundled copy is a stated skip naming the kit update (**never a
|
|
358
|
+
downgrade**). Like the other three reconciles it runs on **every** upgrade — including an
|
|
359
|
+
equal-head one — with no lineage-head bump. A *could not refresh* line is non-fatal: relay it
|
|
360
|
+
plainly with its recovery and continue the upgrade.
|
|
319
361
|
4. **Equal-head exit — a real successful-exit report, not a bare stop.** If the stamp **equals** the head, the lineage is up to date — but step 3 (the methodology-slot **and** hidden-mode footprint reconciles) ran first and may have changed things, so this is a proper exit report, not a no-op:
|
|
320
|
-
- **Report step 3's outcome in plain language** — for **each** pointer (workflow-methodology and orchestration-recipes) whether it was *added*, was *already present* (nothing changed), or was *skipped because the entry point is over its line limit* (the cap-refusal soft-skip from step 3, with its reason); whether the `docs/ai/orchestration.json` config was *seeded* (created from the template), had its onboarding note *refreshed*, was *already current*, or carried a *customized note that was preserved* (a user edit is never clobbered); and, for a hidden deployment, whether the hidden-mode footprint was *moved to project-local*, was *already project-local* (nothing changed), or needed a question (ambiguous visibility / a leftover machine-wide block). Plain wording only — never the reconcile/slot/anchor/marker terms (Gotcha: never leak kit internals).
|
|
362
|
+
- **Report step 3's outcome in plain language** — for **each** pointer (workflow-methodology and orchestration-recipes) whether it was *added*, was *already present* (nothing changed), or was *skipped because the entry point is over its line limit* (the cap-refusal soft-skip from step 3, with its reason); whether the `docs/ai/orchestration.json` config was *seeded* (created from the template), had its onboarding note *refreshed*, was *already current*, or carried a *customized note that was preserved* (a user edit is never clobbered); whether the `docs/ai/gates.json` gate declaration was *seeded* or was *already present* (preserved byte-for-byte); whether the enforcement-script ensure *added* the `archive-decisions` pair to `scripts/` or found it *already present*; the **placed-bridge refresh** outcome — paste the tool's per-bridge lines verbatim (they are already plain: *refreshed* / *already current* / *skipped — not placed* / *could not refresh* + recovery); and, for a hidden deployment, whether the hidden-mode footprint was *moved to project-local*, was *already project-local* (nothing changed), or needed a question (ambiguous visibility / a leftover machine-wide block). Plain wording only — never the reconcile/slot/anchor/marker terms (Gotcha: never leak kit internals).
|
|
321
363
|
- **Never surface the structure number on this exit.** Whatever step 3 did, do **not** recite the `docs/ai` structure version, the internal versioning vocabulary, or the two-axes note here — the number is inert on an equal-head exit; it belongs to *Version disclosure* (shown at the never-downgrade STOP, the explicit status view, or on an explicit ask). Frame the success itself per the final bullet: if step 3 changed anything, say **what changed** in plain human terms; only a pure zero-diff no-op is *settings already current — no update needed*.
|
|
322
364
|
- **Print the report footer** in the canonical order (version block → one-line backend-status line → welcome mat — the shared contracts above; rendered from the helpers, same host-can't-run skip-with-reason). The welcome mat closes on **one** caveat-aware next step (a behind member first, else `setup` / `recipes` / `velocity`).
|
|
323
365
|
- **Then ask before committing — never auto-commit.** If step 3 added the slot (or anything else changed), report it and ask. If step 3 was a pure zero-diff no-op and nothing else changed, give the plain **settings already current — no update needed** message (the *Success state* contract) and still print the read-only version block (installed package versions) + backend line — but **no `docs/ai` structure version and no two-axes note** (nothing changed, so the number is inert here).
|
|
324
366
|
5. Show the relevant `${CLAUDE_SKILL_DIR}/CHANGELOG.md` diff (entries newer than the project's stamp).
|
|
325
367
|
6. Apply `${CLAUDE_SKILL_DIR}/migrations/<version>-<slug>.md` in **semver order**, only those newer than the project's stamp. Migrations are **idempotent** — safe to re-run.
|
|
326
368
|
7. Reconcile drift: add any kernel files/scripts the project is missing; never clobber project-authored content (their `decisions.md`, `known_issues.md`, page specs stay). Any user question a migration raises follows the same rule as bootstrap — **structured multiple-choice where supported** (`AskUserQuestion` in Claude Code), otherwise prose. If `AGENTS.md` has no *Communication language* block (pre-1.1.0 deployment), **ask the user their conversational language** and insert the block — see `migrations/1.1.0-communication-language.md`. If it has no *Attribution* block (pre-1.2.0 deployment), **ask whether the agent may attribute work to itself / AI** and insert the block (defaulting to `off`) — see `migrations/1.2.0-agent-attribution.md`.
|
|
327
|
-
8. Re-stamp `docs/ai/.workflow-version` to the **deployment-lineage head** (`1.3.0`, not the package version — mechanics unchanged: the atomic write to the stamp file). In the report, **describe what the upgrade changed in plain human terms** — which parts of their `docs/ai` are now different (the migrations that ran) — rather than reciting a version number; **omit the raw structure number**, and do **not** print the two-axes note here (it belongs to *Version disclosure*, on demand only). Then **print the report footer** in the canonical order (version block → one-line backend-status line → welcome mat — the shared contracts above; rendered from the helpers, same host-can't-run skip-with-reason; the welcome mat closes on one caveat-aware next step). Then **ask before committing**.
|
|
369
|
+
8. Re-stamp `docs/ai/.workflow-version` to the **deployment-lineage head** (`1.3.0`, not the package version — mechanics unchanged: the atomic write to the stamp file). In the report, **describe what the upgrade changed in plain human terms** — which parts of their `docs/ai` are now different (the migrations that ran), plus the step-3 **placed-bridge refresh** lines (pasted verbatim) — rather than reciting a version number; **omit the raw structure number**, and do **not** print the two-axes note here (it belongs to *Version disclosure*, on demand only). Then **print the report footer** in the canonical order (version block → one-line backend-status line → welcome mat — the shared contracts above; rendered from the helpers, same host-can't-run skip-with-reason; the welcome mat closes on one caveat-aware next step). Then **ask before committing**.
|
|
328
370
|
|
|
329
371
|
### Mode: backends
|
|
330
372
|
|
|
@@ -338,13 +380,19 @@ Read-only. Answers *"which optional execution-backends are set up vs missing, an
|
|
|
338
380
|
|
|
339
381
|
### Mode: setup
|
|
340
382
|
|
|
341
|
-
The **only writer** among the backend modes, and **opt-in / in-agent only** —
|
|
383
|
+
The **only writer** among the backend modes, and **opt-in / in-agent only** — **placement** is **never** part of `init`. The npx installer deploys the *kit* and bundles the bridge skills in its tarball, but **does not place** them (that honesty claim is load-bearing — see `decisions.md` AD-009 / AD-011); **once placed** by `setup`, `init` and *Mode: upgrade* keep the placed copy fresh via the refresh-only `--refresh-placed` (below) — **never a first placement, never a downgrade**. `setup` owns exactly the two deterministic, secret-free steps and **guides** the rest. It **never commits and never runs a subscription CLI**.
|
|
342
384
|
|
|
343
385
|
Run `node ${CLAUDE_SKILL_DIR}/tools/setup-backends.mjs [<backend>] [--bindir <path>] [--dry-run]`:
|
|
344
386
|
|
|
345
387
|
- `<backend>` — `codex` | `agy` | `antigravity` | `codex-cli-bridge` | `antigravity-cli-bridge`; omit for **all**.
|
|
346
388
|
- `--bindir <path>` — where to link the wrappers (default `~/.local/bin`).
|
|
347
389
|
- `--dry-run` — print the per-backend plan and change **nothing** (run this first).
|
|
390
|
+
- `--refresh-placed` — the **refresh-only** mode (what `init` runs automatically and *Mode: upgrade*
|
|
391
|
+
runs as its fourth stamp-independent reconcile): refresh every bridge `setup` **already placed**
|
|
392
|
+
from the kit's bundled copies + re-link its wrappers; an absent bridge is a stated skip (**never**
|
|
393
|
+
placed), a placed bridge newer than the bundle is a stated skip naming the kit update (**never**
|
|
394
|
+
downgraded), and every outcome line is composed by the tool — paste verbatim. Does not combine
|
|
395
|
+
with `--dry-run`.
|
|
348
396
|
- `--help`, `-h` — usage.
|
|
349
397
|
|
|
350
398
|
For each backend it:
|
|
@@ -367,7 +415,7 @@ Read-only. The **single answer to "versions + deployment + settings + bridges"**
|
|
|
367
415
|
|
|
368
416
|
Run `node ${CLAUDE_SKILL_DIR}/tools/family-registry.mjs --json [--dir <project>]` and render it **compact**, in the user's conversational language — **never paste the JSON or any internal field name** (no-leak rule). Map the **`installed[].state`** token via the value→plain-language map under *The version block + welcome mat* (the `visibility` and wrapper states have their own phrasings, below). Present, each area on its own line(s), routing detail to its domain mode:
|
|
369
417
|
|
|
370
|
-
1. **Versions — a status-only render from `installed[]` + `deploymentHead`** (this is **NOT** the shared notes-based version block — see the separation note below): the **`docs/ai` structure version** (named as such, never "lineage head"), then each member by its `display` showing its `version` (or, when there is no version, the plain phrase for its `state`, mapped above), plus the two-axes disambiguation. **Freshness comes from `installed[].refresh`, not from `notes`:** for each member whose **`refresh.behind`** is `true`, show a **localized "needs refresh"** label and the **verbatim `refresh.recommend`** command **exactly once** (the command/package name stays source-language; **do not also paste the English `notes` caveats** — `refresh.recommend` is the single source of the recovery step, so the command is never duplicated on this surface). Lead with a one-line **headline count** derived from `installed[].state` + `refresh.behind` (e.g. *"5 members installed · 1 needs a refresh"*).
|
|
418
|
+
1. **Versions — a status-only render from `installed[]` + `deploymentHead`** (this is **NOT** the shared notes-based version block — see the separation note below): the **`docs/ai` structure version** (named as such, never "lineage head"), then each member by its `display` showing its `version` (or, when there is no version, the plain phrase for its `state`, mapped above), plus the two-axes disambiguation. **Freshness comes from `installed[].refresh`, not from `notes`:** for each member whose **`refresh.behind`** is `true`, show a **localized "needs refresh"** label and the **verbatim `refresh.recommend`** command **exactly once** (the command/package name stays source-language; **do not also paste the English `notes` caveats** — `refresh.recommend` is the single source of the recovery step, so the command is never duplicated on this surface). A member whose **`refresh.freshness`** is **`unknown`** is surfaced too — a localized *"couldn't be checked"* label; it is **never counted as current and never as behind** (its `notes` caveat carries the detail on the notes-based surfaces; here the label is enough). Lead with a one-line **headline count** derived from `installed[].state` + `refresh.behind` + `refresh.freshness` (e.g. *"5 members installed · 1 needs a refresh · 1 couldn't be checked"* — omit a zero count).
|
|
371
419
|
|
|
372
420
|
> **Status reads `refresh`; the shared version block + the bootstrap/upgrade footers stay `notes`-based (unchanged this release).** *Mode: status* has its OWN status-only render (above), keyed on `installed[].refresh.behind` / `refresh.recommend`. The shared **version block** (under *The version block + welcome mat*) and the bootstrap (step 11) + every upgrade (steps 4 / 8) report footer still consume `installed[].notes` verbatim — that wiring is deliberately **untouched** here (their migration onto `refresh` is deferred). Do not rewrite those footers onto `refresh`.
|
|
373
421
|
2. **Deployment (`--dir`)** (from `project`): whether `docs/ai/` is deployed + the deploy stamps by `display`; and **visibility** — render `project.visibility.state` in **user-safe words only**: *visible (tracked)* / *hidden (git-ignored, local-only)* / *unclear (uncommitted or partially set up)* — **never** the words "hidden fence" or any marker term. A `visibility.error` → surface it plainly.
|
|
@@ -480,6 +528,18 @@ Run `node ${CLAUDE_SKILL_DIR}/tools/velocity-profile.mjs [--dry-run | --apply] [
|
|
|
480
528
|
|
|
481
529
|
**Exit codes:** `0` done / dry-run; `1` a precondition STOP (stamp not current, unsafe mode, malformed settings, symlinked `.claude` / non-regular target); `2` bad arguments.
|
|
482
530
|
|
|
531
|
+
### Mode: agents
|
|
532
|
+
|
|
533
|
+
The opt-in **cheap-lane subagent writer** — the family's second `.claude/` writer, on the velocity discipline. It places the bundled cheap-lane subagent definitions (`references/agents/*.md`) into the project's `.claude/agents/` so mechanical work — extraction sweeps, changelog fact-skeletons, gate-failure triage — runs on a **cheap model** (`model: haiku`, `effort: low`, bounded read-only tools) instead of the frontier main lane. **Claude-Code-specific** (like velocity): other agent hosts ignore `.claude/agents/`. Judgment, review, real code, and user-facing copy never move to these vehicles — they are extraction/drafting only, and the orchestrator verifies their output.
|
|
534
|
+
|
|
535
|
+
Run `node ${CLAUDE_SKILL_DIR}/tools/cheap-agents.mjs [--dry-run | --apply] [--cwd <dir>]`:
|
|
536
|
+
|
|
537
|
+
1. **`--dry-run` first, always** (the default — changes nothing). It previews, per bundled vehicle, whether it **would place** the file, finds it **already current**, or finds a **customized** file (different content) that will be **preserved, never overwritten** (delete the file to reseed it from the bundle).
|
|
538
|
+
2. **Only on an explicit yes**, re-run with `--apply`. It writes **only** under `.claude/agents/` — never `settings.json` / `settings.local.json`, never a commit. `--apply` is deployment-gated (the stamp must be at the lineage head) and symlink-safe (a symlinked `.claude` / `.claude/agents` / target file is a STOP).
|
|
539
|
+
3. **Hidden-mode deployments:** after apply, run the hide-footprint reconcile (`node ${CLAUDE_SKILL_DIR}/tools/hide-footprint.mjs --dir <project> --reconcile`) so the placed files stay invisible to `git status` — `/.claude/agents/` is in the known-footprint registry; the apply report reminds you.
|
|
540
|
+
|
|
541
|
+
**Invariants:** writer (writes only `.claude/agents/`) · preview by default · a diverged existing file is reported and preserved, never clobbered · never touches settings · never commits · vehicles are pinned to `model: haiku` + `effort: low` + read-only tools (content-tested).
|
|
542
|
+
|
|
483
543
|
---
|
|
484
544
|
|
|
485
545
|
## Gotchas
|
|
@@ -554,6 +614,6 @@ Deploy these into `AGENTS.md`; remove rows that don't apply to the stack.
|
|
|
554
614
|
- [`references/scripts/`](references/scripts/) — the Node enforcement scripts (caps + staleness + index-freshness gate, 3-tier archive, hook installer) and their unit tests.
|
|
555
615
|
- [`migrations/`](migrations/) — per-version upgrade steps; see `migrations/README.md`.
|
|
556
616
|
- [`launchers/`](launchers/) — run the bootstrapper from non-Claude agents (`SKILL.md` is a native Codex skill; a Devin Desktop workflow launcher + install script). See `launchers/README.md`.
|
|
557
|
-
- [`tools/`](tools/) — the family-wide tooling the kit **owns and ships**: `manifest/{schema.md,validate.mjs}` (the `capability.json` schema + the validator the kit runs as the memory detector, and root CI invokes), `commands.mjs` (the canonical **command catalog** + the pure `routeInvocation` router behind `/agent-workflow-kit help` and the safe unknown-invocation routing rule — one source of truth for the command surface, drift-guarded against the `### Mode:` headers), `delegation.mjs` (the executable delegate/fallback decision + hand-off plan), `inject-methodology.mjs` + `engine-source.mjs` (the bounded **two-slot** reconciliation — ensure-slot / inject-if-empty / cap for the `workflow:methodology` **and** `workflow:orchestration` pointers; both fragments read **live** from the installed `agent-workflow-engine` via `engine-source.mjs` (`deps.rel` selects which) — the family's one source of truth, no bundled mirror; fail-loud when the engine is needed but absent, orchestration soft-skipped when it would bust the cap), `detect-backends.mjs` (the read-only **backend detector** behind `/agent-workflow-kit backends`, plus the axis-aware `guideFor`; exports the readiness consts the planner reuses), `recipes.mjs` (the read-only **recipe planner** behind `/agent-workflow-kit recipes` — `RECIPES` / `planRecipe` / `recommendRecipe` over the bridges' role vocabulary, drift-guarded against `provides`/`cost`/`quota` + an engine↔kit recipe-name parity guard; pure, never runs a subscription CLI; also exports the pure `ACTIVITIES` / `resolveActivityRecipe` activity-procedures resolver), `procedures.mjs` (the read-only **activity-procedures advisor** behind `/agent-workflow-kit procedures` — reads `references/procedures.md` live from the engine via `engine-source.mjs`, reads + validates the agent-writable `docs/ai/orchestration.json` via `orchestration-config.mjs`, and prints the steps + the resolved effective recipe per slot; drift-guarded activity/slot table vs the canon; read-only, never imports the writer, never runs a subscription CLI), `orchestration-config.mjs` (the config **schema/read/pure-transform core** — `loadConfig`/`validateConfig`/the shared slot-recipe validity + `parseOp`/`applySetOps`/`serializeConfig`/the canonical-refresh helpers; no fs writes), `orchestration-write.mjs` (the **only** config fs-writer — a deployment-gated, atomic, symlink/TOCTOU-safe `writeConfig`; imported by `set-recipe` alone, never by `procedures`), `set-recipe.mjs` (the **config writer** behind `/agent-workflow-kit set-recipe` — validate → merge → preview-by-default → write; never runs a backend, never commits), `setup-backends.mjs` (the **link-only** backend setup behind `/agent-workflow-kit setup` — place the bundled bridge + link wrappers), `fs-safe.mjs` (the shared symlink-traversal-safe copy/link/**remove/unlink** primitives that `setup-backends`, the npx installer, and the uninstaller use), `known-footprint.mjs` + `hide-footprint.mjs` (the **hidden-mode** registry + the single hide-writer behind step 9 / the upgrade reconcile — one managed block in the **project-local** `.git/info/exclude` covering the full AI/agent footprint; pinned by `known-footprint.test.mjs` drift-guard + `hide-footprint.test.mjs` / `.integration.test.mjs`), `family-registry.mjs` (the **unified family registry** behind `/agent-workflow-kit status` — aggregates every member's `capability.json`; pinned by a `family-registry.test.mjs` drift-guard), `uninstall.mjs` (the **guarded teardown** behind `/agent-workflow-kit uninstall` — classify each surface, preflight-then-mutate, never delete user-authored content), and `release-scan.mjs` (the attribution-off release gate). The bundled bridge skill mirrors live under [`bridges/`](bridges/) (byte-identical to the repo-root bridges, pinned by `test/bridges-mirror.test.mjs`). See [`tools/manifest/schema.md`](tools/manifest/schema.md).
|
|
617
|
+
- [`tools/`](tools/) — the family-wide tooling the kit **owns and ships**: `manifest/{schema.md,validate.mjs}` (the `capability.json` schema + the validator the kit runs as the memory detector, and root CI invokes), `commands.mjs` (the canonical **command catalog** + the pure `routeInvocation` router behind `/agent-workflow-kit help` and the safe unknown-invocation routing rule — one source of truth for the command surface, drift-guarded against the `### Mode:` headers), `delegation.mjs` (the executable delegate/fallback decision + hand-off plan), `inject-methodology.mjs` + `engine-source.mjs` (the bounded **two-slot** reconciliation — ensure-slot / inject-if-empty / cap for the `workflow:methodology` **and** `workflow:orchestration` pointers; both fragments read **live** from the installed `agent-workflow-engine` via `engine-source.mjs` (`deps.rel` selects which) — the family's one source of truth, no bundled mirror; fail-loud when the engine is needed but absent, orchestration soft-skipped when it would bust the cap), `detect-backends.mjs` (the read-only **backend detector** behind `/agent-workflow-kit backends`, plus the axis-aware `guideFor`; exports the readiness consts the planner reuses), `recipes.mjs` (the read-only **recipe planner** behind `/agent-workflow-kit recipes` — `RECIPES` / `planRecipe` / `recommendRecipe` over the bridges' role vocabulary, drift-guarded against `provides`/`cost`/`quota` + an engine↔kit recipe-name parity guard; pure, never runs a subscription CLI; also exports the pure `ACTIVITIES` / `resolveActivityRecipe` activity-procedures resolver and the machine-composed one-line backend status — `composeStatusLine` behind `--status-line`, pasted verbatim by the bootstrap/upgrade report footers), `procedures.mjs` (the read-only **activity-procedures advisor** behind `/agent-workflow-kit procedures` — reads `references/procedures.md` live from the engine via `engine-source.mjs`, reads + validates the agent-writable `docs/ai/orchestration.json` via `orchestration-config.mjs`, and prints the steps + the resolved effective recipe per slot; drift-guarded activity/slot table vs the canon; read-only, never imports the writer, never runs a subscription CLI), `orchestration-config.mjs` (the config **schema/read/pure-transform core** — `loadConfig`/`validateConfig`/the shared slot-recipe validity + `parseOp`/`applySetOps`/`serializeConfig`/the canonical-refresh helpers; no fs writes), `orchestration-write.mjs` (the **only** config fs-writer — a deployment-gated, atomic, symlink/TOCTOU-safe `writeConfig`; imported by `set-recipe` alone, never by `procedures`), `set-recipe.mjs` (the **config writer** behind `/agent-workflow-kit set-recipe` — validate → merge → preview-by-default → write; never runs a backend, never commits), `setup-backends.mjs` (the **link-only** backend setup behind `/agent-workflow-kit setup` — place the bundled bridge + link wrappers), `fs-safe.mjs` (the shared symlink-traversal-safe copy/link/**remove/unlink** primitives that `setup-backends`, the npx installer, and the uninstaller use), `known-footprint.mjs` + `hide-footprint.mjs` (the **hidden-mode** registry + the single hide-writer behind step 9 / the upgrade reconcile — one managed block in the **project-local** `.git/info/exclude` covering the full AI/agent footprint; pinned by `known-footprint.test.mjs` drift-guard + `hide-footprint.test.mjs` / `.integration.test.mjs`), `family-registry.mjs` (the **unified family registry** behind `/agent-workflow-kit status` — aggregates every member's `capability.json`; pinned by a `family-registry.test.mjs` drift-guard), `uninstall.mjs` (the **guarded teardown** behind `/agent-workflow-kit uninstall` — classify each surface, preflight-then-mutate, never delete user-authored content), `run-gates.mjs` (the **generic project gate runner** behind `/agent-workflow-kit gates` — batches the project-declared `docs/ai/gates.json` matrix into one PASS/FAIL table + a machine-readable summary line; bash cmd contract, distinct honest outcomes for missing/empty/malformed declarations; the runner writes nothing), `cheap-agents.mjs` (the **cheap-lane subagent writer** behind `/agent-workflow-kit agents` — places the bundled `references/agents/*.md` haiku/low vehicles into a project's `.claude/agents/`; velocity writer discipline: dry-run default, deployment-gated apply, a diverged file preserved, never settings), and `release-scan.mjs` (the attribution-off release gate). The bundled bridge skill mirrors live under [`bridges/`](bridges/) (byte-identical to the repo-root bridges, pinned by `test/bridges-mirror.test.mjs`). See [`tools/manifest/schema.md`](tools/manifest/schema.md).
|
|
558
618
|
- [`capability.json`](capability.json) — the kit's own `agent-workflow` family manifest (`kind: composition-root`).
|
|
559
619
|
- [`CHANGELOG.md`](CHANGELOG.md) — version history of this kernel.
|