@warren-dean/code-kit 0.23.0 → 0.24.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 +10 -0
- package/README.md +1 -1
- package/bin/code-kit.mjs +2 -0
- package/hooks/guard-agent.mjs +42 -1
- package/hooks/lib/dispatches.mjs +76 -0
- package/hooks/lib/harness.mjs +2 -2
- package/hooks/lib/journal.mjs +16 -3
- package/hooks/lib/next.mjs +12 -1
- package/hooks/lib/plan.mjs +6 -1
- package/hooks/lib/schedule.mjs +46 -0
- package/hooks/mod/loop.mjs +11 -7
- package/hooks/mod/register.mjs +7 -0
- package/hooks/mod/register.test.ts +28 -0
- package/hooks/mod/view.mjs +4 -2
- package/package.json +1 -1
- package/skills/dispatch/SKILL.md +1 -1
- package/skills/init/SKILL.md +1 -1
- package/skills/spec-design/SKILL.md +1 -1
- package/templates/plan.md +2 -1
|
@@ -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.24.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.24.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,16 @@
|
|
|
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.24.0 (2026-10-25)
|
|
6
|
+
|
|
7
|
+
Each lane agent can run on the model its story needs, instead of one model for every lane.
|
|
8
|
+
|
|
9
|
+
- Set `harness.agents.lanes.model` to `story` (init now recommends it, and `/harness` offers it as "each story's size"). Each story in the plan gets a `**Size:**` line written by the lead: `small` runs on Haiku, `medium` on Sonnet and `large` on Opus. A story with no size runs on Sonnet.
|
|
10
|
+
- The model goes up where the story calls for it. A story citing a security requirement runs on Opus. A fix story runs on Sonnet at least, since it has to write the test that proves its bug. Each time a story's branch is sent back, the next agent runs one model higher, up to Opus.
|
|
11
|
+
- A lane's agent file that names its own model keeps it, and a model the lead names on the call still wins over all of this.
|
|
12
|
+
- `code-kit next` says each story's model and why (`Model: ST-3 on haiku (a small story)`), and `next --json` gives it in `models`. The dispatch skill passes it to the agent, and the mod sets it when the call leaves it out.
|
|
13
|
+
- Each lane agent's start is logged in `.claude/state/dispatches.jsonl` with its model. The journal says which model a story was handed out on, and which one it had run on when it was sent back, so you can see whether the smaller models are being sent back more often than they save.
|
|
14
|
+
|
|
5
15
|
## 0.23.0 (2026-10-23)
|
|
6
16
|
|
|
7
17
|
Worktrees no longer fill the disk, bug reports send once, and a batch of reported bugs is fixed.
|
package/README.md
CHANGED
|
@@ -538,7 +538,7 @@ code-kit approve <name>... --reason "…" [--lane name] [--delegated [--story ST
|
|
|
538
538
|
| `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 |
|
|
539
539
|
| `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, approvals, token use and the rules; 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. |
|
|
540
540
|
| `branches.protected` | no | Default `["main", "master"]` |
|
|
541
|
-
| `harness` | no | What the mod's harness does in the session: `autonomy` (`autonomous`, `propose` or `off`; default `autonomous`), `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; 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), `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`) 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`.
|
|
541
|
+
| `harness` | no | What the mod's harness does in the session: `autonomy` (`autonomous`, `propose` or `off`; default `autonomous`), `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), `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`) 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`. |
|
|
542
542
|
|
|
543
543
|
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.
|
|
544
544
|
|
package/bin/code-kit.mjs
CHANGED
|
@@ -1579,6 +1579,8 @@ function next() {
|
|
|
1579
1579
|
out(actionable ? `Next: ${command(step.step, step.args)}` : `Next: ${step.step}`);
|
|
1580
1580
|
out(`Why: ${step.why}`);
|
|
1581
1581
|
for (const t of step.then) out(`Then: ${command(t.step, t.args)}`);
|
|
1582
|
+
// SCHED-3: the model each story offered to a lane runs on.
|
|
1583
|
+
for (const m of step.models ?? []) out(`Model: ${m.story} on ${m.model} (${m.why})`);
|
|
1582
1584
|
for (const a of step.attention) out(`Note: ${a}`);
|
|
1583
1585
|
}
|
|
1584
1586
|
|
package/hooks/guard-agent.mjs
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
// PreToolUse on Agent (docs/specs/23-the-team.md, SCHED-1): a lane runs one story at a time, across every
|
|
3
3
|
// session in the project. Starting a lane's agent claims the lane; a second agent for a claimed lane is
|
|
4
|
-
// refused, naming the story and the session that has it. Any other agent starts as before.
|
|
4
|
+
// refused, naming the story and the session that has it. Any other agent starts as before. A lane agent
|
|
5
|
+
// that starts is logged with the model it runs on, and why (SCHED-3).
|
|
6
|
+
import { readFileSync } from 'node:fs';
|
|
7
|
+
import { join } from 'node:path';
|
|
8
|
+
import { recordDispatch, storyModels } from './lib/dispatches.mjs';
|
|
5
9
|
import { block, start } from './lib/hook.mjs';
|
|
6
10
|
import { CLI } from './lib/rules.mjs';
|
|
7
11
|
import { claimLane, shortSession } from './lib/laneclaims.mjs';
|
|
12
|
+
import { readStories, storyBranch } from './lib/plan.mjs';
|
|
13
|
+
import { agentFileModel } from './lib/schedule.mjs';
|
|
8
14
|
import { memberOf, readSession } from './lib/sessions.mjs';
|
|
9
15
|
|
|
10
16
|
const { input, project, config, error } = start();
|
|
@@ -34,3 +40,38 @@ if (!claimed.ok) {
|
|
|
34
40
|
`Start ${story ?? 'this story'} when ${c.story ?? 'that story'} is finished, or dispatch a ready story in another lane meanwhile. If that agent has stopped and the lane is free, release it first:\n node "${CLI}" lanes release ${lane}`,
|
|
35
41
|
);
|
|
36
42
|
}
|
|
43
|
+
|
|
44
|
+
// SCHED-3: what it runs on. The lead's call wins, then the lane's agent file, then the setting: `story` is
|
|
45
|
+
// the model the story's size gives, which the mod sets where the call names none (SET-4).
|
|
46
|
+
try {
|
|
47
|
+
const setting = config.harness.agents.lanes.model;
|
|
48
|
+
const planned =
|
|
49
|
+
story && config.docs?.plan
|
|
50
|
+
? (storyModels(
|
|
51
|
+
project,
|
|
52
|
+
config,
|
|
53
|
+
readStories(project, config.docs.plan).filter((s) => s.id === story),
|
|
54
|
+
)[story] ?? null)
|
|
55
|
+
: null;
|
|
56
|
+
let own = null;
|
|
57
|
+
try {
|
|
58
|
+
own = agentFileModel(
|
|
59
|
+
readFileSync(join(project, '.claude/agents', `${call.subagent_type}.md`), 'utf8'),
|
|
60
|
+
);
|
|
61
|
+
} catch {
|
|
62
|
+
// no agent file in the project: a plugin's agent
|
|
63
|
+
}
|
|
64
|
+
const ran = call.model
|
|
65
|
+
? { model: call.model, why: planned?.model === call.model ? planned.why : 'the lead chose it' }
|
|
66
|
+
: own && own !== 'inherit'
|
|
67
|
+
? { model: own, why: `its lane's agent file names ${own}` }
|
|
68
|
+
: setting === 'story'
|
|
69
|
+
? (planned ?? { model: null, why: "the session's model" })
|
|
70
|
+
: setting
|
|
71
|
+
? { model: setting, why: 'the lane model set' }
|
|
72
|
+
: { model: null, why: "the session's model" };
|
|
73
|
+
if (story)
|
|
74
|
+
recordDispatch(project, { story, lane, branch: storyBranch({ lane, id: story }), ...ran });
|
|
75
|
+
} catch {
|
|
76
|
+
// a read-only checkout: the dispatch goes unlogged, and the agent still starts
|
|
77
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
// Each lane agent's model (docs/specs/23-the-team.md, SCHED-3): with `harness.agents.lanes.model` set to
|
|
2
|
+
// `story`, a story runs on the model its size in the plan asks for, raised for a security requirement, a
|
|
3
|
+
// fix or a send-back. And the dispatch log: what each lane agent was started on, so the journal can say
|
|
4
|
+
// whether the smaller models are sent back more often than they save. Kept in the main checkout, beside
|
|
5
|
+
// the reviews, so every session and worktree on the machine writes the same one.
|
|
6
|
+
import { appendFileSync, mkdirSync, readFileSync } from 'node:fs';
|
|
7
|
+
import { dirname, join } from 'node:path';
|
|
8
|
+
import { markdownFiles, storyBranch } from './plan.mjs';
|
|
9
|
+
import { sendBacks } from './reviews.mjs';
|
|
10
|
+
import { projectWorktrees } from './rules.mjs';
|
|
11
|
+
import { agentFileModel, storyModel } from './schedule.mjs';
|
|
12
|
+
import { securityRequirementIds } from './security.mjs';
|
|
13
|
+
|
|
14
|
+
export const DISPATCHES_FILE = '.claude/state/dispatches.jsonl';
|
|
15
|
+
const dispatchesFile = (root) => join(projectWorktrees(root)[0] ?? root, DISPATCHES_FILE);
|
|
16
|
+
|
|
17
|
+
const readText = (path) => {
|
|
18
|
+
try {
|
|
19
|
+
return readFileSync(path, 'utf8');
|
|
20
|
+
} catch {
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* SCHED-3: each story's model, { [id]: { model, why } }, for the stories given (each with id, lane,
|
|
27
|
+
* requirements, fixes and size, as the plan reads them). Empty unless the lane model is `story`; a story
|
|
28
|
+
* with no lane agent (the lead's, a design) has none.
|
|
29
|
+
*/
|
|
30
|
+
export function storyModels(root, config, stories) {
|
|
31
|
+
if (config.harness?.agents?.lanes?.model !== 'story') return {};
|
|
32
|
+
const specs = config.docs?.specs;
|
|
33
|
+
const security = securityRequirementIds(
|
|
34
|
+
specs ? markdownFiles(root, specs).map((f) => readText(join(root, f)) ?? '') : [],
|
|
35
|
+
);
|
|
36
|
+
const backs = sendBacks(root);
|
|
37
|
+
const found = {};
|
|
38
|
+
for (const s of stories) {
|
|
39
|
+
const agent = config.lanes[s.lane]?.agent;
|
|
40
|
+
if (!agent) continue;
|
|
41
|
+
const branch = storyBranch(s);
|
|
42
|
+
found[s.id] = storyModel({
|
|
43
|
+
size: s.size,
|
|
44
|
+
security: s.requirements.some((r) => security.has(r)),
|
|
45
|
+
fix: Boolean(s.fixes),
|
|
46
|
+
sentBack: backs.filter((b) => b.branch === branch).length,
|
|
47
|
+
fileModel: agentFileModel(readText(join(root, '.claude/agents', `${agent}.md`))),
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
return found;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/** SCHED-3: records that a lane agent started for `story`, on `model` (null: the session's), and why. */
|
|
54
|
+
export function recordDispatch(root, { story, lane, branch, model, why }, now = Date.now()) {
|
|
55
|
+
const file = dispatchesFile(root);
|
|
56
|
+
mkdirSync(dirname(file), { recursive: true });
|
|
57
|
+
appendFileSync(
|
|
58
|
+
file,
|
|
59
|
+
`${JSON.stringify({ at: new Date(now).toISOString(), story, lane, branch, model: model ?? null, why: why ?? null })}\n`,
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/** Every lane agent started, oldest first: [{ at, story, lane, branch, model, why }]. */
|
|
64
|
+
export function dispatches(root) {
|
|
65
|
+
return (readText(dispatchesFile(root)) ?? '')
|
|
66
|
+
.split('\n')
|
|
67
|
+
.filter(Boolean)
|
|
68
|
+
.flatMap((line) => {
|
|
69
|
+
try {
|
|
70
|
+
const d = JSON.parse(line);
|
|
71
|
+
return d.story ? [d] : [];
|
|
72
|
+
} catch {
|
|
73
|
+
return [];
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
}
|
package/hooks/lib/harness.mjs
CHANGED
|
@@ -60,9 +60,9 @@ export const SETTINGS = {
|
|
|
60
60
|
problem: (v) =>
|
|
61
61
|
v === null || (typeof v === 'string' && v.length > 0)
|
|
62
62
|
? null
|
|
63
|
-
: `must be a model (${MODELS.join(', ')}, or an id), or null for the session's`,
|
|
63
|
+
: `must be a model (${MODELS.join(', ')}, or an id), story for each story's size, or null for the session's`,
|
|
64
64
|
about:
|
|
65
|
-
"The lane agents' model, set as each is dispatched; none means the session's. A lane's agent file with its own model keeps it",
|
|
65
|
+
"The lane agents' model, set as each is dispatched: story picks it from each story's size; none means the session's. A lane's agent file with its own model keeps it",
|
|
66
66
|
},
|
|
67
67
|
'agents.lanes.contextLimit': {
|
|
68
68
|
default: 250000,
|
package/hooks/lib/journal.mjs
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
import { execFileSync } from 'node:child_process';
|
|
7
7
|
import { existsSync, readFileSync } from 'node:fs';
|
|
8
8
|
import { join } from 'node:path';
|
|
9
|
+
import { dispatches } from './dispatches.mjs';
|
|
9
10
|
import { APPROVAL_LOG } from './rules.mjs';
|
|
10
11
|
import { sendBacks } from './reviews.mjs';
|
|
11
12
|
import { storyTimes } from './timeline.mjs';
|
|
@@ -141,10 +142,19 @@ export function journal(root, status, base, docs = {}) {
|
|
|
141
142
|
const times = storyTimes(root, status.stories, base);
|
|
142
143
|
const byId = new Map(status.stories.map((s) => [s.id, s]));
|
|
143
144
|
const backs = sendBacks(root);
|
|
145
|
+
// SCHED-3: the model each lane agent ran on, from the dispatch log; the session's isn't named.
|
|
146
|
+
const started = dispatches(root).filter((d) => d.model);
|
|
147
|
+
const modelName = (m) => (/^(haiku|sonnet|opus)$/.test(m) ? m[0].toUpperCase() + m.slice(1) : m);
|
|
148
|
+
const ranOn = (branch, before) =>
|
|
149
|
+
started.filter((d) => d.branch === branch && Date.parse(d.at) <= before).at(-1) ?? null;
|
|
144
150
|
for (const t of times) {
|
|
145
151
|
const s = byId.get(t.id);
|
|
146
152
|
const name = `${t.id} ${s?.title ?? ''}`.trim();
|
|
147
153
|
const reqText = s?.requirements?.length ? ` (${s.requirements.join(', ')})` : '';
|
|
154
|
+
const first = started.find((x) => x.branch === t.branch);
|
|
155
|
+
const onModel = first
|
|
156
|
+
? ` on ${modelName(first.model)}${first.why ? ` (${first.why})` : ''}`
|
|
157
|
+
: '';
|
|
148
158
|
if (t.started)
|
|
149
159
|
events.push({
|
|
150
160
|
at: t.started,
|
|
@@ -153,9 +163,11 @@ export function journal(root, status, base, docs = {}) {
|
|
|
153
163
|
text:
|
|
154
164
|
t.lane === 'lead'
|
|
155
165
|
? `The lead started ${name}${reqText} itself.`
|
|
156
|
-
: `${name}${reqText} was handed to the ${t.lane} lane.`,
|
|
166
|
+
: `${name}${reqText} was handed to the ${t.lane} lane${onModel}.`,
|
|
157
167
|
});
|
|
158
|
-
for (const b of backs.filter((x) => x.branch === t.branch))
|
|
168
|
+
for (const b of backs.filter((x) => x.branch === t.branch)) {
|
|
169
|
+
const d = t.lane === 'lead' ? null : ranOn(t.branch, Date.parse(b.at));
|
|
170
|
+
const ran = d ? `; it had run on ${modelName(d.model)}.` : '';
|
|
159
171
|
events.push({
|
|
160
172
|
at: Date.parse(b.at),
|
|
161
173
|
kind: 'sentBack',
|
|
@@ -163,8 +175,9 @@ export function journal(root, status, base, docs = {}) {
|
|
|
163
175
|
text:
|
|
164
176
|
t.lane === 'lead'
|
|
165
177
|
? `${t.id} needed more work from the lead${b.reason ? `: ${b.reason}` : '.'}`
|
|
166
|
-
: `The lead sent ${t.id} back to the ${t.lane} lane${b.reason ? `: ${b.reason}` : '.'}`,
|
|
178
|
+
: `The lead sent ${t.id} back to the ${t.lane} lane${b.reason ? `: ${b.reason}${ran}` : ran || '.'}`,
|
|
167
179
|
});
|
|
180
|
+
}
|
|
168
181
|
if (t.merged)
|
|
169
182
|
events.push({
|
|
170
183
|
at: t.merged,
|
package/hooks/lib/next.mjs
CHANGED
|
@@ -14,6 +14,7 @@ import { instructionsState } from './instructions.mjs';
|
|
|
14
14
|
import { SECURITY_AGENT_FILE } from './security.mjs';
|
|
15
15
|
import { laneClaims } from './laneclaims.mjs';
|
|
16
16
|
import { keptBecause, worktrees } from './worktrees.mjs';
|
|
17
|
+
import { storyModels } from './dispatches.mjs';
|
|
17
18
|
import { pickPerLane } from './schedule.mjs';
|
|
18
19
|
|
|
19
20
|
export const DRAFT_FILE = '.claude/code-kit.draft.json';
|
|
@@ -79,7 +80,8 @@ const hasMarkdown = (dir) => {
|
|
|
79
80
|
|
|
80
81
|
/**
|
|
81
82
|
* { step, why, args, then, attention, brief, worktrees }. `brief`: the brief's open questions (ASK-4);
|
|
82
|
-
* `worktrees`: the merged ones still holding changes, { branch, story, changes, files }, for the person (LEAN-8)
|
|
83
|
+
* `worktrees`: the merged ones still holding changes, { branch, story, changes, files }, for the person (LEAN-8);
|
|
84
|
+
* `models`: each story offered to a lane, with the model it runs on and why, { story, model, why } (SCHED-3). `step` is a skill (spec-design, init, check, dispatch,
|
|
83
85
|
* review), `merge` (the head of the merge queue, where the lead merges), `wait` (lanes are
|
|
84
86
|
* building) or `done`. `base(config)` resolves the branch lanes merge into.
|
|
85
87
|
*/
|
|
@@ -89,6 +91,8 @@ export function nextStep(root, base) {
|
|
|
89
91
|
let briefQuestions = [];
|
|
90
92
|
// LEAN-8: merged worktrees still holding changes, for the person to keep or discard.
|
|
91
93
|
let holdingTrees = [];
|
|
94
|
+
// SCHED-3: the model each story offered to a lane runs on, and why.
|
|
95
|
+
let models = [];
|
|
92
96
|
const result = (step, why, extra = {}) => ({
|
|
93
97
|
step,
|
|
94
98
|
why,
|
|
@@ -97,6 +101,7 @@ export function nextStep(root, base) {
|
|
|
97
101
|
attention,
|
|
98
102
|
brief: briefQuestions,
|
|
99
103
|
worktrees: holdingTrees,
|
|
104
|
+
models,
|
|
100
105
|
...extra,
|
|
101
106
|
});
|
|
102
107
|
const isRepo = git(root, 'rev-parse', '--is-inside-work-tree') === 'true';
|
|
@@ -360,6 +365,12 @@ export function nextStep(root, base) {
|
|
|
360
365
|
const then = [];
|
|
361
366
|
// A sent-back story goes back to its lane with the review's findings, before new work starts.
|
|
362
367
|
const toDispatch = [...fixes, ...ready];
|
|
368
|
+
const chosen = storyModels(
|
|
369
|
+
root,
|
|
370
|
+
config,
|
|
371
|
+
status.stories.filter((s) => toDispatch.includes(s.id)),
|
|
372
|
+
);
|
|
373
|
+
models = toDispatch.filter((id) => chosen[id]).map((id) => ({ story: id, ...chosen[id] }));
|
|
363
374
|
if (review.length && forDesign.length) then.push({ step: 'design', args: forDesign.join(' ') });
|
|
364
375
|
if (review.length && toDispatch.length)
|
|
365
376
|
then.push({ step: 'dispatch', args: toDispatch.join(' ') });
|
package/hooks/lib/plan.mjs
CHANGED
|
@@ -52,7 +52,7 @@ const field = (lines, name) =>
|
|
|
52
52
|
.trim() ?? '';
|
|
53
53
|
|
|
54
54
|
/**
|
|
55
|
-
* Every story in the plan: [{ id, title, lane, requirements, dependsOn, status, fixes, milestone, slice }]. A story's
|
|
55
|
+
* Every story in the plan: [{ id, title, lane, requirements, dependsOn, status, fixes, milestone, slice, size }]. A story's
|
|
56
56
|
* milestone is the `## ` heading above it ("Milestone 5: Your own key"), or null.
|
|
57
57
|
*/
|
|
58
58
|
export function readStories(root, planPath) {
|
|
@@ -82,6 +82,11 @@ export function readStories(root, planPath) {
|
|
|
82
82
|
milestone,
|
|
83
83
|
// SCHED-2: the slice it belongs to, a feature built across lanes, or null.
|
|
84
84
|
slice: field(body, 'Slice') || null,
|
|
85
|
+
// SCHED-3: small, medium or large, as the lead judged it, or null.
|
|
86
|
+
size:
|
|
87
|
+
field(body, 'Size')
|
|
88
|
+
.toLowerCase()
|
|
89
|
+
.match(/^(small|medium|large)\b/)?.[1] ?? null,
|
|
85
90
|
});
|
|
86
91
|
});
|
|
87
92
|
}
|
package/hooks/lib/schedule.mjs
CHANGED
|
@@ -84,3 +84,49 @@ export function pickPerLane(stories, { fixes = [], ready = [], busy = new Set(),
|
|
|
84
84
|
opened: startOrder,
|
|
85
85
|
};
|
|
86
86
|
}
|
|
87
|
+
|
|
88
|
+
/** SCHED-3: the models a lane agent steps up through, smallest first. */
|
|
89
|
+
export const STORY_MODELS = ['haiku', 'sonnet', 'opus'];
|
|
90
|
+
/** SCHED-3: the sizes a story's `**Size:**` may give, and the model each starts on. */
|
|
91
|
+
export const SIZE_MODELS = { small: 'haiku', medium: 'sonnet', large: 'opus' };
|
|
92
|
+
|
|
93
|
+
/** SET-4: the `model:` an agent file's frontmatter names, or null. */
|
|
94
|
+
export function agentFileModel(text) {
|
|
95
|
+
const front = /^---\r?\n([\s\S]*?)\r?\n---/.exec(String(text ?? ''))?.[1] ?? '';
|
|
96
|
+
return /^model:\s*['"]?([^'"\s]+)['"]?\s*$/m.exec(front)?.[1] ?? null;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
const times = (n) => (n === 1 ? 'once' : n === 2 ? 'twice' : `${n} times`);
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* SCHED-3: the model a story's lane agent runs on, and why, as { model, why }. The lane's agent file
|
|
103
|
+
* keeps its own model (other than `inherit`). Otherwise the story's size picks it (Sonnet without one),
|
|
104
|
+
* a security requirement raises it to Opus, a fix to Sonnet at least, and each send-back of its branch
|
|
105
|
+
* one step more, to Opus at most.
|
|
106
|
+
*/
|
|
107
|
+
export function storyModel({
|
|
108
|
+
size = null,
|
|
109
|
+
security = false,
|
|
110
|
+
fix = false,
|
|
111
|
+
sentBack = 0,
|
|
112
|
+
fileModel = null,
|
|
113
|
+
} = {}) {
|
|
114
|
+
if (fileModel && fileModel !== 'inherit')
|
|
115
|
+
return { model: fileModel, why: `its lane's agent file names ${fileModel}` };
|
|
116
|
+
const rank = (m) => STORY_MODELS.indexOf(m);
|
|
117
|
+
let model = SIZE_MODELS[size] ?? 'sonnet';
|
|
118
|
+
const why = [SIZE_MODELS[size] ? `a ${size} story` : 'no size in the plan'];
|
|
119
|
+
const raise = (to, reason) => {
|
|
120
|
+
if (rank(to) <= rank(model)) return;
|
|
121
|
+
model = to;
|
|
122
|
+
why.push(reason);
|
|
123
|
+
};
|
|
124
|
+
if (security) raise('opus', 'it cites a security requirement');
|
|
125
|
+
if (fix) raise('sonnet', 'a fix proves its bug with a test');
|
|
126
|
+
if (sentBack > 0)
|
|
127
|
+
raise(
|
|
128
|
+
STORY_MODELS[Math.min(STORY_MODELS.length - 1, rank(model) + sentBack)],
|
|
129
|
+
`sent back ${times(sentBack)}`,
|
|
130
|
+
);
|
|
131
|
+
return { model, why: why.join(', ') };
|
|
132
|
+
}
|
package/hooks/mod/loop.mjs
CHANGED
|
@@ -315,21 +315,25 @@ export const answeredPrompt = (question, answer) => {
|
|
|
315
315
|
: `The person says: ${said} Carry on with it.`;
|
|
316
316
|
};
|
|
317
317
|
|
|
318
|
-
|
|
319
|
-
export function agentFileModel(text) {
|
|
320
|
-
const front = /^---\r?\n([\s\S]*?)\r?\n---/.exec(String(text ?? ''))?.[1] ?? '';
|
|
321
|
-
return /^model:\s*['"]?([^'"\s]+)['"]?\s*$/m.exec(front)?.[1] ?? null;
|
|
322
|
-
}
|
|
318
|
+
export { agentFileModel } from '../lib/schedule.mjs';
|
|
323
319
|
|
|
324
320
|
/**
|
|
325
321
|
* SET-4: the model to start a lane agent on, or null to leave the spawn as it is: a model the lead's
|
|
326
322
|
* call names wins, then the lane agent file's own (other than `inherit`), then `harness.agents.lanes.model`.
|
|
323
|
+
* Set to `story` (SCHED-3), it's the model `next` gave the story, `story`, or null where it gave none.
|
|
327
324
|
*/
|
|
328
|
-
export function laneModel({
|
|
325
|
+
export function laneModel({
|
|
326
|
+
type,
|
|
327
|
+
model = null,
|
|
328
|
+
lanes = {},
|
|
329
|
+
setting = null,
|
|
330
|
+
fileModel = null,
|
|
331
|
+
story = null,
|
|
332
|
+
}) {
|
|
329
333
|
if (model || !setting) return null;
|
|
330
334
|
if (!Object.values(lanes).some((l) => l.agent === type)) return null;
|
|
331
335
|
if (fileModel && fileModel !== 'inherit') return null;
|
|
332
|
-
return setting;
|
|
336
|
+
return setting === 'story' ? story : setting;
|
|
333
337
|
}
|
|
334
338
|
|
|
335
339
|
/** LEAN-3: compacting a context below this share of its window isn't worth the summary it costs. */
|
package/hooks/mod/register.mjs
CHANGED
|
@@ -377,6 +377,8 @@ export function register(on) {
|
|
|
377
377
|
brief: (nextStep?.brief ?? []).filter((b) => !briefLater.has(b.question)),
|
|
378
378
|
// LEAN-8: merged worktrees still holding changes, less those kept this session.
|
|
379
379
|
worktrees: (nextStep?.worktrees ?? []).filter((w) => !worktreesKept.has(w.branch)),
|
|
380
|
+
// SCHED-3: the model each story offered to a lane runs on.
|
|
381
|
+
models: nextStep?.models ?? [],
|
|
380
382
|
base: status?.base ?? null,
|
|
381
383
|
// SESS-3, SESS-4: a working session's band holds its own, and its task.
|
|
382
384
|
working: role === 'working',
|
|
@@ -2241,12 +2243,17 @@ export function register(on) {
|
|
|
2241
2243
|
const file = where
|
|
2242
2244
|
? await $.fs.read(`${where.cwd}/.claude/agents/${e.subagentType}.md`).catch(() => null)
|
|
2243
2245
|
: null;
|
|
2246
|
+
// SCHED-3: with the lane model `story`, the model `next` gave the story the call's description names.
|
|
2247
|
+
const story = String(e.description ?? '')
|
|
2248
|
+
.match(/\bST-\d+\b/i)?.[0]
|
|
2249
|
+
?.toUpperCase();
|
|
2244
2250
|
const chosen = laneModel({
|
|
2245
2251
|
type: e.subagentType,
|
|
2246
2252
|
model: e.model,
|
|
2247
2253
|
lanes,
|
|
2248
2254
|
setting,
|
|
2249
2255
|
fileModel: typeof file === 'string' ? agentFileModel(file) : null,
|
|
2256
|
+
story: (model.models ?? []).find((m) => m.story === story)?.model ?? null,
|
|
2250
2257
|
});
|
|
2251
2258
|
return next(chosen ? { ...e, model: chosen } : e);
|
|
2252
2259
|
}).catch(($, e, next) => next(e));
|
|
@@ -3248,6 +3248,34 @@ test("SET-4 a lane agent starts on the lane model set; the lead's own choice, an
|
|
|
3248
3248
|
]);
|
|
3249
3249
|
});
|
|
3250
3250
|
|
|
3251
|
+
test("SCHED-3 with the lane model story, a lane agent starts on the model next gave its story; the lead's own choice and an agent file's still win", async ($, on) => {
|
|
3252
|
+
const w = project();
|
|
3253
|
+
(w.check as any).harness = { agents: { lanes: { model: 'story' } } };
|
|
3254
|
+
w.next = {
|
|
3255
|
+
step: 'dispatch',
|
|
3256
|
+
args: 'ST-9',
|
|
3257
|
+
then: [],
|
|
3258
|
+
models: [{ story: 'ST-9', model: 'haiku', why: 'a small story' }],
|
|
3259
|
+
} as any;
|
|
3260
|
+
w.agentFiles['/work/.claude/agents/web-engineer.md'] =
|
|
3261
|
+
'---\nname: web-engineer\nmodel: opus\n---\n';
|
|
3262
|
+
await start($, on, w);
|
|
3263
|
+
await dispatch($, 'core-engineer');
|
|
3264
|
+
await dispatch($, 'core-engineer', 'sonnet');
|
|
3265
|
+
await dispatch($, 'web-engineer');
|
|
3266
|
+
await $.agent.spawn({
|
|
3267
|
+
prompt: 'ST-2 other',
|
|
3268
|
+
description: 'ST-2 other',
|
|
3269
|
+
subagentType: 'core-engineer',
|
|
3270
|
+
});
|
|
3271
|
+
expect(w.spawned.map((e) => [e.subagentType, e.model ?? null])).toEqual([
|
|
3272
|
+
['core-engineer', 'haiku'],
|
|
3273
|
+
['core-engineer', 'sonnet'],
|
|
3274
|
+
['web-engineer', null],
|
|
3275
|
+
['core-engineer', null],
|
|
3276
|
+
]);
|
|
3277
|
+
});
|
|
3278
|
+
|
|
3251
3279
|
test('SET-4 with no lane model set, lane agents start as Claude Code decides', async ($, on) => {
|
|
3252
3280
|
const w = project();
|
|
3253
3281
|
await start($, on, w);
|
package/hooks/mod/view.mjs
CHANGED
|
@@ -1534,7 +1534,7 @@ export const SETTINGS_ID = 'code-kit-settings';
|
|
|
1534
1534
|
const CHOICES = {
|
|
1535
1535
|
autonomy: ['autonomous', 'propose', 'off'],
|
|
1536
1536
|
'agents.reviewer.model': ['', 'haiku', 'sonnet', 'opus'],
|
|
1537
|
-
'agents.lanes.model': ['', 'haiku', 'sonnet', 'opus'],
|
|
1537
|
+
'agents.lanes.model': ['', 'story', 'haiku', 'sonnet', 'opus'],
|
|
1538
1538
|
'compact.milestone': ['ask', 'auto', 'off'],
|
|
1539
1539
|
};
|
|
1540
1540
|
const shown = (v) =>
|
|
@@ -1548,7 +1548,9 @@ const shown = (v) =>
|
|
|
1548
1548
|
? 'the lead'
|
|
1549
1549
|
: v === 'person'
|
|
1550
1550
|
? 'you'
|
|
1551
|
-
:
|
|
1551
|
+
: v === 'story'
|
|
1552
|
+
? "each story's size"
|
|
1553
|
+
: String(v);
|
|
1552
1554
|
|
|
1553
1555
|
/**
|
|
1554
1556
|
* The Settings view: each setting from `code-kit settings --json` with a control, and, once one is
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@warren-dean/code-kit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.0",
|
|
4
4
|
"description": "Keeps AI coding agents inside your project's rules: lanes, layer rules, protected paths and proof before finish, enforced by Claude Code hooks and in CI",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Warren Langeveldt",
|
package/skills/dispatch/SKILL.md
CHANGED
|
@@ -50,7 +50,7 @@ The lease is the paths the story will create or change: its lane's folders for t
|
|
|
50
50
|
|
|
51
51
|
One agent per story: never send a running lane agent a second story, or a send-back. A story that goes on (sent back, or handed back at its context limit) gets a fresh agent: first run `node "${CLAUDE_PLUGIN_ROOT}/bin/code-kit.mjs" worktrees release <branch>`, which keeps the branch's commits and moves its report to the main checkout, then start the agent as below with the brief and "Read your earlier report first: `.claude/state/reports/<branch with / as _>.md` in the main checkout". A long-lived agent rereads its whole context on every step, which is most of what a build costs.
|
|
52
52
|
|
|
53
|
-
Start each story with the Agent tool: `subagent_type` is the lane's agent, `isolation: "worktree"`, and run them in the background, with a `description` that starts with the story's id ("ST-12 booking form"): the loop reads it to know the story is in flight, and won't ask for it again while the agent works. Start every story in the batch in the same message so they run in parallel.
|
|
53
|
+
Start each story with the Agent tool: `subagent_type` is the lane's agent, `model` the one `code-kit next --json` gives the story in `models` (with the lane model `story`, each story's model follows its `**Size:**`, raised for a security requirement, a fix or a send-back; a story with no size runs on Sonnet, so size it in the plan first if it's plainly small or large), `isolation: "worktree"`, and run them in the background, with a `description` that starts with the story's id ("ST-12 booking form"): the loop reads it to know the story is in flight, and won't ask for it again while the agent works. Start every story in the batch in the same message so they run in parallel.
|
|
54
54
|
|
|
55
55
|
The brief is the agent's whole context. Write it so the agent needs nothing else:
|
|
56
56
|
|
package/skills/init/SKILL.md
CHANGED
|
@@ -75,7 +75,7 @@ Write `.claude/code-kit.draft.json`. Follow `${CLAUDE_PLUGIN_ROOT}/README.md`
|
|
|
75
75
|
- **`checks`:** the typecheck, test, architecture and database commands, each scoped by `files`. Only include commands that pass on the current code, or ones the person chose to keep.
|
|
76
76
|
- **`harness.autonomy`:** ask the person how hands-off they want the build. With the code-kit mod (Claude Code 2.1.287 or later), once the plan has stories, a lead loop can keep the work moving between their prompts: it prompts the lead to dispatch ready stories, review finished ones and merge them where merges are delegated. Offer the three choices in plain words: `autonomous` (it keeps going on its own; they can pause it from the band), `propose` (each step waits in the band for their Go), or `off`. Put their answer in the draft as `"harness": { "autonomy": "…" }`. If they'd rather decide later, leave it out: the loop then asks them in the band before its first step. With `autonomous`, the lead owns delivery, so also draft `"merge": true` in `approvals.delegate`: the lead merges a reviewed branch once every check passes.
|
|
77
77
|
- **`approvals.delegate`, who decides what (HELM-1, WHO-1):** the person is the product owner; the lead decides everything technical, so lanes ask the lead, never the person. With no `approvals.delegate`, that's the default: the lead approves new packages (only when the story's requirements need them and they fit the spec, the principles and the architecture; npm packages must also pass the registry limits on licence, popularity and age), every protected change except the specs (`spec`), the screens' designs (`design`), CI (`ci`) and the kit, merges into the base, and weakened tests on a lane's branch after its review. Show the person the split in two lines, what they keep and what the lead decides, and ask if they want to keep anything else. Only if they do, draft `approvals.delegate` with exactly what the lead keeps (`{ "protected": [...], "merge": true, "tests": true, "dependencies": {} }`, leaving out what they keep), or `false` to keep everything. They can change it later in the Settings tab's Approvals section.
|
|
78
|
-
- **`harness.agents.lanes.model`:** ask which model the lane agents run on. Each lane agent builds one story inside its own paths, with its requirements and acceptance criteria in its brief, and the hooks, `verify` and the lead's review catch what it gets wrong, so
|
|
78
|
+
- **`harness.agents.lanes.model`:** ask which model the lane agents run on. Each lane agent builds one story inside its own paths, with its requirements and acceptance criteria in its brief, and the hooks, `verify` and the lead's review catch what it gets wrong, so most stories don't need the session's model. Recommend `story`: each story runs on the model its `**Size:**` in the plan gives (Haiku for small, Sonnet for medium, Opus for large), raised to Opus for a security requirement, to Sonnet at least for a fix, and one step for each time its branch is sent back. Offer one model for every lane (`sonnet`) as the simpler choice, and say the lead, the reviewer and the security reviewer keep their own models either way. A lane's agent file with its own `model:` keeps that. Put their answer in `harness` as `"agents": { "lanes": { "model": "story" } }`, or leave it out for the session's model. A project set up before sizes existed has stories with none, which run on Sonnet until the lead sizes them.
|
|
79
79
|
- **`harness.report.on`:** ask whether agents may draft bug reports for code-kit itself when code-kit gets in their way (a refusal that shouldn't have happened, a crash). Each report holds only code-kit's own facts (its version, the rule, what it said, the command), never the project's code, paths or data, and waits in their Decisions tab: they read it and send it to code-kit's public GitHub under their own account, or discard it. Off unless they say yes; put `"report": { "on": true }` in `harness` if they do.
|
|
80
80
|
- **`docs.standards`:** `docs/standards.md` unless the project keeps its standards elsewhere (see Standards, below).
|
|
81
81
|
- **`approvals.lead`:** ask the person whether they'll ever approve from a phone or another chat-only client, where a `!` command arrives as plain text. If so, set it to `true`: the lead then records approvals they give in chat (`code-kit approve`), and runs the `shell.block` commands marked `person: true` when they say so. Mark a `shell.block` command `person: true` only if the person wants to be able to have the lead run it on their say-so. Leave the setting out if the lead will run unattended.
|
|
@@ -113,7 +113,7 @@ These are what `/code-kit:init` turns into enforced rules, so be concrete.
|
|
|
113
113
|
- a **QA lane** (`qa`, agent `test-engineer`) whenever the product has screens or journeys that cross lanes: it owns the end-to-end suites (for example `e2e/**` or `apps/*/e2e/**`), in the runner that suits each surface (Playwright for web, Maestro or Detox for mobile), and its command runs them. Nobody else owns these tests, so without it nothing proves a journey works across the lanes;
|
|
114
114
|
- no lane for security: it owns no paths. init adds a read-only security reviewer that checks every story touching the threat models' sensitive parts, so security requirements are delivered by the lanes whose code they constrain;
|
|
115
115
|
- milestones, each a usable increment;
|
|
116
|
-
- stories, each small enough for one lane to finish on one branch. Each story is a `### ST-<n> Title` heading with `**Lane:**`, `**Requirements:**` (the IDs it delivers, or `none` for a spike or a foundation that delivers none), `**Depends on:**` and `**Status:** todo` lines, and for a story that fixes a bug, `**Fixes:**` with what was broken. `code-kit status` and the dispatch skill read them. A story that needs two lanes is two stories, with a dependency between them;
|
|
116
|
+
- stories, each small enough for one lane to finish on one branch. Each story is a `### ST-<n> Title` heading with `**Lane:**`, `**Requirements:**` (the IDs it delivers, or `none` for a spike or a foundation that delivers none), `**Depends on:**`, `**Size:**` and `**Status:** todo` lines, and for a story that fixes a bug, `**Fixes:**` with what was broken. The size is your judgement of what the story asks of whoever builds it, and with the lane model `story` it picks the lane agent's model: `small` for one layer inside patterns the code already has and no new contract (copy, configuration, a field on an existing form, tests for code that exists), `large` for a new data model or migration, a contract other lanes build on, money, sign-in or concurrency, or a library the project hasn't used, and `medium` for the rest. Size by what could go wrong, not by how many lines it takes. `code-kit status` and the dispatch skill read them. A story that needs two lanes is two stories, with a dependency between them;
|
|
117
117
|
- sequencing: contracts and shared foundations first, as the lead's own stories (`**Lane:** lead`, built by the lead rather than dispatched), then work that can run in parallel. A lane runs one story at a time, so parallel work is stories in different lanes;
|
|
118
118
|
- **slices**: group the stories that together make one feature someone could see working (a vertical slice across lanes, such as "Book a class") with a `**Slice:** <name>` line on each, in plan order, contract story first. A free lane builds the open slice's stories before the next slice's (`harness.slices.open`, 1 by default), so the feature in progress finishes and merges before the next one spreads across the lanes;
|
|
119
119
|
- **a test story per journey**: for each main user journey, a story in the `qa` lane citing the journey's requirements and depending on the screen and service stories it goes through, so the journey is proven end to end as soon as its parts are built;
|
package/templates/plan.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Plan
|
|
2
2
|
|
|
3
|
-
`code-kit status` reads this file. Keep each story's heading and its four `**…:**` lines in this form. Use `**Lane:** lead` for the lead's own stories (contracts, foundations, spikes), `**Lane:** qa` for a journey's end-to-end test story (it depends on the screen and service stories the journey goes through), `**Lane:** design` for a design story (an area's screens, designed with the person before any of them is built; the stories building them depend on it), and `**Requirements:** none` for a story that delivers no requirement. A story that fixes a bug adds a fifth line, `**Fixes:** <what was broken, and where it was seen>`: `code-kit verify` then requires a test that fails without the fix and passes with it. A story that belongs to a slice (a feature that can be shown working, built across lanes) adds `**Slice:** <name>`: a lane takes the open slice's stories first.
|
|
3
|
+
`code-kit status` reads this file. Keep each story's heading and its four `**…:**` lines in this form. Use `**Lane:** lead` for the lead's own stories (contracts, foundations, spikes), `**Lane:** qa` for a journey's end-to-end test story (it depends on the screen and service stories the journey goes through), `**Lane:** design` for a design story (an area's screens, designed with the person before any of them is built; the stories building them depend on it), and `**Requirements:** none` for a story that delivers no requirement. A story that fixes a bug adds a fifth line, `**Fixes:** <what was broken, and where it was seen>`: `code-kit verify` then requires a test that fails without the fix and passes with it. A story that belongs to a slice (a feature that can be shown working, built across lanes) adds `**Slice:** <name>`: a lane takes the open slice's stories first. `**Size:**` is `small` (one layer, inside patterns the code already has, no new contract), `medium` or `large` (a new data model or migration, a contract other lanes build on, money, sign-in or concurrency, or a library the project hasn't used); with `harness.agents.lanes.model` set to `story`, it picks the lane agent's model.
|
|
4
4
|
|
|
5
5
|
## Lanes
|
|
6
6
|
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
**Requirements:** {{AREA-1, AREA-2}}
|
|
19
19
|
**Depends on:** {{ST-n, or none}}
|
|
20
20
|
**Slice:** {{the feature it's part of, or leave the line out}}
|
|
21
|
+
**Size:** {{small, medium or large}}
|
|
21
22
|
**Status:** todo
|
|
22
23
|
|
|
23
24
|
{{What gets built, in two or three sentences. The acceptance criteria are the cited requirements'.}}
|