joycraft 1.5.1 → 1.5.3

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/README.md CHANGED
@@ -280,11 +280,12 @@ Joycraft's rule is that only an accepted review completes a spec. Without the
280
280
  gates, this rule is an instruction in a skill. An agent can forget the rule or skip
281
281
  it, for example late in a long session. The gates make the rule a check.
282
282
 
283
- **What the gate stops.** The gate check finds three problems:
283
+ **What the gate stops.** The gate check finds four problems:
284
284
 
285
285
  - A spec is marked done with no accepted review, no acceptance from you and no waiver.
286
286
  - A spec has one status in the queue and a different status in the spec file.
287
287
  - Joycraft cannot read a queue file or a spec file.
288
+ - You accepted old specs as they are, and the file with your words is missing or changed.
288
289
 
289
290
  It sends the agent back with the spec or file name and the next step. A spec that waits at
290
291
  `in-review` is not a problem.
@@ -292,15 +293,25 @@ It sends the agent back with the spec or file name and the next step. A spec tha
292
293
  **Why you want it.** Use the gates for long sessions and for sessions that you do
293
294
  not watch. A prompt tells the agent what to do, but a prompt is not a guarantee.
294
295
  With the gates on, Claude Code runs the check each time the agent tries to stop. The
295
- agent cannot stop until the problem is gone. For a spec marked done with no accepted
296
- review, the agent sets the spec back to `in-review` without asking you.
296
+ agent cannot stop until the problem is gone. The hook can stop the agent at a spec
297
+ marked done with no accepted review. Then the agent sets the spec back to `in-review`
298
+ without asking you.
297
299
 
298
300
  **Before you turn them on.** An older project can have specs marked done with no
299
- accepted review. Turning on the gates runs the check first. The hook goes in only
300
- after a clean check. The agent sets each of these specs back to
301
- `in-review` itself, tells you what it changed, and checks again. It stops and asks
302
- you only about a file that it cannot read. A look at the problems first is optional.
303
- To see them, say:
301
+ review on record, from the time before the gates. Turning on the gates runs the check
302
+ first. The hook goes in only after a clean check. The agent names these specs and asks
303
+ you one question: accept them as they are, or send them back for review.
304
+
305
+ - If you accept them, the agent writes your words, exactly as you said them, in a
306
+ decision file beside the queue. Commit that file. The agent then accepts the specs
307
+ with one command. The specs stay done.
308
+ - If you send them back, the agent sets each spec back to `in-review`.
309
+
310
+ The command refuses a spec that was submitted for review or that has a review report.
311
+ The runtime checks only the record. It cannot check that you said the words in the
312
+ file. The agent fixes the other problems itself, tells you what it changed, and checks
313
+ again. It stops and asks you only about a file that it cannot read. A look at the
314
+ problems first is optional. To see them, say:
304
315
 
305
316
  ```text
306
317
  Run Joycraft's gate check with `node .joycraft/runtime/gate.mjs check` and show me
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "releaseVersion": "1.5.1",
3
+ "releaseVersion": "1.5.3",
4
4
  "manifestSchemas": [
5
5
  1
6
6
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "joycraft",
3
- "version": "1.5.1",
3
+ "version": "1.5.3",
4
4
  "description": "Install and update Joycraft, a skill bundle and runtime for agent-led software work, in any project",
5
5
  "type": "module",
6
6
  "bin": {
@@ -13,8 +13,8 @@
13
13
  "payload"
14
14
  ],
15
15
  "joycraft": {
16
- "release": "1.5.1",
17
- "summary": "Turning on the gates now checks first, and the agent fixes what it can before the hook goes in. When the gate blocks a stop, the agent restores the spec without asking you. A failed test run exits 1. Rolling back the 1.0 upgrade also removes the gate hook.",
16
+ "release": "1.5.3",
17
+ "summary": "When you turn on the gates, the agent names specs marked done with no review on record and asks one question: accept them as they are, or send them back for review. Your words are recorded verbatim in a file committed beside the queue.",
18
18
  "autoSafeEligible": false
19
19
  },
20
20
  "scripts": {
@@ -68,8 +68,8 @@ export interface QueueSpec {
68
68
  /** Written by `completion.mjs submit` with the move to in-review; subject bindings leave it out, like status. */
69
69
  submitted?: { at: string };
70
70
  acceptedReport?: { path: string; sha256: string };
71
- /** Explicit owner exception, mutually exclusive with acceptedReport; not a PASS. */
72
- ownerAcceptance?: Receipt;
71
+ /** Explicit owner exception, mutually exclusive with acceptedReport; not a PASS. `legacy: true` names a LegacyAcceptance file (no review). */
72
+ ownerAcceptance?: Receipt & { legacy?: true };
73
73
  /** The feature's FeatureWaiver file, plus the UNVERIFIED report a tool-break waiver completed on; mutually exclusive with acceptedReport and ownerAcceptance. */
74
74
  waiver?: Receipt & { review?: Receipt };
75
75
  }
@@ -164,6 +164,20 @@ export interface ReviewFinding {
164
164
  /** The reading the reviewer took for a case the spec does not decide. */
165
165
  assumption?: string;
166
166
  }
167
+ /** The owner's own words accepting specs marked done with no review on record, as they are; written by `accept-owner --legacy`. The runtime checks the record, not who spoke. */
168
+ export interface LegacyAcceptance {
169
+ schemaVersion: 1;
170
+ kind: 'legacy';
171
+ /** Project-relative; must equal --queue. */
172
+ queuePath: string;
173
+ /** The owner's verbatim words, nonempty. */
174
+ statement: string;
175
+ statedAt: string;
176
+ /** Equal to the --spec ids; each was done with no acceptance. */
177
+ specs: number[];
178
+ /** What the user said about why the specs stand as they are. */
179
+ reason: string;
180
+ }
167
181
  /** Scoped human instruction recorded by the host; bindings do not authenticate its origin. */
168
182
  export interface OwnerAcceptance {
169
183
  schemaVersion: 1;
@@ -1,6 +1,6 @@
1
1
  # Guarded completion
2
2
 
3
- Use this reference to submit a spec, snapshot a subject, finalize a review or recover a write.
3
+ Use this reference to submit, snapshot, finalize, accept or recover a spec.
4
4
 
5
5
  ## Stable local interface
6
6
 
@@ -12,6 +12,7 @@ node .joycraft/runtime/completion.mjs scope --queue <queue-path> --spec <id>
12
12
  node .joycraft/runtime/completion.mjs snapshot --queue <queue-path> --spec <id> --out <subject.json>
13
13
  node .joycraft/runtime/completion.mjs finalize-review --queue <queue-path> --spec <id> --report <report.json>
14
14
  node .joycraft/runtime/completion.mjs accept-owner --queue <queue-path> --spec <id> --decision <owner-acceptance.json>
15
+ node .joycraft/runtime/completion.mjs accept-owner --legacy --queue <queue-path> --spec <id>[,<id>...] --decision <legacy.json>
15
16
  node .joycraft/runtime/completion.mjs accept-waiver --queue <queue-path> --spec <id> --waiver <feature-waiver.json> [--report <report.json>]
16
17
  node .joycraft/runtime/completion.mjs recover --queue <queue-path>
17
18
  ```
