Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/reference/FEATURES.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ GENERATED , do not hand-edit. Regenerate: `bash lib/registry/feature-registry.sh
| `/kit:design` | `[H/I]` | Opt-in interactive solution-design beat between /think and /spec. Use when the operator wants to shape HOW to build after the idea passed /… | SPEC-003, SPEC-004, SPEC-005 +162 | test-anomalies-advisor.sh, test-board-mirror-cleanup.sh, test-ceremony-fits-diff.sh +40 |
| `/kit:devs-team` | `[H/I]` | Parallel multi-lens critique of a solution design (the active spec if present, else the decision brief). Dispatches 5 engineering lenses, m… | SPEC-016, SPEC-018, SPEC-019 +14 | test-gate-vocab-recording.sh, test-meta-review-verifiers.sh, test-meta-spec-depth.sh +1 |
| `/kit:dispatch` | `[H/I]` | Fire several disjoint VALIDATED specs concurrently, each in its own worktree, then converge. Cross-goal fan-out behind a disjointness gate … | SPEC-002, SPEC-016, SPEC-017 +114 | test-advisor.sh, test-agent-effectiveness.sh, test-attempt-state-race.sh +52 |
| `/kit:docs` | `[H/I]` | Update all project documentation to match the current codebase. Cross-references the diff against every doc file and fixes drift. | SPEC-001, SPEC-002, SPEC-003 +292 | conform.sh, test-active-spec-pick.sh, test-adapters.sh +163 |
| `/kit:docs` | `[H/I]` | Update all project documentation to match the current codebase. Cross-references the diff against every doc file and fixes drift. | SPEC-001, SPEC-002, SPEC-003 +292 | conform.sh, test-active-spec-pick.sh, test-adapters.sh +164 |
| `/kit:draft-agent` | `[H/I]` | Meta-agent agent-builder. From a one-line description, generates a new subagent definition OR a mega-goal sub-goal file and (by default) in… | SPEC-089, SPEC-108, SPEC-139 +1 | test-agent-effectiveness.sh, test-command-emit-sweep.sh, test-meta-agent.sh +1 |
| `/kit:execute` | `[H/I]` | Whole-spec execution with verification. Dispatches one builder for the whole spec, verifies every task's criteria once at the end, retries … | SPEC-001, SPEC-003, SPEC-004 +82 | test-board-work.sh, test-break-it.sh, test-config-registry.sh +29 |
| `/kit:explain` | `[H/I]` | Turn a merged change into a literate-diff explainer a human READS to understand: background -> goal + intuition -> a prose-ordered diff -> … | SPEC-050, SPEC-060, SPEC-094 +25 | test-boundary-lint.sh, test-clean-room.sh, test-command-emit-sweep.sh +13 |
Expand All @@ -38,7 +38,7 @@ GENERATED , do not hand-edit. Regenerate: `bash lib/registry/feature-registry.sh
| `/kit:retro` | `[H/I]` | Run a retrospective after shipping. Captures what worked, what didn't, and action items for the next cycle. Outputs to docs/retro/RETRO.md. | SPEC-002, SPEC-003, SPEC-006 +48 | smoke.sh, test-command-emit-sweep.sh, test-gate-vocab-recording.sh +10 |
| `/kit:review-team` | `[H/I]` | Parallel code review with 3 specialist lenses plus the kit-default kit:advisor extra lens. Dispatches the security, architecture, and test-… | SPEC-002, SPEC-003, SPEC-007 +50 | test-advisor.sh, test-config-registry.sh, test-every-step-review.sh +10 |
| `/kit:review` | `[H/I]` | Paranoid code review. Security, architecture, regressions, missing tests, edge cases. Produces actionable TODOS. | SPEC-001, SPEC-002, SPEC-003 +155 | smoke.sh, test-adopt.sh, test-advisor.sh +90 |
| `/kit:ship` | `[H/I]` | Ship: review gate, tests, version bump, changelog, conventional commit, docs update, PR. Complete pipeline from done to merged. | SPEC-001, SPEC-002, SPEC-003 +111 | test-active-spec-pick.sh, test-adopt.sh, test-board-mirror.sh +64 |
| `/kit:ship` | `[H/I]` | Ship: review gate, tests, version bump, changelog, conventional commit, docs update, PR. Complete pipeline from done to merged. | SPEC-001, SPEC-002, SPEC-003 +111 | test-active-spec-pick.sh, test-adopt.sh, test-board-mirror.sh +65 |
| `/kit:spec-validate` | `[H/I]` | Adversarial review of a spec before implementation. 7 specialist lenses attack the spec from different angles (6 advisory, 1 blocking on th… | SPEC-002, SPEC-003, SPEC-004 +70 | test-command-emit-sweep.sh, test-design-record.sh, test-every-step-review.sh +10 |
| `/kit:spec` | `[H/I]` | Generate a development spec from a feature idea or decision brief. Creates docs/specs/ with structured requirements. | SPEC-001, SPEC-002, SPEC-003 +241 | test-active-spec-pick.sh, test-audit-verdict-grammar.sh, test-bin-forwarders.sh +111 |
| `/kit:start` | `[H/I]` | Detect project state and suggest the right next command. The entry point for any session. | SPEC-002, SPEC-003, SPEC-004 +94 | test-anomalies-advisor.sh, test-audit-cadence.sh, test-board-add.sh +96 |
Expand Down Expand Up @@ -103,7 +103,7 @@ GENERATED , do not hand-edit. Regenerate: `bash lib/registry/feature-registry.sh
| `observe` | `[I]` | Query and render the kit's control plane (fleet runs, spend, debt; backed by lib/bench) from an agent session. NOT for your own Claude Code… | SPEC-033, SPEC-052, SPEC-128 +17 | smoke.sh, test-bin-forwarders.sh, test-kit-contract.sh +4 |
| `repo-hygiene` | `[I]` | Use for the whole-repo decay audit, "run the repo-hygiene loop", "what has rotted in this repo", "is anything mis-shelved", "dọn repo", o… | SPEC-256 | test-audit-cadence.sh, test-audit-verdict-grammar.sh, test-repohygiene.sh |
| `skill-review` | `[I]` | Review and promote skill drafts that skill-curator staged from past sessions. Use when the user runs /skill-review, says "review my skill d… | SPEC-218, SPEC-285 | test-async.sh, test-bin-forwarders.sh, test-egress-visible.sh +7 |
| `stats` | `[I]` | Query or render ledger state and propose backlog rows off anomalies. Use when asked to SEE it -- "show me the ledger state", "my waived gat… | SPEC-001, SPEC-182, SPEC-192 +24 | test-anomalies-advisor.sh, test-bin-forwarders.sh, test-board-brief.sh +38 |
| `stats` | `[I]` | Query or render ledger state and propose backlog rows off anomalies. Use when asked to SEE it -- "show me the ledger state", "my waived gat… | SPEC-001, SPEC-182, SPEC-192 +24 | test-anomalies-advisor.sh, test-bin-forwarders.sh, test-board-brief.sh +39 |
| `system-design` | `[I]` | Own the repo's system design document at docs/SYSTEM-DESIGN.md: its format, its updates per feature, and rendering it as a UML drawing set … | SPEC-292, SPEC-426, SPEC-427 | test-doc-figures.sh, test-system-design.sh |
| `topology-drift` | `[I]` | Maintainer-only. Use to audit THIS KIT's OWN feature estate against its path map, "run the topology-drift loop", "feature inventory drift".… | SPEC-225, SPEC-235, SPEC-237 | test-audit-cadence.sh, test-audit-scanner-contract.sh, test-audit-verdict-grammar.sh +1 |
| `web-drift` | `[I]` | Use for the live-website agent-readiness audit, "run the web-drift loop", "web drift sweep", "check the public sites", or a scheduled caden… | SPEC-232, SPEC-256, SPEC-298 | test-audit-cadence.sh, test-audit-verdict-grammar.sh, test-web-drift-refusal-guard.sh |
Expand Down Expand Up @@ -134,7 +134,7 @@ GENERATED , do not hand-edit. Regenerate: `bash lib/registry/feature-registry.sh
| `post-compact-reinject.sh` | `[E]` | SessionStart | SessionStart hook (matcher compact) that re-injects the critical project rules compaction strips from context. | SPEC-003, SPEC-010, SPEC-034 +5 | test-active-spec-pick.sh, test-hooks.sh, test-install-modules.sh +2 |
| `pre-compact-backup.sh` | `[E]` | PreCompact | PreCompact hook that saves a structured snapshot of the session before auto-compaction. | SPEC-010, SPEC-084, SPEC-334 +3 | test-active-spec-pick.sh, test-hooks.sh, test-install-modules.sh +3 |
| `prose-rag.sh` | `[E]` | UserPromptSubmit | UserPromptSubmit shim that injects prior-note recall when PROSE_RAG_INJECT=1; dormant otherwise. | SPEC-194, SPEC-204, SPEC-249 +6 | smoke.sh, test-adopt.sh, test-bin-forwarders.sh +8 |
| `safety-gate.sh` | `[E]` | PreToolUse | PreToolUse hook that blocks destructive deletes, direct pushes to main or master, and force-pushes. | SPEC-003, SPEC-014, SPEC-019 +15 | test-anchor-module-gate.sh, test-codex-hooks.sh, test-codex-manifest.sh +12 |
| `safety-gate.sh` | `[E]` | PreToolUse | PreToolUse hook that blocks destructive deletes, direct pushes to main or master, and force-pushes. | SPEC-003, SPEC-014, SPEC-019 +15 | test-anchor-module-gate.sh, test-codex-hooks.sh, test-codex-manifest.sh +13 |
| `secrets-guard.sh` | `[E]` | PreToolUse | PreToolUse hook that blocks the agent from reading secret files, with the path canonicalized first. | SPEC-014, SPEC-084, SPEC-288 +4 | test-codex-hooks.sh, test-codex-manifest.sh, test-entry.sh +6 |
| `ship-gate.sh` | `[E]` | PreToolUse | PreToolUse hook that refuses a push onto a default branch, or a push or PR when the spec lane has a required gate with no ran or override e… | SPEC-006, SPEC-042, SPEC-044 +88 | test-active-spec-pick.sh, test-anchor-module-gate.sh, test-ceremony-fits-diff.sh +52 |
| `slop-cleaner.sh` | `[E]` | Stop | Stop hook that nudges, never blocks, on bloat signals in recently modified source files after long sessions. | SPEC-013, SPEC-014, SPEC-084 +4 | test-anchor-module-gate.sh, test-codex-hooks.sh, test-egress-visible.sh +3 |
Expand Down
80 changes: 80 additions & 0 deletions docs/verification/l312-install-fixes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Verification: Installer bugs and out-of-place copy trims

## Scope

Three installer bugs fixed and two out-of-place copy trims applied in `install.sh`, with sandboxed regression coverage in `tests/test-install-fixes.sh` (including review round 1 blockers B1 and B2):

1. In-place `--uninstall` (direct clone, symlinked `$CLAUDE_DIR/dwarves-kit -> checkout`, or case-variant path on case-insensitive filesystems such as macOS APFS) compares `$KIT_DIR` and `$CLAUDE_DIR/dwarves-kit` by inode (`-ef`), keeping checkout files (`hooks/`, `kit.toml`, `bin/`, `lib/`, `settings.json`, `docs/`) and removing only artifacts created outside the checkout.
2. `--force-both` (and `KIT_FORCE_FULL=1`) after a plugin-compat install exits 0 by replacing `ls -1 ... | while read` summary pipelines with glob loops that tolerate empty `commands/` and `agents/` directories under `set -euo pipefail`.
3. `kit_render_install_toml` preserves the destination `kit.toml` mode on update (or the source `kit.toml` mode on fresh install, fallback `0644`) instead of letting `mktemp` drop it to `0600`.
4. Out-of-place `lib/` tar copy excludes `lib/*/tests` and `lib/*/*/tests` (grep over `bin/`, `hooks/`, `lib/`, `agents/`, `commands/`, `.agents/` confirmed zero installed runtime tools read module test directories; only checkout-only dev scripts `bin/test-affected`, `lib/registry/feature-registry.sh`, and `hooks/ship-gate.sh` inspect them in a kit checkout).
5. Out-of-place `docs/impl-playbook/` copy installs only the 10 files referenced by `agents/`, `commands/`, `hooks/`, or `lib/`, plus sibling playbooks they point to:
- Kept (10): `cloudflare.md` (`agents/infra-reviewer.md:29`), `coding-hygiene.md` (`agents/code-reviewer.md:24,99`), `exploratory-testing.md` (`commands/test-plan.md:17`), `financial-data-handling.md` (`agents/security-reviewer.md:70,108`), `frontend-design-engineering.md` (`agents/frontend-reviewer.md:28`), `red-team-engagement.md` (`docs/impl-playbook/threat-modeling.md:27`), `security.md` (`agents/security-reviewer.md:27,108`), `test-case-design.md` (`agents/test-writer.md:34,82`; `agents/code-reviewer.md:66,99`), `testing-strategy.md` (`agents/test-writer.md:33,82`; `agents/code-reviewer.md:65,99`), `threat-modeling.md` (`agents/security-reviewer.md:70,108`).
- Dropped (11, zero direct or transitive references from `agents/`, `commands/`, `hooks/`, `lib/`): `README.md`, `architecture-decision.md`, `bash.md`, `ci-cd-pipeline.md`, `go.md`, `logging-observability.md`, `notification-design.md`, `python.md`, `requirements-gathering.md`, `rust.md`, `typescript.md`.

## Verification runs

### Regression suite on `/bin/bash` (3.2.57) and bash 5 (5.3.20)

Command: /bin/bash tests/test-install-fixes.sh && bash tests/test-install-fixes.sh
Exit: 0
Output:
/bin/bash 3.2.57:
PASS case-variant in-place --uninstall exits 0
PASS case-variant in-place uninstall keeps checkout hooks and kit.toml intact
PASS out-of-place install copies exactly the referenced impl-playbooks
PASS re-install removes stale unreferenced impl-playbook files
PASS=31 FAIL=0
bash 5.3.20:
PASS case-variant in-place --uninstall exits 0
PASS case-variant in-place uninstall keeps checkout hooks and kit.toml intact
PASS out-of-place install copies exactly the referenced impl-playbooks
PASS re-install removes stale unreferenced impl-playbook files
PASS=31 FAIL=0

### Suites selected by `tests/run-all.sh --changed --list` (40 suites)

Command: bash tests/run-all.sh --changed --list (executed per suite on bash 5.3.20 and /bin/bash 3.2.57)
Exit: 0 (for all 39 unlocked suites on bash 5.3.20)
Output:
bash 5.3.20: 39/40 passed (test-adopt 88/0, test-install-modules 67/0, test-install-compat PASS, test-clean-room 75/0, test-install-fixes 31/0, test-meta-docs-registry 123/123, test-hooks 843/843, plus all other 32 unlocked suites). 1/40 (tests/test-wrap-land.sh, unrelated to install.sh) timed out waiting on the host test lock held by a sibling worktree.
/bin/bash 3.2.57: 33/40 passed (all installer, adopt, clean-room, and meta-docs-registry suites passed: test-install-fixes 31/0, test-install-modules, test-install-compat, test-install-lib-copy, test-install-self-symlink, test-install-mods, test-install-contract, test-install-plugin-detect, test-adopt, test-clean-room, test-meta-docs-registry 123/123). 7/40 failed for pre-existing reasons outside install.sh (test-board-registry-env, test-board-states, test-install-clis board promote, test-hooks 837/843, test-wrap-merge require bash 4+; test-boundary-lint hit pre-existing lib/mega/mega-review.py; test-wrap-land waited on the sibling host test lock).

### Shellcheck lint

Command: shellcheck --norc -S warning install.sh tests/test-install-fixes.sh
Exit: 0
Output:
(no warnings or errors)

### Host sandbox integrity

Before and after all test runs, real `~/.gitconfig` (`2c3e7653...57d4f21`) and `~/.claude/settings.json` (`203cd3b9...7a6a2adf`) SHA-256 digests were unchanged.

## Negative control

Ran `lib/gate/negctl.sh` against both the pre-round-1 commit (`f7a2a02e:install.sh`, proving B1 and B2 fail red) and `origin/master:install.sh` (proving all five items fail red), plus five individual planted faults.

Command: bash lib/gate/negctl.sh . "bash tests/test-install-fixes.sh" "git show f7a2a02e:install.sh > install.sh"
Exit: 1 (under mutation against f7a2a02e:install.sh; 0 before mutation and 0 after restore)
Output:
== 1. In-place --uninstall keeps checkout hooks and kit.toml ==
FAIL case-variant in-place uninstall keeps checkout hooks and kit.toml intact
== 5. Out-of-place installs copy only referenced impl-playbooks ==
FAIL out-of-place install copies exactly the referenced impl-playbooks
expected: ... red-team-engagement.md ...
got: (9 files without red-team-engagement.md)
---
PASS=29 FAIL=2
Against origin/master:install.sh: rc=1 (PASS=17 FAIL=14); restore rc=0 (PASS=31 FAIL=0).
Individual planted faults:
Bug1-inplace-uninstall: rc=1 (PASS=25 FAIL=3)
Bug2-force-both-pipefail: rc=1 (PASS=25 FAIL=3)
Bug3-kit-toml-mode: rc=1 (PASS=25 FAIL=3)
Trim4-lib-tests: rc=1 (PASS=26 FAIL=2)
Trim5-impl-playbooks: rc=1 (PASS=26 FAIL=2)
Verdict: RED

## Rollback

Revert the commits on `install.sh`, `tests/test-install-fixes.sh`, and `docs/reference/FEATURES.md` with `git revert <sha>`, then re-run `bash install.sh` to restore the previous installer behavior and full `lib/` + `docs/impl-playbook/` copy set.
Loading
Loading