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
30 changes: 15 additions & 15 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ Tool-agnostic front door (Claude Code, Codex, Gemini, human): four-zone operate-

## Enforcement boundary

**Contract, not a guardrail.** Hooks enforce; coverage varies by runtime:
- **Claude Code** enforces everything (safety-gate, push-to-main, anti-rationalization, verification).
- **Codex** enforces the five hard controls (`hooks/codex-hooks.json`; `SECURITY.md`).
- **Other runtimes** are **advisory only**.
**Contract, not a guardrail.** Hooks share one entry (`hooks/anchor-root.sh`); coverage varies by runtime:
- **Claude Code** enforces everything (all hooks in `hooks/hooks.json` / `settings.json`).
- **Codex, Antigravity (`agy`), and Devin** enforce the 12 PreToolUse/Stop guards via `hooks/anchor-root.sh --runtime <codex|agy|devin>` (`hooks/codex-hooks.json` trusted in `/hooks`; `hooks/agy-hooks.json` and `hooks/devin-hooks.json` owner-registered with `DEVKIT_ROOT`; `docs/reference/agent-runtimes.md`).
- **Other runtimes** (or unregistered manifests) are **advisory only**.

Layering: `docs/reference/architecture.md` ("Hook fallback layer"), `docs/reference/PHILOSOPHY.md`, `CLAUDE.md`.

Expand All @@ -22,35 +22,35 @@ Layering: `docs/reference/architecture.md` ("Hook fallback layer"), `docs/refere

Smallest verifiable increment, verified locally, committed. **Skill routing:** design -> `/kit:think` -> `/kit:design`; bugs -> `/kit:debug`; skip overlapping third-party skills.

0. **Take work.** Use handed task. **WAVE** (2+ items): work one at a time from chat, never mint board rows; list unfinished follow-ups in final report. New rows need operator ask or blocker (`board-row-gate`: `board-row-ok: <reason>`; opt out `[gate] board_row_gate = false`). Else pull `bash "$K/lib/board/backlog.sh" next`, claim, flip to `claimed` (`_meta` is maintainer-only).
1. **Classify, lane, grill, Done.** Run `bash "$K/lib/classify/task-type-classify.sh" classify "<task>"`. `spec-feature` picks `tiny`/`normal`/`full`/`bug`/`backfill` (default `normal`; classifier suggests `full`; push diff floor applies full gates on hard paths); other types run their type loop + `Lane:`. Run `/kit:grill` (tiny exempt), log `bash "$K/lib/gate/gate-ledger.sh" record <rid> grill ran|skipped "<reason>"`. Phase 0: define `Done =` via `bash "$K/lib/gate/proof-gate.sh" contract "<task>"`.
0. **Take work.** Use handed task. **WAVE** (2+ items): one at a time from chat, never mint board rows; list follow-ups at close. New rows need operator ask or blocker (`board-row-gate`: `board-row-ok: <reason>`; `[gate] board_row_gate = false` opts out). Else pull `bash "$K/lib/board/backlog.sh" next` and claim (`_meta` is maintainer-only).
1. **Classify, lane, grill, Done.** Run `bash "$K/lib/classify/task-type-classify.sh" classify "<task>"`. `spec-feature` picks `tiny`/`normal`/`full`/`bug`/`backfill` (default `normal`; classifier suggests `full`; push floor applies full gates on hard paths); other types run their type loop + `Lane:`. Run `/kit:grill` (tiny exempt), log `bash "$K/lib/gate/gate-ledger.sh" record <rid> grill ran|skipped "<reason>"`. Phase 0: define `Done =` via `bash "$K/lib/gate/proof-gate.sh" contract "<task>"`.
2. **Read spec:** task row, AC, `## Verification`, `## After state` (tiny: one edit).
3. **Implement** smallest verifiable increment; no speculation or premature abstraction.
4. **Verify locally:** run `## Verification` yourself (CI is a second opinion); never claim unrun checks.
4. **Verify locally:** run `## Verification` yourself (CI is second opinion); never claim unrun checks.
5. **Commit:** conventional commit, one logical change, no spec/ticket IDs in subject (`commit-format`; `ship-gate` + `push-to-main` guard push).

