@warren-dean/code-kit 0.3.9 → 0.3.11
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.
|
@@ -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.3.
|
|
12
|
+
"version": "0.3.11",
|
|
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.
|
|
3
|
+
"version": "0.3.11",
|
|
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
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
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
|
+
|
|
5
|
+
## 0.3.11 (2026-10-04)
|
|
6
|
+
|
|
7
|
+
- **`code-kit verify` and union-merged approval logs:** verify now accepts an approval log that git merged with `merge=union`, as the README recommends.
|
|
8
|
+
- **The problem:** when a lane merged its base after the base had gained log entries, git put the lane's own entries first. verify read that as a rewritten log, and then refused the lane's approved manifest changes too.
|
|
9
|
+
- **Now:** it accepts the log as long as every earlier line is still there, in order. A log whose earlier lines were changed, removed or reordered still fails.
|
|
10
|
+
|
|
11
|
+
## 0.3.10 (2026-10-04)
|
|
12
|
+
|
|
13
|
+
- **Delegated ratification trailer:** Context Graph's delegated ratification trailer (`Ctx-Ratified-By: <ratifier> (delegated)`) may be written by the lead only, never by a lane. A person's trailer stays blocked for every agent, as before.
|
|
14
|
+
- **Adapters:** they can now add lead-only shell rules (`shell.restricted`) as well as blocked ones.
|
|
15
|
+
|
|
16
|
+
## 0.3.9 (2026-10-04)
|
|
17
|
+
|
|
18
|
+
- **Delegated approvals:** with `"approvals": { "delegate": { "protected": [...], "dependencies": {...} } }`, the lead can approve on its own authority with `code-kit approve … --delegated`. This is for a lead that runs without a person watching.
|
|
19
|
+
- **Protected approvals:** only the names you list.
|
|
20
|
+
- **Dependencies:** checked against the npm registry for licence, weekly downloads, recent releases and install scripts.
|
|
21
|
+
- **All or nothing:** anything outside the rules approves nothing, and goes to the person.
|
|
22
|
+
- **The record:** every delegated approval is marked with the rule it used.
|
|
23
|
+
- **`code-kit approve` takes package names:** `approve @scope/pkg` now means `dep-@scope+pkg`, where it used to refuse the name.
|
|
24
|
+
|
|
25
|
+
## 0.3.8 (2026-10-03)
|
|
26
|
+
|
|
27
|
+
- **Lead stories:** plans can give the lead its own stories (`**Lane:** lead`), such as contracts, foundations and spikes. `code-kit next` hands them to the lead instead of dispatching them, and `status` no longer calls `lead` an unknown lane.
|
|
28
|
+
- **Stories with no requirements:** `**Requirements:** none` marks a story that delivers no requirement, such as a spike.
|
|
29
|
+
- **The CLI** no longer crashes when its output is piped into `head`.
|
|
30
|
+
|
|
31
|
+
## 0.3.7 (2026-10-03)
|
|
32
|
+
|
|
33
|
+
- **Approvals from chat:** with `"approvals": { "lead": true }`, the lead can record an approval you give in chat with `code-kit approve`, for when `!` isn't available, as on a phone. The approval is marked as given in chat. The lead may also run `shell.block` commands marked `person: true` when you say so.
|
|
34
|
+
|
|
35
|
+
## 0.3.6 (2026-10-02)
|
|
36
|
+
|
|
37
|
+
- **Companion plugin:** the README, `llms.txt` and the init skill now point to Context Graph. Init mentions it once when it isn't installed, and never installs it unasked.
|
|
38
|
+
|
|
39
|
+
## 0.3.5 (2026-10-02)
|
|
40
|
+
|
|
41
|
+
- **Logo and diagram:** the npm package now includes them, and the README shows them on npmjs.com too.
|
|
42
|
+
|
|
43
|
+
## 0.3.4 (2026-10-02)
|
|
44
|
+
|
|
45
|
+
- **Dependency approvals:** each new package needs a person's approval (`dep-<package>`), for one lane or for everyone. The approval also covers the manifest and lockfile changes the install makes. The commit hook logs those changes, and `code-kit verify` accepts them.
|
|
46
|
+
- **A hole closed:** flags before a package name (`npm install -D lodash`) no longer slip past the guard.
|
|
47
|
+
- **Worktrees:** approvals are read from the main checkout, so a lane working in its own worktree sees them.
|
|
48
|
+
- **Wording:** the README states the hooks' deliberate limits instead of promising hard guarantees.
|
|
49
|
+
|
|
50
|
+
## 0.3.3 (2026-10-01)
|
|
51
|
+
|
|
52
|
+
- **Descriptions:** they now open with what code-kit does for AI coding agents.
|
|
53
|
+
|
|
54
|
+
## 0.3.2 (2026-10-01)
|
|
55
|
+
|
|
56
|
+
- **npm:** published as `@warren-dean/code-kit`. CI uses `npx @warren-dean/code-kit verify`.
|
|
57
|
+
- **For AI tools:** an `llms.txt` and an `AGENTS.md` describe the plugin.
|
|
58
|
+
|
|
59
|
+
## 0.3.1 (2026-10-01)
|
|
60
|
+
|
|
61
|
+
- **Ready to install from a public repository:** MIT licence, a security policy, and install instructions.
|
|
62
|
+
|
|
63
|
+
## 0.3.0 (2026-09-30)
|
|
64
|
+
|
|
65
|
+
- **Adapters** for tools that share a project, starting with Context Graph.
|
|
66
|
+
- **`code-kit trace`:** reports the requirements, lane and layer of a file.
|
|
67
|
+
- **Earlier layer checks:** layer rules are now checked before a write, not just after it.
|
|
68
|
+
|
|
69
|
+
## 0.2.0 (2026-09-29)
|
|
70
|
+
|
|
71
|
+
- **From idea to merged code:** the spec-design, dispatch, review, status, verify and next skills, built on the rules from 0.1.0.
|
|
72
|
+
|
|
73
|
+
## 0.1.0
|
|
74
|
+
|
|
75
|
+
- **Project rules from `.claude/code-kit.json`:** lanes, layers, protected paths with an approval log, spec-check before code, and proof before finishing, all enforced by hooks.
|
package/README.md
CHANGED
|
@@ -399,9 +399,9 @@ Other tools share a project with code-kit and keep files of their own. An adapte
|
|
|
399
399
|
|
|
400
400
|
While the tool is detected, its additions are merged into the effective config, like the kit's own defaults. Run `code-kit adapters` to see them, or switch one off with `"adapters": { "<name>": false }`.
|
|
401
401
|
|
|
402
|
-
| Adapter | Detected by | Adds
|
|
403
|
-
| --------------- | ----------- |
|
|
404
|
-
| `context-graph` | `.ctx/` | `.ctx/**` for the lead. `.ctx/decisions.ctx` and `.ctx/cards.ctx` for any actor, since every agent records decisions and file cards. `graph.ctx` and `config.toml` are protected (approval `ctx`). No Claude actor may write a `Ctx-Ratified-By` trailer: ratifying is a person's act (with `approvals.lead`, the lead may add it when the person says so in chat). |
|
|
402
|
+
| Adapter | Detected by | Adds |
|
|
403
|
+
| --------------- | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
404
|
+
| `context-graph` | `.ctx/` | `.ctx/**` for the lead. `.ctx/decisions.ctx` and `.ctx/cards.ctx` for any actor, since every agent records decisions and file cards. `graph.ctx` and `config.toml` are protected (approval `ctx`). No Claude actor may write a person's `Ctx-Ratified-By` trailer: ratifying is a person's act (with `approvals.lead`, the lead may add it when the person says so in chat). A delegated trailer, `Ctx-Ratified-By: <ratifier> (delegated)`, is the lead's alone, under Context Graph's `[delegate]` rules. |
|
|
405
405
|
|
|
406
406
|
Its setup:
|
|
407
407
|
|
|
@@ -419,6 +419,10 @@ The other direction is `code-kit trace <path> --json`. It's the contract other t
|
|
|
419
419
|
npm test # unit tests, then the hooks end to end in throwaway repositories
|
|
420
420
|
```
|
|
421
421
|
|
|
422
|
+
## Changes
|
|
423
|
+
|
|
424
|
+
What changed in each release is in [CHANGELOG.md](https://github.com/warrendeanlangeveldt/code-kit/blob/main/CHANGELOG.md), and on [GitHub Releases](https://github.com/warrendeanlangeveldt/code-kit/releases).
|
|
425
|
+
|
|
422
426
|
## Licence
|
|
423
427
|
|
|
424
428
|
MIT. See [LICENSE](LICENSE). To report a security problem, see [SECURITY.md](SECURITY.md).
|
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
// edits, so those two files are writable by any actor; the rules and settings
|
|
5
5
|
// are the lead's, and changes to them go through the approval log. Ratifying a rule is a person's act,
|
|
6
6
|
// signed with a commit trailer, so no Claude actor may write that trailer, unless the project lets the
|
|
7
|
-
// lead act on what the person says in chat (`approvals.lead`).
|
|
7
|
+
// lead act on what the person says in chat (`approvals.lead`). A delegated ratification, signed
|
|
8
|
+
// `Ctx-Ratified-By: <ratifier> (delegated)`, is the lead's own act under the repository's [delegate]
|
|
9
|
+
// rules: only the lead may write that trailer, and Context Graph's gate checks the kinds it covers.
|
|
8
10
|
import { existsSync } from 'node:fs';
|
|
9
11
|
import { join } from 'node:path';
|
|
10
12
|
|
|
@@ -22,11 +24,18 @@ export default {
|
|
|
22
24
|
shell: {
|
|
23
25
|
block: [
|
|
24
26
|
{
|
|
25
|
-
pattern: 'Ctx-Ratified-By\\s*[:=]',
|
|
27
|
+
pattern: 'Ctx-Ratified-By\\s*[:=](?![^\\n"\']*\\(delegated\\))',
|
|
26
28
|
why: "Ratifying a Context Graph rule is a person's act: they add the Ctx-Ratified-By trailer themselves, with a `!` git command.",
|
|
27
29
|
person: true,
|
|
28
30
|
},
|
|
29
31
|
],
|
|
32
|
+
restricted: [
|
|
33
|
+
{
|
|
34
|
+
pattern: 'Ctx-Ratified-By\\s*[:=][^\\n"\']*\\(delegated\\)',
|
|
35
|
+
lanes: [],
|
|
36
|
+
why: "Only the lead ratifies under Context Graph's [delegate] rules. Write a change request for the lead, and stop.",
|
|
37
|
+
},
|
|
38
|
+
],
|
|
30
39
|
},
|
|
31
40
|
setup: [
|
|
32
41
|
'.gitignore: .ctx/archive/, .ctx/bench/, .ctx/models/ and .ctx/serve.json (ctx working files, never committed)',
|
|
@@ -4,8 +4,9 @@
|
|
|
4
4
|
// name the tool, and the key that switches it off in the config: "adapters": { "<name>": false }
|
|
5
5
|
// detect (root) => true when the tool is in use in this project
|
|
6
6
|
// config { lead?, anyActor?, protected? } merged into the effective config, like the kit's defaults
|
|
7
|
-
// shell { block? } commands refused for every Claude actor, merged into
|
|
8
|
-
// marks a person's act the lead may do for them under
|
|
7
|
+
// shell { block?, restricted? } block: commands refused for every Claude actor, merged into
|
|
8
|
+
// shell.block (`person: true` marks a person's act the lead may do for them under
|
|
9
|
+
// approvals.lead); restricted: commands only the lead and the listed lanes may run
|
|
9
10
|
// setup lines for init to apply or tell the person: ignore files, merge drivers, instructions
|
|
10
11
|
//
|
|
11
12
|
// The core only ever calls applyAdapters() and activeAdapters(); it never names a tool.
|
|
@@ -29,6 +30,7 @@ export function applyAdapters(config, raw, root) {
|
|
|
29
30
|
merged.anyActor.push(...(c.anyActor ?? []));
|
|
30
31
|
merged.protected.push(...(c.protected ?? []));
|
|
31
32
|
merged.shell.block.push(...(a.shell?.block ?? []));
|
|
33
|
+
merged.shell.restricted.push(...(a.shell?.restricted ?? []));
|
|
32
34
|
}
|
|
33
35
|
merged.adapters = active.map((a) => a.name);
|
|
34
36
|
return merged;
|
package/hooks/lib/verify.mjs
CHANGED
|
@@ -41,18 +41,36 @@ export function branchChanges(root, base) {
|
|
|
41
41
|
.filter(Boolean);
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
+
/**
|
|
45
|
+
* The lines added to the log between `before` and `after`, or null if any earlier line was changed,
|
|
46
|
+
* removed or reordered. Every earlier line must still be there, in order; new lines may sit between
|
|
47
|
+
* them, because `merge=union` (see the README) puts a branch's own entries before the ones the base
|
|
48
|
+
* gained after the branch left it.
|
|
49
|
+
*/
|
|
50
|
+
export function addedLogLines(before, after) {
|
|
51
|
+
const old = before.split('\n').filter(Boolean);
|
|
52
|
+
const added = [];
|
|
53
|
+
let i = 0;
|
|
54
|
+
for (const line of after.split('\n').filter(Boolean)) {
|
|
55
|
+
if (i < old.length && line === old[i]) i++;
|
|
56
|
+
else added.push(line);
|
|
57
|
+
}
|
|
58
|
+
return i === old.length ? added : null;
|
|
59
|
+
}
|
|
60
|
+
|
|
44
61
|
/** Entries appended to the approval log since commit `from`, plus problems if it was rewritten. */
|
|
45
62
|
function logEntries(root, base) {
|
|
46
63
|
const before = showAt(root, base, APPROVAL_LOG) ?? '';
|
|
47
64
|
const after = showAt(root, 'HEAD', APPROVAL_LOG) ?? '';
|
|
48
|
-
|
|
65
|
+
const added = addedLogLines(before, after);
|
|
66
|
+
if (added === null)
|
|
49
67
|
return {
|
|
50
68
|
entries: [],
|
|
51
69
|
problems: [`${APPROVAL_LOG} was edited, not appended to; it is append-only.`],
|
|
52
70
|
};
|
|
53
71
|
const entries = [];
|
|
54
72
|
const problems = [];
|
|
55
|
-
for (const line of
|
|
73
|
+
for (const line of added) {
|
|
56
74
|
try {
|
|
57
75
|
entries.push(JSON.parse(line));
|
|
58
76
|
} catch {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@warren-dean/code-kit",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.11",
|
|
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",
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
".claude-plugin",
|
|
31
31
|
"assets",
|
|
32
32
|
"README.md",
|
|
33
|
+
"CHANGELOG.md",
|
|
33
34
|
"LICENSE",
|
|
34
35
|
"SECURITY.md"
|
|
35
36
|
],
|