@erclx/aitk 0.79.0 → 0.81.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.
Files changed (52) hide show
  1. package/claude/.claude-plugin/plugin.json +1 -1
  2. package/claude/skills/ci-workflow/REQUIREMENT.md +3 -1
  3. package/claude/skills/claude-address-review/SKILL.md +8 -3
  4. package/claude/skills/claude-address-review/references/rebase-conflicts.md +3 -1
  5. package/claude/skills/claude-autoship/SKILL.md +3 -1
  6. package/claude/skills/claude-diagram/SKILL.md +3 -1
  7. package/claude/skills/claude-docs/SKILL.md +17 -4
  8. package/claude/skills/claude-feature/SKILL.md +6 -2
  9. package/claude/skills/claude-intake/REQUIREMENT.md +3 -1
  10. package/claude/skills/claude-memory-review/SKILL.md +6 -2
  11. package/claude/skills/claude-memory-review/references/receipt-format.md +3 -1
  12. package/claude/skills/claude-orchestrate/REQUIREMENT.md +6 -2
  13. package/claude/skills/claude-orchestrate/references/orchestrator-resume.md +3 -1
  14. package/claude/skills/claude-pr-review/SKILL.md +11 -3
  15. package/claude/skills/claude-seed-sync/SKILL.md +3 -1
  16. package/claude/skills/cli-script/REQUIREMENT.md +3 -1
  17. package/claude/skills/docs-sync/SKILL.md +3 -1
  18. package/claude/skills/git-followup/REQUIREMENT.md +3 -1
  19. package/claude/skills/git-followup/SKILL.md +10 -2
  20. package/claude/skills/git-ship/SKILL.md +3 -1
  21. package/claude/skills/migration-context/REQUIREMENT.md +3 -1
  22. package/claude/skills/project-commands/SKILL.md +3 -1
  23. package/claude/skills/session-resume/SKILL.md +3 -1
  24. package/claude/skills/setup-indexes/SKILL.md +3 -1
  25. package/claude/skills/setup-init/SKILL.md +3 -1
  26. package/claude/skills/toolkit-cli/SKILL.md +1 -1
  27. package/docs/agents/commands.md +29 -27
  28. package/docs/agents/comments.md +3 -1
  29. package/docs/agents/context-audit-checks.md +40 -6
  30. package/docs/agents/context-audit.md +2 -2
  31. package/docs/agents/index.md +1 -1
  32. package/docs/agents/indexes.md +3 -1
  33. package/docs/agents/install-and-sync.md +12 -6
  34. package/docs/agents/output-shape.md +3 -1
  35. package/docs/agents/records.md +45 -1
  36. package/docs/agents/sandbox.md +3 -1
  37. package/docs/ai-workflow.md +31 -8
  38. package/docs/operating-model.md +6 -3
  39. package/docs/target-projects.md +22 -6
  40. package/docs/visual-design-workflow.md +13 -3
  41. package/package.json +1 -1
  42. package/src/cli.ts +2 -1
  43. package/src/commands/context.ts +65 -3
  44. package/src/commands/records.ts +160 -2
  45. package/src/context/audit.ts +87 -2
  46. package/src/context/citations.ts +17 -0
  47. package/src/records/backup.ts +394 -0
  48. package/standards/context.md +1 -0
  49. package/standards/prose.md +3 -1
  50. package/standards/rule.md +3 -1
  51. package/standards/tasks.md +11 -3
  52. package/standards/versioning.md +3 -1
@@ -17,9 +17,27 @@ It reports rather than gates by default, the closer call because a missing secti
17
17
 
18
18
  `--gate` promotes the finding to a failing exit code, which the seed stage runs and no other caller does. That mode needs an answer to the sanctioned omission above, so a file declaring `stub: true` in its frontmatter is dropped before the check and reported nowhere. Both are described in `context-audit.md`.
19
19
 
20
+ ## Reference form
21
+
22
+ The reference-form check reports an entry naming a sibling entry by bare filename where `.claude/standards/context.md` asks for the path it sits at. A bare name resolves against whichever folder its reader is already in, so a domain that splits into subfolders strands every inbound reference and the break surfaces nowhere. A path is checkable, which is what makes the form rule worth measuring at all: once a reference spells its path, the citation gate resolves it and a split that moves the file fails the push.
23
+
24
+ A finding is a backticked filename carrying no folder, matched against the entries beside the one that wrote it. The backticks are required, since a filename in running prose is not a reference a reader follows.
25
+
26
+ A name matching no sibling is left alone, which is the measure reaching less than the rule does rather than the rule stopping there. The standard governs a reference to any other entry, so a split entry naming one that sits in a different folder is a violation this check never sees. What the sibling set buys is that a name resolving inside the folder is a reference by construction, where a bare filename matched anywhere would report every sentence that happens to name a file.
27
+
28
+ An entry naming itself is left alone on separate grounds, since no split can strand it. Fenced blocks are excluded with the scans above, and a line carrying the citation ignore marker is excluded because that marker already means the line displays a name rather than pointing at one.
29
+
30
+ The check covers the folders a domain split into and stops at the flat folder above them. A split folder's entries are named for sub-areas of one domain, so a bare name matching one of them points at it. The flat folder's entries are named for whole domains, and a domain name is a common noun that a seed or another tree spells the same way, which is where both false positives measured against this corpus sat. What the exemption costs is the references a future split of the flat folder would strand, and it is taken because a report firing on correct prose teaches a reader to stop reading the section.
31
+
32
+ It reports and never gates, which is the split the citation check already draws. An unresolved path is a fact and a form violation is a judgment with a measured false-positive rate, the same line `aitk markdown audit` draws between a ban and a weight checkpoint. The JSON record carries the findings per entry as `entries[].bareReferences`.
33
+
20
34
  ## Length
21
35
 
22
- Length quotes its checkpoint from `.claude/standards/context.md`: roughly 150 rendered lines for an entry, applied to each of the 60 entries the audit measures, 51 of them under `.claude/context/` and 9 diagram files beside them. It counts rendered lines rather than source lines, wrapping each line at 80 columns and summing the heights. A line is wrapped at the width it renders at, so a link counts as its anchor text and a backticked path counts whole, which parts the rendered count from a source count wherever an entry cites a path in backticks rather than as a link. Entries here are authored one line per bullet, so a block of fifteen paragraph-bullets occupies fifteen source lines and renders past sixty, which source counting cannot see. The measure counts fenced blocks and frontmatter, so a reference-heavy entry ranks by its examples, which the legend states on every run alongside the width, since a number in rendered lines cannot be reproduced without it.
36
+ Length quotes its checkpoint from `.claude/standards/context.md`: roughly 150 rendered lines for an entry, applied to each of the 60 entries the audit measures, 51 of them under `.claude/context/` and 9 diagram files beside them. It counts rendered lines rather than source lines, wrapping each line at 80 columns and summing the heights.
37
+
38
+ A line is wrapped at the width it renders at, so a link counts as its anchor text and a backticked path counts whole, which parts the rendered count from a source count wherever an entry cites a path in backticks rather than as a link. Entries here are authored one line per bullet, so a block of fifteen paragraph-bullets occupies fifteen source lines and renders past sixty, which source counting cannot see.
39
+
40
+ The measure counts fenced blocks and frontmatter, so a reference-heavy entry ranks by its examples, which the legend states on every run alongside the width, since a number in rendered lines cannot be reproduced without it.
23
41
 