Stuck -> zone 4; never churn.
- **One rid:** `<rid>` = `bash "$K/lib/gate/gate-ledger.sh" rid` (branch slug, `type/` stripped; refuses master/main/detached).
- **Show the road, then your position on it:** print `bash "$K/lib/gate/gate-ledger.sh" plan <lane>`, `bash "$K/lib/gate/gate-ledger.sh" progress <rid> <lane>` per phase, `bash "$K/lib/telemetry/lane-telemetry.sh" trace <rid>`.
- **Show the road, then your position on it:** `bash "$K/lib/gate/gate-ledger.sh" plan <lane>`, `bash "$K/lib/gate/gate-ledger.sh" progress <rid> <lane>` per phase, `bash "$K/lib/telemetry/lane-telemetry.sh" trace <rid>`.
- **Review & battery:** `lib/` or `hooks/` uses `/kit:review-team`; `/kit:battery` skips small diffs (`bash "$K/lib/gate/battery-gate.sh"`).
- **Gates:** `bash "$K/lib/gate/gate-ledger.sh" record <rid> <Phase> ran|skipped "<why>"` (`ship-gate` blocks missing required gates without `ran`/`override`; `bash "$K/lib/gate/gate-ledger.sh" descent <rid> <lane>` checks order). `bash "$K/lib/gate/gate-ledger.sh" outcome` (`HOOK-ENFORCED` at ship), `bash "$K/lib/spec/spec-next.sh" reserve`, `bash "$K/lib/gate/proof-table-gen.sh" <rid>`, advisory gates, flows: `docs/WORKFLOW.md`, `docs/verification/README.md`.
- **Gates:** `bash "$K/lib/gate/gate-ledger.sh" record <rid> <Phase> ran|skipped "<why>"` (`ship-gate` blocks missing gates without `ran`/`override`; `bash "$K/lib/gate/gate-ledger.sh" descent <rid> <lane>` checks order). `bash "$K/lib/gate/gate-ledger.sh" outcome` (`HOOK-ENFORCED` at ship), `bash "$K/lib/spec/spec-next.sh" reserve`, `bash "$K/lib/gate/proof-table-gen.sh" <rid>`: `docs/WORKFLOW.md`, `docs/verification/README.md`.

## 3. Done means

Done only when **AC are met AND the verifier ran the check** against phase-0 `Done =` (else not assignable), review recorded, report written, and final response lists what changed and what was not attempted. If you could not run a check, say so plainly. Self-reported "done" is not proof (anti-rationalization backstops Claude Code).
Done only when **AC are met AND the verifier ran the check** against phase-0 `Done =`, review recorded, report written, and final reply lists what changed and what was not attempted. Say plainly if a check could not run. Self-reported "done" is not proof.

- **Show proof:** capture `Output:` (or screenshot/GIF); `ship-gate` refuses typed words alone. Copy to final response and PR (`bash "$K/bin/wrap" land`); `[proof] visual = true` UI diffs owe `bash "$K/bin/proof-asset" put` (`docs/verification/README.md`).
- **Show proof:** capture `Output:` (or screenshot/GIF); `ship-gate` refuses typed words alone. Copy to reply and PR (`bash "$K/bin/wrap" land`); `[proof] visual = true` UI diffs owe `bash "$K/bin/proof-asset" put` (`docs/verification/README.md`).
- **Fast tests:** iterate on `tests/test-<name>.sh`; regressions once via `bash tests/run-all.sh --changed --time`. Never loop suites, clone master, or run `--all` (`docs/reference/operations.md`).
- **Deployable-done:** services, daemons, flagged features, or `stateful` diffs (`bash "$K/lib/gate/proof-ledger.sh" classify`) owe `deploy-proof` (`Command:`/`Exit:` + rollback or `[UNAVAILABLE: reason]`) + `UAT` (`ship-gate` -> `bash "$K/lib/gate/proof-ledger.sh" check` or override). Inert/library/refactor/docs work is unchanged (`docs/verification/README.md`).
- **Deployable-done:** services, daemons, flagged features, or `stateful` diffs (`bash "$K/lib/gate/proof-ledger.sh" classify`) owe `deploy-proof` (`Command:`/`Exit:` + rollback or `[UNAVAILABLE: reason]`) + `UAT` (`bash "$K/lib/gate/proof-ledger.sh" check` or override). Inert/library/refactor/docs unchanged (`docs/verification/README.md`).
- **Understanding axis (ADR-0031):** design records and explainer/quiz nudges are advisory; never alter "done" or block builds (`docs/WORKFLOW.md`).

## 4. Pause if (ask a human)

Stop, write a named blocker (decision + why), and ask before:
- **Architecture direction** - component fit, new component, interface/data-model shape.
- **Source-of-truth hierarchy** - canonical file/section when two disagree.
- **Validation removal** - weakening, deleting, or bypassing any test, assertion, hook, or guardrail.
- **Risk-classification change** - lighter lane, dropped phase, narrower hard-path/full-lane trigger (staying on default is not a change).
- **Source-of-truth hierarchy** - canonical file when two disagree.
- **Validation removal** - weakening, deleting, or bypassing a test, hook, or guardrail.
- **Risk-classification change** - lighter lane, dropped phase, narrower full-lane trigger (keeping default is not a change).
- **Privacy / security** - secrets, credentials, access scope, or data leaving the repo.