@@ -24,7 +25,7 @@ An optional `verification.changeScope` records an explicit full Git commit SHA i
24
25
 
25
26
  A requirement input may optionally declare exact `scope.anchors` or `scope.decisionIds`. Anchors bind complete named heading subtrees together with their ancestor context and non-decision document context; decision IDs bind complete stable JSON decision records. They may be combined for a canonical brief whose frontmatter contains a `decisions:` JSON array. A criterion may name such a record as `frontmatter.decisions.<id>`; an explicit `decisionIds` selector must include that ID. Heading-only scopes keep all frontmatter decisions governing. Pure JSON decision records support `decisionIds` only, so unsupported JSON heading anchors fail instead of being ignored. Anchor selection supports ATX (`#`) headings outside fenced code blocks; setext and linked headings are not selectors. A required criterion anchor must be included by an anchored scope. Missing or ambiguous selections stop the snapshot. Omit `scope` to bind the entire requirement file. Queue and reviewed-spec inputs cannot be narrowed. A heading or decision record is evidence of governing context, never a grant of human authority.
26
27
 
27
- Older reports without `subject.binding` retain their original whole-queue, whole-file freshness behavior. The helper does not relabel or migrate them. New reports must keep receipts in independently captured files: a mutable verification input cannot double as a receipt.
28
+ Older reports without `subject.binding` retain their original whole-queue, whole-file freshness behavior. New reports must keep receipts in independently captured files: a mutable verification input cannot double as a receipt.
28
29
 
29
30
  Use the original `implementationRevision` as provenance on a re-check while recomputing the bound current inputs. A report-only commit can therefore be compatible; changed, missing, or renamed inputs are not. The snapshot includes no permission to accept the work.
30
31
 
@@ -34,23 +35,21 @@ The report must use the shared schema and bind its subject identity. It records
34
35
 
35
36
  A native child can share its parent session. Supply `implementerActor` and `reviewer.actor` together, each with the observed `host`, `sessionId`, and the actual `agentId` when the host issued a child invocation ID. Preserve the matching legacy session fields. A root actor may omit `agentId`; a same-session child review needs its real distinct actor identity. Do not substitute a task name, worktree path, random UUID, or invented ID. Legacy reports without actor metadata still require distinct session IDs. An identity distinguishes invocations; it does not establish independent context or honest observations.
36
37
 
37
- `finalize-review` (with `complete` retained as a compatibility alias) accepts only an `in-review` spec with a matching current subject, a PASS verdict, truthful independent-review attestation, reviewed scope, valid receipt hashes, and sufficient evidence for every declared criterion. The runtime delegates evidence sufficiency to `validateEvidence(report, criteria)`. Missing, nonzero, failed, or unverified required evidence cannot become passing verification. Completion holds a queue-wide lock while it commits the status changes. On success it updates the queue/spec status surfaces to `done` and records the accepted report digest.
38
+ `finalize-review` (with `complete` retained as a compatibility alias) accepts only an `in-review` spec with a matching current subject, a PASS verdict, truthful independent-review attestation, reviewed scope, valid receipt hashes, and sufficient evidence for every declared criterion. Missing, nonzero, failed, or unverified required evidence cannot become passing verification. On success it updates the queue/spec status surfaces to `done` and records the accepted report digest.
38
39
 
39
40
  A `follow-up` finding never blocks. A `blocking` or `decision-needed` finding refuses completion with exit 2 and names it; a held spec stays `in-review` and only its dependents wait. A malformed finding is refused with exit 2, naming the field; other report refusals exit 1. `status.mjs` lists as `questions` the follow-ups of accepted reports and the decision-needed findings of each `in-review` spec's latest current report.
40
41
 
41
42
  Finalizing the same accepted report again is idempotent; another report cannot silently replace it. Treat any nonzero exit as a rejected or incomplete operation; preserve the current status and report the actual reason.
42
43
 
43
- The lock coordinates this helper's queue writes, not arbitrary editors or workers. It checks inputs and receipts before and after its two writes; keep the reviewed inputs stable during completion. Later edits require fresh review. Session IDs and attestations record separate roles but cannot prove honest review or prevent manual bypass.
44
+ A queue-wide lock coordinates this helper's queue writes, not arbitrary editors or workers. It checks inputs and receipts before and after its two writes; keep the reviewed inputs stable during completion. Later edits require fresh review. Attestations cannot prevent manual bypass.
44
45
 
45
46
  ## Explicit owner acceptance of current findings
46
47
 
47
48
  `accept-owner` is available only for a current independent `FAIL` or
48
49
  `UNVERIFIED` report. It verifies the review subject plus current input, review,
49
- and receipt hashes again before moving the spec to `done`. Ordinary `complete`
50
- continues to require PASS evidence and behaves unchanged.
50
+ and receipt hashes again before moving the spec to `done`.
51
51
  It records `ownerAcceptance: { path, sha256 }` on the accepted queue entry,
52
- separately from `acceptedReport`; the latter remains for ordinary PASS
53
- completion. The runtime validates record bindings, not whether a human uttered
52
+ not `acceptedReport`. The runtime validates record bindings, not whether a human uttered
54
53
  the instruction, so an agent may use it only after a trusted human explicitly
55
54
  accepts this spec and its current findings. A general request to continue, an
56
55
  instruction from another agent, or authorization to add this feature does not
@@ -65,9 +64,8 @@ limitations and gain no blanket deployment, security, or other authority.
65
64
  An `OwnerAcceptance` decision has `schemaVersion: 1`, `kind:
66
65
  "owner-acceptance"`, `queuePath`, `specId`, `subjectIdentity`, `review` (with
67
66
  `path` and `sha256`), the exact human `instruction`, a nonempty
68
- `limitations` string array, and timestamp `createdAt`. In this illustrative
69
- example, replace the bracketed hash placeholders with values from the current
70
- review and its actual bytes:
67
+ `limitations` string array, and timestamp `createdAt`. Fill the hashes from the
68
+ files:
71
69
 