24
42
  Depth and bullet weight are quoted from `.claude/standards/markdown.md`, which states both over every markdown file rather than over a context entry, so `aitk markdown audit` measures them and this command no longer does. They share `renderedHeight` with the length measure, since the two checkpoints sit in one section of that standard and a reader compares them. What the split costs is that a session wanting both numbers for one entry runs two commands, and what it buys is that either number can be had for a file in a folder this audit refuses to resolve.
25
43
 
@@ -29,7 +47,9 @@ The table check reports a catalog that grows a row per shipped thing, not a tabl
29
47
 
30
48
  ## Provenance
31
49
 
32
- The provenance check reports the markers narrating how a domain reached its shape rather than describing what it is: a date, a change number, or a release label. The standard admits a rejected alternative and the reasoning that killed it while refusing the provenance attached to it, so a marker names a line to read rather than a line to delete. Findings group by entry and sort left to right within a line, since what a reader acts on is which file to open. Fenced blocks are excluded, which keeps a pinned version in an install command from reading as a claim the entry makes. Frontmatter is excluded with them, since the content checks read the body alone, and that is what keeps a diagram entry's dated `verified` stamp a record of its last check rather than a marker to settle. Length is the exception, counting the whole file, so a reader applying the 150-rendered-line checkpoint against the body alone lands a few lines under what the tool reports.
50
+ The provenance check reports the markers narrating how a domain reached its shape rather than describing what it is: a date, a change number, or a release label. The standard admits a rejected alternative and the reasoning that killed it while refusing the provenance attached to it, so a marker names a line to read rather than a line to delete. Findings group by entry and sort left to right within a line, since what a reader acts on is which file to open.
51
+
52
+ Fenced blocks are excluded, which keeps a pinned version in an install command from reading as a claim the entry makes. Frontmatter is excluded with them, since the content checks read the body alone, and that is what keeps a diagram entry's dated `verified` stamp a record of its last check rather than a marker to settle. Length is the exception, counting the whole file, so a reader applying the 150-rendered-line checkpoint against the body alone lands a few lines under what the tool reports.
33
53
 
34
54
  ## Narration
35
55
 
@@ -37,7 +57,11 @@ The narration check reports a bullet that states the design a sibling bullet rep
37
57
 
38
58
  It reads structure rather than words, which the corpus decided. Measured across the 39 entries this toolkit held the day it shipped, the terms carrying clean signal for a supersession are too rare to catch anything: `superseded` appears twice, `previously` three times, and `formerly`, `originally`, and `at first` never. The one term that would have caught the case a review caught by hand is `now`, which appears 57 times across 24 entries in correct present-tense prose. A list including it reports 57 lines to catch one, and a list excluding it reports nothing.
39
59
 
40
- What it matches instead is a bullet doing three things at once: opening with a pronoun whose antecedent is the bullet above it, carrying a past-tense verb, and following another top-level bullet. All three are required. Eight bullets in the corpus open with a back-reference, and the verb set narrows those to one. The pronoun is matched cased and anchored to the opening, since a mid-sentence `this` is a determiner rather than a reference back. The verb is matched uncased anywhere in the bullet, and rejected when a copula sits in front of it, since `is used to resolve the folder` is the passive of `use` rather than the past habitual the set means. Both sets are published under `## Narration pronouns` and `## Narration verbs` in a governance rule and read at run time, so widening either costs a rule edit rather than a TypeScript change. The copula list stays in code, because it is English grammar rather than corpus vocabulary and a rule publishing two of three headings would be another absent state to carry. Discovery keys on the headings rather than the filename, because rules are numbered and a renumber would empty the sets while the check kept reporting clean. A run finding no rule that publishes both says it scanned nothing rather than reporting clean.
60
+ What it matches instead is a bullet doing three things at once: opening with a pronoun whose antecedent is the bullet above it, carrying a past-tense verb, and following another top-level bullet. All three are required. Eight bullets in the corpus open with a back-reference, and the verb set narrows those to one.
61
+
62
+ The pronoun is matched cased and anchored to the opening, since a mid-sentence `this` is a determiner rather than a reference back. The verb is matched uncased anywhere in the bullet, and rejected when a copula sits in front of it, since `is used to resolve the folder` is the passive of `use` rather than the past habitual the set means.
63
+
64
+ Both sets are published under `## Narration pronouns` and `## Narration verbs` in a governance rule and read at run time, so widening either costs a rule edit rather than a TypeScript change. The copula list stays in code, because it is English grammar rather than corpus vocabulary and a rule publishing two of three headings would be another absent state to carry. Discovery keys on the headings rather than the filename, because rules are numbered and a renumber would empty the sets while the check kept reporting clean. A run finding no rule that publishes both says it scanned nothing rather than reporting clean.
41
65
 
42
66
  A blank line does not end the run. Markdown reads the bullets around one as a single loose list, so a walker that broke there would leave the shape reachable by anyone who spaced their bullets out. What ends a run is content that is neither a bullet nor indented under one, which is what keeps the first bullet under a heading from reading as a reply to the last bullet above it.
43
67
 
@@ -47,13 +71,23 @@ The opening delimiter decides that for the whole block rather than each line dec
47
71
 
48
72
  Two fenced blocks with nothing between them are one contiguous run of fenced lines, so the mark alone cannot say where the first ends. The line walker reports which block each line sits in, and the boundary re-reads indentation whenever that number changes, so an unindented block written directly behind an indented one ends the run rather than inheriting the answer above it. No markdown file this repository tracks holds that shape, because a formatter inserts a blank line between two fences on contact, and a target running these commands over an unformatted tree still can.
49
73
 
50
- Precision is the whole value, so recall is the accepted exposure, and two shapes are knowingly out of reach. A narration written as one bullet carrying its own before and after slips through, and nothing else sees it either. So does the perfect passive, since `has been superseded` narrates a supersession and the copula guard rejects it with the passives it exists for. A rejected alternative is a back-reference in the past tense by construction, and the standard keeps what was tried and why it lost, so a legitimate hit exists and no measure separates it from a violation. The report states that on every run, which is why the finding names a line to read rather than a line to delete. The JSON record carries the findings per entry as `entries[].narration` and the sets as `checkpoints.narration`, which is absent under `--citations-only` where the run never loads them and null where no rule publishes both.
74
+ Precision is the whole value, so recall is the accepted exposure, and two shapes are knowingly out of reach. A narration written as one bullet carrying its own before and after slips through, and nothing else sees it either. So does the perfect passive, since `has been superseded` narrates a supersession and the copula guard rejects it with the passives it exists for.
75
+
76
+ A rejected alternative is a back-reference in the past tense by construction, and the standard keeps what was tried and why it lost, so a legitimate hit exists and no measure separates it from a violation. The report states that on every run, which is why the finding names a line to read rather than a line to delete.
77
+
78
+ The JSON record carries the findings per entry as `entries[].narration` and the sets as `checkpoints.narration`, which is absent under `--citations-only` where the run never loads them and null where no rule publishes both.
51
79
 
52
80
  ## Which folders each check reaches
53
81
 
