joycraft 1.5.2 → 1.5.4
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/dist/joycraft-release.json +1 -1
- package/package.json +3 -3
- package/payload/.joycraft/references/archive.md +12 -9
- package/payload/.joycraft/runtime/archive.mjs +49 -26
- package/payload/.joycraft/runtime/identity.mjs +3 -0
- package/payload/.joycraft/runtime/queue-check.mjs +11 -2
- package/payload/PIN +6 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "joycraft",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.4",
|
|
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.
|
|
17
|
-
"summary": "
|
|
16
|
+
"release": "1.5.4",
|
|
17
|
+
"summary": "Session-end archive now finds a feature whose folder is dated but whose queue feature is not, such as docs/features/2026-11-17-corpus-report with feature corpus-report. Before, that feature could not be archived. The queue check reports a folder name that archive cannot find.",
|
|
18
18
|
"autoSafeEligible": false
|
|
19
19
|
},
|
|
20
20
|
"scripts": {
|
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
It runs only from a host-asserted `session-end` boundary. A queue transition,
|
|
5
5
|
review, hook event, or ordinary verification must never invoke it.
|
|
6
6
|
|
|
7
|
+
`--feature` takes the queue's `feature` or the folder name:
|
|
8
|
+
`docs/features/<feature>` or `docs/features/YYYY-MM-DD-<feature>`. Two dated
|
|
9
|
+
matches stop it; pass a folder name. `<slug>` below is the folder name.
|
|
10
|
+
|
|
7
11
|
Prepare a project-relative attestation file:
|
|
8
12
|
|
|
9
13
|
```json
|
|
@@ -200,7 +204,7 @@ then atomically moves `docs/features/<slug>` to
|
|
|
200
204
|
feature stay live. Reports and receipts outside the feature are copied under
|
|
201
205
|
the archive record's `evidence/` directory. `archive-replay.json` maps each
|
|
202
206
|
original path to its moved, copied or restored byte-identical record. Historical links in
|
|
203
|
-
the moved files retain their original text;
|
|
207
|
+
the moved files retain their original text; treat them as history.
|
|
204
208
|
|
|
205
209
|
The staging directory receives `archive-recovery.json` before any copy or move,
|
|
206
210
|
and the marker remains in the final archive as immutable move provenance. If an
|
|
@@ -208,9 +212,9 @@ interruption prevents the final rename, the runtime tries to restore the source
|
|
|
208
212
|
directory. If that restore cannot prove the source is back and staging no longer
|
|
209
213
|
holds the feature, it retains the staged directory and its recovery manifest for
|
|
210
214
|
manual recovery. A collision or changed byte fails without accepting new
|
|
211
|
-
completion. A repeat is idempotent only when the
|
|
212
|
-
the feature and every
|
|
213
|
-
|
|
215
|
+
completion. A repeat is idempotent only when the replay manifest names
|
|
216
|
+
the feature and every mapped byte still matches; otherwise reconcile it
|
|
217
|
+
manually.
|
|
214
218
|
|
|
215
219
|
## After-archive hook
|
|
216
220
|
|
|
@@ -223,8 +227,7 @@ hooks:
|
|
|
223
227
|
|
|
224
228
|
After a successful `--apply`, the runtime runs it once from the project root with
|
|
225
229
|
`JOYCRAFT_FEATURE`, `JOYCRAFT_ARCHIVE_PATH` and `JOYCRAFT_SOURCE_PATH` set, and reports
|
|
226
|
-
its exit code and output tail under `afterArchive`. Use it to update a
|
|
227
|
-
or run a doc audit
|
|
228
|
-
report
|
|
229
|
-
`paths.features` and `paths.archive`
|
|
230
|
-
folders; the defaults are `docs/features` and `docs/archive`.
|
|
230
|
+
its exit code and output tail under `afterArchive`. Use it to update a wiki
|
|
231
|
+
or run a doc audit. A failing hook does not undo the archive;
|
|
232
|
+
report and fix it. A repeat does not run it again.
|
|
233
|
+
`paths.features` and `paths.archive` there move both folders.
|
|
@@ -2,7 +2,7 @@ import { execFileSync, spawnSync } from 'node:child_process';
|
|
|
2
2
|
import { cpSync, existsSync, lstatSync, mkdirSync, readFileSync, readdirSync, realpathSync, renameSync, rmSync, writeFileSync } from 'node:fs';
|
|
3
3
|
import path from 'node:path';
|
|
4
4
|
import { pathToFileURL } from 'node:url';
|
|
5
|
-
import { boundQueueForSubject, briefDecisionRecords, canonical, isObject, isSha256, localPath, nonempty, normalizedQueueForSubject, parseJson, readLocal, readQueue, relativePath, requireValue, scopedRequirementForSubject, sha256, specStatus, subjectIdentity, validateIndependentReview } from './identity.mjs';
|
|
5
|
+
import { boundQueueForSubject, briefDecisionRecords, canonical, featureFolderMatches, isObject, isSha256, localPath, nonempty, normalizedQueueForSubject, parseJson, readLocal, readQueue, relativePath, requireValue, scopedRequirementForSubject, sha256, specStatus, subjectIdentity, validateIndependentReview } from './identity.mjs';
|
|
6
6
|
import { validateEvidence } from './evidence.mjs';
|
|
7
7
|
import { validateOwnerAcceptance, validateWaiver } from './completion.mjs';
|
|
8
8
|
import { readConfig, workPaths } from './config.mjs';
|
|
@@ -12,8 +12,28 @@ const featureName = value => {
|
|
|
12
12
|
return value;
|
|
13
13
|
};
|
|
14
14
|
// Folders come from joycraft.yaml (paths.features / paths.archive); defaults are docs/features and docs/archive.
|
|
15
|
-
|
|
16
|
-
const
|
|
15
|
+
// A feature folder is named for its queue feature, optionally after a YYYY-MM-DD- date.
|
|
16
|
+
const archivePath = (root, folder) => `${workPaths(root).archive}/${folder}`;
|
|
17
|
+
const featurePath = (root, folder) => `${workPaths(root).features}/${folder}`;
|
|
18
|
+
const featureFolder = queuePath => path.posix.dirname(path.posix.dirname(queuePath));
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* The folder a --feature value names: the folder with that exact name, else the one
|
|
22
|
+
* folder named YYYY-MM-DD-<value>. A working folder is preferred to an archived one,
|
|
23
|
+
* so a repeat of a finished archive resolves the same way as its first run.
|
|
24
|
+
*/
|
|
25
|
+
function resolveFolder(root, name) {
|
|
26
|
+
const { features, archive } = workPaths(root);
|
|
27
|
+
for (const home of [features, archive]) {
|
|
28
|
+
const local = path.join(realpathSync(root), home);
|
|
29
|
+
const names = existsSync(local) ? readdirSync(local).filter(entry => !entry.startsWith('.')) : [];
|
|
30
|
+
if (names.includes(name)) return name;
|
|
31
|
+
const dated = names.filter(entry => entry !== name && featureFolderMatches(entry, name)).sort();
|
|
32
|
+
requireValue(dated.length <= 1, `Feature ${name} matches more than one folder in ${home}: ${dated.join(', ')}. Pass one of these folder names as --feature`);
|
|
33
|
+
if (dated.length === 1) return dated[0];
|
|
34
|
+
}
|
|
35
|
+
throw new Error(`No feature folder for ${name}: looked for ${name} and YYYY-MM-DD-${name} in ${features} and ${archive}`);
|
|
36
|
+
}
|
|
17
37
|
|
|
18
38
|
function localDirectory(root, relative) {
|
|
19
39
|
relative = relativePath(relative);
|
|
@@ -82,8 +102,8 @@ const isDecisionAnswered = decision => ['clarified', 'assigned'].includes(decisi
|
|
|
82
102
|
* record naming the answered owner decisions that authorized it, and the record's before
|
|
83
103
|
* and after hashes must equal that commit's parent and own brief bytes.
|
|
84
104
|
*/
|
|
85
|
-
function briefAmendments(root,
|
|
86
|
-
const recordPath = `${
|
|
105
|
+
function briefAmendments(root, source, briefPath, later) {
|
|
106
|
+
const recordPath = `${source}/brief-amendments.json`;
|
|
87
107
|
const changed = `Original requirement changed after acceptance: ${briefPath}`;
|
|
88
108
|
requireValue(existsSync(localPath(root, recordPath, true)), `${changed} (no ${recordPath} records its amendments)`);
|
|
89
109
|
const record = parseJson(readLocal(root, recordPath), recordPath);
|
|
@@ -119,9 +139,9 @@ function validateReconciliation(record, feature) {
|
|
|
119
139
|
}
|
|
120
140
|
}
|
|
121
141
|
|
|
122
|
-
function readReconciliation(root, feature, file) {
|
|
142
|
+
function readReconciliation(root, source, feature, file) {
|
|
123
143
|
if (file === undefined) return undefined;
|
|
124
|
-
requireValue(file === `${
|
|
144
|
+
requireValue(file === `${source}/archive-reconciliation.json`, 'Use the feature archive-reconciliation.json for the explicit override');
|
|
125
145
|
const bytes = readLocal(root, file), record = parseJson(bytes, file);
|
|
126
146
|
validateReconciliation(record, feature);
|
|
127
147
|
return { path: file, sha256: sha256(bytes), record, used: new Set() };
|
|
@@ -133,7 +153,7 @@ function reconciledRequirement(root, state, review, input, project, reconciliati
|
|
|
133
153
|
requireValue(index >= 0, `Archive reconciliation does not cover ${review.path}: ${input.path}`);
|
|
134
154
|
const entry = reconciliation.record.entries[index];
|
|
135
155
|
requireValue(sha256(readLocal(root, input.path)) === entry.currentSha256, `Archive reconciliation is stale: ${input.path}`);
|
|
136
|
-
const record = historicalRequirement(root, state.
|
|
156
|
+
const record = historicalRequirement(root, featureFolder(state.queuePath), input, project, ['none', 'requirement-scope', 'queue-scope', 'queue-status', 'spec-status'], entry.acceptedCommit);
|
|
137
157
|
reconciliation.used.add(index);
|
|
138
158
|
return { ...record, ...(input.normalization === 'queue-scope' ? { specId: state.spec.id } : {}), reconciliationEntry: index, reconciliationSha256: reconciliation.sha256 };
|
|
139
159
|
}
|
|
@@ -145,7 +165,7 @@ function reconciledRequirement(root, state, review, input, project, reconciliati
|
|
|
145
165
|
* also needs an owner-decision amendment for each of those commits. The accepted bytes are
|
|
146
166
|
* restored into the archive, so the original requirement is preserved, not reclassified.
|
|
147
167
|
*/
|
|
148
|
-
function historicalRequirement(root,
|
|
168
|
+
function historicalRequirement(root, source, input, project, normalizations = ['none', 'requirement-scope'], acceptedCommit) {
|
|
149
169
|
const changed = `Original requirement changed after acceptance: ${input.path}`;
|
|
150
170
|
requireValue(gitRoot(root), `${changed} (no git history proves the accepted version)`);
|
|
151
171
|
requireValue(gitIn(root, ['status', '--porcelain', '--', input.path]).trim() === '', `${changed} (commit its current version first)`);
|
|
@@ -163,7 +183,7 @@ function historicalRequirement(root, feature, input, project, normalizations = [
|
|
|
163
183
|
const later = gitIn(root, ['log', '--full-history', '--topo-order', '--format=%H', '--reverse', `${accepted}..HEAD`, '--', input.path]).split('\n').filter(Boolean);
|
|
164
184
|
const raw = committedBytes(root, accepted, input.path);
|
|
165
185
|
const record = { path: input.path, normalization: input.normalization ?? 'none', ...(input.scope !== undefined ? { scope: input.scope } : {}), acceptedSha256: input.sha256, acceptedCommit: accepted, restoredSha256: sha256(raw), laterCommits: later };
|
|
166
|
-
if (input.path === `${
|
|
186
|
+
if (input.path === `${source}/brief.md`) record.amendments = briefAmendments(root, source, input.path, later);
|
|
167
187
|
return record;
|
|
168
188
|
}
|
|
169
189
|
|
|
@@ -202,7 +222,7 @@ function historicalReport(root, queuePath, state, review, { ownerAccepted = fals
|
|
|
202
222
|
const reviewedSpec = reviewedQueue.specs.find(spec => spec.id === state.spec.id);
|
|
203
223
|
requireValue(reviewedSpec && reviewedSpec.file === state.spec.file && canonical(report.subject.criteria) === canonical(reviewedSpec.verification.criteria), `Accepted report criteria differ from the archived spec: ${reportPath}`);
|
|
204
224
|
const declaredSpecPaths = new Set([...state.queue.specs, ...reviewedQueue.specs].map(spec => path.posix.join(path.posix.dirname(queuePath), spec.file)));
|
|
205
|
-
for (const required of [state.specPath, `${
|
|
225
|
+
for (const required of [state.specPath, `${featureFolder(queuePath)}/brief.md`, ...report.subject.criteria.map(item => relativePath(item.requirement.path))]) {
|
|
206
226
|
requireValue(inputs.some(input => isObject(input) && input.path === required && input.kind === 'requirement' && isSha256(input.sha256)), `Accepted report omits original requirement ${required}: ${reportPath}`);
|
|
207
227
|
}
|
|
208
228
|
const requirement = (input, project) => {
|
|
@@ -214,9 +234,9 @@ function historicalReport(root, queuePath, state, review, { ownerAccepted = fals
|
|
|
214
234
|
requireValue(input.path !== queuePath && !declaredSpecPaths.has(input.path), `Original requirement changed after acceptance: ${input.path}`);
|
|
215
235
|
const key = canonical(input);
|
|
216
236
|
const explicit = reconciliation?.record.entries.some(entry => entry.report.path === review.path && entry.path === input.path && entry.normalization === input.normalization);
|
|
217
|
-
if (!history.has(key)) history.set(key, explicit ? reconciledRequirement(root, state, review, input, project, reconciliation) : historicalRequirement(root,
|
|
237
|
+
if (!history.has(key)) history.set(key, explicit ? reconciledRequirement(root, state, review, input, project, reconciliation) : historicalRequirement(root, featureFolder(queuePath), input, project));
|
|
218
238
|
};
|
|
219
|
-
for (const input of inputs.filter(input => isObject(input) && input.kind === 'requirement' && (bound !== undefined || input.path.startsWith(`${
|
|
239
|
+
for (const input of inputs.filter(input => isObject(input) && input.kind === 'requirement' && (bound !== undefined || input.path.startsWith(`${featureFolder(queuePath)}/`)))) {
|
|
220
240
|
// The queue was checked above. Only an explicit, hash-bound reconciliation can
|
|
221
241
|
// preserve a changed acceptance record; normal requirement fallback cannot.
|
|
222
242
|
if (input.path === queuePath) {
|
|
@@ -304,15 +324,15 @@ function historicalDecision(root, queuePath, state, reconciliation) {
|
|
|
304
324
|
|
|
305
325
|
function fileDigest(root, relative) { return { path: relative, sha256: sha256(readLocal(root, relative)) }; }
|
|
306
326
|
|
|
307
|
-
function existingArchive(root,
|
|
308
|
-
const destination = archivePath(root,
|
|
327
|
+
function existingArchive(root, folder) {
|
|
328
|
+
const destination = archivePath(root, folder), source = featurePath(root, folder);
|
|
309
329
|
const manifestPath = `${destination}/archive-replay.json`;
|
|
310
330
|
const manifest = parseJson(readLocal(root, manifestPath), manifestPath);
|
|
311
|
-
requireValue(isObject(manifest) && manifest.schemaVersion === 1 && manifest.kind === 'joycraft-archive-replay' && manifest.feature === feature && manifest.source ===
|
|
331
|
+
requireValue(isObject(manifest) && manifest.schemaVersion === 1 && manifest.kind === 'joycraft-archive-replay' && typeof manifest.feature === 'string' && featureFolderMatches(folder, manifest.feature) && manifest.source === source && Array.isArray(manifest.files), `Archive destination is not a valid archive for ${folder}: ${destination}`);
|
|
312
332
|
if (manifest.reconciliation !== undefined) {
|
|
313
333
|
const proof = manifest.reconciliation;
|
|
314
|
-
requireValue(isObject(proof) && proof.path === `${
|
|
315
|
-
validateReconciliation(proof.record, feature);
|
|
334
|
+
requireValue(isObject(proof) && proof.path === `${source}/archive-reconciliation.json` && isSha256(proof.sha256), 'Archived reconciliation metadata is malformed');
|
|
335
|
+
validateReconciliation(proof.record, manifest.feature);
|
|
316
336
|
const ledger = manifest.files.find(file => file.operation === 'moved' && file.originalPath === proof.path && file.sha256 === proof.sha256);
|
|
317
337
|
requireValue(ledger && sha256(readLocal(root, ledger.archivedPath)) === proof.sha256 && canonical(parseJson(readLocal(root, ledger.archivedPath), proof.path)) === canonical(proof.record), 'Archived reconciliation paper trail is missing or changed');
|
|
318
338
|
requireValue(manifest.historical?.acceptanceRecordsReconciled === true, 'Archived reconciliation must remain visibly labeled');
|
|
@@ -343,14 +363,15 @@ function existingArchive(root, feature) {
|
|
|
343
363
|
}
|
|
344
364
|
|
|
345
365
|
export function previewArchiveFeature({ root = process.cwd(), feature, phase, attestation, reconciliation: reconciliationPath }) {
|
|
346
|
-
|
|
366
|
+
const name = featureName(feature);
|
|
347
367
|
requireValue(phase === 'session-end', 'Archive is allowed only during phase=session-end');
|
|
348
|
-
const
|
|
368
|
+
const folder = resolveFolder(root, name);
|
|
369
|
+
const source = featurePath(root, folder), destination = archivePath(root, folder);
|
|
349
370
|
const parsedAttestation = parseAttestation(root, attestation);
|
|
350
371
|
if (existsSync(projectTarget(root, destination))) {
|
|
351
372
|
requireValue(!existsSync(projectTarget(root, source)), `Archive destination already exists while live source remains: ${destination}`);
|
|
352
|
-
const existing = existingArchive(root,
|
|
353
|
-
return { schemaVersion: 1, feature, phase, source, destination, attestation: parsedAttestation, existing: true, manifest: existing.manifestPath, historical: existing.manifest.historical };
|
|
373
|
+
const existing = existingArchive(root, folder);
|
|
374
|
+
return { schemaVersion: 1, feature: existing.manifest.feature, phase, source, destination, attestation: parsedAttestation, existing: true, manifest: existing.manifestPath, historical: existing.manifest.historical };
|
|
354
375
|
}
|
|
355
376
|
plainDirectory(root, source);
|
|
356
377
|
const queuePath = `${source}/specs/.joycraft-spec-queue.json`;
|
|
@@ -367,8 +388,10 @@ export function previewArchiveFeature({ root = process.cwd(), feature, phase, at
|
|
|
367
388
|
requireValue(queues.length === 1 && queues[0] === queuePath, `Unexpected alternate queue in feature archive: ${queues.filter(item => item !== queuePath).join(', ') || 'missing canonical queue'}`);
|
|
368
389
|
requireValue(!existsSync(localPath(root, `${source}/specs/.joycraft-completion.pending.json`, true)), 'A pending completion journal blocks archival; recover it first');
|
|
369
390
|
const queue = parseJson(readLocal(root, queuePath), queuePath);
|
|
370
|
-
|
|
371
|
-
|
|
391
|
+
// The queue's feature stays the identity of the record; the folder only locates it.
|
|
392
|
+
requireValue(typeof queue.feature === 'string' && featureFolderMatches(folder, queue.feature), `Queue feature does not match its folder ${source}: name the folder for the feature (${queue.feature}), optionally after a YYYY-MM-DD- date`);
|
|
393
|
+
feature = queue.feature;
|
|
394
|
+
const reconciliation = readReconciliation(root, source, feature, reconciliationPath);
|
|
372
395
|
const evidence = [];
|
|
373
396
|
for (const item of queue.specs ?? []) {
|
|
374
397
|
const state = readQueue({ root, queuePath, specId: item.id, criteria: item?.ownerAcceptance?.legacy !== true });
|
|
@@ -428,7 +451,7 @@ export function archiveFeature(options) {
|
|
|
428
451
|
// Revalidate every input immediately before changing paths, so a preview cannot race a writer.
|
|
429
452
|
const fresh = previewArchiveFeature({ ...options, root, apply: false });
|
|
430
453
|
requireValue(canonical({ ...plan, attestation: undefined }) === canonical({ ...fresh, attestation: undefined }), 'Archive inputs changed after preview; rerun the session-end preflight');
|
|
431
|
-
const stage = `${workPaths(root).archive}/.${plan.
|
|
454
|
+
const stage = `${workPaths(root).archive}/.${path.posix.basename(plan.destination)}.staging-${process.pid}-${Date.now()}`;
|
|
432
455
|
const stageLocal = projectTarget(root, stage), destinationLocal = projectTarget(root, plan.destination), sourceLocal = localDirectory(root, plan.source);
|
|
433
456
|
requireValue(!existsSync(stageLocal) && !existsSync(destinationLocal), 'Archive collision detected before move');
|
|
434
457
|
mkdirSync(stageLocal, { recursive: true, mode: 0o700 });
|
|
@@ -482,7 +505,7 @@ function runAfterArchive(root, plan) {
|
|
|
482
505
|
|
|
483
506
|
function argumentsFor(argv) {
|
|
484
507
|
const [command, ...args] = argv;
|
|
485
|
-
requireValue(command === 'archive', 'Usage: archive.mjs archive --feature <
|
|
508
|
+
requireValue(command === 'archive', 'Usage: archive.mjs archive --feature <feature or folder name> --phase session-end --attestation <path> [--reconciliation <path>] [--apply]');
|
|
486
509
|
const flags = {};
|
|
487
510
|
for (let index = 0; index < args.length; index += 1) {
|
|
488
511
|
if (args[index] === '--apply') { requireValue(flags['--apply'] === undefined, 'Duplicate --apply'); flags['--apply'] = true; continue; }
|
|
@@ -224,6 +224,9 @@ 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
|
+
/** Whether a feature folder is named for a queue feature: the feature, optionally after a YYYY-MM-DD- date. */
|
|
228
|
+
export const featureFolderMatches = (folder, feature) => folder === feature || (/^\d{4}-\d{2}-\d{2}-/.test(folder) && folder.slice(11) === feature);
|
|
229
|
+
|
|
227
230
|
/** `criteria: false` skips the criteria check, for a spec accepted as done before the gates. */
|
|
228
231
|
export function readQueue({ root = process.cwd(), queuePath, specId, criteria = true }) {
|
|
229
232
|
queuePath = relativePath(queuePath);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { existsSync, realpathSync } from 'node:fs';
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import { pathToFileURL } from 'node:url';
|
|
4
|
-
import {
|
|
4
|
+
import { workPaths } from './config.mjs';
|
|
5
|
+
import { briefDecisionRecords, featureFolderMatches, isObject, localPath, parseJson, readLocal, relativePath, validateQueue } from './identity.mjs';
|
|
5
6
|
|
|
6
7
|
// Before the first dispatch, find the queue gaps a program can decide, so each
|
|
7
8
|
// goes back to the brief as a question while the user is present. It reports;
|
|
@@ -276,7 +277,15 @@ export function checkQueue({ root = process.cwd(), queuePath }) {
|
|
|
276
277
|
}
|
|
277
278
|
|
|
278
279
|
const folder = path.posix.dirname(queuePath);
|
|
279
|
-
const
|
|
280
|
+
const featureFolder = path.posix.dirname(folder);
|
|
281
|
+
// Session-end archive finds a feature by its folder name, so a working queue
|
|
282
|
+
// whose folder is named for something else can never be archived.
|
|
283
|
+
let featuresHome = null;
|
|
284
|
+
try { featuresHome = workPaths(root).features; } catch { /* A broken joycraft.yaml is reported by config.mjs. */ }
|
|
285
|
+
if (queuePath === `${featuresHome}/${path.posix.basename(featureFolder)}/specs/.joycraft-spec-queue.json` && !featureFolderMatches(path.posix.basename(featureFolder), queue.feature)) {
|
|
286
|
+
gap('feature-folder', null, featureFolder, `has feature "${queue.feature}", but its folder is ${featureFolder}; session-end archive finds a feature only in a folder named ${queue.feature} or YYYY-MM-DD-${queue.feature}.`);
|
|
287
|
+
}
|
|
288
|
+
const briefPath = path.posix.join(featureFolder, 'brief.md');
|
|
280
289
|
const decisions = existsSync(localPath(root, briefPath, true)) ? briefDecisionRecords(readLocal(root, briefPath), briefPath) : [];
|
|
281
290
|
const open = decisions.filter(record => isObject(record) && record.status === 'open' && typeof record.id === 'string');
|
|
282
291
|
|
package/payload/PIN
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"source": "joycraft-prototype",
|
|
4
|
-
"tag": "field-
|
|
5
|
-
"commit": "
|
|
4
|
+
"tag": "field-24",
|
|
5
|
+
"commit": "637956d7e5a5a149551372f4826be474e8badc27",
|
|
6
6
|
"files": {
|
|
7
7
|
".agents/skills/joycraft-cleanup/SKILL.md": "99ce785e551be33412ac7a99ce44585a9b2be4440617caac273680383b4f7057",
|
|
8
8
|
".agents/skills/joycraft-context/SKILL.md": "8eb9374846b8f0d99280217b3fc73cfddac97d72f3ff6f3aca4a86af58dd8b85",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
".joycraft/assets/artifacts/transports.js": "318e97895468b47f07febc913d3a6e100b0ad19b78b3a4fc51bebc488e67c25d",
|
|
24
24
|
".joycraft/contracts/types.d.ts": "cdb96d320b216cd1a110d08580967958b14d2fcca98cc4b3c5aa29f03caa550c",
|
|
25
25
|
".joycraft/references/architecture.md": "4e225ba23ed72d3d7b1af9bfceeb708583eede79978c294724b917ad94674be9",
|
|
26
|
-
".joycraft/references/archive.md": "
|
|
26
|
+
".joycraft/references/archive.md": "fdaae382a94c15c10f390b123afe8354b84b1a3b54e65b328ac990a497456eaf",
|
|
27
27
|
".joycraft/references/artifacts.md": "7fab219f6d6d8b23ef3b44a509f637b085b551b34f28622d6dc1167a7f484c6a",
|
|
28
28
|
".joycraft/references/cleanup.md": "aa784c63442a289c67de359d82c78abca3aa8cab5b5e2d91fcd731b45c209003",
|
|
29
29
|
".joycraft/references/completion.md": "698e67984a959744f40bb0b221c953665d4558c046f4faea55dc6c7162e4cb0d",
|
|
@@ -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": "
|
|
44
|
+
".joycraft/runtime/archive.mjs": "d3ef01156a6801ea42df3129908b7aa354c447664f21cd75e28a940395a3b653",
|
|
45
45
|
".joycraft/runtime/artifacts/cli.mjs": "b3472857b6f8f680dc0d8a7be6495c502a430f5d0c47c88d44b42217e541b528",
|
|
46
46
|
".joycraft/runtime/artifacts/decisions.mjs": "e54fe173ca9050d495fd20b05aaedee8c918f3074553b6b7292cb40f500cbcb2",
|
|
47
47
|
".joycraft/runtime/artifacts/model.mjs": "1349e081d9ef24b0bbcc1e3d9b220d043917a51e89a3e1798950ed241c8ab41d",
|
|
@@ -60,9 +60,9 @@
|
|
|
60
60
|
".joycraft/runtime/dispatch-start.mjs": "fd3654e78cd5db9ada013ed95ea9259d53725e41bcee399ce2cb1a7d9e54a579",
|
|
61
61
|
".joycraft/runtime/evidence.mjs": "84d8465d5076bca250d78bab7be71328897a1648cd5d74a487c94f59e768f93f",
|
|
62
62
|
".joycraft/runtime/gate.mjs": "b6c65645f939a2b41adbad3c712683c3458385cea4de446707b95559e1bbcea3",
|
|
63
|
-
".joycraft/runtime/identity.mjs": "
|
|
63
|
+
".joycraft/runtime/identity.mjs": "87860a0fe61461b18a0fa4eb43f7c7e40bdd1540005dd0b45e377f298453a42c",
|
|
64
64
|
".joycraft/runtime/kickoff.mjs": "9d96998bff94662863182b9a922f26732c649b7a0b0130b6da7d63ec73eb3590",
|
|
65
|
-
".joycraft/runtime/queue-check.mjs": "
|
|
65
|
+
".joycraft/runtime/queue-check.mjs": "64d8bf1cb5fb5324af9c19ad90495c8fefea6651f69f242de02ddc39a8dd45c8",
|
|
66
66
|
".joycraft/runtime/redact.mjs": "cc8c0fe5e8d8fe78116ef126f6eee757a247739084e19c342bcf09a2b06524bc",
|
|
67
67
|
".joycraft/runtime/retro.mjs": "6f3664b0d50c12d4f2d8eef4b4d0d62897939d03e45860d4dcf35c0f5f92677c",
|
|
68
68
|
".joycraft/runtime/review-tools.json": "e0b0f5625654bba5f02d49710356aa1740fd42dd282eef6a29af361396915763",
|