@warren-dean/code-kit 0.34.0 → 0.36.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/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +17 -0
- package/README.md +55 -33
- package/bin/code-kit.mjs +312 -14
- package/hooks/guard-agent.mjs +32 -1
- package/hooks/guard-bash.mjs +8 -3
- package/hooks/guard-paths.mjs +21 -2
- package/hooks/lib/config.mjs +8 -0
- package/hooks/lib/harness.mjs +13 -0
- package/hooks/lib/instructions.mjs +11 -1
- package/hooks/lib/layers.mjs +18 -0
- package/hooks/lib/loop-state.mjs +4 -3
- package/hooks/lib/next.mjs +100 -9
- package/hooks/lib/plan.mjs +19 -5
- package/hooks/lib/promote.mjs +554 -0
- package/hooks/lib/regression.mjs +2 -1
- package/hooks/lib/sessions.mjs +97 -13
- package/hooks/lib/shell.mjs +36 -11
- package/hooks/lib/streamconfig.mjs +80 -0
- package/hooks/lib/streams.mjs +244 -0
- package/hooks/lib/verify.mjs +14 -0
- package/hooks/mod/loop.mjs +7 -0
- package/hooks/mod/register.mjs +9 -1
- package/hooks/session.mjs +8 -0
- package/package.json +1 -1
- package/skills/decide/SKILL.md +9 -2
- package/skills/init/SKILL.md +9 -2
- package/skills/lead/SKILL.md +9 -1
- package/skills/promote/SKILL.md +49 -0
- package/skills/review/SKILL.md +1 -0
- package/skills/spec-check/SKILL.md +2 -1
- package/skills/spec-design/SKILL.md +1 -0
- package/templates/agent.md +2 -0
- package/templates/claude-md.md +2 -0
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"name": "code-kit",
|
|
10
10
|
"source": "./",
|
|
11
11
|
"description": "Keeps AI coding agents inside your project's rules, from idea to merged code: spec design, lanes, layer rules, protected paths with an approval log, spec-check and design gates, proof-before-finish checks, dispatch, review, build status and CI verification, configured per project from its docs",
|
|
12
|
-
"version": "0.
|
|
12
|
+
"version": "0.36.0",
|
|
13
13
|
"category": "development",
|
|
14
14
|
"tags": ["guardrails", "architecture", "lanes", "layers", "spec-driven", "ci", "multi-agent"],
|
|
15
15
|
"license": "MIT"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "code-kit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.36.0",
|
|
4
4
|
"description": "Keeps AI coding agents inside your project's rules, from idea to merged code: spec design, lanes, layer rules, protected paths with an approval log, spec-check and design gates, proof-before-finish checks, dispatch, review, build status and CI verification, configured per project from its docs",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Warren Langeveldt"
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
What changed in each release of code-kit, newest first. Versions follow the plugin manifest and the npm package `@warren-dean/code-kit`. Each release is also on [GitHub Releases](https://github.com/warrendeanlangeveldt/code-kit/releases).
|
|
4
4
|
|
|
5
|
+
## 0.36.0 (2026-11-14)
|
|
6
|
+
|
|
7
|
+
- **Streams: several product lines in one product.** A product with separate product lines in one repository can now be built by a squad, or a session, per line at once. Declare them as `streams` in the config: each stream has its own lead session (`/code-kit:lead <stream>`), plan file, specs and lanes, and each lead's loop dispatches only its own stream's stories, so two sessions no longer fight over one lead. Layers become a core per technical layer and a module per stream: a module may use core and its own stream's modules, never another stream's, and core uses no module; the hooks refuse both and say to ask for it in core rather than copy it. Core is owned by a platform stream, which the others ask with `code-kit core ask`, or, without one, its lanes are shared and taken in turns. A project without `streams` works as before.
|
|
8
|
+
- **Code that belongs in core is noticed.** With streams, code-kit raises a candidate for core when it sees the same code in two streams' modules (names aside), a refused import of another stream's module, a copy into a module, module code that repeats core, or a requirement another stream's spec already has. `code-kit promote` lists them, the platform's lead decides each with `/code-kit:promote`, and a promotion is a platform story. The review checks what a branch repeats, and `harness.promote.coreClones: "refuse"` makes verify refuse module code that copies core.
|
|
9
|
+
- **Setup asks about product lines.** `/code-kit:spec-design` and `/code-kit:init` ask once whether the product has separate product lines, and only then lay out core and modules; a project that started as one can add streams later, with the code moved in stories.
|
|
10
|
+
|
|
11
|
+
## 0.35.0 (2026-11-13)
|
|
12
|
+
|
|
13
|
+
- **Reading the approval log beside a helper function.** A command that defined a short name for code-kit's command line (`ck() { node …/code-kit.mjs "$@"; }`) and also read `.claude/approval-log.jsonl` with `tail` or `grep` was refused as a possible write to the log, though the read never called the function. A function now stops the read only when the read calls it. One that shadows a reader, writes the log, or defines an alias or exports a variable in its body is still refused.
|
|
14
|
+
- **Lane agents change files with Edit and Write.** In its own worktree, a lane agent's shell command is refused when Claude Code can't prove it stays inside that worktree, and writes through a heredoc (`cat > file <<EOF`, `python3 - <<EOF`) were the usual case, each costing the lane a step. The lane instructions now say to change files with the Edit and Write tools and keep the shell for running things. Projects are asked once to bring their instructions up to date.
|
|
15
|
+
- **A pause from another tool pauses the loop.** `code-kit loop pause` recorded a pause that other tools read, but a session already running the loop only read it when it started, so it carried on prompting. It now reads the recorded pause as it reads the project, and stops taking new steps within seconds; the band says the loop is paused, and Resume stays yours.
|
|
16
|
+
- **`unset`, then a commit.** Unsetting a variable (`unset NAME`, `unset -v A B`) before a commit in the same command was refused as a command that may write files. It writes nothing, like setting one, so it passes now; with a redirect it still counts.
|
|
17
|
+
- **Reading the approval log beside a heredoc.** `python3 - <<'EOF' … EOF` and then `grep -c … .claude/approval-log.jsonl` in the same command was refused as a possible write to the log, though `python3 -c '…'` before the same read passed: any heredoc in the line made code-kit judge the whole line as one command. A heredoc whose body doesn't name the log is now judged like any other command that doesn't, so the read passes; one whose body names it is still judged whole.
|
|
18
|
+
- **git's read-only plumbing before a commit.** `git check-ignore -q <path> && git commit …` was refused as a write the commit's checks can't see. `check-ignore`, `check-attr`, `ls-tree`, `rev-list`, `merge-base`, `describe`, `name-rev`, `show-ref`, `for-each-ref` and `cherry` only read, and now pass like `git status` and `git log`; redirected into the checkout, they still count.
|
|
19
|
+
- **Python's bare asserts count.** The weakened-test check counted `assert(…)` calls and `self.assertEqual(…)`, but not Python's and pytest's bare `assert x == y` statements. A test file whose assertions went from calls to statements, or that gained bare asserts, could be read as having fewer and refused as weakened. Each bare `assert` statement now counts as one assertion.
|
|
20
|
+
- **`set -o pipefail`, then a commit.** Setting the shell's options (`set -euo pipefail`, `set +x`) before a commit in the same command was refused as a command that may write files. It writes nothing, so it passes now; with a redirect it still counts.
|
|
21
|
+
|
|
5
22
|
## 0.34.0 (2026-11-08)
|
|
6
23
|
|
|
7
24
|
- **The loop no longer cuts into a conversation.** It prompted the lead as soon as each turn ended, so when you were talking with the lead about something else, the next step landed a minute after its answer to you. The reading of the lead's reply is now given what you said and tells a conversation from asking it to carry on; after a conversation, the loop waits until you've been quiet for `harness.loop.quietMinutes` (10 by default), and the band says so, with **Carry on**.
|
package/README.md
CHANGED
|
@@ -395,6 +395,7 @@ Once init has switched the rules on, the lead runs the build in a loop:
|
|
|
395
395
|
/code-kit:decide # decide what lanes asked for: approve, offer something better, or bring it to you
|
|
396
396
|
/code-kit:review ST-12 # check a finished branch, then merge or send it back
|
|
397
397
|
/code-kit:status # where the build stands against the spec
|
|
398
|
+
/code-kit:promote # with streams: decide what goes into core, from what two streams share
|
|
398
399
|
```
|
|
399
400
|
|
|
400
401
|
- **Dispatch** picks the stories whose dependencies are done, one per lane: a lane runs one story at a time across the whole project, and the open slice's stories go first (a story's `**Slice:**`, the feature it's part of; `harness.slices.open`). It checks that no open question blocks them and that their contracts exist, then starts each lane agent in its own worktree on the branch `<lane>/st-<n>`, every free lane in parallel. A second agent for a lane that's running one is refused. Each brief names the story's requirements and acceptance criteria. Lanes spec-check first, build end to end, name requirement IDs in their test titles, and commit.
|
|
@@ -414,6 +415,20 @@ You can open several Claude Code sessions in one project: one building the plan,
|
|
|
414
415
|
|
|
415
416
|
Spec: `docs/specs/23-the-team.md`.
|
|
416
417
|
|
|
418
|
+
## Streams: several product lines in one product
|
|
419
|
+
|
|
420
|
+
One product in one repository can have separate product lines (offerings for different users, each with its own roadmap) built by separate squads, or sessions, at once. Declare them as `streams` in the config, and the project is built as a modular monolith: per technical layer, a **core** the streams share and a **module** per stream.
|
|
421
|
+
|
|
422
|
+
- **A lead per stream.** Each stream has its own lead session, plan file, specs and lanes, and they lead at once: `/code-kit:lead <stream>`. Each lead's loop and `code-kit next` give it only its own stream's stories, and it writes only its own stream's plan and specs. The first lead works in the main checkout, the others in a worktree each, on `lead/<stream>`.
|
|
423
|
+
- **Streams kept apart.** A layer with `stream` is that stream's module; one without is core. A module may import core and its own stream's modules, never another stream's, and core never imports a module: the hooks refuse both, and the refusal says to ask for it in core rather than copy it.
|
|
424
|
+
- **Core has one owner.** A stream with `platform: true` owns core's lanes: the other streams ask it for changes with `code-kit core ask "<what>" --story ST-n`, and their story waits on its decision. Without a platform stream, core's lanes are in no stream, and the streams take them in turns.
|
|
425
|
+
- **Shared capability noticed.** code-kit raises a candidate for core when it sees the same code in two streams' modules (names aside), an import of another stream's module refused, a copy into a module, module code that repeats core, or a requirement another stream's spec already has. `code-kit promote` lists them; the platform's lead decides each (`/code-kit:promote`), and a promotion is a platform story. Set `harness.promote.coreClones` to `refuse` and verify refuses a branch whose module code repeats core's.
|
|
426
|
+
- **Project-wide still.** One merge queue, one approval log, one set of standards and checks.
|
|
427
|
+
|
|
428
|
+
A project without `streams` is one stream holding every lane, and works as before. `spec-design` and `init` ask once whether the product has separate product lines, and only then lay out core and modules.
|
|
429
|
+
|
|
430
|
+
Spec: `docs/specs/31-streams-and-platform.md`.
|
|
431
|
+
|
|
417
432
|
## Teams (preview)
|
|
418
433
|
|
|
419
434
|
For several people in one repository, each with their own agents. Not every developer works in a team, so it's off until you set it up: `/code-kit:init` asks whether others work in the repository, and `/code-kit:team-init` sets the team up (or changes it, or takes it out) at any time, asking for the tech lead and each lane's owners and showing what it writes first. Everything goes through GitHub; there's no server:
|
|
@@ -501,7 +516,13 @@ code-kit cost [--json] # each environmen
|
|
|
501
516
|
code-kit decisions [--json] [--all] # what waits on you in this session, and a count in each other one; --all lists every session's
|
|
502
517
|
code-kit who # which session this is, whether it leads the project, and its task
|
|
503
518
|
code-kit sessions [--json] # the sessions working the project, which one leads, and each one's task
|
|
504
|
-
code-kit sessions lead
|
|
519
|
+
code-kit sessions lead [stream] # make this session the lead, or its stream's lead (the person's own act, as Lead from here)
|
|
520
|
+
code-kit sessions stream <name> # a working session joins a stream (the person's own act)
|
|
521
|
+
code-kit streams [--json] # the project's streams: each one's lanes, plan and lead, and the core lanes they share
|
|
522
|
+
code-kit core [--json] # change requests to core; core ask "<what>" --story ST-n asks the platform, core accept <id> --story ST-n | core decline <id> --reason "…" decides
|
|
523
|
+
code-kit promote [--json] [--story ST-n] # candidates for core, or what a story's requirements repeat of other streams' specs
|
|
524
|
+
code-kit promote scan [--branch b] [--json|--quiet] # look for candidates, or, with --branch, what a branch repeats of core or another stream
|
|
525
|
+
code-kit promote accept <id> --story ST-n | promote reject <id> --reason "…" # the deciding lead's call on a candidate
|
|
505
526
|
code-kit task "<what>" --touches "<globs>" # a working session's ad hoc task, leasing the paths it changes; task done ends it, task take <session> moves a stale one here
|
|
506
527
|
code-kit lanes [--json] # what each lane is running now, one story each across every session
|
|
507
528
|
code-kit lanes release <lane> # free a lane whose agent stopped without finishing
|
|
@@ -547,38 +568,39 @@ code-kit approve <name>... --reason "…" [--lane name] [--delegated [--story ST
|
|
|
547
568
|
|
|
548
569
|
`.claude/code-kit.json`. Globs use `*` (one segment), `**` (any depth), `**/` (zero or more folders), `?` and `{a,b}`. Patterns under `shell` are regular expressions.
|
|
549
570
|
|
|
550
|
-
| Field | Required | What it is
|
|
551
|
-
| ------------------------------ | ----------------- |
|
|
552
|
-
| `version` | yes | `1`
|
|
553
|
-
| `docs.specs` | no | Folder of specs. With it, a lane needs a spec-check report before writing code on a branch
|
|
554
|
-
| `docs.principles`, `docs.plan` | no | The engineering principles and the implementation plan
|
|
555
|
-
| `docs.costs` | no | The cost register (spec 29), default `docs/costs.md`: one table, `\| Item \| Provider \| Environment \| Size \| Monthly \| Basis \|`, a row per paid thing with its monthly estimate as a number and where the price came from, dated. Any agent may write it once `cost` is set
|
|
556
|
-
| `docs.decisions` | no | Where agreed intents are recorded as numbered decision records (`code-kit intend record`); default `docs/decisions`
|
|
557
|
-
| `docs.standards` | no | The project's standards (spec 22), default `docs/standards.md`: each a `### <id> <title>` heading with `level` (required or recommended), `applied` (enforced, checked or advice), `layers`, `why`, `source` and, when enforced, `enforced by` naming the layer rule, protected path, check or shell rule that refuses a breach. The id's prefix is its category: `PRI-` principles, `PAT-` patterns, `ARC-` architecture, `CON-` conventions, `POL-` policies. Each lane agent is given the ones for its layers; a refusal from an enforcing rule names the standard; reviews check the checked ones. Protect the file with the `standards` approval: removing a standard, or weakening a required one, always needs the person's, whatever is delegated
|
|
558
|
-
| `lead.paths` | yes | What the main session writes. `.claude/**` and `.mcp.json` are always added.
|
|
559
|
-
| `lead.outside` | no | Paths outside the repository the lead may write, e.g. `../shared-lib/**`. Claude's memory is always included, and the session's own folder in Claude Code's temporary folder (`/tmp/claude-<uid>/<project>/<session id>/`: its scratchpad and tool output), which the lanes may write too; another session's isn't.
|
|
560
|
-
| `anyActor` | no | Paths every writer may change (e.g. the lockfile), read-only agents included. `.claude/state/**` is always included. An entry may be `{ "glob", "reviewer" }` to name the lane (or `"lead"`) that reviews changes to it; otherwise the lead reviews them, and `who` and `trace` say so.
|
|
561
|
-
| `
|
|
562
|
-
| `
|
|
563
|
-
| `
|
|
564
|
-
| `
|
|
565
|
-
| `
|
|
566
|
-
| `
|
|
567
|
-
| `shell.
|
|
568
|
-
| `
|
|
569
|
-
| `
|
|
570
|
-
| `
|
|
571
|
-
| `
|
|
572
|
-
| `
|
|
573
|
-
| `
|
|
574
|
-
| `approvals.
|
|
575
|
-
| `
|
|
576
|
-
| `
|
|
577
|
-
| `
|
|
578
|
-
| `
|
|
579
|
-
| `branches.
|
|
580
|
-
| `
|
|
581
|
-
| `
|
|
571
|
+
| Field | Required | What it is |
|
|
572
|
+
| ------------------------------ | ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
573
|
+
| `version` | yes | `1` |
|
|
574
|
+
| `docs.specs` | no | Folder of specs. With it, a lane needs a spec-check report before writing code on a branch |
|
|
575
|
+
| `docs.principles`, `docs.plan` | no | The engineering principles and the implementation plan |
|
|
576
|
+
| `docs.costs` | no | The cost register (spec 29), default `docs/costs.md`: one table, `\| Item \| Provider \| Environment \| Size \| Monthly \| Basis \|`, a row per paid thing with its monthly estimate as a number and where the price came from, dated. Any agent may write it once `cost` is set |
|
|
577
|
+
| `docs.decisions` | no | Where agreed intents are recorded as numbered decision records (`code-kit intend record`); default `docs/decisions` |
|
|
578
|
+
| `docs.standards` | no | The project's standards (spec 22), default `docs/standards.md`: each a `### <id> <title>` heading with `level` (required or recommended), `applied` (enforced, checked or advice), `layers`, `why`, `source` and, when enforced, `enforced by` naming the layer rule, protected path, check or shell rule that refuses a breach. The id's prefix is its category: `PRI-` principles, `PAT-` patterns, `ARC-` architecture, `CON-` conventions, `POL-` policies. Each lane agent is given the ones for its layers; a refusal from an enforcing rule names the standard; reviews check the checked ones. Protect the file with the `standards` approval: removing a standard, or weakening a required one, always needs the person's, whatever is delegated |
|
|
579
|
+
| `lead.paths` | yes | What the main session writes. `.claude/**` and `.mcp.json` are always added. |
|
|
580
|
+
| `lead.outside` | no | Paths outside the repository the lead may write, e.g. `../shared-lib/**`. Claude's memory is always included, and the session's own folder in Claude Code's temporary folder (`/tmp/claude-<uid>/<project>/<session id>/`: its scratchpad and tool output), which the lanes may write too; another session's isn't. |
|
|
581
|
+
| `anyActor` | no | Paths every writer may change (e.g. the lockfile), read-only agents included. `.claude/state/**` is always included. An entry may be `{ "glob", "reviewer" }` to name the lane (or `"lead"`) that reviews changes to it; otherwise the lead reviews them, and `who` and `trace` say so. |
|
|
582
|
+
| `streams` | no | Spec 31: `{ "<name>": { lanes, plan, specs?, platform?, label? } }`, the product lines built at once, each with its own lead session. `lanes` are the stream's (each lane in one stream; a lane in none is a core lane the streams share in turns); `plan` its plan file or folder, inside `docs.plan`; `specs` the spec files it builds (globs); `platform: true` makes the stream the owner of core, and then every lane must be in a stream. Leave it out for one product line. |
|
|
583
|
+
| `lanes.<name>` | yes (may be `{}`) | `{ agent, paths, exclude?, owners?, label? }`: the agent name maps a subagent to its lane; `label` names what the lane delivers ("Screens", "API contract"; one line, at most 60 characters), for a team provider's report, and is otherwise taken from the lane's name; `owners` (GitHub handles) are the people whose sessions work it, in a team (needs `team`). A worktree with a `.lane` file holding the lane name makes the main session that lane. |
|
|
584
|
+
| `protected[]` | no | `{ glob, approval, why }`: logged on every commit. Anyone but the lead needs an approval: the lead's where `approvals.delegate.protected` names it, otherwise a person's (see [Approvals](#approvals)). `.claude/**` is always protected as `kit`. |
|
|
585
|
+
| `designGate` | no | `{ register, screens: [{ glob, not? }], howTo }`: screen files wait until the register (`{ "screens": [{ "file": … }] }`) holds their exported designs; an entry naming only a design tool's artboard doesn't open the gate. Init sets it for every lane that owns screens; `/code-kit:design` adds approved designs |
|
|
586
|
+
| `layers[]` | no | `{ name, paths, mayImport, denyPackages?, label?, stream? }`: the first layer whose paths match a file owns it. A layer may always import itself. With `streams`, `stream` makes the layer that stream's module: it may import core and its own stream's layers, never another stream's, and a layer without `stream` (core) may import no module, whatever `mayImport` says. `label` names what the layer delivers ("Data", "Service"; one line, at most 60 characters), for a team provider's report, and is otherwise taken from the layer's name. |
|
|
587
|
+
| `importAliases` | no | `{ "@app/domain": "packages/domain/src" }`: resolves non-relative imports to repository paths |
|
|
588
|
+
| `shell.block[]` | no | `{ pattern, why, person?, command? }`: never run. `person: true` marks a person's act, which the lead may do for them with `approvals.lead` on. `command: true` matches the pattern from the start of each command the line runs (after a package runner such as `npx` or `pnpm exec`, and inside `sh -c` or `eval`), with quoted text masked unless the pattern has quotes, so a grep, a heredoc or a message that mentions it isn't refused. Without it the pattern reads the whole line, except a read's quoted arguments: `grep "<command>" docs` doesn't run it |
|
|
589
|
+
| `shell.restricted[]` | no | `{ pattern, lanes, why }`: only the lead and these lanes. A read's quoted arguments don't count, as for `shell.block` |
|
|
590
|
+
| `postEdit[]` | no | `{ files, exclude?, run }`: after each edit of a matching file. `{file}` is the file. Exit 127 (tool not installed) is skipped. |
|
|
591
|
+
| `tests[]` | no | Globs naming the test files, in place of the conventions, for every rule that asks what a test is: weakened tests, a fix's tests, the tests that name a requirement, the code map and the security review. Default: a file named as a test (`*.test.*`, `*.spec.*`, `*.smoke.*`, `test_*.py`, `*_test.go`, `*_test.py`) or in a test folder (`test/`, `tests/`, `__tests__/`, `e2e/`, `smoke/`). Proving a fix keeps the files named as tests and takes the rest back, test-folder helpers included; with `tests` set, the files it names are the ones kept. |
|
|
592
|
+
| `regression.prepare` | no | A command run in a fresh checkout before a fix's tests run there without the fix, such as `npm ci`. The checkout's `node_modules` and virtualenvs are copied in first (a copy-on-write clone where the disk has one), so it can't change the checkout's own. The merge queue runs it too, in the merged tree's checkout, when its manifests or lockfiles differ from the installs copied in; without it, the queue runs the install the lockfile calls for. |
|
|
593
|
+
| `checks[]` | no | `{ name, files, exclude?, run[], each?, owners?, ifMissing?, timeoutSeconds? }`: before finishing, when matching files changed. `each` runs the commands in every changed folder matching that glob. `owners` limits who may change the files (the lead always may). `ifMissing: "fail"` makes a missing tool an error (the default is to skip the check, which `verify` and a merge list as not run). `timeoutSeconds` (240 unless set) is how long each command may run; one that runs out of time leaves its branch at the head of the merge queue rather than sending it back. |
|
|
594
|
+
| `adapters` | no | `{ "<adapter>": false }` switches off an adapter that would otherwise be detected; `true` says the project wants that tool, so until it's set up here `next` gives its setup before any code. See [Adapters](#adapters). |
|
|
595
|
+
| `approvals.lead` | no | `true` lets the lead act on what the person says in chat, for when `!` isn't available (on a phone, say): it records their approvals with `code-kit approve`, and runs `shell.block` commands marked `person`. Default `false`. See [Approvals](#approvals). |
|
|
596
|
+
| `approvals.delegate` | no | `false`, or `{ protected?: [approval names], merge?: true, push?: true, tests?: true, dependencies?: { licences?, minWeeklyDownloads?, maxMonthsSinceRelease?, allowInstallScripts?: true \| false \| [kinds] } }`: what the lead decides, inside the guardrails you keep: the protected approvals it grants, and packages it approves for a story, with `code-kit approve --delegated`; with `merge`, merges into a protected branch with `code-kit merge --delegated`; with `push`, pushes the protected branch, never by force (yours unless you set it, since a push can deploy; read from the config committed on that branch); with `tests`, weakened tests on a lane's branch. Left out, the lead decides everything technical: every protected approval but `spec`, `design`, `ci` and `kit`, packages, merges and weakened tests (WHO-1); `false` keeps everything for you. Lanes ask the lead for these, never you. npm packages are also checked against the npm registry, and a Python lane's against PyPI; the defaults are MIT, Apache-2.0, BSD and ISC, 10,000 weekly downloads, a release within 18 months, and no install scripts. See [Approvals](#approvals). |
|
|
597
|
+
| `setup` | no | The version of init's setup the project has (3 now). Without it, or lower, `next` names what the project is missing (the design gate, design stories before screens, a QA lane, a security reviewer) and starts no new story until re-running init adds it |
|
|
598
|
+
| `cost` | no | The running budget (spec 29): `{ currency, monthly, load?, paths? }`. `currency` is a three-letter code (USD, AUD, EUR); `monthly` maps each environment (`prod`, `dev`, …, not `all`) to what it may cost a month; `load` says in words what the budget plans for; `paths` are the infrastructure files, whatever defines them, and a branch that changes one changes the register too. A commit that takes an environment past its budget needs the person's `cost` approval, whatever is delegated |
|
|
599
|
+
| `team` | no | Preview. For several people in one repository: `{ techLead, staleDays?, intents?, board?, provider?, report? }`. `techLead` is the GitHub handle of the person who owns the plan, specs and contracts; `staleDays` is how many working days without a push make a claim stale (default 3); `intents` is the discussion category intents go in (default `Intents`; create it once in the repository's Settings › Discussions); `board` is `{ owner, number }`, a GitHub Project the plan is mirrored onto; `provider` is `"github"` (default), `{ command, fallback? }` for another team provider, or, in preview, a hosted provider's adapter as `{ "<name>": "<https address>" }`, which keeps the intents (Discussions only when `intents` is set) and has GitHub as its fallback; with `fallback: "github"`, claims go through GitHub whenever that provider can't be reached; `report` (default true) is whether the project reports its facts (stories' stages, send-backs, the requirement trail, the specs' titles and outcome lines, approvals, token use, the rules, the design register and the sessions at work; never code) to a provider that isn't GitHub. A provider may also supply an organisation's standards (`standards`, answering `{ standards, waivers, version }`, each standard in `docs.standards`' fields, each waiver `{ standard, paths?, expires?, reason?, approvedBy? }`): they apply as if in the project's file, which may extend or tighten one but weaken a required one only under a waiver. See docs/specs/16-teams.md, docs/specs/21-hub-adapter-and-reports.md and docs/specs/22-standards.md. |
|
|
600
|
+
| `branches.protected` | no | Default `["main", "master"]` |
|
|
601
|
+
| `branches.publish` | no | How a merge reaches the remote's base: `push` (the base is pushed, fast-forward only) or `pull-request` (for a base the remote only lets change through pull requests: code-kit opens one from `code-kit/publish-<base>` after each merge, and merges it where `approvals.delegate.push` is on, otherwise it waits for you). Left out, code-kit leaves pushing the base to you |
|
|
602
|
+
| `execution.unrepeatable` | no | Patterns (regular expressions) for commands that can't safely run twice, such as a seed or a deploy. With migrations, the commands `shell.block` and `shell.restricted` name, and `git push`, an interrupted one is never run again on its own after a crash: the lead finds out what happened first (spec 26) |
|
|
603
|
+
| `harness` | no | What the mod's harness does in the session: `autonomy` (`autonomous`, `propose`, `off` or `vibe`; default `autonomous`; `vibe` is autonomous with every decision the lead's, see [Vibe](#vibe)), `loop.quietMinutes` (while you talk with the lead about something else, how long the loop waits after you last spoke, 0 to 120; default 10), `loop.check` (check each step against the project before the lead is prompted with it; default `true`), `hold.minutes` (how long a call waiting on your approval is held, 0 to 10; default 2), `stall.nudgeMinutes` and `stall.restartMinutes` (default 5 and 10), `stall.maxRestarts` (default 2), `agents.reviewer.on` (default `false`) and `agents.reviewer.model` (code-kit's reviewer and the security reviewer; default `sonnet`), `agents.lanes.model` (the model each lane agent starts on, unless the lead's call or the lane's agent file names one: a model, or `story` for each story's `**Size:**` in the plan, raised for security requirements, fixes and send-backs; default the session's), `slices.open` (how many of the plan's slices are in focus: a free lane builds an open slice's stories first; default 1), `promote.tokens` (with `streams`, how many tokens of code alike, names aside, make a clone a candidate for core; default 60) and `promote.coreClones` (what verify does with module code that repeats core's: `note` or `refuse`; default `note`), `background.pauseAtPercent` (default 80), `compact.at` (compact the lead's context between turns once it's past this share of its window; default 40, 0 for never), `compact.milestone` (when a milestone finishes, compact the lead's context: `ask`, `auto` or `off`; default `ask`), `agents.lanes.contextLimit` (the context a lane agent may reach before it hands its story to a fresh agent; default 250,000 tokens), `notify.on` (a system notification when something new needs you; default `true`), `motion` (whether the pane's characters, clocks and the lead's rail move while work flows: `while-active` or `off`; default `while-active`) and `report.on` (agents draft bug reports for code-kit, which you send or discard; default `false`). Change them with `/harness` or `code-kit settings set`. |
|
|
582
604
|
|
|
583
605
|
Add `.claude/approvals/`, `.claude/state/` and `.claude/code-kit.draft.json` to `.gitignore`, and `.claude/approval-log.jsonl merge=union` to `.gitattributes`, so merging branches that both logged changes keeps every entry. Commit `.claude/code-kit.baseline.json` if the project has one.
|
|
584
606
|
|