54
- The provenance, required-section, and narration checks cover `.claude/context/` alone, while length and the table finding reach every audited folder. What narrows the three is stated in `.claude/standards/context.md`, which opens its scope by handing diagrams and wireframes to `diagrams.md` and `wireframes.md`, and the sibling standards do not restate it. A marker reported in a diagram entry would cite a rule that entry's own standard routes elsewhere, and a diagram entry carries a heading per kind rather than a run of bullets deciding anything. The split is between kinds of rule rather than kinds of folder, and what decides it is which tier states the rule rather than what the check measures. Length and the table finding generalize as judgments about how far a reader travels, so both reach wherever the audit is pointed. Required sections narrow for a plainer reason: the names are the context standard's own, and neither sibling standard states a required section at all.
82
+ The provenance, required-section, and narration checks cover `.claude/context/` alone, the reference-form check covers the split folders inside it, and length and the table finding reach every audited folder.
83
+
84
+ What narrows the three is stated in `.claude/standards/context.md`, which opens its scope by handing diagrams and wireframes to `diagrams.md` and `wireframes.md`, and the sibling standards do not restate it. A marker reported in a diagram entry would cite a rule that entry's own standard routes elsewhere, and a diagram entry carries a heading per kind rather than a run of bullets deciding anything. The split is between kinds of rule rather than kinds of folder, and what decides it is which tier states the rule rather than what the check measures.
85
+
86
+ Length and the table finding generalize as judgments about how far a reader travels, so both reach wherever the audit is pointed. Required sections narrow for a plainer reason: the names are the context standard's own, and neither sibling standard states a required section at all.
87
+
88
+ The same test is what moved depth and bullet weight out of this command entirely. A rule stated at the attribute tier reaches every markdown file, and a check reaching every markdown file has no reason to require a folder that resolves.
55
89
 
56
- The same test is what moved depth and bullet weight out of this command entirely. A rule stated at the attribute tier reaches every markdown file, and a check reaching every markdown file has no reason to require a folder that resolves. The scoping key is the folder an entry was audited under, so `--folder` still reaches a folder the default list does not carry, and a domain split into `context/<sub-area>/` is governed as `context`. Every run states the reach, including a run where no audited folder is the governed one. The JSON record carries it as `checkpoints.provenanceFolder` and a per-folder `governsContent`.
90
+ The scoping key is the folder an entry was audited under, so `--folder` still reaches a folder the default list does not carry, and a domain split into `context/<sub-area>/` is governed as `context`. Every run states the reach, including a run where no audited folder is the governed one. The JSON record carries it as `checkpoints.provenanceFolder` and a per-folder `governsContent`.
57
91
 
58
92
  ## Index drift
59
93
 
@@ -37,7 +37,7 @@ A run where no requested name resolves refuses, whichever list it read. Naming t
37
37
 
38
38
  ## Exit codes
39
39
 
40
- Exit codes are `0` for a clean run, `1` for a refusal, and `2` for a gating finding. An unresolved citation gates under every mode. Length, table, provenance, and narration findings print and return `0` under every mode, because each is a judgment and failing a push on one would make the check something to route around. Narration is the weakest of the four, since whether two bullets share a subject is a call the measure approximates from structure alone, and one of the shapes it matches is the rejected alternative the standard asks an entry to keep.
40
+ Exit codes are `0` for a clean run, `1` for a refusal, and `2` for a gating finding. An unresolved citation gates under every mode. Length, reference form, table, provenance, and narration findings print and return `0` under every mode, because each is a judgment and failing a push on one would make the check something to route around. Narration is the weakest of the five, since whether two bullets share a subject is a call the measure approximates from structure alone, and one of the shapes it matches is the rejected alternative the standard asks an entry to keep.
41
41
 
42
42
  Required-section and index findings sit between the two. Both are answerable from the file rather than weighed, so `--gate` promotes them to failing codes while a bare run leaves them advisory. The toolkit runs the bare form against itself and the widened form against the seed tree, described below.
43
43
 
@@ -76,7 +76,7 @@ Three exclusions keep it from firing on prose about paths. Fenced blocks are ski
76
76
 
77
77
  Two cases remain, and no syntax separates either from a real reference. One is a sentence naming a hypothetical entry to show the shape of a name. The other is a line instructing a target project about its own tree, which resolves against the target rather than against this repository and passes here only while the two layouts agree. Splitting a seeded domain into a folder ends that agreement and turns every such line red at once.
78
78
 
79
- Append `<!-- audit-ignore-citations -->` to the source line in either case. The marker suppresses citation checking for its own line only.
79
+ Append `<!-- audit-ignore-citations -->` to the source line in either case. The marker suppresses citation checking for its own line only, and the reference-form check reads it too, since both ask whether a line points at a file and the marker is how a line says it displays a name instead.
80
80
 
81
81
  The marker itself stays out of anything that installs. A seed, a plugin skill body, and a stack reference all reach a target, so a marker there lands as toolkit bookkeeping in someone else's tree. Reword those lines to drop the path instead, and where a stop message has to spell it, move that message into a fenced block, which this check already skips.
82
82
 
@@ -19,7 +19,7 @@ CLI catalog and invocation rules for agents, split by command domain. Start with
19
19
  - [Markdown audit](markdown-audit.md): Running the audit over any markdown path, where its bans and checkpoints are read from, what each check reports, and why the ban half gates while the structural half reports
20
20
  - [Output shape](output-shape.md): Two framed shapes every command renders into, how JSON and --names modes keep stdout clean, and the exit discipline that lets piped output drain
21
21
  - [Overview](overview.md): What this folder covers, the invocation rules every command inherits, and where domain behavior is documented instead
22
- - [Records](records.md): Validating the gitignored session records under .claude/, the per-kind checks, the refusal reasons, and why the root defaults to the main worktree
22
+ - [Records](records.md): Validating the gitignored session records under .claude/, the per-kind checks, the refusal reasons, backing the folders to a private remote, and why the root defaults to the main worktree
23
23
  - [Sandbox](sandbox.md): Scenario routing, the expectation scoring surface, and the coverage census over scenarios and skills
24
24
  - [Scripting](scripting.md): The runtime catalogs that replace hardcoded names, what each carries, and a headless invocation per domain
25
25
  - [Skill audit](skills-audit.md): Measuring both skill corpora against standards/skill.md, the checks it reads, and the requirement gate that is the only failing one
@@ -5,7 +5,9 @@ description: Flags, exit codes, and JSON shape for aitk indexes regen, plus when
5
5
 
6
6
  # Indexes
7
7
 
8
- `aitk indexes regen` rewrites `index.md` files from sibling frontmatter. With no positional paths, it walks the current directory. With paths, each resolves by walking up to the nearest indexed ancestor, bounded by `--root`. Duplicates dedupe. The whole-repo walk prunes `.git`, `node_modules`, and anything `.gitignore` covers via `git check-ignore`.
8
+ `aitk indexes regen` rewrites `index.md` files from sibling frontmatter. With no positional paths, it walks the current directory. With paths, each resolves by walking up to the nearest indexed ancestor, bounded by `--root`.
9
+
10
+ Duplicates dedupe. The whole-repo walk prunes `.git`, `node_modules`, and anything `.gitignore` covers via `git check-ignore`.
9
11
 
10
12
  A positional path is not filtered that way, because the walk-up resolves on the filesystem and never consults git. That is the only way to regenerate an index inside a gitignored folder, and it is how `.claude/tasks/` and `.claude/memory/` both stay current.
11
13
 