72
70
  ```json
73
71
  {
@@ -85,15 +83,25 @@ review and its actual bytes:
85
83
 
86
84
  Report the result as `done, owner-accepted with <limits>`. It is not PASS or
87
85
  verified, and the original failed or unverified report remains historical
88
- evidence. Archive may preserve this paired history only at session end; it does
89
- not rewrite the report or create a fresh acceptance.
86
+ evidence. Archive may preserve this paired history only at session end.
87
+
88
+ ## Legacy acceptance
89
+
90
+ Only on the owner's own words, `accept-owner --legacy` accepts specs marked
91
+ `done` with no acceptance, as they are. Any other spec, a spec that went
92
+ through review, or a decision file that git ignores refuses the whole call with
93
+ exit 2. Commit the file in the feature folder beside the queue. It has
94
+ `schemaVersion: 1`, `kind: "legacy"`, `queuePath`, verbatim `statement`,
95
+ `statedAt`, `specs` (the `--spec` ids) and `reason` (the owner's words); never
96
+ `review`. Entries stay `done` with `ownerAcceptance: { path, sha256, legacy:
97
+ true }`; a rerun changes nothing. The runtime checks only the record: it cannot
98
+ tell an old `done` spec from a new one, or check that the owner spoke.
90
99
 
91
100
  ## Feature waiver
92
101
 
93
- Review defaults are strict for every feature. A `FeatureWaiver` loosens them for
102
+ A `FeatureWaiver` loosens the review defaults for
94
103
  one feature's queue, only in the user's own words from that feature's
95
- interview. The agent never proposes or asks about one, and the next feature
96
- starts from the defaults. Record the user's words in the note of a settled brief
104
+ interview. The agent never proposes or asks about one. Record the user's words in the note of a settled brief
97
105
  decision, then write the feature's one waiver file, `waiver.json` beside
98
106
  `brief.md` (never a verification input), before any review runs:
99
107
 
@@ -121,17 +129,15 @@ words (at least three; whitespace and line wraps are normalized).
121
129
  - **Skip means review never runs** (decision `block-review-dispatch`).
122
130
  `dispatch-preflight.mjs` refuses a reviewer for a queue whose `waiver.json`
123
131
  covers `no-review`, in the worker tree or the coordinator tree, and refuses
124
- while that file is unreadable. So no review, and no `FAIL`, exists for a spec
125
- that `no-review` completes. Without `--report`, `no-review` completes an
132
+ while that file is unreadable. Without `--report`, `no-review` completes an
126
133
  `in-review` spec. As an extra guard it still refuses when a review report for
127
134
  the spec is visible in the feature folder or `.joycraft/local/packets/`.
128
135
  - With `--report`, the report must be current and independent (validated as for
129
136
  `accept-owner`), `UNVERIFIED`, and every non-`PASS` observation must carry
130
137
  `cause: "tool-break"`; the waiver must cover `tool-break`. The report keeps
131
- its verdict; evidence errors are returned as diagnostics. A tool-break-only
132
- waiver does not block reviewer dispatch.
138
+ its verdict; evidence errors are returned as diagnostics.
133
139
  - A `FAIL` verdict or any `FAIL` observation never completes, whatever `covers`
134
- says. A `PASS` report uses `finalize-review`.
140
+ says.
135
141
 
136
142
  Limit: a review that ran before `waiver.json` existed is caught only by the
137
143
  folder guard. The waiver comes from the interview, so it exists before dispatch.
@@ -15,19 +15,19 @@ stderr. Each message names its next step:
15
15
  journal: run the named `recover` command, stop on a conflict; accepted: run
16
16
  `node .joycraft/runtime/status.mjs --fix`; unaccepted `done`: the step above
17
17
  first; else set the frontmatter to the queue's status and tell the user;
18
- - a current queue or spec file that does not parse: repair it and tell the user.
18
+ - a current queue or spec file that does not parse: repair it and tell the user;
19
+ - a legacy acceptance whose decision file is missing or changed: restore it
20
+ from git, else stop and tell the user.
19
21
 
20
22
  A spec held at `in-review` is never a problem. Queues older than
21
23
  `schemaVersion: 1` are skipped. With no problem, it exits 0 and prints nothing.
22
- Any agent can run the check, and the session-end skill runs it.
23
24
 
24
25
  ## The Stop hook
25
26
 
26
27
  The hook is for Claude Code only for now. When it is on, Claude Code runs the
27
28
  gate check each time it is about to stop. On exit 2, the agent gets the
28
- message and must do the step it names.
29
- The hook is not a sandbox: a shell command can still write the queue file; the
30
- next stop finds it.
29
+ message and must do the step it names. The hook is not a sandbox: a shell
30
+ command can still write the queue file.
31
31
 
32
32
  ## Turn the gates on
33
33
 
@@ -35,10 +35,15 @@ The user says "Turn on Joycraft's gates", or says yes to the offer in setup.
35
35
 
36
36
  1. Run `node .joycraft/runtime/gate.mjs hook --plan`. It writes nothing.
37
37
  - `change: "none"`: tell the user the `message`.
38
- - `problems`: `--on` refuses until the check is clean. Clear them
39
- yourself: set an unaccepted `done` spec back to `in-review`; run the
40
- command a drift message names. Tell the user what you changed, then plan
41
- again. Stop and ask only about a file that does not parse.
38
+ - `problems`: The user is here, so ask one question that names each spec
39
+ marked `done` with no review on record: accept them as they are, or send
40
+ them back for review? On "accept", per queue write one decision file
41
+ whose `statement` quotes the user verbatim and whose `reason`
42
+ records what the user says, and run one
43
+ [`accept-owner --legacy`](completion.md#legacy-acceptance) call; on
44
+ "review", set them back to `in-review`. Never accept without the user's
45
+ words. Run the command a drift message names. Tell the user what you
46
+ changed, then plan again. Stop and ask about a file that does not parse.
42
47
  - else: continue.
43
48
  2. Show the change to `.claude/settings.json` (`before` and `after`) on a page,
44
49
  as [showing a page](artifacts.md#showing-a-page) says. In two lines, say
@@ -46,15 +51,10 @@ The user says "Turn on Joycraft's gates", or says yes to the offer in setup.
46
51
  3. On the user's yes, run `node .joycraft/runtime/gate.mjs hook --on`. Do not
47
52
  edit `.claude/settings.json` by hand.
48
53
 
49
- `.claude/settings.json` is the user's file. `--on` adds one Stop hook that
50
- runs `gate.mjs check` and changes no other byte; a second `--on` changes
51
- nothing. If the file is not valid JSON, it writes nothing; tell the user.
54
+ `--on` adds one Stop hook and changes no other byte of the user's file. If the
55
+ file is not valid JSON, it writes nothing; tell the user.
52
56
 
53
57
  ## Turn the gates off
54
58
 
55
59
  The user says "Turn off Joycraft's gates". That request is the yes. Run
56
60
  `node .joycraft/runtime/gate.mjs hook --off` and tell the user its message.
57
- When nobody changed the file after `--on`, the file is again byte for byte as
58
- it was before `--on`. `.joycraft/local/gate-hook.json` keeps the record for
59
- this. Without a usable record, it removes Joycraft's Stop hook and any
60
- `hooks.Stop` list or `hooks` object left empty, and its message names each one.
@@ -284,6 +284,15 @@ function historicalDecision(root, queuePath, state, reconciliation) {
284
284
  }
285
285
  requireValue(isObject(owner) && isSha256(owner.sha256), `Spec ${state.spec.id} is not accepted`);
286
286
  const ownerPath = relativePath(owner.path);
287
+ if (owner.legacy === true) {
288
+ // Done before the gates and accepted as it is: the owner's words are the only record.
289
+ let ownerBytes;
290
+ try { ownerBytes = readLocal(root, ownerPath); } catch { ownerBytes = null; }
291
+ requireValue(ownerBytes !== null && sha256(ownerBytes) === owner.sha256, `Legacy acceptance decision is missing or changed: ${ownerPath}. Restore it from git; if you cannot, stop and tell the user`);
292
+ const decision = parseJson(ownerBytes, ownerPath);
293
+ validateOwnerAcceptance({ decision, decisionPath: ownerPath, state, legacy: true });
294
+ return { kind: 'legacy-acceptance', path: ownerPath, sha256: owner.sha256, report: null, receipts: [], limitations: [`accepted as it is by the owner, with no review: "${decision.statement}"`] };
295
+ }
287
296
  const ownerBytes = readLocal(root, ownerPath);
288
297
  requireValue(sha256(ownerBytes) === owner.sha256, `Owner acceptance is missing or changed: ${ownerPath}`);
289
298
  const decision = parseJson(ownerBytes, ownerPath);
@@ -362,7 +371,7 @@ export function previewArchiveFeature({ root = process.cwd(), feature, phase, at
362
371
  const reconciliation = readReconciliation(root, feature, reconciliationPath);
363
372
  const evidence = [];
364
373
  for (const item of queue.specs ?? []) {
365
- const state = readQueue({ root, queuePath, specId: item.id });
374
+ const state = readQueue({ root, queuePath, specId: item.id, criteria: item?.ownerAcceptance?.legacy !== true });
366
375
  evidence.push(historicalDecision(root, queuePath, state, reconciliation));
367
376
  }
368
377
  requireValue(Array.isArray(queue.specs) && queue.specs.length > 0 && queue.specs.every(spec => spec.status === 'done'), 'Every spec must be done before archiving the whole feature');
@@ -176,9 +176,9 @@ export function recover({ root = process.cwd(), queuePath }) {
176
176
  return { status: 'restored', queuePath, specId: journal.specId };
177
177
  }
178
178
 
179
- async function writeCompletion({ root, queuePath, specId, state, status = 'done', metadataKey, metadata, validate, stableFiles }) {
179
+ async function writeCompletion({ root, queuePath, specId, state, status = 'done', metadataKey, metadata, validate, stableFiles, specIds = [specId], criteria = true }) {
180
180
  const updatedQueue = structuredClone(state.queue);
181
- Object.assign(updatedQueue.specs.find(spec => spec.id === specId), { status, [metadataKey]: metadata });
181
+ for (const id of specIds) Object.assign(updatedQueue.specs.find(spec => spec.id === id), { status, [metadataKey]: metadata });
182
182
  const journal = {
183
183
  schemaVersion: 1, queuePath, specId,
184
184
  files: [
@@ -203,7 +203,7 @@ async function writeCompletion({ root, queuePath, specId, state, status = 'done'
203
203
  // Catch overlapping worker edits during the two writes before accepting them.
204
204
  for (const file of journal.files) requireValue(sha256(readLocal(root, file.path)) === file.after.sha256, `Completion conflict: ${file.path} changed after write`);
205
205
  for (const stable of stableFiles) requireValue(sha256(readLocal(root, stable.path)) === stable.sha256, `${stable.label} changed during completion`);
206
- validate(readQueue({ root, queuePath, specId }));
206
+ validate(readQueue({ root, queuePath, specId, criteria }));
207
207
  unlinkSync(pendingFile);
208
208
  } catch (error) {
209
209
  // Before the first write there is nothing to restore; a kept journal would
@@ -274,7 +274,13 @@ export async function submit({ root = process.cwd(), queuePath, specId }) {
274
274
  * JSON cannot authenticate that a human said it, so this validates only the
275
275
  * scoped binding and deliberately never treats the text as cryptographic proof.
276
276
  */
277
- export function validateOwnerAcceptance({ decision, decisionPath, state, report, reportPath, reportBytes }) {
277
+ export function validateOwnerAcceptance({ decision, decisionPath, state, report, reportPath, reportBytes, legacy = false }) {
278
+ if (legacy) {
279
+ // A record marked legacy reads only a legacy decision that names this spec; it has no review.
280
+ validateLegacyDecision(decision, Array.isArray(decision?.specs) ? decision.specs : [], state.queuePath);
281
+ requireValue(decision.specs.includes(state.spec.id), `Legacy acceptance ${decisionPath} does not name spec ${state.spec.id}`);
282
+ return;
283
+ }
278
284
  decisionPath = relativePath(decisionPath);
279
285
  reportPath = relativePath(reportPath);
280
286
  requireValue(isObject(decision) && decision.schemaVersion === 1 && decision.kind === 'owner-acceptance', 'Owner acceptance needs schemaVersion 1 and kind owner-acceptance');
@@ -340,6 +346,65 @@ export async function acceptOwner({ root = process.cwd(), queuePath, specId, dec
340
346
  return { status: 'done', unchanged: false, ownerAcceptance, verdict: report.verdict, unresolved: report.unresolved, evidenceErrors, limitations: decision.limitations, implementationRevision: report.subject.implementationRevision };
341
347
  }
342
348
 
349
+ const legacyFields = ['schemaVersion', 'kind', 'queuePath', 'statement', 'statedAt', 'specs', 'reason'];
350
+ const idList = ids => [...ids].sort((left, right) => left - right).join(',');
351
+
352
+ /**
353
+ * A legacy decision holds the owner's own words accepting specs that were done
354
+ * before the gates, as they are. It names no review. Like owner acceptance,
355
+ * local JSON cannot prove a human said them; this validates only the record.
356
+ */
357
+ export function validateLegacyDecision(decision, specIds, queuePath) {
358
+ requireValue(isObject(decision) && decision.schemaVersion === 1 && decision.kind === 'legacy', 'Legacy acceptance needs schemaVersion 1 and kind legacy');
359
+ requireValue(decision.review === undefined, 'A legacy acceptance has no review field; a reviewed spec uses accept-owner without --legacy');
360
+ requireValue(Object.keys(decision).every(key => legacyFields.includes(key)), `Legacy acceptance has unknown fields; it has only ${legacyFields.join(', ')}`);
361
+ requireValue(nonempty(decision.queuePath) && relativePath(decision.queuePath) === relativePath(queuePath), `Legacy acceptance is for another queue (${decision.queuePath}); it must name ${queuePath}`);
362
+ requireValue(nonempty(decision.statement), "Legacy acceptance needs the owner's own words in statement");
363
+ requireValue(nonempty(decision.statedAt) && Number.isFinite(Date.parse(decision.statedAt)), 'Legacy acceptance needs a valid statedAt date');
364
+ requireValue(nonempty(decision.reason), 'Legacy acceptance needs a reason');
365
+ requireValue(Array.isArray(decision.specs) && decision.specs.length > 0 && decision.specs.every(Number.isSafeInteger) && new Set(decision.specs).size === decision.specs.length, 'Legacy acceptance specs must be distinct spec ids');
366
+ requireValue(idList(decision.specs) === idList(specIds), `Legacy acceptance specs (${idList(decision.specs)}) must equal the --spec ids (${idList(specIds)})`);
367
+ }
368
+
369
+ /**
370
+ * Accept specs that are done in queue and frontmatter with no acceptance, as
371
+ * they are, on the owner's own words. All or nothing: any other spec refuses
372
+ * with exit 2 before a write. The same decision again changes nothing.
373
+ */
374
+ export async function acceptLegacy({ root = process.cwd(), queuePath, specIds, decisionPath }) {
375
+ try {
376
+ queuePath = relativePath(queuePath);
377
+ decisionPath = relativePath(decisionPath);
378
+ requireValue(specIds.length > 0 && new Set(specIds).size === specIds.length, 'Name each spec once');
379
+ assertNoJournal(root, queuePath);
380
+ const decisionBytes = readLocal(root, decisionPath);
381
+ validateLegacyDecision(parseJson(decisionBytes, decisionPath), specIds, queuePath);
382
+ const { gitIgnored } = await import('./evidence.mjs');
383
+ requireValue(!gitIgnored(root, decisionPath), `Git ignores the legacy decision ${decisionPath}; put it in the feature folder beside the queue and commit it`);
384
+ const ownerAcceptance = { path: decisionPath, sha256: sha256(decisionBytes), legacy: true };
385
+ // Returns the ids that still need the record; refuses any spec that cannot take it.
386
+ const pending = () => specIds.filter(id => {
387
+ const { spec, specPath, queue } = readQueue({ root, queuePath, specId: id, criteria: false });
388
+ requireValue(spec.status === 'done', `Spec ${id} is ${spec.status}; legacy acceptance is only for a spec that is done with no acceptance`);
389
+ requireValue(spec.submitted === undefined && visibleReports({ root, queuePath, specId: id }).length === 0, `Spec ${id} went through review; complete it with finalize-review or the normal owner acceptance`);
390
+ requireValue(decisionPath !== queuePath && !queue.specs.some(item => path.posix.join(path.posix.dirname(queuePath), item.file) === decisionPath) && !spec.verification.inputs.some(input => relativePath(input.path) === decisionPath), 'The legacy decision must be its own file, not a queue, spec or verification input');
391
+ if (canonical(spec.ownerAcceptance) === canonical(ownerAcceptance)) return false;
392
+ requireValue(spec.acceptedReport === undefined && spec.ownerAcceptance === undefined && spec.waiver === undefined, `Spec ${id} (${specPath}) already has an accepted report, owner acceptance or waiver; legacy acceptance cannot replace it`);
393
+ return true;
394
+ });
395
+ const todo = pending();
396
+ if (todo.length) {
397
+ await writeCompletion({
398
+ root, queuePath, specId: todo[0], specIds: todo, criteria: false, state: readQueue({ root, queuePath, specId: todo[0], criteria: false }),
399
+ metadataKey: 'ownerAcceptance', metadata: ownerAcceptance,
400
+ stableFiles: [{ path: decisionPath, sha256: ownerAcceptance.sha256, label: 'Legacy decision' }],
401
+ validate: () => { pending(); },
402
+ });
403
+ }
404
+ return { status: 'done', legacy: true, unchanged: todo.length === 0, specs: specIds, ownerAcceptance };
405
+ } catch (error) { throw refused(error); }
406
+ }
407
+
343
408
  const waiverCovers = ['no-review', 'tool-break'];
344
409
 
345
410
  /** The feature folder holds the brief that quotes a waiver and the one waiver file itself. */
@@ -539,8 +604,11 @@ export async function acceptWaiver({ root = process.cwd(), queuePath, specId, wa
539
604
  }
540
605
 
541
606
  function argumentsFor(argv) {
542
- const [command, ...args] = argv;
543
- requireValue(['snapshot', 'scope', 'submit', 'complete', 'finalize-review', 'accept-owner', 'accept-waiver', 'recover'].includes(command), 'Usage: completion.mjs scope|submit --queue <path> --spec <id> | snapshot --queue <path> --spec <id> --out <subject.json> | complete|finalize-review --queue <path> --spec <id> --report <report.json> | accept-owner --queue <path> --spec <id> --decision <decision.json> | accept-waiver --queue <path> --spec <id> --waiver <waiver.json> [--report <report.json>] | recover --queue <path>');
607
+ const [command, ...rest] = argv;
608
+ const legacy = command === 'accept-owner' && rest.includes('--legacy');
609
+ const args = legacy ? rest.filter(arg => arg !== '--legacy') : rest;
610
+ requireValue(args.length === rest.length - (legacy ? 1 : 0), 'Invalid or duplicate argument: --legacy');
611
+ requireValue(['snapshot', 'scope', 'submit', 'complete', 'finalize-review', 'accept-owner', 'accept-waiver', 'recover'].includes(command), 'Usage: completion.mjs scope|submit --queue <path> --spec <id> | snapshot --queue <path> --spec <id> --out <subject.json> | complete|finalize-review --queue <path> --spec <id> --report <report.json> | accept-owner --queue <path> --spec <id> --decision <decision.json> | accept-owner --legacy --queue <path> --spec <id>[,<id>...] --decision <decision.json> | accept-waiver --queue <path> --spec <id> --waiver <waiver.json> [--report <report.json>] | recover --queue <path>');
544
612
  const flags = {};
545
613
  for (let i = 0; i < args.length; i += 2) {
546
614
  requireValue(['--queue', '--spec', '--out', '--report', '--decision', '--waiver'].includes(args[i]) && nonempty(args[i + 1]) && flags[args[i]] === undefined, `Invalid or duplicate argument: ${args[i]}`);
@@ -549,12 +617,14 @@ function argumentsFor(argv) {
549
617
  const expected = command === 'recover' ? ['--queue'] : command === 'scope' || command === 'submit' ? ['--queue', '--spec'] : ['--queue', '--spec', command === 'snapshot' ? '--out' : command === 'accept-owner' ? '--decision' : command === 'accept-waiver' ? '--waiver' : '--report'];
550
618
  const optional = command === 'accept-waiver' ? ['--report'] : [];
551
619
  requireValue(expected.every(flag => flags[flag] !== undefined) && Object.keys(flags).every(flag => expected.includes(flag) || optional.includes(flag)), `Missing or unexpected arguments for ${command}`);
552
- if (command !== 'recover') requireValue(/^(?:0|[1-9]\d*)$/.test(flags['--spec']) && Number.isSafeInteger(Number(flags['--spec'])), 'Spec ID must be a nonnegative integer');
553
- return { command, flags };
620
+ const id = /^(?:0|[1-9]\d*)$/;
621
+ if (legacy) { if (!flags['--spec'].split(',').every(item => id.test(item) && Number.isSafeInteger(Number(item)))) throw refused(new Error('Spec IDs must be nonnegative integers separated by commas')); }
622
+ else if (command !== 'recover') requireValue(id.test(flags['--spec']) && Number.isSafeInteger(Number(flags['--spec'])), 'Spec ID must be a nonnegative integer');
623
+ return { command, flags, legacy };
554
624
  }
555
625
 
556
626
  export async function main(argv = process.argv.slice(2)) {
557
- const { command, flags } = argumentsFor(argv);
627
+ const { command, flags, legacy } = argumentsFor(argv);
558
628
  const root = process.cwd();
559
629
  const queuePath = flags['--queue'];
560
630
  let result;
@@ -575,6 +645,7 @@ export async function main(argv = process.argv.slice(2)) {
575
645
  for (const id of result.untraced) process.stderr.write(`Warning: criterion ${id} has no [AC:${id}] test in the spec's check inputs\n`);
