From cffd320a1b73b252b9eae0484ac03ac92e338f83 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 20 Oct 2026 16:08:32 +0000 Subject: [PATCH] feat(kaizen)!: remove the deploy, monitor and postmortem stubs (S3, 4.1.0) Kaizen's command list no longer carries the production commands: the 4.0 stubs and their guides are gone; they are /kaizen-ops:deploy, monitor and postmortem. Contracts: changelogs keep the names of their time; elsewhere a former /kaizen: may only appear as a migration note on the line naming its /kaizen-ops: (README, kaizen-ops README, troubleshooting). Plan: S3 shipped right after S2 at the user's request; DoD updated. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_012iZk6aQ3fhJy4jrZhfWtaf --- CLAUDE.md | 2 +- ...0-1515-refactor-kaizen-core-ops-split-plan.md | 11 ++++++----- plugins/kaizen-ops/README.md | 8 ++++++-- plugins/kaizen-ops/tests/contracts.test.mjs | 9 +++++++-- plugins/kaizen/.claude-plugin/plugin.json | 2 +- plugins/kaizen/CHANGELOG.md | 12 ++++++++++++ plugins/kaizen/README.md | 10 +++++++--- plugins/kaizen/docs/README.md | 4 ++-- plugins/kaizen/docs/guides/deploy.md | 10 ---------- plugins/kaizen/docs/guides/monitor.md | 10 ---------- plugins/kaizen/docs/guides/postmortem.md | 10 ---------- plugins/kaizen/docs/troubleshooting.md | 2 +- plugins/kaizen/skills/deploy/SKILL.md | 16 ---------------- plugins/kaizen/skills/monitor/SKILL.md | 16 ---------------- plugins/kaizen/skills/postmortem/SKILL.md | 16 ---------------- plugins/kaizen/tests/contracts.test.mjs | 13 ++++++++++--- 16 files changed, 53 insertions(+), 98 deletions(-) delete mode 100644 plugins/kaizen/docs/guides/deploy.md delete mode 100644 plugins/kaizen/docs/guides/monitor.md delete mode 100644 plugins/kaizen/docs/guides/postmortem.md delete mode 100644 plugins/kaizen/skills/deploy/SKILL.md delete mode 100644 plugins/kaizen/skills/monitor/SKILL.md delete mode 100644 plugins/kaizen/skills/postmortem/SKILL.md diff --git a/CLAUDE.md b/CLAUDE.md index c882e55..1bf8f51 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -38,7 +38,7 @@ plugins// - **slide-studio** — `/slides` skill: presentation decks as one HTML file from `skills/slides/assets/deck.html` (19 layouts as `data-layout`, 3 themes — `ink`, `paper`, `kaizen` (washi/sumi/vermilion, ensō + hanko drawn by the runtime) — + BRAND tokens, presenter runtime with steps/notes/overview); `scripts/slides.mjs` lists layouts, previews themes (`themes`), scaffolds (`new --layouts`), audits each slide in Chromium (`check`: overflow, collisions, safe area, contrast, density) and exports PDF/PNG/contact sheet. Self-sufficient: `scripts/setup.mjs`/`deps.mjs` reuse or auto-install playwright-core + Chrome Headless Shell into `${CLAUDE_PLUGIN_DATA}` (check/export only). Tests `node --test plugins/slide-studio/tests/*.test.mjs` (browser tests need `SLIDE_STUDIO_HOME` with a ready `env.json`); CI in `.github/workflows/slide-studio.yml`. -- **kaizen** (4.0.0, self-sufficient since the other plugins left; production commands in kaizen-ops since 4.0; English since #17; French plans/constitutions from 2.x still parsed) — AI-assisted SDLC built on Every's Compound Engineering loop (MIT, see `plugins/kaizen/LICENSE`) plus Spec Kit's constitution. 20 skills invoked `/kaizen:` (plus `deploy`, `monitor`, `postmortem` stubs answering "moved to kaizen-ops" until 4.1.0) — newcomers get a four-command path, `setup` → `plan` → `work` → `ship` (README "Start here", `help`, `setup`, `status` next step; constitution optional, after the next step): `help` (orientation, reads `kaizen.mjs status`), the production CLI behind kaizen-ops' `deploy` and `monitor` (team-declared deploy/rollback/flag commands and production signals in `.kaizen/config.json`; protected envs need a user-typed `kaizen deploy `; annotated tags `deploy//…`/`rollback//…` feed real DORA in `metrics` and postmortem timelines; `scripts/deploy.mjs`, `scripts/monitor.mjs`; `monitor patrol` (scheduled confirmed check; a blind signal — broken metric command — never rolls back nor opens an incident, unlike an unreachable HTTP health-check) and `monitor alert` (Alertmanager/PagerDuty/Datadog/generic payloads) open dated incidents as `incident//…` tags (resolved by rollback or `resolve//…`), feeding DORA failure rate and time to restore; `deploy detect|configure` in `scripts/deploydetect.mjs` recognizes the platform — Vercel, Netlify, Fly, Heroku, Kamal, Capistrano, Helm, Kustomize, Serverless, SAM, Firebase, GitHub Actions, Makefile/npm, Compose, Terraform), `constitution`, `ideate`, `brainstorm`, `decide` (ADR), `plan`, `doc-review`, `work`, `debug`, `polish`, `review`, `ship`, `address-feedback`, `watch-pr`, `release`, `learn`, `prune-learnings`, `metrics`, `autopilot`, `setup`. 22 read-only agents (5 research, 6 plan reviewers sharing `references/doc-review-contract.md`, 11 code reviewers (incl. `rendering-reviewer`, which opens before/after captures) sharing `references/review-contract.md`). Artifacts live in the target repo: `CONSTITUTION.md` (articles each with a **Check:**, enforced by `plan check`, doc-review and standards-reviewer; hierarchy constitution > packs > learnings; written headless it is a `status: draft` that informs but never blocks until ratified), one unified plan per topic in `docs/plans/` (`kaizen-plan/v1`, `` markers incl. constitution/threats/rollout, R/AE/KTD/U IDs, PR-sized slices), learnings `docs/learnings/`, `docs/adr/`, `docs/postmortems/`. `scripts/kaizen.mjs` is a zero-dependency CLI for all deterministic work (verify, plan check, size, learnings, packs, constitution, PR snapshot/watch via `pr.mjs`, dev server, DORA metrics, ADR, release notes); `scripts/quality-gate.mjs` is a Stop hook blocking while verify is red during work/autopilot (scoped to the session that ran `gate on` via a PostToolUse `--claim`, time-budgeted under the hook timeout); `scripts/secret-gate.mjs` is a PreToolUse hook refusing a `git commit` that adds a key or token (~30 patterns in `scripts/secrets.mjs`, also `kaizen.mjs secrets scan` and the `audit fix secret_scanning` PR workflow; refuses `--no-verify`; active in every repo, `secrets.scan`/`secrets.ignore` in config); `.mcp.json` bundles the Playwright MCP server (pinned) used by polish/work/autopilot; `scripts/review-gate.mjs` is a PreToolUse hook refusing `git push` of a branch until `/kaizen:review` recorded the pushed tree (`review record`, which requires evidence that Kaizen code reviewers actually ran — logged by `review-hooks.mjs --evidence`, a PostToolUse hook on Agent — except light reviews ≤ 20 lines or post-fix updates; `review waive --reason` only issues a code the user must type as `kaizen waive `, confirmed by the `review-hooks.mjs --confirm` UserPromptSubmit hook; state in `review-state.mjs`, direct writes blocked; a PreToolUse `--launch` hook logs each reviewer as launched, and `review record --run` refuses a run where one left no `[-].json`, a gap only accepted by a user-typed code). Guard rails beyond the plugin: `kaizen doctor` (`scripts/doctor.mjs`; SessionStart heartbeat `hooks-seen.json`, `.claude/settings.json` declaring `kaizen@dojo`, git hooks wired, branch or upstream unreviewed) run first by help/work/setup; `audit fix git_hooks` (`scripts/githooks.mjs`, `templates/githooks/`) installs fail-closed pre-push/pre-commit hooks resolving a pinned CLI (`git config kaizen.cli`, `$KAIZEN_CLI`, or `cache/dojo/kaizen/` only) and `audit fix claude_settings` declares the plugin. Plans: `plan amend` (append-only R IDs, `amended:` frontmatter, `scripts/planamend.mjs`), `plan reviewed` (`reviewed: " "`, plan check warns when absent or stale), `visual: ` evidence warned for rendering units. `kaizen perf` (`scripts/perf.mjs`, `perf` config: pass/fail/blind). `/kaizen:learn harvest`. `profile: prototype|product|critical` (named by stakes; former `lean|standard|full` still read, reported deprecated) in `.kaizen/config.json` scales ceremony, never the deterministic gates; it is a floor: `scripts/risk.mjs` raises it one step for a cycle whose files touch a risk surface (auth, payment, sensitive data, migration, public API, dependencies, team `risk.paths`), `kaizen.mjs profile [--plan|--files]` gives the effective one and skills pass it to `models --profile`. `review estimate` (`scripts/estimate.mjs`) prices a review before launch — tokens and relative cost per model, from the repo's cycle history (agents counted per role) or a diff heuristic; `/kaizen:review` asks above `review.confirm_above_cost`. Cycles record tokens per model family (`usage.by_model`); `metrics dashboard` (`scripts/dashboard.mjs`) writes a self-contained HTML cost dashboard to `.kaizen/state/cost-dashboard.html`. Every gate stop and what lifts it (review recorded, waiver) is appended to `.kaizen/state/friction.jsonl` (`logFriction` in lib, never changes a decision); `metrics` → `friction` reports refusals, time blocked on push, waiver share and blocking checks. A second Stop hook (`scripts/ledger-hook.mjs` → `ledger.mjs`) charges every turn's new tokens (transcript byte offsets) to the work item — branch Jira key, else plan `jira:`/`plan:`, else branch, else `unattributed` — in `.kaizen/state/ledger.jsonl`; `kaizen cost [item|current]` and `metrics` → `work_items` give the cost of each feature or fix end to end. `scripts/models.mjs` maps every agent to a role and every role to a model per profile (`models.roles` / `models.agents` overrides, `kaizen.mjs models`); skills pass that `model` to each Agent call and review evidence records it. `scripts/audit.mjs` (`kaizen.mjs audit`, `/kaizen:setup audit`) scores SDLC maturity in five areas and scaffolds ci/pr_template/dependabot/codeowners/gitignore_env without overwriting. The Stop hook also records token usage from the transcript, main session plus subagents (`/subagents/agent-*.jsonl`, attributed to a role via launches logged by the Agent hook in `scripts/cycle-agents.mjs`); verify commands run through `scripts/run-bounded.mjs`, which kills the whole process tree on timeout; `gate off` appends the cycle to `.kaizen/state/cycles.jsonl` (`metrics` → `cycle_cost`); `gate.targeted` runs `{files}`-scoped checks. `plan check` warns on rollout without rollback/signal/threshold, `release notes` extracts rollout of shipped plans; constitution `approvers` require an approved amendment per version. Tests: `node --test plugins/kaizen/tests/*.test.mjs` (unit, CLI, gate, PR with fake `gh`, contracts — run after any skill/agent/CLI/doc change; contracts require the README to list every CLI command and hook, `docs/README.md` to list every guide, and every relative doc link to resolve). User docs: `plugins/kaizen/docs/` (getting-started, configuration, packs, troubleshooting, positioning, one guide per skill); end-to-end evals: `node plugins/kaizen/evals/run.mjs` (real `claude -p`, costly); CI in `.github/workflows/kaizen.yml`. +- **kaizen** (4.1.0, self-sufficient since the other plugins left; production commands in kaizen-ops since 4.0; English since #17; French plans/constitutions from 2.x still parsed) — AI-assisted SDLC built on Every's Compound Engineering loop (MIT, see `plugins/kaizen/LICENSE`) plus Spec Kit's constitution. 20 skills invoked `/kaizen:` (the 4.0 stubs of `deploy`, `monitor`, `postmortem` were removed in 4.1.0; changelogs keep the old names, other docs only as `old → /kaizen-ops:` migration notes, enforced by the contracts) — newcomers get a four-command path, `setup` → `plan` → `work` → `ship` (README "Start here", `help`, `setup`, `status` next step; constitution optional, after the next step): `help` (orientation, reads `kaizen.mjs status`), the production CLI behind kaizen-ops' `deploy` and `monitor` (team-declared deploy/rollback/flag commands and production signals in `.kaizen/config.json`; protected envs need a user-typed `kaizen deploy `; annotated tags `deploy//…`/`rollback//…` feed real DORA in `metrics` and postmortem timelines; `scripts/deploy.mjs`, `scripts/monitor.mjs`; `monitor patrol` (scheduled confirmed check; a blind signal — broken metric command — never rolls back nor opens an incident, unlike an unreachable HTTP health-check) and `monitor alert` (Alertmanager/PagerDuty/Datadog/generic payloads) open dated incidents as `incident//…` tags (resolved by rollback or `resolve//…`), feeding DORA failure rate and time to restore; `deploy detect|configure` in `scripts/deploydetect.mjs` recognizes the platform — Vercel, Netlify, Fly, Heroku, Kamal, Capistrano, Helm, Kustomize, Serverless, SAM, Firebase, GitHub Actions, Makefile/npm, Compose, Terraform), `constitution`, `ideate`, `brainstorm`, `decide` (ADR), `plan`, `doc-review`, `work`, `debug`, `polish`, `review`, `ship`, `address-feedback`, `watch-pr`, `release`, `learn`, `prune-learnings`, `metrics`, `autopilot`, `setup`. 22 read-only agents (5 research, 6 plan reviewers sharing `references/doc-review-contract.md`, 11 code reviewers (incl. `rendering-reviewer`, which opens before/after captures) sharing `references/review-contract.md`). Artifacts live in the target repo: `CONSTITUTION.md` (articles each with a **Check:**, enforced by `plan check`, doc-review and standards-reviewer; hierarchy constitution > packs > learnings; written headless it is a `status: draft` that informs but never blocks until ratified), one unified plan per topic in `docs/plans/` (`kaizen-plan/v1`, `` markers incl. constitution/threats/rollout, R/AE/KTD/U IDs, PR-sized slices), learnings `docs/learnings/`, `docs/adr/`, `docs/postmortems/`. `scripts/kaizen.mjs` is a zero-dependency CLI for all deterministic work (verify, plan check, size, learnings, packs, constitution, PR snapshot/watch via `pr.mjs`, dev server, DORA metrics, ADR, release notes); `scripts/quality-gate.mjs` is a Stop hook blocking while verify is red during work/autopilot (scoped to the session that ran `gate on` via a PostToolUse `--claim`, time-budgeted under the hook timeout); `scripts/secret-gate.mjs` is a PreToolUse hook refusing a `git commit` that adds a key or token (~30 patterns in `scripts/secrets.mjs`, also `kaizen.mjs secrets scan` and the `audit fix secret_scanning` PR workflow; refuses `--no-verify`; active in every repo, `secrets.scan`/`secrets.ignore` in config); `.mcp.json` bundles the Playwright MCP server (pinned) used by polish/work/autopilot; `scripts/review-gate.mjs` is a PreToolUse hook refusing `git push` of a branch until `/kaizen:review` recorded the pushed tree (`review record`, which requires evidence that Kaizen code reviewers actually ran — logged by `review-hooks.mjs --evidence`, a PostToolUse hook on Agent — except light reviews ≤ 20 lines or post-fix updates; `review waive --reason` only issues a code the user must type as `kaizen waive `, confirmed by the `review-hooks.mjs --confirm` UserPromptSubmit hook; state in `review-state.mjs`, direct writes blocked; a PreToolUse `--launch` hook logs each reviewer as launched, and `review record --run` refuses a run where one left no `[-].json`, a gap only accepted by a user-typed code). Guard rails beyond the plugin: `kaizen doctor` (`scripts/doctor.mjs`; SessionStart heartbeat `hooks-seen.json`, `.claude/settings.json` declaring `kaizen@dojo`, git hooks wired, branch or upstream unreviewed) run first by help/work/setup; `audit fix git_hooks` (`scripts/githooks.mjs`, `templates/githooks/`) installs fail-closed pre-push/pre-commit hooks resolving a pinned CLI (`git config kaizen.cli`, `$KAIZEN_CLI`, or `cache/dojo/kaizen/` only) and `audit fix claude_settings` declares the plugin. Plans: `plan amend` (append-only R IDs, `amended:` frontmatter, `scripts/planamend.mjs`), `plan reviewed` (`reviewed: " "`, plan check warns when absent or stale), `visual: ` evidence warned for rendering units. `kaizen perf` (`scripts/perf.mjs`, `perf` config: pass/fail/blind). `/kaizen:learn harvest`. `profile: prototype|product|critical` (named by stakes; former `lean|standard|full` still read, reported deprecated) in `.kaizen/config.json` scales ceremony, never the deterministic gates; it is a floor: `scripts/risk.mjs` raises it one step for a cycle whose files touch a risk surface (auth, payment, sensitive data, migration, public API, dependencies, team `risk.paths`), `kaizen.mjs profile [--plan|--files]` gives the effective one and skills pass it to `models --profile`. `review estimate` (`scripts/estimate.mjs`) prices a review before launch — tokens and relative cost per model, from the repo's cycle history (agents counted per role) or a diff heuristic; `/kaizen:review` asks above `review.confirm_above_cost`. Cycles record tokens per model family (`usage.by_model`); `metrics dashboard` (`scripts/dashboard.mjs`) writes a self-contained HTML cost dashboard to `.kaizen/state/cost-dashboard.html`. Every gate stop and what lifts it (review recorded, waiver) is appended to `.kaizen/state/friction.jsonl` (`logFriction` in lib, never changes a decision); `metrics` → `friction` reports refusals, time blocked on push, waiver share and blocking checks. A second Stop hook (`scripts/ledger-hook.mjs` → `ledger.mjs`) charges every turn's new tokens (transcript byte offsets) to the work item — branch Jira key, else plan `jira:`/`plan:`, else branch, else `unattributed` — in `.kaizen/state/ledger.jsonl`; `kaizen cost [item|current]` and `metrics` → `work_items` give the cost of each feature or fix end to end. `scripts/models.mjs` maps every agent to a role and every role to a model per profile (`models.roles` / `models.agents` overrides, `kaizen.mjs models`); skills pass that `model` to each Agent call and review evidence records it. `scripts/audit.mjs` (`kaizen.mjs audit`, `/kaizen:setup audit`) scores SDLC maturity in five areas and scaffolds ci/pr_template/dependabot/codeowners/gitignore_env without overwriting. The Stop hook also records token usage from the transcript, main session plus subagents (`/subagents/agent-*.jsonl`, attributed to a role via launches logged by the Agent hook in `scripts/cycle-agents.mjs`); verify commands run through `scripts/run-bounded.mjs`, which kills the whole process tree on timeout; `gate off` appends the cycle to `.kaizen/state/cycles.jsonl` (`metrics` → `cycle_cost`); `gate.targeted` runs `{files}`-scoped checks. `plan check` warns on rollout without rollback/signal/threshold, `release notes` extracts rollout of shipped plans; constitution `approvers` require an approved amendment per version. Tests: `node --test plugins/kaizen/tests/*.test.mjs` (unit, CLI, gate, PR with fake `gh`, contracts — run after any skill/agent/CLI/doc change; contracts require the README to list every CLI command and hook, `docs/README.md` to list every guide, and every relative doc link to resolve). User docs: `plugins/kaizen/docs/` (getting-started, configuration, packs, troubleshooting, positioning, one guide per skill); end-to-end evals: `node plugins/kaizen/evals/run.mjs` (real `claude -p`, costly); CI in `.github/workflows/kaizen.yml`. - **kaizen-ops** (1.0.0, requires Kaizen ≥ 4.0.0; plan `docs/plans/2026-10-20-1515-refactor-kaizen-core-ops-split-plan.md`) — Kaizen's production skills `/kaizen-ops:deploy`, `/kaizen-ops:monitor`, `/kaizen-ops:postmortem`, plus their guides and the postmortem template; skills and docs only — the CLI, hooks, config and every gate stay in core, so nothing is weaker without it (a core contract test forbids core scripts and hooks from referring to kaizen-ops). `scripts/kaizen.mjs` is a resolver that finds Kaizen core (`git config kaizen.cli`, `$KAIZEN_CLI`, sibling `../kaizen`, newest `cache/dojo/kaizen/`), refuses a core older than `scripts/requires.json` and forwards the call; answers `core-root` (the skills read core's `references/` and `docs/configuration.md` through it) and `--version`. `kaizen doctor` warns (`ops_plugin`) when a repo declares deployments or signals without `kaizen-ops@dojo` enabled; `audit fix claude_settings` enables it. Evals load both plugins (`--plugin-dir` twice). Tests `node --test plugins/kaizen-ops/tests/*.test.mjs` (run by `.github/workflows/kaizen.yml`). diff --git a/docs/plans/2026-10-20-1515-refactor-kaizen-core-ops-split-plan.md b/docs/plans/2026-10-20-1515-refactor-kaizen-core-ops-split-plan.md index b69c378..aaf4c6f 100644 --- a/docs/plans/2026-10-20-1515-refactor-kaizen-core-ops-split-plan.md +++ b/docs/plans/2026-10-20-1515-refactor-kaizen-core-ops-split-plan.md @@ -368,11 +368,12 @@ Measured coupling (3.10.0): ## Definition of done -- [ ] S1 and S2 merged, Kaizen 4.0.0 and kaizen-ops 1.0.0 in `marketplace.json`; S3 (4.1.0) merged after one - minor version. -- [ ] Every R covered by its tests or evals above; CI green on the matrix for each slice. -- [ ] No `/kaizen:deploy`, `/kaizen:monitor` or `/kaizen:postmortem` outside the stubs (4.0.x) and the - CHANGELOG. +- [x] S1 (#36) and S2 (#37) merged, Kaizen 4.0.0 and kaizen-ops 1.0.0 in `marketplace.json`; S3 (4.1.0) + shipped right after S2 at the user's request, without the one-minor-version delay (doctor's + `ops_plugin` warning remains the migration signal). +- [x] Every R covered by its tests or evals above; CI green on the matrix for each slice. +- [x] No `/kaizen:deploy`, `/kaizen:monitor` or `/kaizen:postmortem` outside the CHANGELOGs and + `old → new` migration notes (contract-enforced). - [ ] Review recorded with no open P0/P1 on each slice. - [ ] A learning captured if the split taught something durable (e.g. how a plugin reaches another one's CLI). diff --git a/plugins/kaizen-ops/README.md b/plugins/kaizen-ops/README.md index fcf40d0..a323298 100644 --- a/plugins/kaizen-ops/README.md +++ b/plugins/kaizen-ops/README.md @@ -18,8 +18,12 @@ stays complete without it. Guides: [deploy](docs/guides/deploy.md) · [monitor](docs/guides/monitor.md) · [postmortem](docs/guides/postmortem.md) — index in [docs/](docs/README.md). -Until Kaizen 4.0 these commands were `/kaizen:deploy`, `/kaizen:monitor` and `/kaizen:postmortem`; -in Kaizen 4.0.x those names only answer where the command went. +Until Kaizen 4.0 these commands were part of Kaizen itself (stubs answered "moved" in 4.0.x; removed +in 4.1.0): + +- `/kaizen:deploy` → `/kaizen-ops:deploy` +- `/kaizen:monitor` → `/kaizen-ops:monitor` +- `/kaizen:postmortem` → `/kaizen-ops:postmortem` ## How it works diff --git a/plugins/kaizen-ops/tests/contracts.test.mjs b/plugins/kaizen-ops/tests/contracts.test.mjs index e7f0aed..60acb4e 100644 --- a/plugins/kaizen-ops/tests/contracts.test.mjs +++ b/plugins/kaizen-ops/tests/contracts.test.mjs @@ -64,8 +64,13 @@ test('every cited path exists: ${CLAUDE_PLUGIN_ROOT} in this plugin, core-root i test('every command reference names an existing skill, here or in core', () => { for (const { file, text } of docs) { for (const [, s] of text.matchAll(/\/kaizen-ops:([a-z-]+)/g)) assert.ok(skills.includes(s), `${file}: /kaizen-ops:${s} does not exist`); - for (const [, s] of text.matchAll(/kaizen:([a-z][a-z-]*)/g)) { - assert.ok(coreSkills.includes(s) || coreAgents.includes(s), `${file}: kaizen:${s} is not a Kaizen core skill or agent`); + if (file.endsWith('CHANGELOG.md')) continue; // history keeps the names of its time + for (const line of text.split('\n')) { + for (const [, s] of line.matchAll(/(? is fine as a migration note next to its /kaizen-ops:. + if (skills.includes(s) && line.includes(`kaizen-ops:${s}`)) continue; + assert.ok(coreSkills.includes(s) || coreAgents.includes(s), `${file}: kaizen:${s} is not a Kaizen core skill or agent`); + } } } }); diff --git a/plugins/kaizen/.claude-plugin/plugin.json b/plugins/kaizen/.claude-plugin/plugin.json index b526ab0..48f64c6 100644 --- a/plugins/kaizen/.claude-plugin/plugin.json +++ b/plugins/kaizen/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "kaizen", "description": "High-quality AI SDLC adapted from the Compound Engineering loop: engineering constitution enforced as gates, brainstorm, plan (traceability, threats, rollout, PR-sized slices) with independent doc review, test-first work with a Stop-hook quality gate, multi-agent code review, ship and PR watching, UI polish, learnings in docs/learnings/ read back by every cycle, ADRs, blameless postmortems, DORA metrics and releases; production commands (deploy, monitor, postmortem) in kaizen-ops", - "version": "4.0.0", + "version": "4.1.0", "author": { "name": "Angelo LIMA", "email": "contact@example.com" diff --git a/plugins/kaizen/CHANGELOG.md b/plugins/kaizen/CHANGELOG.md index 2f8ae91..7c72952 100644 --- a/plugins/kaizen/CHANGELOG.md +++ b/plugins/kaizen/CHANGELOG.md @@ -2,6 +2,18 @@ Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). Versions: [SemVer](https://semver.org/). +## [4.1.0] - 2026-10-20 + +### Removed +- The `/kaizen:deploy`, `/kaizen:monitor` and `/kaizen:postmortem` stubs and their guides (deprecated + in 4.0.0): Kaizen's command list no longer carries the production commands. They are + `/kaizen-ops:deploy`, `/kaizen-ops:monitor`, `/kaizen-ops:postmortem` in the kaizen-ops plugin; + `kaizen doctor` still tells a repository that declares deployments or signals to enable it. + +### Changed +- Contract tests: a changelog keeps the command names of its time; elsewhere a former `/kaizen:` + may only appear as a migration note, on the line that names its `/kaizen-ops:`. + ## [4.0.0] - 2026-10-20 ### Breaking diff --git a/plugins/kaizen/README.md b/plugins/kaizen/README.md index 65a0016..095ab8b 100644 --- a/plugins/kaizen/README.md +++ b/plugins/kaizen/README.md @@ -117,9 +117,13 @@ run next. ### Deploy and monitor — in kaizen-ops Since 4.0 the production commands live in the [**kaizen-ops**](../kaizen-ops/README.md) plugin, for -teams that deploy through Kaizen: `/kaizen:deploy` → `/kaizen-ops:deploy`, `/kaizen:monitor` → -`/kaizen-ops:monitor`, `/kaizen:postmortem` → `/kaizen-ops:postmortem` (until 4.1.0 the old names only -answer where the command went). Enable it next to Kaizen: +teams that deploy through Kaizen (the old names were removed in 4.1.0): + +- `/kaizen:deploy` → `/kaizen-ops:deploy` +- `/kaizen:monitor` → `/kaizen-ops:monitor` +- `/kaizen:postmortem` → `/kaizen-ops:postmortem` + +Enable it next to Kaizen: `"enabledPlugins": { "kaizen@dojo": true, "kaizen-ops@dojo": true }`. The CLI, the configuration and every gate behind them — typed approval for protected environments, deployment tags, DORA from real deployments — stay here, so nothing is weaker without it. diff --git a/plugins/kaizen/docs/README.md b/plugins/kaizen/docs/README.md index a48e05a..077a110 100644 --- a/plugins/kaizen/docs/README.md +++ b/plugins/kaizen/docs/README.md @@ -86,12 +86,12 @@ In-depth pages: what each mechanism does exactly, with its rules, limits and dia - [address-feedback](guides/address-feedback.md) — handle review feedback - [watch-pr](guides/watch-pr.md) — drive a PR to "ready" - [release](guides/release.md) — prepare a version -- [deploy](guides/deploy.md), [monitor](guides/monitor.md) — moved to [kaizen-ops](../../kaizen-ops/docs/README.md) in 4.0 +- deploy, monitor — in [kaizen-ops](../../kaizen-ops/docs/README.md) since 4.0 **Learn and measure** - [learn](guides/learn.md) — capture a learning - [prune-learnings](guides/prune-learnings.md) — maintain the learnings -- [postmortem](guides/postmortem.md) — moved to [kaizen-ops](../../kaizen-ops/docs/README.md) in 4.0 +- postmortem — in [kaizen-ops](../../kaizen-ops/docs/README.md) since 4.0 - [metrics](guides/metrics.md) — measure delivery and the compounding effect **Orchestrate** diff --git a/plugins/kaizen/docs/guides/deploy.md b/plugins/kaizen/docs/guides/deploy.md deleted file mode 100644 index e9aa11c..0000000 --- a/plugins/kaizen/docs/guides/deploy.md +++ /dev/null @@ -1,10 +0,0 @@ -# deploy — moved to kaizen-ops - -Since Kaizen 4.0, `/kaizen:deploy` is **`/kaizen-ops:deploy`**, in the -[kaizen-ops](../../../kaizen-ops/README.md) plugin: see its -[deploy guide](../../../kaizen-ops/docs/guides/deploy.md). Enable it with -`"kaizen-ops@dojo": true` in `.claude/settings.json`; `kaizen doctor` reports when a repository that -declares deployments or production signals does not. - -The CLI behind it (`node $K deploy …`), the gates and the configuration stay in Kaizen -core. `/kaizen:deploy` only answers where the command went until Kaizen 4.1.0 removes it. diff --git a/plugins/kaizen/docs/guides/monitor.md b/plugins/kaizen/docs/guides/monitor.md deleted file mode 100644 index 918b369..0000000 --- a/plugins/kaizen/docs/guides/monitor.md +++ /dev/null @@ -1,10 +0,0 @@ -# monitor — moved to kaizen-ops - -Since Kaizen 4.0, `/kaizen:monitor` is **`/kaizen-ops:monitor`**, in the -[kaizen-ops](../../../kaizen-ops/README.md) plugin: see its -[monitor guide](../../../kaizen-ops/docs/guides/monitor.md). Enable it with -`"kaizen-ops@dojo": true` in `.claude/settings.json`; `kaizen doctor` reports when a repository that -declares deployments or production signals does not. - -The CLI behind it (`node $K monitor …`), the gates and the configuration stay in Kaizen -core. `/kaizen:monitor` only answers where the command went until Kaizen 4.1.0 removes it. diff --git a/plugins/kaizen/docs/guides/postmortem.md b/plugins/kaizen/docs/guides/postmortem.md deleted file mode 100644 index 9331217..0000000 --- a/plugins/kaizen/docs/guides/postmortem.md +++ /dev/null @@ -1,10 +0,0 @@ -# postmortem — moved to kaizen-ops - -Since Kaizen 4.0, `/kaizen:postmortem` is **`/kaizen-ops:postmortem`**, in the -[kaizen-ops](../../../kaizen-ops/README.md) plugin: see its -[postmortem guide](../../../kaizen-ops/docs/guides/postmortem.md). Enable it with -`"kaizen-ops@dojo": true` in `.claude/settings.json`; `kaizen doctor` reports when a repository that -declares deployments or production signals does not. - -The CLI behind it (`node $K monitor incident …`), the gates and the configuration stay in Kaizen -core. `/kaizen:postmortem` only answers where the command went until Kaizen 4.1.0 removes it. diff --git a/plugins/kaizen/docs/troubleshooting.md b/plugins/kaizen/docs/troubleshooting.md index c755668..65e2a25 100644 --- a/plugins/kaizen/docs/troubleshooting.md +++ b/plugins/kaizen/docs/troubleshooting.md @@ -58,7 +58,7 @@ does not run them — `git config core.hooksPath .githooks`. | Message | What to do | |---|---| -| `/kaizen:deploy` (or monitor, postmortem) only says "moved", or `/kaizen-ops:deploy` is unknown | since Kaizen 4.0 the production commands are in the kaizen-ops plugin: `"enabledPlugins": { "kaizen-ops@dojo": true }` in `.claude/settings.json` (`node $K audit fix claude_settings` does it), then a new session; `kaizen doctor` reports it | +| `/kaizen:deploy` (or monitor, postmortem) is unknown, or `/kaizen-ops:deploy` is unknown | since Kaizen 4.0 the production commands are in the kaizen-ops plugin (`/kaizen-ops:deploy`, `/kaizen-ops:monitor`, `/kaizen-ops:postmortem`): `"enabledPlugins": { "kaizen-ops@dojo": true }` in `.claude/settings.json` (`node $K audit fix claude_settings` does it), then a new session; `kaizen doctor` reports it | | "Direct deployment of production refused" | go through `/kaizen-ops:deploy production`: it asks for your approval, creates the tag and watches | | "production is protected: approval required" | type the displayed code yourself: `kaizen deploy ` (30 min, for this commit) | | "unknown environment" | declare it in `.kaizen/config.json` → `deploy.environments` ([configuration](configuration.md#deploy--deployment-and-rollback)), or `node $K deploy detect` | diff --git a/plugins/kaizen/skills/deploy/SKILL.md b/plugins/kaizen/skills/deploy/SKILL.md deleted file mode 100644 index 519fdd9..0000000 --- a/plugins/kaizen/skills/deploy/SKILL.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -name: deploy -description: Moved in Kaizen 4.0 — deployments, rollbacks and feature flags are now /kaizen-ops:deploy, in the kaizen-ops plugin. Use when the user types /kaizen:deploy, only to say where the command went. -allowed-tools: Read ---- - -# /kaizen:deploy moved to kaizen-ops - -Kaizen 4.0 moved the production commands to the **kaizen-ops** plugin. Do not run anything — no CLI, -no deployment, no command — and answer in the user's language, in three lines: - -1. The command is now **`/kaizen-ops:deploy`** (same arguments, same behaviour). -2. If it is not available, enable the plugin in `.claude/settings.json`: - `"enabledPlugins": { "kaizen@dojo": true, "kaizen-ops@dojo": true }`, then restart Claude Code; - `/kaizen:help` checks the setup if anything is still missing. -3. This stub is removed in Kaizen 4.1.0. diff --git a/plugins/kaizen/skills/monitor/SKILL.md b/plugins/kaizen/skills/monitor/SKILL.md deleted file mode 100644 index c62c628..0000000 --- a/plugins/kaizen/skills/monitor/SKILL.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -name: monitor -description: Moved in Kaizen 4.0 — production signals, incidents and continuous monitoring are now /kaizen-ops:monitor, in the kaizen-ops plugin. Use when the user types /kaizen:monitor, only to say where the command went. -allowed-tools: Read ---- - -# /kaizen:monitor moved to kaizen-ops - -Kaizen 4.0 moved the production commands to the **kaizen-ops** plugin. Do not run anything — no CLI, -no deployment, no command — and answer in the user's language, in three lines: - -1. The command is now **`/kaizen-ops:monitor`** (same arguments, same behaviour). -2. If it is not available, enable the plugin in `.claude/settings.json`: - `"enabledPlugins": { "kaizen@dojo": true, "kaizen-ops@dojo": true }`, then restart Claude Code; - `/kaizen:help` checks the setup if anything is still missing. -3. This stub is removed in Kaizen 4.1.0. diff --git a/plugins/kaizen/skills/postmortem/SKILL.md b/plugins/kaizen/skills/postmortem/SKILL.md deleted file mode 100644 index eba3f66..0000000 --- a/plugins/kaizen/skills/postmortem/SKILL.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -name: postmortem -description: Moved in Kaizen 4.0 — blameless postmortems of production incidents are now /kaizen-ops:postmortem, in the kaizen-ops plugin. Use when the user types /kaizen:postmortem, only to say where the command went. -allowed-tools: Read ---- - -# /kaizen:postmortem moved to kaizen-ops - -Kaizen 4.0 moved the production commands to the **kaizen-ops** plugin. Do not run anything — no CLI, -no deployment, no command — and answer in the user's language, in three lines: - -1. The command is now **`/kaizen-ops:postmortem`** (same arguments, same behaviour). -2. If it is not available, enable the plugin in `.claude/settings.json`: - `"enabledPlugins": { "kaizen@dojo": true, "kaizen-ops@dojo": true }`, then restart Claude Code; - `/kaizen:help` checks the setup if anything is still missing. -3. This stub is removed in Kaizen 4.1.0. diff --git a/plugins/kaizen/tests/contracts.test.mjs b/plugins/kaizen/tests/contracts.test.mjs index 9f00762..1d4dcdf 100644 --- a/plugins/kaizen/tests/contracts.test.mjs +++ b/plugins/kaizen/tests/contracts.test.mjs @@ -58,11 +58,18 @@ test('every kaizen: reference names an existing skill or agent', () => { const known = new Set([...skills, ...agents]); // Plan section markers (kaizen:goal…) and artifact contracts: not skills. const markers = new Set(['goal', 'product', 'relationships', 'planning', 'constitution', 'threats', 'rollout', 'units', 'verification', 'done', 'id', 'section', 'name']); + // Commands moved to kaizen-ops in 4.0: a changelog keeps them as history; elsewhere an old name may + // only appear as a migration note, on the line that names its /kaizen-ops: replacement. + const moved = new Set(['deploy', 'monitor', 'postmortem']); const bad = []; for (const { file, text } of docs) { - for (const m of text.matchAll(/kaizen:([a-z][a-z-]*)/g)) { - if (markers.has(m[1]) || known.has(m[1])) continue; - bad.push(`${file} → kaizen:${m[1]}`); + if (file.endsWith('CHANGELOG.md')) continue; + for (const line of text.split('\n')) { + for (const m of line.matchAll(/(?