@@ -34,7 +34,9 @@ under `AITK_NON_INTERACTIVE=1`. Both used to fall back to an interactive picker
34
34
  that resolved to its first option headlessly, so `aitk gov install` with no
35
35
  stack installed whichever stack sorted first and `aitk snippets install` with no
36
36
  category installed every category. Each now reports the valid names on stderr
37
- and exits 1. Every documented agent path already passes the argument, including
37
+ and exits 1.
38
+
39
+ Every documented agent path already passes the argument, including
38
40
  `aitk init`. The confirm-then-apply prompt after it still resolves to `Yes`
39
41
  headlessly, so a call that names its stack or category is unchanged.
40
42
 
@@ -76,8 +78,9 @@ lands between one and three of the fifteen.
76
78
  because the `.claude/rules/` it writes there is produced output rather than an
77
79
  operator's working copy. It reads the stack recorded in `internal/governance.toml`,
78
80
  installs it alongside anything under `internal/rules/`, and clears the
79
- destination first so a rule the record stopped naming disappears. It takes
80
- `--root <path>` and defaults to the toolkit root, prints nothing on success, and
81
+ destination first so a rule the record stopped naming disappears.
82
+
83
+ It takes `--root <path>` and defaults to the toolkit root, prints nothing on success, and
81
84
  reports the reason on stderr with exit 1 when the record names a stack or rule
82
85
  that does not resolve. `scripts/core/regen-claude-copies.sh` calls it, and the
83
86
  Consumed copies stage of `bun run check` asserts the result is committed.
@@ -88,7 +91,9 @@ Consumed copies stage of `bun run check` asserts the result is committed.
88
91
  and open a pull request. Under `AITK_NON_INTERACTIVE=1` it applies the domain
89
92
  syncs and then refuses the git workflow, reporting the branch and commit it
90
93
  would have created and exiting 0. Nothing is staged, committed, or pushed
91
- headlessly. Run it interactively to reach the commit and pull request options.
94
+ headlessly.
95
+
96
+ Run it interactively to reach the commit and pull request options.
92
97
  It also refuses a target whose working tree is dirty, so commit or stash first.
93
98
 
94
99
  ## Drift reporting
@@ -97,8 +102,9 @@ It also refuses a target whose working tree is dirty, so commit or stash first.
97
102
  and is safe to run at any time. Each file is classified as `stale` when it still
98
103
  matches what the toolkit installed, `customized` when the project edited it,
99
104
  `stranded` when it sits at a path the toolkit no longer installs to, `orphaned`
100
- when the project authored it, or `drifted` when no stamp covers it. Use `--json`
101
- for the machine-readable report and `--exit-code` to fail a CI job. Orphaned
105
+ when the project authored it, or `drifted` when no stamp covers it.
106
+
107
+ Use `--json` for the machine-readable report and `--exit-code` to fail a CI job. Orphaned
102
108
  files are excluded from that exit code, since a project-authored rule never
103
109
  converges. Attribution reads `.claude/aitk.json`, which every install and sync
104
110
  writes.
@@ -5,7 +5,9 @@ description: Two framed shapes every command renders into, how JSON and --names
5
5
 
6
6
  # Output shape
7
7
 
8
- Every CLI command renders into one of two framed shapes. Data goes to stdout. UI and logs go to stderr. Help output is the exception. It prints to stdout so it can be piped and grepped.
8
+ Every CLI command renders into one of two framed shapes. Data goes to stdout. UI and logs go to stderr.
9
+
10
+ Help output is the exception. It prints to stdout so it can be piped and grepped.
9
11
 
10
12
  ## Data shape (lists, runs, errors)
11
13
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: Records
3
- description: Validating the gitignored session records under .claude/, the per-kind checks, the refusal reasons, and why the root defaults to the main worktree
3
+ description: Validating the gitignored session records under .claude/, the per-kind checks, the refusal reasons, backing the folders to a private remote, and why the root defaults to the main worktree
4
4
  ---
5
5
 
6
6
  # Records
@@ -56,3 +56,47 @@ aitk records validate plans --json | jq -r '.findings[] | "\(.kind): \(.subject)
56
56
  ```
57
57
 
58
58
  For the shapes each check enforces, see `.claude/standards/plan.md`, `.claude/standards/groundwork.md`, `.claude/standards/intake.md`, and `.claude/standards/memory.md`.
59
+
60
+ ## Push and pull
61
+
62
+ `aitk records push` commits the backed record folders to a private remote and pushes them. `aitk records pull` fetches the other direction and writes them back. Both take `--json` and `--root` the way `validate` does, and both exit `0` on agreement and `1` on a refusal.
63
+
64
+ ```bash
65
+ aitk records push
66
+ aitk records push --json
67
+ aitk records pull
68
+ ```
69
+
70
+ The backed folders are `groundwork`, `intake`, `memory`, `plans`, `plans-archive`, `review`, `task-archive`, and `tasks`, all under `.claude/`. They are the gitignored Claude group minus `.claude/.tmp`, which is deletable without loss, and `.claude/worktrees/`, whose contents belong to the project repository already. The list is a constant rather than configuration, matching the four folder names `validate` hardcodes.
71
+
72
+ Records are gitignored by design, so the history lives in a second git directory at `.claude/.records.git` with `.claude/` as its work tree. Every path stays where it is, which is what a separate checkout could not do. The verbs stage the eight folders by explicit pathspec with `--force`, so nothing outside them can enter the index however the ignore rules read, and the project working tree and its index are never touched.
73
+
74
+ ### Setup
75
+
76
+ A person creates the records repository once per machine, and the verbs refuse with the commands when it is absent:
77
+
78
+ ```bash
79
+ git --git-dir=.claude/.records.git init
80
+ git --git-dir=.claude/.records.git remote add origin <private-repo-url>
81
+ ```
82
+
83
+ Point it at a private repository, and at one that is not a remote of the project. Records carry the memory pen, the review reports, and the groundwork trails, so a public project publishes all of it to anyone who fetches all refs. `push` compares the configured origin against every remote of the project and refuses on a match. A read of that list which fails refuses as well, since an empty list clears the comparison for every origin and a gate that passes on its own failure is no gate.
84
+
85
+ ### Refusals
86
+
87
+ | Reason | What fired |
88
+ | ------------------- | ------------------------------------------------------------------------------------ |
89
+ | `no-repository` | No `.claude/.records.git`, answered with the two setup commands |
90
+ | `no-remote` | The records history has no `origin` |
91
+ | `remote-unreadable` | The project's own remotes could not be read, so the shared-origin gate could not run |
92
+ | `remote-shared` | The records origin is also a remote of the project |
93
+ | `no-remote-records` | `pull` found no branch on the records origin |
94
+ | `local-changes` | `pull` found records on disk that the history does not carry |
95
+ | `local-ahead` | `pull` found local commits that never reached the origin |
96
+ | `git-failed` | A git call failed, with its stderr in the message |
97
+
98
+ The two `pull` refusals exist because the directions are not symmetric. A push only adds, while a pull onto a machine holding work that never left it would discard that work. Resolve either by running `push` first, or by moving the local folders aside. A machine holding none of the eight has nothing to lose, so a restore onto a fresh checkout runs straight through.
99
+
100
+ ### When it runs
101
+
102
+ `.husky/post-merge` runs `push` after the task-archive loop, on every merge rather than only on one that archived a task. A review report and a memory entry both land on runs that close nothing. The call sits inside an `if` and last in the file, so an unreachable remote neither aborts the hook nor delays the archiving above it, and a checkout that never ran the setup reports nothing. Anything the hook misses is covered by running the verb by hand.
@@ -60,6 +60,8 @@ The record carries every scenario with the arms that declare, plus `totalScenari
60
60
 