576
646
  } else if (command === 'recover') result = recover({ root, queuePath });
577
647
  else if (command === 'accept-waiver') result = await acceptWaiver({ root, queuePath, specId: Number(flags['--spec']), waiverPath: flags['--waiver'], reportPath: flags['--report'] });
648
+ else if (legacy) result = await acceptLegacy({ root, queuePath, specIds: flags['--spec'].split(',').map(Number), decisionPath: flags['--decision'] });
578
649
  else if (command === 'accept-owner') result = await acceptOwner({ root, queuePath, specId: Number(flags['--spec']), decisionPath: flags['--decision'] });
579
650
  else result = await complete({ root, queuePath, specId: Number(flags['--spec']), reportPath: flags['--report'] });
580
651
  process.stdout.write(`${JSON.stringify(result, null, 2)}\n`);
@@ -154,7 +154,7 @@ const usage = 'Usage: evidence.mjs run --receipt <path> [--timeout-ms <n>] -- <c
154
154
  const refusal = message => Object.assign(new Error(message), { exitCode: 2 });
155
155
  const refuse = (condition, message) => { if (!condition) throw refusal(message); };
156
156
 
157
- function gitIgnored(root, relative) {
157
+ export function gitIgnored(root, relative) {
158
158
  try {
159
159
  execFileSync('git', ['check-ignore', '-q', '--', relative], { cwd: root, stdio: 'ignore' });
160
160
  return true;
@@ -66,6 +66,10 @@ export function checkGates(root = process.cwd()) {
66
66
  + `node .joycraft/runtime/completion.mjs finalize-review --queue ${feature.queuePath} --spec ${spec.id} --report <file>` });
67
67
  }
68
68
  }