## Self-intro
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ All notable changes to dwarves-kit are documented here.

## [2.3.0] - 2026-10-09

Release note: [docs/releases/2.3.0.md](docs/releases/2.3.0.md).
Upgrade: no migration; re-run `install.sh` to pick up the new hooks and verbs. Release artifacts and screenshots belong on the GitHub Release; `CHANGELOG.md` is the single in-repo release record.

### Highlights

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ It is bash and markdown, with no UI and no server. It targets one engineer or on
| Doc | What it holds |
|---|---|
| [`docs/MANUAL.md`](docs/MANUAL.md) | The command reference: every command, agent and recovery path |
| [`docs/reference/lifecycle.md`](docs/reference/lifecycle.md) | The loop, the gates and the five stages |
| [`docs/reference/workflow-paths.md`](docs/reference/workflow-paths.md) | Every entry point, the flow topology, and the five stages |
| [`docs/guides/runtimes.md`](docs/guides/runtimes.md) | Wiring Claude Code, Antigravity, Codex, and Devin |
| [`docs/reference/install.md`](docs/reference/install.md) | Install layers, the module table, plugin, Codex and bash install |
| [`docs/reference/skills.md`](docs/reference/skills.md) | The skills roster |
| [`docs/reference/project-structure.md`](docs/reference/project-structure.md) | The directory layout |
Expand Down
40 changes: 0 additions & 40 deletions docs/HISTORY.md

This file was deleted.