61
61
  `--skills` answers what the scenario count cannot, which is whether anything can fail a given skill. It adds `skills`, `totalSkills`, `asserted`, `shouldBeAsserted`, `exempt`, `staleExemptions`, and `supersededExemptions` to the record, and keeps the scenario view rather than replacing it. The two denominators disagree on purpose: an armed scenario under `infra/` or `tooling/` exercises a CLI domain and pairs with no skill at all.
62
62
 
63
- A skill pairs to a scenario by filename, `<category>-<command>` first and bare `<command>` second, so `claude/setup-init.sh` reaches the `setup-init` skill. `should-be-asserted` is the default rather than a queue to drain, and which of those skills earns an arm is a project decision the census does not make. `exempt` means no arm should be written and holds only with a reason, declared in `scripts/sandbox/exempt.toml` and limited to a harness limit the checker cannot reach past or a skill that writes no artifact. An armed arm outranks an exemption. An exemption naming no shipped skill, or naming one an arm now asserts, exits 1 without `--strict`. Each armed arm reports as `<category>:<command>/<arm>`, so two same-named arms under different scenarios stay distinct.
63
+ A skill pairs to a scenario by filename, `<category>-<command>` first and bare `<command>` second, so `claude/setup-init.sh` reaches the `setup-init` skill. `should-be-asserted` is the default rather than a queue to drain, and which of those skills earns an arm is a project decision the census does not make.
64
+
65
+ `exempt` means no arm should be written and holds only with a reason, declared in `scripts/sandbox/exempt.toml` and limited to a harness limit the checker cannot reach past or a skill that writes no artifact. An armed arm outranks an exemption. An exemption naming no shipped skill, or naming one an arm now asserts, exits 1 without `--strict`. Each armed arm reports as `<category>:<command>/<arm>`, so two same-named arms under different scenarios stay distinct.
64
66
 
65
67
  `scripts/sandbox/run.sh` calls this after a headless run and merges the verdict into the envelope it prints. It also writes that merged record to `.claude/.tmp/sandbox-runs/<target>-<arm>-<timestamp>.json` with a `writes` array appended, and logs the path on stderr. Both fields are what a later re-score needs, since `--envelope` and `--writes` read files the run deletes on exit. Stdout carries the same bytes it did before the record existed.
@@ -44,13 +44,17 @@ One session works for most features. Prefer splitting across two sessions only w
44
44
 
45
45
  Work in Claude Code directly. It reads `CLAUDE.md` automatically and has full file access, no pasting needed.
46
46
 
47
- - When the input is a pile of findings rather than one feature, invoke `aitk:claude-intake` first. It files the dump into `.claude/intake/<slug>/`, one item per finding carrying a problem measured against the tree, a proposed fix, and a verdict, then names which items are plan-ready, which need measuring, and which are already settled. The routing test is whether the repository can answer an item today, so a session grepping handles the yes and the next bullet handles the no.
48
- - When the current state is unmeasured and more than one approach is live, invoke `aitk:claude-groundwork` first. It opens a track folder under `.claude/groundwork/<slug>/` and ends in a decision, which may be to do nothing. Skip it when the approach is already settled. A track may run experiments to settle a question, writing a fixture it reads itself under `.claude/.tmp/groundwork-fixtures/<slug>/` and spawning up to three billed headless runs before it asks. A fixture a headless run is pointed at sits outside the repository, since a session started under the project root inherits that project's `CLAUDE.md` and rules and would measure them instead of the arm.
47
+ - When the input is a pile of findings rather than one feature, invoke `aitk:claude-intake` first. It files the dump into `.claude/intake/<slug>/`, one item per finding carrying a problem measured against the tree, a proposed fix, and a verdict, then names which items are plan-ready, which need measuring, and which are already settled.
48
+ - When the current state is unmeasured and more than one approach is live, invoke `aitk:claude-groundwork` first. It opens a track folder under `.claude/groundwork/<slug>/` and ends in a decision, which may be to do nothing. Skip it when the approach is already settled.
49
49
  - Invoke `aitk:claude-feature` to scan for code-level conflicts and ambiguities, confirm approach before proceeding
50
50
  - Implement the feature, then Claude Code runs the commands defined in `CLAUDE.md`, fixes failures, and iterates until all pass
51
51
  - For UI changes, invoke `aitk:claude-ui-test` to generate and run Playwright e2e tests
52
52
  End the session once the feature works and tests pass. Invoke `aitk:claude-docs` to capture any decisions made during implementation before closing.
53
53
 
54
+ The routing test is whether the repository can answer an item today. A session grepping handles the yes, and a groundwork track handles the no.
55
+
56
+ A groundwork track may run experiments to settle a question, writing a fixture it reads itself under `.claude/.tmp/groundwork-fixtures/<slug>/` and spawning up to three billed headless runs before it asks. A fixture a headless run is pointed at sits outside the repository, since a session started under the project root inherits that project's `CLAUDE.md` and rules and would measure them instead of the arm.
57
+
54
58
  #### Session 2
55
59
 
56
60
  Start a fresh Claude Code session. The diff is sufficient context for both review and ship.
@@ -85,6 +89,8 @@ An execution that picks other than the suggestion rewrites the `- Suggested:` li
85
89
 
86
90
  `aitk records validate plans` reports where a plan and that standard disagree: a filename that is not `feature-<slug>.md`, a missing required section, a files-to-touch entry naming no file, and a question carrying a suggestion with no answer slot. The same verb takes `groundwork`, `intake`, and `memory`, which are governed the same way and were unreachable for the same reason. Nothing fires it automatically, because all four folders are gitignored and every check the repository runs reads changed files from git. It reports and never writes, since the folders are per-machine scratch with no history to recover a wrong repair from.
87
91
 
92
+ `aitk records push` carries these folders off the disk they live on, and `aitk records pull` brings them back. Eight of them are backed: `groundwork`, `intake`, `memory`, `plans`, `plans-archive`, `review`, `task-archive`, and `tasks`. The history lives in a second git directory at `.claude/.records.git` with `.claude/` as its work tree, so every path a task file cites stays where it is. A person points it at a private repository once and both verbs refuse until they have, and `push` refuses when that origin is also a remote of the project, since the payload is the memory pen and the groundwork trails. `.husky/post-merge` runs the push after its archive loop, on every merge rather than only on one that closed a task. See [records](agents/records.md) for the refusal table.
93
+
88
94
  A plan that ships is archived, never deleted. `aitk:claude-docs` moves it to `.claude/plans-archive/` and retargets the task file's `Plan:` line at the new location, so a completed task still leads to the reasoning behind it. Both folders are gitignored, which is why a deleted plan had no recovery path. A plan cited by more than one task stays put until the last of them closes, since moving it early would strand every other pointer.
89
95
 