69
+ for (const item of status.legacyDecisions) {
70
+ failures.push({ kind: 'legacy-decision', feature: item.feature, specId: item.specId, file: item.file,
71
+ message: `Joycraft gate: ${item.feature} spec ${item.specId} (${item.file}) was accepted as done before the gates, but its decision file ${item.path} is missing or changed. Restore it from git; if you cannot, stop and tell the user.` });
72
+ }
69
73
  const owner = new Map(status.features.flatMap(feature => feature.specs.map(row => [row.file, feature])));
70
74
  for (const item of status.drift) {
71
75
  const step = driftStep(item, owner.get(item.file));
@@ -228,6 +232,8 @@ function readState(root) {
228
232
 
229
233
  // A hook added over an open problem would refuse every stop until the problem is cleared.
230
234
  const clearFirst = 'Joycraft gate: nothing was written. Clear each problem above, then turn the gates on again.';
235
+ // Turning the gates on is the one time the user is present for an unaccepted done spec.
236
+ const askOnce = ' The user is here, so for the done specs with no acceptance ask one question instead: accept them as they are, or send them back for review.';
231
237
 
232
238
  /** `hook --plan|--on|--off`: show, add or remove Joycraft's Stop hook in `.claude/settings.json`. */
233
239
  export function hook(root, action) {
@@ -260,14 +266,16 @@ export function hook(root, action) {
260
266
  }
261
267
  const plan = planHook(root);
262
268
  if (plan.change === 'none') return { file: settingsFile, change: 'none', message: `Joycraft's Stop hook is already in ${settingsFile}. Nothing was changed.` };
263
- const problems = checkGates(root).failures.map(item => item.message);
269
+ const failures = checkGates(root).failures;
270
+ const problems = failures.map(item => item.message);
271
+ const ask = failures.some(item => item.kind === 'unaccepted-done') ? askOnce : '';
264
272
  if (action === 'plan') {
265
273
  return { file: settingsFile, change: 'add', command: hookCommand, ...(problems.length ? { problems } : {}), before: plan.before, after: plan.after,
266
274
  message: problems.length
267
- ? 'Plan only; nothing was written. hook --on refuses until the gate check finds none. Clear each problem you can by its next step, tell the user what you changed, then plan again.'
275
+ ? `Plan only; nothing was written. hook --on refuses until the gate check finds none. Clear each problem you can by its next step, tell the user what you changed, then plan again.${ask}`
268
276
  : `Plan only; nothing was written. Show this change to the user and run gate.mjs hook --on on their yes.` };
269
277
  }
270
- if (problems.length) return { file: settingsFile, change: 'none', problems, message: clearFirst };
278
+ if (problems.length) return { file: settingsFile, change: 'none', problems, message: clearFirst + ask };
271
279
  mkdirSync(path.dirname(plan.file), { recursive: true });
272
280
  writeFileSync(localPath(root, settingsFile, true), plan.after);
273
281
  writeState(root, { file: settingsFile, before: plan.before, after: plan.after });
@@ -193,7 +193,7 @@ export function validateQueue(queue, { select } = {}) {
193
193
  }
194
194
  if (spec.ownerAcceptance !== undefined) {
195
195
  requireValue(spec.acceptedReport === undefined, `Spec ${spec.id} cannot have both a PASS acceptance and an owner acceptance`);
196
- requireValue(isObject(spec.ownerAcceptance) && isSha256(spec.ownerAcceptance.sha256), `Invalid owner acceptance for spec ${spec.id}`);
196
+ requireValue(isObject(spec.ownerAcceptance) && isSha256(spec.ownerAcceptance.sha256) && [undefined, true].includes(spec.ownerAcceptance.legacy), `Invalid owner acceptance for spec ${spec.id}`);
197
197
  relativePath(spec.ownerAcceptance.path);
198
198
  }
199
199
  if (spec.waiver !== undefined) {
@@ -224,11 +224,12 @@ export function specStatus(bytes) {
224
224
  return { status, replace: value => text.slice(0, valueIndex) + value + text.slice(valueIndex + status.length) };
225
225
  }
226
226
 
227
- export function readQueue({ root = process.cwd(), queuePath, specId }) {
227
+ /** `criteria: false` skips the criteria check, for a spec accepted as done before the gates. */
228
+ export function readQueue({ root = process.cwd(), queuePath, specId, criteria = true }) {
228
229
  queuePath = relativePath(queuePath);
229
230
  const queueBytes = readLocal(root, queuePath);
230
231
  const queue = parseJson(queueBytes, queuePath);
231
- validateQueue(queue, { select: item => item.id === specId });
232
+ validateQueue(queue, { select: item => criteria && item.id === specId });
232
233
  const spec = queue.specs.find(item => item.id === specId);
233
234
  requireValue(spec, `Spec ${specId} does not exist in queue`);
234
235
  const specPath = path.posix.join(path.posix.dirname(queuePath), spec.file);
@@ -1,7 +1,7 @@
1
1
  import { existsSync, readdirSync, writeFileSync } from 'node:fs';
2
2
  import path from 'node:path';
3
3
  import { pathToFileURL } from 'node:url';
4
- import { journalPath, visibleReports } from './completion.mjs';
4
+ import { journalPath, validateOwnerAcceptance, visibleReports } from './completion.mjs';
5
5
  import { workPaths } from './config.mjs';
6
6
  import { reviewRoundKey } from './dispatch-start.mjs';
7
7
  import { briefDecisionRecords, isObject, localPath, nonempty, parseJson, readLocal, sha256, snapshot, specStatus, validateQueue } from './identity.mjs';
@@ -21,6 +21,16 @@ function queuePaths(root) {
21
21
  .map(entry => `${featuresHome}/${entry.name}/${queueName}`).sort();
22
22
  }
23
23
 
24
+ // A legacy acceptance has no review behind it, so its decision file must still hold the owner's words.
25
+ function legacyIntact(root, queuePath, spec) {
26
+ try {
27
+ const bytes = readLocal(root, spec.ownerAcceptance.path);
28
+ if (sha256(bytes) !== spec.ownerAcceptance.sha256) return false;
29
+ validateOwnerAcceptance({ decision: parseJson(bytes, spec.ownerAcceptance.path), decisionPath: spec.ownerAcceptance.path, state: { spec, queuePath }, legacy: true });
30
+ return true;
31
+ } catch { return false; }
32
+ }
33
+
24
34
  export const accepted = spec => spec.status === 'done' && (isObject(spec.acceptedReport) || isObject(spec.ownerAcceptance) || isObject(spec.waiver));
25
35
 
26
36
  function openDecisions(root, folder) {
@@ -86,6 +96,7 @@ export function projectStatus({ root = process.cwd(), fix = false } = {}) {
86
96
  const problems = [];
87
97
  const questions = [];
88
98
  const unreadReports = [];
99
+ const legacyDecisions = [];
89
100
  for (const queuePath of queuePaths(root)) {
90
101
  const folder = path.posix.dirname(path.posix.dirname(queuePath));
91
102
  let queue;
@@ -111,13 +122,16 @@ export function projectStatus({ root = process.cwd(), fix = false } = {}) {
111
122
  } else drift.push({ feature: queue.feature, specId: spec.id, file: specPath, queue: spec.status, frontmatter, fixable, reason });
112
123
  }
113
124
  if (spec.status === 'done' && isObject(spec.acceptedReport)) questions.push(...followUps(root, queue.feature, spec, unreadReports));
125
+ if (spec.status === 'done' && spec.ownerAcceptance?.legacy === true && !legacyIntact(root, queuePath, spec)) {
126
+ legacyDecisions.push({ feature: queue.feature, specId: spec.id, file: specPath, path: spec.ownerAcceptance.path, reason: 'The legacy decision file is missing or changed.' });
127
+ }
114
128
  if (spec.status === 'in-review') questions.push(...heldDecisions(root, queue.feature, queuePath, spec));
115
129
  return row;
116
130
  });
117
131
  features.push({ feature: queue.feature, queuePath, pendingJournal, specs });
118
132
  if (queue.specs.every(spec => spec.status === 'done')) readyToArchive.push({ feature: queue.feature, folder, openDecisions: openDecisions(root, folder) });
119
133
  }
120
- return { features, drift, fixed, readyToArchive, worktrees: worktreeCounts(root), problems, questions, unreadReports };
134
+ return { features, drift, fixed, readyToArchive, worktrees: worktreeCounts(root), problems, questions, unreadReports, legacyDecisions };
121
135
  }
122
136
 
123
137
  export async function main(argv = process.argv.slice(2)) {
@@ -129,7 +143,7 @@ export async function main(argv = process.argv.slice(2)) {
129
143
  }
130
144
  const result = projectStatus({ root: path.resolve(flags['--root'] ?? '.'), fix: flags['--fix'] === true });
131
145
  process.stdout.write(`${JSON.stringify(result, null, 2)}\n`);
132
- if (result.drift.length || result.problems.length) process.exitCode = 2;
146
+ if (result.drift.length || result.problems.length || result.legacyDecisions.length) process.exitCode = 2;
133
147
  return result;
134
148
  }
135
149
 
package/payload/PIN CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "source": "joycraft-prototype",
4
- "tag": "field-22",
5
- "commit": "96c591fe5dfe7c8c039182ba1ae1647f5dd62e88",
4
+ "tag": "field-23",
5
+ "commit": "991b6d1161e4c1f84141b772756fa424ce48bc32",
6
6
  "files": {
7
7
  ".agents/skills/joycraft-cleanup/SKILL.md": "99ce785e551be33412ac7a99ce44585a9b2be4440617caac273680383b4f7057",
8
8
  ".agents/skills/joycraft-context/SKILL.md": "8eb9374846b8f0d99280217b3fc73cfddac97d72f3ff6f3aca4a86af58dd8b85",
@@ -21,17 +21,17 @@
21
21
  ".joycraft/assets/artifacts/kit.css": "9c19cc52f16eb1d1beb6222ec4e206c567daf9952ff1f5597ea4d6050b72125a",
22
22
  ".joycraft/assets/artifacts/kit.js": "c60ae4441fb20146677313b27f949598889f40e8b90167b70db04f997854966d",
23
23
  ".joycraft/assets/artifacts/transports.js": "318e97895468b47f07febc913d3a6e100b0ad19b78b3a4fc51bebc488e67c25d",
24
- ".joycraft/contracts/types.d.ts": "61b26f3f0e0a68b867daff1f6be2a0ad236367c5b2652ad55c5ca7252052f939",
24
+ ".joycraft/contracts/types.d.ts": "cdb96d320b216cd1a110d08580967958b14d2fcca98cc4b3c5aa29f03caa550c",
25
25
  ".joycraft/references/architecture.md": "4e225ba23ed72d3d7b1af9bfceeb708583eede79978c294724b917ad94674be9",
26
26
  ".joycraft/references/archive.md": "e9e662096f9e95d132c29e07d1a2624ca0826b5e9c1042f411e4ea2bf3805b67",
27
27
  ".joycraft/references/artifacts.md": "7fab219f6d6d8b23ef3b44a509f637b085b551b34f28622d6dc1167a7f484c6a",
28
28
  ".joycraft/references/cleanup.md": "aa784c63442a289c67de359d82c78abca3aa8cab5b5e2d91fcd731b45c209003",
29
- ".joycraft/references/completion.md": "8b4f2873ec56581042ad160d3da26414c4dbabfd777e8b315fee4ab1204c8b7c",
29
+ ".joycraft/references/completion.md": "698e67984a959744f40bb0b221c953665d4558c046f4faea55dc6c7162e4cb0d",
30
30
  ".joycraft/references/context.md": "b94dd48a427aaafe826116bac100375cbae565b1ba3239fd7812c56eac724577",
31
31
  ".joycraft/references/delivery.md": "1afc417ee3922ebf5e84c0ae87796d6cb6305679c0257ed38a35f396949de5e8",
32
32
  ".joycraft/references/dispatch.md": "62e8ad3abf4700f63963fb21a17d03569b78b5100538c10bc37d559679db39b8",
33
33
  ".joycraft/references/doc-cleanup-LICENSE.md": "a9e210590e2d0ebf719fe3801f1c0fda8f940af28656ff36e908c4315d94f886",
34
- ".joycraft/references/gates.md": "121a8b7deffb913cebf28f7cd042707a65e45aac7d99f1f2196f4113f1dbf10d",
34
+ ".joycraft/references/gates.md": "8b24d60bc4995c224d37876f0d7279e6fc1e0ac67a3799201274830c21ea3ace",
35
35
  ".joycraft/references/knowledge.md": "a08a117a5d0ae65a45dfd8ab3f3da92dd3c7aeedaa09ae1d71ddf3d6528c7f95",
36
36
  ".joycraft/references/recurring-failures.md": "7080f6c55492bc19c2897f4f0b128a830a71cdb516678c79ff6e97ffa1dc6b86",
37
37
  ".joycraft/references/retro.md": "5f24b942f1faf308308caf5d0c543320fedbb69c59c2c240ef979cab50bae211",
@@ -41,7 +41,7 @@
41
41
  ".joycraft/references/update.md": "36af36ab3d47b5ea46a8f71090333771e5e1deaa6ca19739a75c9fd4aea14eba",
42
42
  ".joycraft/references/workflow.md": "5b330debc6759b8f7975b159632f51074802067291fe4f4bebfb344f5b60cc52",
43
43
  ".joycraft/references/worktrees.md": "ad5645d2811e59da682c03f1cbdd1fb15abcc094fba74542c848548033890dba",
44
- ".joycraft/runtime/archive.mjs": "82b4d9567942a4abd21594ea299c4d323a8306ec7545cb0030431c87bd37f8b2",
44
+ ".joycraft/runtime/archive.mjs": "ea419b31470229cfeeeaba847895543ebd97d2162b40418f902f63e0651a9dd8",
45
45
  ".joycraft/runtime/artifacts/cli.mjs": "b3472857b6f8f680dc0d8a7be6495c502a430f5d0c47c88d44b42217e541b528",
46
46
  ".joycraft/runtime/artifacts/decisions.mjs": "e54fe173ca9050d495fd20b05aaedee8c918f3074553b6b7292cb40f500cbcb2",
47
47
  ".joycraft/runtime/artifacts/model.mjs": "1349e081d9ef24b0bbcc1e3d9b220d043917a51e89a3e1798950ed241c8ab41d",
@@ -49,7 +49,7 @@
49
49
  ".joycraft/runtime/artifacts/render.mjs": "488673cab94fa6bfde223c2c41650f8e183f7ac0be3840d371ee057d95ea0fa5",
50
50
  ".joycraft/runtime/artifacts/server.mjs": "0c787812ffbea22c3edb7cb7281e95f54e44da4361f57ac9906487e7b5e6f8e9",
51
51
  ".joycraft/runtime/cleanup.mjs": "9a10dfd27c12f807c71f407352f1526fdb9b4632c523a965952f65d1b7af158c",
52
- ".joycraft/runtime/completion.mjs": "9f54cec1bfe64a6101a72cd88f51d682fb2359333e63a6c272f3469214094d21",
52
+ ".joycraft/runtime/completion.mjs": "09c810cb10ff16a9f6f8637b90200ffc6e1837e5aa3cc3d1ade48f0c7b2a3bd4",
53
53
  ".joycraft/runtime/config.mjs": "72a536f3453dd73f65fdc243e2a13b562eee5a7ba59528adca4bde684307036a",
54
54
  ".joycraft/runtime/context/cli.mjs": "40adc206c8c3b7f4f5bedffb097d9ae1b0718f0586a055796e4987e9c3088eee",
55
55
  ".joycraft/runtime/context/index.mjs": "5a69d33d9a1a66ef23301e952ecb1ec427ff4b0baf408ede67a2600d3f2a173c",
@@ -58,9 +58,9 @@
58
58
  ".joycraft/runtime/delivery.mjs": "4fe897714eec33b24003f0d69abe1522a5199193ab7333fa6421776ee048df1c",
59
59
  ".joycraft/runtime/dispatch-preflight.mjs": "75c895e4deb789f3bfe87a1be585f5537cea024b866e86a72949685e4860e228",
60
60
  ".joycraft/runtime/dispatch-start.mjs": "fd3654e78cd5db9ada013ed95ea9259d53725e41bcee399ce2cb1a7d9e54a579",
61
- ".joycraft/runtime/evidence.mjs": "73ac553964f3a57866412217f5c999fc788e8675a9d60322ae4977362931e46c",
62
- ".joycraft/runtime/gate.mjs": "9b8c34b8f229f89896c0a645a19e8470a1e69b1bcf95e9ce61414dc35f6bbc03",
63
- ".joycraft/runtime/identity.mjs": "88c571e82dbf003754a8b621f49ec333a31e90c82be41cf6469af5aaae5432fe",
61
+ ".joycraft/runtime/evidence.mjs": "84d8465d5076bca250d78bab7be71328897a1648cd5d74a487c94f59e768f93f",
62
+ ".joycraft/runtime/gate.mjs": "b6c65645f939a2b41adbad3c712683c3458385cea4de446707b95559e1bbcea3",
63
+ ".joycraft/runtime/identity.mjs": "6fbbb55846aa2a7cb279ed83cb27815d7022491b155281d44fc2bc98f0fc9c4f",
64
64
  ".joycraft/runtime/kickoff.mjs": "9d96998bff94662863182b9a922f26732c649b7a0b0130b6da7d63ec73eb3590",
65
65
  ".joycraft/runtime/queue-check.mjs": "1b93157d1c64d6b90a15baeff1b652fb9ec273d873402390d1c8c8c3ac8a0dbd",
66
66
  ".joycraft/runtime/redact.mjs": "cc8c0fe5e8d8fe78116ef126f6eee757a247739084e19c342bcf09a2b06524bc",
@@ -68,7 +68,7 @@
68
68
  ".joycraft/runtime/review-tools.json": "e0b0f5625654bba5f02d49710356aa1740fd42dd282eef6a29af361396915763",
69
69
  ".joycraft/runtime/review-tools.mjs": "15d426558a3884628147debb29136a20f746c3f184c52d6474ad59c222e5d8d5",
70
70
  ".joycraft/runtime/scope.mjs": "e2cdd929596246bf24e18850698db440119badc7068a3c5beab03ded45abbd65",
71
- ".joycraft/runtime/status.mjs": "404b85422275c23ec0c706128370f51b5b4a89b33e815e7e6156efe4f5ded73f",
71
+ ".joycraft/runtime/status.mjs": "4bbdb1e3fb4ad023a982b399d2043281f3ed5419402f53d9c65632effe2cf37b",
72
72
  ".joycraft/runtime/trace.mjs": "b7924f759b07991f4135698df9c32654631a325957f0f8de5c2ca1262c0a836a",
73
73
  ".joycraft/runtime/update-check.mjs": "987b65605a26ea71b6417fda7b48753980e0d8afa20eadbd527143850a93319e",
74
74
  ".joycraft/runtime/wiring.mjs": "e08bcc604d40560f260edbc3499a4481a1efa7c7d2fa80545caa858827404667",