17 changes: 9 additions & 8 deletions docs/MANUAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ For the full playbook (every scenario, the autonomy dial, the freeform front doo

## Command reference (the kit invokes these from your intent; you rarely type them)

Index by loop stage (formerly "leg"; [`reference/lifecycle.md`](reference/lifecycle.md) "The five stages" tells the full story). Front-door and meta commands sit outside the stages on purpose:
Index by loop stage (formerly "leg"; [`reference/workflow-paths.md`](reference/workflow-paths.md#the-five-stages) "The five stages" tells the full story). Front-door and meta commands sit outside the stages on purpose:

| Stage | Commands |
|---|---|
Expand Down Expand Up @@ -98,15 +98,15 @@ Index by loop stage (formerly "leg"; [`reference/lifecycle.md`](reference/lifecy

**Phase:** challenge an idea before writing a spec
**Reads:** the idea from chat
**Writes:** `docs/briefs/DECISION-BRIEF-<slug>.md` (legacy: `docs/briefs/DECISION-BRIEF.md`) only if the verdict is BUILD
**Writes:** `docs/briefs/DECISION-BRIEF-<slug>.md` (legacy: `DECISION-BRIEF.md` in `docs/briefs/`) only if the verdict is BUILD
**When to invoke:** before any non-trivial feature. Costs ~5 minutes.
**Common gotcha:** the 6 forcing questions are confrontational by design. If you accept them too easily, the brief is weak.

### `/kit:design`

**Phase:** opt-in interactive solution-design beat (between Think and Spec)
**Reads:** `docs/briefs/DECISION-BRIEF-<slug>.md` (legacy: `docs/briefs/DECISION-BRIEF.md`) (if present), the codebase
**Writes:** appends a `## Solution` section to `docs/briefs/DECISION-BRIEF-<slug>.md` (legacy: `docs/briefs/DECISION-BRIEF.md`) (never clobbers the brief's product framing); when the design is design-bearing, also appends a `## Design` section (diagram + ADR link(s), ADR-0031 §1 / SPEC-122) that `/kit:spec` folds into the spec
**Reads:** `docs/briefs/DECISION-BRIEF-<slug>.md` (legacy: `DECISION-BRIEF.md` in `docs/briefs/`) (if present), the codebase
**Writes:** appends a `## Solution` section to `docs/briefs/DECISION-BRIEF-<slug>.md` (legacy: `DECISION-BRIEF.md` in `docs/briefs/`) (never clobbers the brief's product framing); when the design is design-bearing, also appends a `## Design` section (diagram + ADR link(s), ADR-0031 §1 / SPEC-122) that `/kit:spec` folds into the spec
**When to invoke:** when you want to shape the solution with the agent (2-3 approaches, one question at a time, approve per section) before `/kit:spec`. Opt-in; skip it and `/kit:spec` works as before.
**Common gotcha:** under bypassPermissions the per-section `AskUserQuestion` prompts may auto-resolve, hollowing the feedback. Use it interactively. It does not execute and is not a gate. Realizes SPEC-008 Part C; forked from `superpowers:brainstorming`.

Expand All @@ -128,7 +128,7 @@ Index by loop stage (formerly "leg"; [`reference/lifecycle.md`](reference/lifecy

### `/kit:devs-team`

Opt-in design-critique lane between `/kit:design` and `/kit:spec`. Dispatches 5 engineering lenses (simplicity, performance, boundaries, data-model, operability) in parallel against the `## Solution`, read spec-first (the active spec if one exists, else the pre-spec `docs/briefs/DECISION-BRIEF-<slug>.md` (legacy: `docs/briefs/DECISION-BRIEF.md`)), merges findings, and appends a report-only `## Design critique` (SOLID / REVISE / RECONSIDER) to that same doc. Never blocks `/kit:spec`. The design analogue of `/kit:review-team`. Placement is spec-first per SPEC-023.
Opt-in design-critique lane between `/kit:design` and `/kit:spec`. Dispatches 5 engineering lenses (simplicity, performance, boundaries, data-model, operability) in parallel against the `## Solution`, read spec-first (the active spec if one exists, else the pre-spec `docs/briefs/DECISION-BRIEF-<slug>.md` (legacy: `DECISION-BRIEF.md` in `docs/briefs/`)), merges findings, and appends a report-only `## Design critique` (SOLID / REVISE / RECONSIDER) to that same doc. Never blocks `/kit:spec`. The design analogue of `/kit:review-team`. Placement is spec-first per SPEC-023.

### `/kit:visual-team`

Expand Down Expand Up @@ -217,7 +217,7 @@ schedules, sequences, or merges. Source: SPEC-036; ADR-0022.
### `/kit:spec`

**Phase:** generate the development spec
**Reads:** `docs/briefs/DECISION-BRIEF-<slug>.md` (legacy: `docs/briefs/DECISION-BRIEF.md`) (if present), the codebase via the 4 parallel research subagents when the `Depth:` line asks for repo research, or chat (greenfield)
**Reads:** `docs/briefs/DECISION-BRIEF-<slug>.md` (legacy: `DECISION-BRIEF.md` in `docs/briefs/`) (if present), the codebase via the 4 parallel research subagents when the `Depth:` line asks for repo research, or chat (greenfield)
**Writes:** `docs/specs/SPEC-NNN-<slug>.md` (Status: DRAFT), `docs/research/YYYY-MM-DD-<slug>-{stack,features,architecture,pitfalls}.md`
**When to invoke:** after `/think`, or directly if the work is well-scoped already
**Depth:** step 1 writes a `Depth:` line under `Lane:` (`standard`, `research (repo|outside: ...)`, `blind-spot (failure: ...)`). Research runs only when the line asks for it, so a `standard` brownfield spec sends zero research agents; `bash lib/spec/spec-depth.sh check <spec>` validates the line.
Expand Down Expand Up @@ -536,7 +536,7 @@ Say "let's discuss the solution", "iterate on the design", or `/kit:design`. Cla
the opt-in interactive design beat (and/or `/kit:devs-team`, or `superpowers:brainstorming`
for open-ended exploration): it proposes 2-3 approaches, one question at a time, holds for
your approval per section, and appends the agreed Solution to
`docs/briefs/DECISION-BRIEF-<slug>.md` (legacy: `docs/briefs/DECISION-BRIEF.md`). It never auto-advances; leave with "the design is good,
`docs/briefs/DECISION-BRIEF-<slug>.md` (legacy: `DECISION-BRIEF.md` in `docs/briefs/`). It never auto-advances; leave with "the design is good,
write the spec."

**Scenario 5 -- a vague / ambiguous goal.** Say "I have a rough idea about X", "here's a
Expand Down Expand Up @@ -779,7 +779,8 @@ The lifecycle story, install layers, skills roster, directory layout and test no

| You want | Read |
|---|---|
| The loop, the closed-loop idea, the command sequence, the five stages | [`reference/lifecycle.md`](reference/lifecycle.md) |
| The loop, the entry points, and the five stages | [`reference/workflow-paths.md`](reference/workflow-paths.md) (and [`guides/spine.md`](guides/spine.md)) |
| Runtime hooks and skills across Claude Code, Antigravity, Codex, Devin | [`reference/agent-runtimes.md`](reference/agent-runtimes.md) (and [`guides/runtimes.md`](guides/runtimes.md)) |
| Install layers, the module table, plugin, Codex and bash install | [`reference/install.md`](reference/install.md) |
| The skills roster | [`reference/skills.md`](reference/skills.md) |
| The directory layout | [`reference/project-structure.md`](reference/project-structure.md) |
Expand Down
Loading
Loading