90
96
  The sweep reads the whole board rather than the tasks the session touched. It is the one place the skill reaches past its own rule against editing a task file the session did not change, because a task that closed while an earlier run missed its archive is exactly what the sweep exists to clear. Reaching it is safe: the archive moves the plan and retargets the pointer in the same pass, so an untouched task ends up with a working link rather than a broken one.
@@ -95,7 +101,9 @@ The sweep reads the whole board rather than the tasks the session touched. It is
95
101
 
96
102
  `aitk tasks validate` checks what those rows claim against what the tree holds: every plan pointer resolves, every row and task file map one to one, no task sits in two groups, and no two rows marked ready touch the same file. That last check is the half a reader cannot run by eye, and it is what keeps two workers from being handed colliding work. It reports and never writes, because a row is the orchestrator's claim and a validator repairing one would assert the claim it exists to test. Nothing fires it automatically, since the board is gitignored per-machine scratch with no shared moment to hang a hook on, so the orchestrator's sweep calls it at the point the readiness claim is made.
97
103
 
98
- `aitk:claude-tasks` owns the two operations that bracket a task's life. It creates the file, holding the filename convention and the frontmatter contract so a malformed write cannot break the index for every sibling, and it moves a shipped task to `.claude/task-archive/`. Creation is where the origin invariant is enforced: every task names a plan, a groundwork folder, an intake folder, or an issue, since a task with no origin is either lost context or work nobody decided to do. Archiving a task leaves its plan alone, because `aitk:claude-docs` owns the plans sweep and already holds the last-live-citation rule. That makes the order load-bearing, so the archive verb refuses to run while the `Plan:` line still points into `.claude/plans/`. The sweep only reaches tasks still in the live folder, and archiving the task first would strand the plan there with nothing citing it.
104
+ `aitk:claude-tasks` owns the two operations that bracket a task's life. It creates the file, holding the filename convention and the frontmatter contract so a malformed write cannot break the index for every sibling, and it moves a shipped task to `.claude/task-archive/`. Creation is where the origin invariant is enforced: every task names a plan, a groundwork folder, an intake folder, or an issue, since a task with no origin is either lost context or work nobody decided to do.
105
+
106
+ Archiving a task leaves its plan alone, because `aitk:claude-docs` owns the plans sweep and already holds the last-live-citation rule. That makes the order load-bearing, so the archive verb refuses to run while the `Plan:` line still points into `.claude/plans/`. The sweep only reaches tasks still in the live folder, and archiving the task first would strand the plan there with nothing citing it.
99
107
 
100
108
  Nothing chained that archive until the `post-merge` git hook landed. Every earlier step fires from `aitk:claude-autoship` or `aitk:git-ship`, both of which finish while the pull request is still open, so a task archived there would close for work that may be abandoned. The board is gitignored, which rules out reading it from anywhere but the machine that pulled. The hook names the board's archive candidates and stays silent otherwise, including on a project with no board.
101
109
 
@@ -109,13 +117,28 @@ For features on a mature stack, chain the post-plan pipeline in one session. App
109
117
 
110
118
  - Use when the plan is tight and the stack has real verify commands and test coverage
111
119
  - Autoship stops on: verify failure after one fix attempt, UI manual checklist non-empty, an inherited review finding above minor, no diff baseline resolving against `main`, an empty changed-file list, or hook failure
112
- - Review findings split by origin before severity is read. One the branch inherited stops the chain, and one the run itself caused is repaired in place at any severity, bounded at a single pass. Origin is causation rather than authorship, so staleness the run induced in a file it never opened counts as its own and the plan's file list bounds what it builds rather than what it may repair.
113
- - Review is skipped when the diff is prose that only informs: every changed file matches `*.md` or `*.txt`, and none sits under a behavior path. Behavior paths cover skills, rules, standards, snippets, and `tooling/` in both the authoring and the installed spelling, plus root `CLAUDE.md`, so the list matches whether a repository authors those surfaces or consumed them from the toolkit. Markdown under one states what an agent does, so a branch touching it reaches review while `docs/` and `wiki/` still skip and stay gated by `docs-sync`, `claude-standards-audit`, and pre-push hooks.
114
- - An empty changed-file list stops the chain rather than counting as prose-only. The filename test passes vacuously on an empty set, which routed a branch past review instead of through it.
115
120
  - Every stop leaves recoverable state. Fix and resume with `/git-ship`
116
121
  - Skip autoship for auth, migrations, security-sensitive changes, or work where the plan itself is uncertain
117
- - Both `autoship` and `git-ship` open with `claude-memory-capture`, which sends what the session learned to the surface that owns it. A fact about a domain carrying an entry in `.claude/context/index.md` is routed to that entry, and `claude-docs` folds it in on the next step, so it ships in the same pull request. Anything no entry owns stays a file in `.claude/memory/`. Capture leads rather than trails because a routed fact edits a tracked file, which has to reach the branch before the commit steps run.
118
- - If capture wrote at least one memory file, `claude-memory-review` then proposes a decision-ready fix scoped to those entries while context is fresh, otherwise it is skipped. It stops at Propose. Review the receipt and run Apply yourself, on its own commit separate from the feature. Run `claude-memory-review` standalone to curate the whole pen. An entry it retires moves to `.claude/.tmp/memory-archive/` rather than being deleted, since the folder is gitignored and a bulk pass has no undo.
122
+
123
+ #### What reaches review
124
+
125
+ Review findings split by origin before severity is read. One the branch inherited stops the chain, and one the run itself caused is repaired in place at any severity, bounded at a single pass. Origin is causation rather than authorship, so staleness the run induced in a file it never opened counts as its own and the plan's file list bounds what it builds rather than what it may repair.
126
+
127
+ Review is skipped when the diff is prose that only informs: every changed file matches `*.md` or `*.txt`, and none sits under a behavior path. Behavior paths cover skills, rules, standards, snippets, and `tooling/` in both the authoring and the installed spelling, plus root `CLAUDE.md`, so the list matches whether a repository authors those surfaces or consumed them from the toolkit.
128
+
129
+ Markdown under one states what an agent does, so a branch touching it reaches review while `docs/` and `wiki/` still skip and stay gated by `docs-sync`, `claude-standards-audit`, and pre-push hooks.
130
+
131
+ An empty changed-file list stops the chain rather than counting as prose-only. The filename test passes vacuously on an empty set, which routed a branch past review instead of through it.
132
+
133
+ #### Memory in the chain
134
+
135
+ Both `autoship` and `git-ship` open with `claude-memory-capture`, which sends what the session learned to the surface that owns it. A fact about a domain carrying an entry in `.claude/context/index.md` is routed to that entry, and `claude-docs` folds it in on the next step, so it ships in the same pull request. Anything no entry owns stays a file in `.claude/memory/`.
136
+
137
+ Capture leads rather than trails because a routed fact edits a tracked file, which has to reach the branch before the commit steps run.
138
+
139
+ If capture wrote at least one memory file, `claude-memory-review` then proposes a decision-ready fix scoped to those entries while context is fresh, otherwise it is skipped. It stops at Propose. Review the receipt and run Apply yourself, on its own commit separate from the feature.
140
+
141
+ Run `claude-memory-review` standalone to curate the whole pen. An entry it retires moves to `.claude/.tmp/memory-archive/` rather than being deleted, since the folder is gitignored and a bulk pass has no undo.
119
142
 
120
143
  ### UI polish
121
144
 
@@ -8,8 +8,9 @@ category: Workflow
8
8
 
9
9
  A way to build fast and reliably across parallel Claude Code sessions without a
10
10
  loop and without losing the human review gate. One warm session plans and
11
- reviews. Cold worker sessions build. The human launches workers and merges. This
12
- page covers the roles and the loop. For the worktree mechanism (isolation, merge
11
+ reviews. Cold worker sessions build. The human launches workers and merges.
12
+
13
+ This page covers the roles and the loop. For the worktree mechanism (isolation, merge
13
14
  order, port collisions), see [Claude Code and git worktrees](../wiki/claude/claude-worktrees.md).
14
15
 
15
16
  ## Two roles
@@ -108,7 +109,9 @@ occasional theme-setting.
108
109
 
109
110
  The binding constraint is the human and the shared files, not the roadmap. Cap
110
111
  at two or three worker tracks and split them across the stack so they do not
111
- collide on the same files. Unit checks run freely in many worktrees at once.
112
+ collide on the same files.
113
+
114
+ Unit checks run freely in many worktrees at once.
112
115
  Only fixed-port work (a dev server, an end-to-end run, a screenshot) and
113
116
  singleton resources (one local model server, one GPU) serialize. See
114
117
  [Claude Code and git worktrees](../wiki/claude/claude-worktrees.md) for merge order and the
@@ -57,9 +57,15 @@ Scaffold installs tooling and seeds. It does not fill the planning docs or the d
57
57
 
58
58
  1. Fill `.claude/REQUIREMENTS.md` and `.claude/ARCHITECTURE.md`. The seed provides the files, the scope and decisions are yours to write.
59
59
  2. For a UI project, invoke `aitk:claude-design-extract` to draft `.claude/DESIGN.md`. With no UI code yet it takes the greenfield path and proposes tokens from the requirements and a `## Personality` section. Skip for non-UI projects.
60
- 3. Optionally invoke `aitk:claude-diagram` to draft entries under `.claude/diagrams/` from the architecture and the requirements. One file per diagram kind, so a later refresh of one kind leaves the others untouched. It renders each diagram it writes to verify the layout, which downloads the Mermaid CLI on first use and takes about 15 seconds. A machine without a renderer still gets the diagrams and is told which check was skipped. Each entry records the commit and date it was last verified against, and `aitk:claude-docs` maintains that record on every ship: it annotates an entry whose cited code path left the tree and stubs a kind whose source signal arrived uncovered. The sweep writes frontmatter only, so a diagram's picture and prose change when you redraw them and at no other time.
60
+ 3. Optionally invoke `aitk:claude-diagram` to draft entries under `.claude/diagrams/` from the architecture and the requirements. One file per diagram kind, so a later refresh of one kind leaves the others untouched. It renders each diagram it writes to verify the layout, which downloads the Mermaid CLI on first use and takes about 15 seconds.
61
61
  4. Start the feature loop. See [AI workflow](ai-workflow.md) for the per-feature sequence.
62
62
 
63
+ A machine without a renderer still gets the diagrams and is told which check was skipped.
64
+
65
+ Each diagram entry records the commit and date it was last verified against, and `aitk:claude-docs` maintains that record on every ship: it annotates an entry whose cited code path left the tree and stubs a kind whose source signal arrived uncovered. The sweep writes frontmatter only, so a diagram's picture and prose change when you redraw them and at no other time.
66
+
67
+ `.claude/ARCHITECTURE.md` carries the same mechanism on the same ship. `aitk:claude-docs` anchors a decision it amends to the paths that decision cites, and reports an anchored decision whose cited path the branch touched.
68
+
63
69
  ### Stack decision
64
70
 
65
71
  The default path is `base`. `aitk init` on `base` installs base tooling configs, Claude seeds, governance core rules, and snippets, and scaffolds an empty `.claude/wiki/`. Most projects need nothing more.
@@ -77,9 +83,11 @@ Run `aitk tooling list --json` and `aitk gov list --json` to see the current cat
77
83
  `governance`, `standards`, and `wiki` are skippable:
78
84
 
79
85
  - `--skip governance`: leave `.claude/rules/` empty. Standards still install, so `.claude/standards/prose.md` lands with nothing pointing at it and no coding standard loads on a file match. The preview names any `--add` rules the skip drops, and the run prints the `aitk gov install <stack> <path>` command to add rules afterward, carrying those extras so one paste restores what the skip declined.
80
- - `--skip standards`: leave standards out. The governance rules still reference `.claude/standards/`, so their authority lines resolve to nothing. Toolkit skills are unaffected, since each falls back to the copy in its own plugin root. That fallback now carries runtime behavior rather than reference prose alone, because the pre-publish scan and the branch-slug transform each have a standard of their own, `publish.md` and `slug.md`, cited by the skills that run them.
86
+ - `--skip standards`: leave standards out. The governance rules still reference `.claude/standards/`, so their authority lines resolve to nothing. Toolkit skills are unaffected, since each falls back to the copy in its own plugin root.
81
87
  - `--skip wiki`: skip the `.claude/wiki/` scaffold. A target that already carries a root `wiki/` keeps it, since the verb reports that folder rather than migrating it.
82
88
 
89
+ That standards fallback carries runtime behavior rather than reference prose alone, because the pre-publish scan and the branch-slug transform each have a standard of their own, `publish.md` and `slug.md`, cited by the skills that run them.
90
+
83
91
  ## Add a domain later
84
92
 
85
93
  When a new need appears after scaffold, install the one domain without re-running `aitk init`.
@@ -98,9 +106,13 @@ When the toolkit updates, target projects pull changes per domain. There is one
98
106
 
99
107
  ### Check first
100
108
 
101
- `aitk sync --check <path>` reports what has drifted without writing anything. It splits each difference by cause, which is the question that decides what to do next. A `stale` file still matches what the toolkit installed, so the update is mechanical. A `customized` file carries local edits, so taking the upstream version is a decision and `aitk:claude-seed-sync` is the tool for it. A `stranded` file sits where an older toolkit installed it and the toolkit has since moved, which is what `aitk:migration-standards` handles.
109
+ `aitk sync --check <path>` reports what has drifted without writing anything. It splits each difference by cause, which is the question that decides what to do next.
102
110
 
103
- That attribution comes from `.claude/aitk.json`, a stamp every install and sync writes. Standards, snippets, and governance record a hash per installed file. Tooling records the stack chain it resolved instead, since its install runs no per-file walk to attribute. Each domain holds its own toolkit commit, so syncing governance today does not move the revision standards measures against, and each domain reports the upstream commits touching its own source path. Running any sync stamps that domain, and the report names the ones still unstamped.
111
+ A `stale` file still matches what the toolkit installed, so the update is mechanical. A `customized` file carries local edits, so taking the upstream version is a decision and `aitk:claude-seed-sync` is the tool for it. A `stranded` file sits where an older toolkit installed it and the toolkit has since moved, which is what `aitk:migration-standards` handles.
112
+
113
+ That attribution comes from `.claude/aitk.json`, a stamp every install and sync writes. Standards, snippets, and governance record a hash per installed file. Tooling records the stack chain it resolved instead, since its install runs no per-file walk to attribute.
114
+
115
+ Each domain holds its own toolkit commit, so syncing governance today does not move the revision standards measures against, and each domain reports the upstream commits touching its own source path. Running any sync stamps that domain, and the report names the ones still unstamped.
104
116
 
105
117
  A project that has never synced under a toolkit new enough to write a stamp falls back to the toolkit's own git history. Installed content matching any version that history published proves the file untouched, so it reports `stale` naming the commit it came from, and content matching no published version stays `drifted`. That fallback needs the toolkit as a git checkout. Installed from the registry it ships source without history, and the report says attribution was unavailable rather than reading every file as a local edit.
106
118
 
@@ -122,9 +134,13 @@ Tooling reports under a section of its own, and `measured` there says whether th
122
134
 
123
135
  ### Catch-all
124
136
 
125
- `aitk sync <path>` runs every installed domain's sync in sequence. Safe to run on a cadence. It never touches user-owned seed files. Governance rules in `.claude/rules/`, tooling configs, and reference docs refresh in place. Stale `.claude/GOV.md` from earlier installs is removed.
137
+ `aitk sync <path>` runs every installed domain's sync in sequence. Safe to run on a cadence.
138
+
139
+ It never touches user-owned seed files. Governance rules in `.claude/rules/`, tooling configs, and reference docs refresh in place. Stale `.claude/GOV.md` from earlier installs is removed.
140
+
141
+ Standards are the exception inside that run, and the stamp narrows it. A standard the project customized is reported and left alone rather than overwritten. A standard still matching what was installed carries no local edits to lose, so a headless run updates it.
126
142
 
127
- Standards are the exception inside that run, and the stamp narrows it. A standard the project customized is reported and left alone rather than overwritten. A standard still matching what was installed carries no local edits to lose, so a headless run updates it. An unstamped project reaches the same split through the history fallback, so a headless run updates every standard it can prove untouched and refuses while any file resists attribution. To take the upstream version of a customized file, run `aitk standards sync <path>` interactively, or use `aitk:claude-seed-sync` below to merge section by section.
143
+ An unstamped project reaches the same split through the history fallback, so a headless run updates every standard it can prove untouched and refuses while any file resists attribution. To take the upstream version of a customized file, run `aitk standards sync <path>` interactively, or use `aitk:claude-seed-sync` below to merge section by section.
128
144
 
129
145
  ### Targeted
130
146
 
@@ -18,7 +18,9 @@ The default. `.claude/DESIGN.md` holds visual intent as prose plus token tables
18
18
 
19
19
  ### Seed shape
20
20
 
21
- The toolkit seed in `tooling/claude/seeds/.claude/DESIGN.md` ships a token-table template with a starting set of roles, and `.claude/standards/design.md` carries the same tables under `## Template` with placeholder rows. The column headers are what the renderer parses, so they stay verbatim in either, while the rows and values are the project's own. The `aitk:claude-design-extract` skill drafts the file, sourcing tokens from a project's existing prose and CLI UI surfaces, or proposing them from `.claude/REQUIREMENTS.md` and a `## Personality` paragraph when no UI code exists yet. `aitk design render` writes an HTML plus CSS preview to `.claude/review/design/` for eyeballing the current system without leaving Claude Code. See `.claude/context/design.md`.
21
+ The toolkit seed in `tooling/claude/seeds/.claude/DESIGN.md` ships a token-table template with a starting set of roles, and `.claude/standards/design.md` carries the same tables under `## Template` with placeholder rows. The column headers are what the renderer parses, so they stay verbatim in either, while the rows and values are the project's own.
22
+
23
+ The `aitk:claude-design-extract` skill drafts the file, sourcing tokens from a project's existing prose and CLI UI surfaces, or proposing them from `.claude/REQUIREMENTS.md` and a `## Personality` paragraph when no UI code exists yet. `aitk design render` writes an HTML plus CSS preview to `.claude/review/design/` for eyeballing the current system without leaving Claude Code. See `.claude/context/design.md`.
22
24
 
23
25
  ### Tools
24
26
 
@@ -41,7 +43,13 @@ The toolkit seed in `tooling/claude/seeds/.claude/DESIGN.md` ships a token-table
41
43
 
42
44
  ## Tier 1: visual companion
43
45
 
44
- ASCII and prose stay as source of truth. Add a visual render as a feedback surface for the agent and for human review. Stitch via MCP handles agent-driven generation of prototypes and design systems. Excalidraw handles agent-driven wireframes when the round-trip canvas loop matters. Claude Design joins only when codebase extraction or the annotated handoff bundle is worth the ceiling cost. All three produce derived artifacts, so human edits are review annotations rather than source changes.
46
+ ASCII and prose stay as source of truth. Add a visual render as a feedback surface for the agent and for human review.
47
+
48
+ - Stitch via MCP handles agent-driven generation of prototypes and design systems
49
+ - Excalidraw handles agent-driven wireframes when the round-trip canvas loop matters
50
+ - Claude Design joins only when codebase extraction or the annotated handoff bundle is worth the ceiling cost
51
+
52
+ All three produce derived artifacts, so human edits are review annotations rather than source changes.
45
53
 
46
54
  ### Seed shape
47
55
 
@@ -124,7 +132,9 @@ Four questions. Each yes weighs toward a higher tier.
124
132
  - Is there a dedicated designer, or will there be one?
125
133
  - Does design iterate independently of code?
126
134
 
127
- Zero or one yes: tier 0. Two or three: tier 1. Four: tier 2. Resist over-tiering early. Moving up is cheap because tiers stack. Moving down means abandoning tooling and confusing collaborators.
135
+ Zero or one yes: tier 0. Two or three: tier 1. Four: tier 2.
136
+
137
+ Resist over-tiering early. Moving up is cheap because tiers stack. Moving down means abandoning tooling and confusing collaborators.
128
138
 
129
139
  ## References
130
140
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@erclx/aitk",
3
3
  "type": "module",
4
- "version": "0.79.0",
4
+ "version": "0.81.0",
5
5
  "description": "Infrastructure and quality tooling for developer workflows",
6
6
  "license": "MIT",
7
7
  "bin": {
package/src/cli.ts CHANGED
@@ -56,7 +56,7 @@ function showHelp(): void {
56
56
  `${GREY}│${NC} comments [cmd] ${GREY}# Measure comment density and trend (scan)${NC}`,
57
57
  `${GREY}│${NC} context [cmd] ${GREY}# Report context folder health (audit)${NC}`,
58
58
  `${GREY}│${NC} markdown [cmd] ${GREY}# Report markdown against the attribute standards (audit)${NC}`,
59
- `${GREY}│${NC} records [cmd] ${GREY}# Check session records under .claude/ (validate)${NC}`,
59
+ `${GREY}│${NC} records [cmd] ${GREY}# Session records under .claude/ (validate, push, pull)${NC}`,
60
60
  `${GREY}│${NC}`,
61
61
  `${GREY}│${NC} ${WHITE}Sandbox:${NC}`,
62
62
  `${GREY}│${NC} aitk sandbox ${GREY}# Interactive scenario picker${NC}`,
@@ -91,6 +91,7 @@ function showHelp(): void {
91
91
  `${GREY}│${NC} aitk context audit --json`,
92
92
  `${GREY}│${NC} aitk markdown audit .claude/rules --json`,
93
93
  `${GREY}│${NC} aitk records validate plans`,
94
+ `${GREY}│${NC} aitk records push --json`,
94
95
  `${GREY}└${NC}`,
95
96
  ]
96
97
  console.log(lines.join('\n'))