joycraft 1.1.2 → 1.2.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 (28) hide show
  1. package/dist/joycraft-release.json +1 -1
  2. package/package.json +3 -3
  3. package/payload/.agents/skills/joycraft-decompose/SKILL.md +5 -1
  4. package/payload/.agents/skills/joycraft-entry/SKILL.md +16 -0
  5. package/payload/.agents/skills/joycraft-implement/SKILL.md +16 -0
  6. package/payload/.agents/skills/joycraft-session-end/SKILL.md +1 -1
  7. package/payload/.agents/skills/joycraft-testing/SKILL.md +7 -5
  8. package/payload/.agents/skills/joycraft-ui-slice/SKILL.md +4 -3
  9. package/payload/.agents/skills/joycraft-verify/SKILL.md +1 -1
  10. package/payload/.claude/agents/joycraft-reviewer.md +7 -2
  11. package/payload/.joycraft/contracts/types.d.ts +22 -0
  12. package/payload/.joycraft/references/archive.md +4 -2
  13. package/payload/.joycraft/references/completion.md +55 -2
  14. package/payload/.joycraft/references/dispatch.md +12 -0
  15. package/payload/.joycraft/references/setup.md +36 -12
  16. package/payload/.joycraft/references/testing.md +14 -7
  17. package/payload/.joycraft/references/update.md +8 -0
  18. package/payload/.joycraft/references/workflow.md +3 -2
  19. package/payload/.joycraft/runtime/archive.mjs +19 -4
  20. package/payload/.joycraft/runtime/completion.mjs +210 -10
  21. package/payload/.joycraft/runtime/dispatch-preflight.mjs +16 -3
  22. package/payload/.joycraft/runtime/evidence.mjs +4 -0
  23. package/payload/.joycraft/runtime/identity.mjs +11 -0
  24. package/payload/.joycraft/runtime/review-tools.json +110 -30
  25. package/payload/.joycraft/runtime/review-tools.mjs +650 -126
  26. package/payload/.joycraft/runtime/status.mjs +1 -1
  27. package/payload/.joycraft/runtime/worktrees.mjs +1 -1
  28. package/payload/PIN +27 -27
@@ -1,8 +1,8 @@
1
- import { closeSync, existsSync, fsyncSync, mkdirSync, openSync, readFileSync, renameSync, unlinkSync, writeFileSync } from 'node:fs';
1
+ import { closeSync, existsSync, fsyncSync, lstatSync, mkdirSync, openSync, readFileSync, readdirSync, renameSync, unlinkSync, writeFileSync } from 'node:fs';
2
2
  import { randomUUID } from 'node:crypto';
3
3
  import path from 'node:path';
4
4
  import { pathToFileURL } from 'node:url';
5
- import { canonical, isObject, isSha256, localPath, nonempty, parseJson, readLocal, readQueue, relativePath, requireValue, sha256, snapshot, subjectIdentity, validateIndependentReview } from './identity.mjs';
5
+ import { briefDecisionRecords, canonical, isObject, isSha256, localPath, nonempty, parseJson, readLocal, readQueue, relativePath, requireValue, sha256, snapshot, subjectIdentity, validateIndependentReview } from './identity.mjs';
6
6
 
7
7
  export { snapshot } from './identity.mjs';
8
8
 
@@ -173,11 +173,11 @@ export async function complete({ root = process.cwd(), queuePath, specId, report
173
173
  const checked = await checkReport({ root, queuePath, specId, reportPath });
174
174
  const { report, acceptedReport } = checked;
175
175
  if (state.spec.status === 'done') {
176
- requireValue(state.spec.ownerAcceptance === undefined, 'Done spec has an owner acceptance; ordinary completion cannot relabel it as PASS');
176
+ requireValue(state.spec.ownerAcceptance === undefined && state.spec.waiver === undefined, 'Done spec has an owner acceptance or waiver; ordinary completion cannot relabel it as PASS');
177
177
  requireValue(canonical(state.spec.acceptedReport) === canonical(acceptedReport), 'Done spec already has a different accepted report; it cannot be silently replaced');
178
178
  return { status: 'done', unchanged: true, acceptedReport, implementationRevision: report.subject.implementationRevision };
179
179
  }
180
- requireValue(state.spec.acceptedReport === undefined && state.spec.ownerAcceptance === undefined, 'In-review spec already has completion metadata; reconcile its status before retrying');
180
+ requireValue(state.spec.acceptedReport === undefined && state.spec.ownerAcceptance === undefined && state.spec.waiver === undefined, 'In-review spec already has completion metadata; reconcile its status before retrying');
181
181
  await writeCompletion({
182
182
  root, queuePath, specId, state, metadataKey: 'acceptedReport', metadata: acceptedReport,
183
183
  stableFiles: [{ path: reportPath, sha256: acceptedReport.sha256, label: 'Report' }],
@@ -238,11 +238,11 @@ export async function acceptOwner({ root = process.cwd(), queuePath, specId, dec
238
238
  const evidenceErrors = await ownerEvidenceErrors(report, state.spec.verification.criteria);
239
239
  const ownerAcceptance = { path: decisionPath, sha256: sha256(decisionBytes) };
240
240
  if (state.spec.status === 'done') {
241
- requireValue(state.spec.acceptedReport === undefined, 'Done spec has an accepted PASS report; owner acceptance cannot replace it');
241
+ requireValue(state.spec.acceptedReport === undefined && state.spec.waiver === undefined, 'Done spec has an accepted PASS report or waiver; owner acceptance cannot replace it');
242
242
  requireValue(canonical(state.spec.ownerAcceptance) === canonical(ownerAcceptance), 'Done spec already has a different owner acceptance; it cannot be silently replaced');
243
243
  return { status: 'done', unchanged: true, ownerAcceptance, verdict: report.verdict, unresolved: report.unresolved, evidenceErrors, limitations: decision.limitations, implementationRevision: report.subject.implementationRevision };
244
244
  }
245
- requireValue(state.spec.acceptedReport === undefined && state.spec.ownerAcceptance === undefined, 'In-review spec already has completion metadata; reconcile its status before retrying');
245
+ requireValue(state.spec.acceptedReport === undefined && state.spec.ownerAcceptance === undefined && state.spec.waiver === undefined, 'In-review spec already has completion metadata; reconcile its status before retrying');
246
246
  await writeCompletion({
247
247
  root, queuePath, specId, state, metadataKey: 'ownerAcceptance', metadata: ownerAcceptance,
248
248
  stableFiles: [
@@ -257,16 +257,215 @@ export async function acceptOwner({ root = process.cwd(), queuePath, specId, dec
257
257
  return { status: 'done', unchanged: false, ownerAcceptance, verdict: report.verdict, unresolved: report.unresolved, evidenceErrors, limitations: decision.limitations, implementationRevision: report.subject.implementationRevision };
258
258
  }
259
259
 
260
+ const waiverCovers = ['no-review', 'tool-break'];
261
+
262
+ /** The feature folder holds the brief that quotes a waiver and the one waiver file itself. */
263
+ function featureBriefPath(queuePath) {
264
+ return path.posix.join(path.posix.dirname(path.posix.dirname(queuePath)), 'brief.md');
265
+ }
266
+
267
+ /** A feature has at most one waiver, at a fixed path beside its brief, so dispatch can find it. */
268
+ export function featureWaiverPath(queuePath) {
269
+ return path.posix.join(path.posix.dirname(path.posix.dirname(relativePath(queuePath))), 'waiver.json');
270
+ }
271
+
272
+ /**
273
+ * The feature's waiver file, or null when the feature has none. Dispatch and
274
+ * accept-waiver share this lookup. An unreadable waiver throws, so a broken
275
+ * file never silently allows review or completion.
276
+ */
277
+ export function readFeatureWaiver({ root = process.cwd(), queuePath }) {
278
+ const waiverPath = featureWaiverPath(queuePath);
279
+ if (!existsSync(path.join(root, waiverPath))) return null;
280
+ const bytes = readLocal(root, waiverPath);
281
+ return { path: waiverPath, bytes, waiver: parseJson(bytes, waiverPath) };
282
+ }
283
+
284
+ /**
285
+ * Decision block-review-dispatch: "skip review" means review never runs. A
286
+ * reviewer cannot be dispatched for a spec whose feature waiver covers
287
+ * no-review, so no FAIL review can exist for a spec that no-review completes.
288
+ */
289
+ export function assertReviewAllowed({ root = process.cwd(), queuePath }) {
290
+ let found;
291
+ try { found = readFeatureWaiver({ root, queuePath }); }
292
+ catch (error) { throw new Error(`Reviewer dispatch refused: the feature waiver ${featureWaiverPath(queuePath)} is unreadable (${error.message}); fix or remove it first`); }
293
+ if (found === null) return;
294
+ const covers = found.waiver?.covers;
295
+ requireValue(Array.isArray(covers), `Reviewer dispatch refused: the feature waiver ${found.path} has no covers list; fix or remove it first`);
296
+ requireValue(!covers.includes('no-review'), `Reviewer dispatch refused: the feature waiver ${found.path} covers no-review, so review never runs for this queue. Complete with accept-waiver, or remove no-review from the waiver before any review`);
297
+ }
298
+
299
+ /**
300
+ * A FeatureWaiver is the user's own words, given in one feature's interview and
301
+ * recorded in a clarified brief decision. Like owner acceptance, local JSON
302
+ * cannot prove a human said them; this validates only the record and its
303
+ * bindings. `checkSource: false` skips the brief checks for historical
304
+ * (archive) reads.
305
+ */
306
+ export function validateWaiver({ root = process.cwd(), waiver, waiverPath, state, checkSource = true }) {
307
+ waiverPath = relativePath(waiverPath);
308
+ requireValue(isObject(waiver) && waiver.schemaVersion === 1 && waiver.kind === 'feature-waiver', 'Feature waiver needs schemaVersion 1 and kind feature-waiver');
309
+ requireValue(Object.keys(waiver).every(key => ['schemaVersion', 'kind', 'queuePath', 'covers', 'instruction', 'decision', 'source', 'createdAt'].includes(key)), 'Feature waiver has unknown fields');
310
+ requireValue(nonempty(waiver.queuePath) && relativePath(waiver.queuePath) === state.queuePath, `Feature waiver is for another queue (${waiver.queuePath}); a waiver covers only its own feature's queue`);
311
+ requireValue(waiverPath === featureWaiverPath(state.queuePath), `Feature waiver must be the feature's one waiver file: ${featureWaiverPath(state.queuePath)}`);
312
+ requireValue(Array.isArray(waiver.covers) && waiver.covers.length > 0 && waiver.covers.every(item => waiverCovers.includes(item)) && new Set(waiver.covers).size === waiver.covers.length, `Feature waiver covers must be a nonempty subset of ${waiverCovers.join(', ')}`);
313
+ requireValue(nonempty(waiver.instruction), "Feature waiver needs the user's exact nonempty instruction");
314
+ requireValue(nonempty(waiver.decision) && /^[A-Za-z0-9_-]{1,100}$/.test(waiver.decision), 'Feature waiver needs the id of the brief decision that holds the user\'s words');
315
+ requireValue(nonempty(waiver.createdAt) && Number.isFinite(Date.parse(waiver.createdAt)), 'Feature waiver needs a valid createdAt timestamp');
316
+ requireValue(isObject(waiver.source) && nonempty(waiver.source.path) && isSha256(waiver.source.sha256), 'Feature waiver source must be a receipt of the brief with a SHA-256 digest');
317
+ const sourcePath = relativePath(waiver.source.path);
318
+ requireValue(sourcePath === featureBriefPath(state.queuePath), `Feature waiver source must be this feature's brief: ${featureBriefPath(state.queuePath)}`);
319
+ requireValue(waiverPath !== state.queuePath && waiverPath !== state.specPath && waiverPath !== sourcePath, 'Feature waiver must be separate from queue, spec and brief');
320
+ requireValue(!state.spec.verification.inputs.some(input => relativePath(input.path) === waiverPath), 'Feature waiver cannot be a verification input');
321
+ if (checkSource) {
322
+ const briefBytes = readLocal(root, sourcePath);
323
+ requireValue(sha256(briefBytes) === waiver.source.sha256, `Feature waiver source hash does not match ${sourcePath}`);
324
+ assertDecisionQuotes(briefBytes, sourcePath, waiver);
325
+ }
326
+ }
327
+
328
+ const words = text => text.trim().split(/\s+/).filter(Boolean);
329
+
330
+ /**
331
+ * The named decision must exist once in the brief, be settled (clarified or
332
+ * assigned, with an answer), and hold the instruction as a run of whole words
333
+ * of its note or answer. Whitespace, including line wraps, is normalized.
334
+ */
335
+ function assertDecisionQuotes(briefBytes, sourcePath, waiver) {
336
+ const records = briefDecisionRecords(briefBytes, sourcePath).filter(record => isObject(record) && record.id === waiver.decision);
337
+ requireValue(records.length === 1, `Feature waiver decision ${waiver.decision} is missing or ambiguous in ${sourcePath}`);
338
+ const [decision] = records;
339
+ const answered = typeof decision.answer === 'string' ? nonempty(decision.answer) : decision.answer !== null && decision.answer !== undefined;
340
+ requireValue(['clarified', 'assigned'].includes(decision.status) && answered, `Feature waiver decision ${waiver.decision} is not answered in ${sourcePath}`);
341
+ const quote = words(waiver.instruction);
342
+ requireValue(quote.length >= 3, 'Feature waiver instruction must be at least three of the user\'s words');
343
+ const holds = text => {
344
+ if (typeof text !== 'string') return false;
345
+ const spoken = words(text);
346
+ for (let start = 0; start + quote.length <= spoken.length; start++) if (quote.every((word, index) => spoken[start + index] === word)) return true;
347
+ return false;
348
+ };
349
+ requireValue(holds(decision.note) || holds(decision.answer), `Feature waiver instruction must appear as whole words in the note or answer of decision ${waiver.decision} in ${sourcePath}`);
350
+ }
351
+
352
+ const isFailing = report => report.verdict === 'FAIL' || (Array.isArray(report.flows) && report.flows.some(flow => Array.isArray(flow?.observations) && flow.observations.some(observation => observation?.result === 'FAIL')));
353
+
354
+ /**
355
+ * Every review report the runtime can see for this queue/spec: the dispatch
356
+ * report destination beside the queue, the rest of the feature folder, and
357
+ * local packets. Matching is by subject.queuePath and subject.specId.
358
+ */
359
+ export function visibleReports({ root = process.cwd(), queuePath, specId }) {
360
+ queuePath = relativePath(queuePath);
361
+ const found = [];
362
+ const scan = relative => {
363
+ const directory = path.join(root, relativePath(relative));
364
+ if (!existsSync(directory) || !lstatSync(directory).isDirectory()) return;
365
+ for (const name of readdirSync(directory).sort()) {
366
+ const child = path.posix.join(relative, name);
367
+ const stat = lstatSync(path.join(directory, name));
368
+ if (stat.isDirectory()) scan(child);
369
+ else if (stat.isFile() && name.endsWith('.json') && child !== queuePath) {
370
+ let value;
371
+ try { value = JSON.parse(readFileSync(path.join(directory, name), 'utf8')); } catch { continue; }
372
+ if (isObject(value) && 'verdict' in value && isObject(value.subject) && value.subject.queuePath === queuePath && value.subject.specId === specId) found.push({ path: child, report: value });
373
+ }
374
+ }
375
+ };
376
+ scan(path.posix.dirname(path.posix.dirname(queuePath)));
377
+ scan('.joycraft/local/packets');
378
+ return found;
379
+ }
380
+
381
+ /**
382
+ * Extra guard only. The enforcement is reviewer dispatch refusing a no-review
383
+ * queue (assertReviewAllowed), so no review should exist. A report found in the
384
+ * usual folders still refuses: no-review needs none, and a FAIL never passes.
385
+ */
386
+ function assertNoReviewBypass({ root, queuePath, specId, report }) {
387
+ const seen = visibleReports({ root, queuePath, specId });
388
+ const failing = seen.filter(item => isFailing(item.report) && (report === undefined || item.report.subject.identity === report.subject.identity));
389
+ requireValue(failing.length === 0, `A waiver never covers a FAIL: a FAIL review exists for this spec (${failing.map(item => item.path).join(', ')})`);
390
+ if (report === undefined) requireValue(seen.length === 0, `A review report exists for this spec (${seen.map(item => item.path).join(', ')}); no-review cannot skip it. Pass --report so the tool-break and FAIL rules apply`);
391
+ }
392
+
393
+ /** Fail closed on any FAIL, then allow only an UNVERIFIED report whose gaps are all tool breaks. */
394
+ export function validateWaivedReport({ waiver, report }) {
395
+ const observations = report.flows.flatMap(flow => flow.observations);
396
+ const failed = observations.filter(observation => observation.result === 'FAIL').length;
397
+ requireValue(report.verdict !== 'FAIL' && failed === 0, `A waiver never covers a FAIL: the report ${report.verdict === 'FAIL' ? 'verdict is FAIL' : `has ${failed} FAIL observation(s)`}`);
398
+ requireValue(report.verdict === 'UNVERIFIED', 'A waived report must be UNVERIFIED; a PASS report uses ordinary completion');
399
+ requireValue(waiver.covers.includes('tool-break'), 'Feature waiver does not cover tool-break, so it cannot complete a reviewed UNVERIFIED spec');
400
+ const uncaused = observations.filter(observation => observation.result !== 'PASS' && observation.cause !== 'tool-break').length;
401
+ requireValue(uncaused === 0, `Feature waiver covers only tool breaks: ${uncaused} non-PASS observation(s) lack cause: 'tool-break'`);
402
+ }
403
+
404
+ /**
405
+ * Complete an in-review spec under its feature's waiver. Without a report the
406
+ * waiver must cover no-review. With a report it must be current, independent,
407
+ * UNVERIFIED and gap-free except for tool breaks; it keeps its real verdict.
408
+ */
409
+ export async function acceptWaiver({ root = process.cwd(), queuePath, specId, waiverPath, reportPath }) {
410
+ queuePath = relativePath(queuePath);
411
+ waiverPath = relativePath(waiverPath);
412
+ assertNoJournal(root, queuePath);
413
+ const state = readQueue({ root, queuePath, specId });
414
+ requireValue(state.spec.status === 'in-review' || state.spec.status === 'done', 'Only an in-review spec can move to done');
415
+ requireValue(waiverPath === featureWaiverPath(queuePath), `Feature waiver must be the feature's one waiver file: ${featureWaiverPath(queuePath)}`);
416
+ const found = readFeatureWaiver({ root, queuePath });
417
+ requireValue(found !== null, `Feature waiver not found: ${waiverPath}`);
418
+ const { bytes: waiverBytes, waiver } = found;
419
+ validateWaiver({ root, waiver, waiverPath, state });
420
+ let report, reportBytes, evidenceErrors = [];
421
+ if (reportPath !== undefined) {
422
+ reportPath = relativePath(reportPath);
423
+ requireValue(reportPath !== waiverPath, 'Review report must be separate from the waiver');
424
+ reportBytes = readLocal(root, reportPath);
425
+ report = parseJson(reportBytes, reportPath);
426
+ validateReview({ root, report, state, reportPath, artifactPaths: [waiverPath] });
427
+ validateWaivedReport({ waiver, report });
428
+ evidenceErrors = await ownerEvidenceErrors(report, state.spec.verification.criteria);
429
+ } else requireValue(waiver.covers.includes('no-review'), 'Feature waiver does not cover no-review; supply the current UNVERIFIED report for a tool-break waiver');
430
+ assertNoReviewBypass({ root, queuePath, specId, report });
431
+ const receipt = { path: waiverPath, sha256: sha256(waiverBytes), ...(report ? { review: { path: reportPath, sha256: sha256(reportBytes) } } : {}) };
432
+ const result = { status: 'done', waiver: receipt, covers: waiver.covers, instruction: waiver.instruction, ...(report ? { verdict: report.verdict, unresolved: report.unresolved, evidenceErrors, implementationRevision: report.subject.implementationRevision } : { verdict: null }) };
433
+ if (state.spec.status === 'done') {
434
+ requireValue(state.spec.acceptedReport === undefined && state.spec.ownerAcceptance === undefined, 'Done spec has an accepted report or owner acceptance; a waiver cannot replace it');
435
+ requireValue(canonical(state.spec.waiver) === canonical(receipt), 'Done spec already has a different waiver; it cannot be silently replaced');
436
+ return { ...result, unchanged: true };
437
+ }
438
+ requireValue(state.spec.acceptedReport === undefined && state.spec.ownerAcceptance === undefined && state.spec.waiver === undefined, 'In-review spec already has completion metadata; reconcile its status before retrying');
439
+ await writeCompletion({
440
+ root, queuePath, specId, state, metadataKey: 'waiver', metadata: receipt,
441
+ stableFiles: [
442
+ { path: waiverPath, sha256: receipt.sha256, label: 'Feature waiver' },
443
+ { path: relativePath(waiver.source.path), sha256: waiver.source.sha256, label: 'Waiver source brief' },
444
+ ...(report ? [{ path: reportPath, sha256: sha256(reportBytes), label: 'Review report' }] : []),
445
+ ],
446
+ validate: currentState => {
447
+ validateWaiver({ root, waiver, waiverPath, state: currentState });
448
+ assertNoReviewBypass({ root, queuePath, specId, report });
449
+ if (report) {
450
+ validateReview({ root, report, state: currentState, reportPath, artifactPaths: [waiverPath] });
451
+ validateWaivedReport({ waiver, report });
452
+ }
453
+ },
454
+ });
455
+ return { ...result, unchanged: false };
456
+ }
457
+
260
458
  function argumentsFor(argv) {
261
459
  const [command, ...args] = argv;
262
- requireValue(['snapshot', 'scope', 'complete', 'finalize-review', 'accept-owner', 'recover'].includes(command), 'Usage: completion.mjs scope --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> | recover --queue <path>');
460
+ requireValue(['snapshot', 'scope', 'complete', 'finalize-review', 'accept-owner', 'accept-waiver', 'recover'].includes(command), 'Usage: completion.mjs scope --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>');
263
461
  const flags = {};
264
462
  for (let i = 0; i < args.length; i += 2) {
265
- requireValue(['--queue', '--spec', '--out', '--report', '--decision'].includes(args[i]) && nonempty(args[i + 1]) && flags[args[i]] === undefined, `Invalid or duplicate argument: ${args[i]}`);
463
+ requireValue(['--queue', '--spec', '--out', '--report', '--decision', '--waiver'].includes(args[i]) && nonempty(args[i + 1]) && flags[args[i]] === undefined, `Invalid or duplicate argument: ${args[i]}`);
266
464
  flags[args[i]] = args[i + 1];
267
465
  }
268
- const expected = command === 'recover' ? ['--queue'] : command === 'scope' ? ['--queue', '--spec'] : ['--queue', '--spec', command === 'snapshot' ? '--out' : command === 'accept-owner' ? '--decision' : '--report'];
269
- requireValue(Object.keys(flags).length === expected.length && expected.every(flag => flags[flag] !== undefined), `Missing or unexpected arguments for ${command}`);
466
+ const expected = command === 'recover' ? ['--queue'] : command === 'scope' ? ['--queue', '--spec'] : ['--queue', '--spec', command === 'snapshot' ? '--out' : command === 'accept-owner' ? '--decision' : command === 'accept-waiver' ? '--waiver' : '--report'];
467
+ const optional = command === 'accept-waiver' ? ['--report'] : [];
468
+ requireValue(expected.every(flag => flags[flag] !== undefined) && Object.keys(flags).every(flag => expected.includes(flag) || optional.includes(flag)), `Missing or unexpected arguments for ${command}`);
270
469
  if (command !== 'recover') requireValue(/^(?:0|[1-9]\d*)$/.test(flags['--spec']) && Number.isSafeInteger(Number(flags['--spec'])), 'Spec ID must be a nonnegative integer');
271
470
  return { command, flags };
272
471
  }
@@ -289,6 +488,7 @@ export async function main(argv = process.argv.slice(2)) {
289
488
  const current = snapshot({ root, queuePath, specId: Number(flags['--spec']) });
290
489
  result = { queuePath: current.queuePath, specId: current.specId, changeScope: current.binding?.changeScope ?? null };
291
490
  } else if (command === 'recover') result = recover({ root, queuePath });
491
+ else if (command === 'accept-waiver') result = await acceptWaiver({ root, queuePath, specId: Number(flags['--spec']), waiverPath: flags['--waiver'], reportPath: flags['--report'] });
292
492
  else if (command === 'accept-owner') result = await acceptOwner({ root, queuePath, specId: Number(flags['--spec']), decisionPath: flags['--decision'] });
293
493
  else result = await complete({ root, queuePath, specId: Number(flags['--spec']), reportPath: flags['--report'] });
294
494
  process.stdout.write(`${JSON.stringify(result, null, 2)}\n`);
@@ -4,7 +4,7 @@ import { constants } from 'node:fs';
4
4
  import path from 'node:path';
5
5
  import { pathToFileURL } from 'node:url';
6
6
  import { canonical, isObject, isSha256, nonempty, parseJson, readLocal, readQueue, relativePath, requireAbsent, requireValue, sha256, snapshot, validateNativeActor, validateQueue } from './identity.mjs';
7
- import { checkReport } from './completion.mjs';
7
+ import { assertReviewAllowed, checkReport } from './completion.mjs';
8
8
  import { reviewLoopSection } from './review-tools.mjs';
9
9
 
10
10
  const unknown = 'unknown';
@@ -84,6 +84,17 @@ export function assertImplementerDependenciesReady(root, sourceView, roles) {
84
84
  requireValue(pending.length === 0, `Implementer dispatch is blocked until dependencies are done: ${pending.join(', ')}`);
85
85
  }
86
86
 
87
+ /**
88
+ * Decision block-review-dispatch: a reviewer is never dispatched for a queue
89
+ * whose feature waiver covers no-review. Both the worker tree and the
90
+ * coordinator tree are checked, so an uncommitted waiver still blocks a
91
+ * reviewer in a linked worktree.
92
+ */
93
+ export function assertReviewerNotWaived(sourceView, roles, workspace) {
94
+ if (!roles.some(role => role.name === 'reviewer')) return;
95
+ for (const root of new Set([workspace.workerRoot, workspace.coordinatorRoot])) assertReviewAllowed({ root, queuePath: sourceView.queue.path });
96
+ }
97
+
87
98
  function attestWorkspace(workspace, workerRoot, roles, queueParallel) {
88
99
  const defaultAccess = roles.every(role => role.name === 'reviewer') ? 'read-only' : 'mutating';
89
100
  if (workspace === undefined) {
@@ -350,6 +361,7 @@ export function preflightDispatch(request, { availableCapabilities } = {}) {
350
361
  const sourceView = validateSourceView(root, request.delivery?.sourceView);
351
362
  assertImplementerDependenciesReady(root, sourceView, roles);
352
363
  const workspace = attestWorkspace(request.workspace, root, roles, queueRequestsParallel(root, sourceView));
364
+ assertReviewerNotWaived(sourceView, roles, workspace);
353
365
  const reportDestination = validateReportDestination(root, request.delivery?.reportDestination);
354
366
  rejectSharedSourceOverwrite(workspace, sourceView, reportDestination);
355
367
  const requiredCapabilities = validateClaims(request.claims, roles, reportDestination, availableCapabilities);
@@ -456,9 +468,10 @@ export function prepareDispatch({ workerRoot, coordinatorRoot, parallel, access,
456
468
  outputContract: { reportPath: reportDestination, schemaVersion: 1, completeWith: 'node .joycraft/runtime/completion.mjs finalize-review --queue <queue-path> --spec <id> --report <report-path>' },
457
469
  nativePrompt: role === 'reviewer' ? 'Read the listed files first. Review current raw sources and report observed evidence only. Do not infer an expected verdict or reasoning. Return the schema-v1 report at the declared report path.' : 'Read the listed files first. Implement only the current raw task sources. Do not certify acceptance; preserve planned missing inputs as work to create, then prepare an independent review after committing.',
458
470
  };
459
- // The project's recorded review-loop tools and commands, so workers use the same setup.
471
+ // The project's recorded review-loop tools and commands, so workers use the same setup, and this
472
+ // machine's own host tools from the git-ignored local record when it has one.
460
473
  const reviewLoop = reviewLoopSection(root);
461
- if (reviewLoop) packet.reviewLoop = { path: 'AGENTS.md', section: reviewLoop };
474
+ if (reviewLoop) packet.reviewLoop = reviewLoop;
462
475
  if (role === 'reviewer' && implementerActor !== undefined) {
463
476
  // The native host supplies this only after creating the reviewer. Do not
464
477
  // synthesize an actor record in a pre-dispatch packet.
@@ -87,6 +87,10 @@ export function validateEvidence(report, criteria) {
87
87
  if (!methods.has(observation.method)) fail(`${at} has an unsupported method`);
88
88
  if (!results.has(observation.result)) fail(`${at} has an unsupported result`);
89
89
  else if (observation.result !== 'PASS') fail(`${at} remains ${observation.result}`);
90
+ if (observation.cause !== undefined && observation.cause !== 'tool-break') fail(`${at} has an unsupported cause`);
91
+ else if (observation.cause === 'tool-break' && observation.result !== 'UNVERIFIED') {
92
+ fail(`${at}: cause 'tool-break' marks only an UNVERIFIED check, not ${String(observation.result)}`);
93
+ }
90
94
  if (!text(observation.actual)) fail(`${at} needs an actual observation`);
91
95
  if (observation.method === 'source' && observation.kind !== 'structural') {
92
96
  fail(`${at}: a source scan supports structural claims only`);
@@ -193,6 +193,16 @@ export function validateQueue(queue, { select } = {}) {
193
193
  requireValue(isObject(spec.ownerAcceptance) && isSha256(spec.ownerAcceptance.sha256), `Invalid owner acceptance for spec ${spec.id}`);
194
194
  relativePath(spec.ownerAcceptance.path);
195
195
  }
196
+ if (spec.waiver !== undefined) {
197
+ requireValue(spec.acceptedReport === undefined && spec.ownerAcceptance === undefined, `Spec ${spec.id} cannot have a waiver together with a PASS acceptance or owner acceptance`);
198
+ requireValue(isObject(spec.waiver) && isSha256(spec.waiver.sha256), `Invalid waiver for spec ${spec.id}`);
199
+ relativePath(spec.waiver.path);
200
+ requireValue(Object.keys(spec.waiver).every(key => ['path', 'sha256', 'review'].includes(key)), `Waiver for spec ${spec.id} has unknown fields`);
201
+ if (spec.waiver.review !== undefined) {
202
+ requireValue(isObject(spec.waiver.review) && isSha256(spec.waiver.review.sha256), `Invalid waived review receipt for spec ${spec.id}`);
203
+ relativePath(spec.waiver.review.path);
204
+ }
205
+ }
196
206
  }
197
207
  for (const spec of queue.specs) requireValue(spec.depends_on.every(id => ids.has(id)), `Unknown dependency for spec ${spec.id}`);
198
208
  }
@@ -236,6 +246,7 @@ function queueSpecRequirements(spec) {
236
246
  delete requirements.status;
237
247
  delete requirements.acceptedReport;
238
248
  delete requirements.ownerAcceptance;
249
+ delete requirements.waiver;
239
250
  return requirements;
240
251
  }
241
252
 
@@ -1,36 +1,116 @@
1
1
  {
2
- "schemaVersion": 1,
2
+ "schemaVersion": 2,
3
+ "canShow": ["picture", "structure", "interact", "request", "run"],
4
+ "detection": "Hints, not a limit. A hint with foundBy \"project\" is in use when the package declares one of its dependencies, holds one of its config files, or has a package script or CI step (.github/workflows, .gitlab-ci.yml) that matches its script pattern or uses one of its CI actions; a working tool fills its role, so another declared tool of that role plans no install. A hint with foundBy \"machine\" is present when one of its commands answers on PATH. hostTools are tools the active host reports (--host-tools). A category names the roles its review needs; any hint of that role and kind fills it. recommend names the hint to suggest only when nothing fills the role. A user-scope install with commands runs after the user's yes only when it marks sudo false and needs no licence or signIn; any other install is printed steps.",
3
5
  "categories": {
4
- "web": { "label": "Web app", "tools": ["playwright"], "ui": true },
5
- "ios": { "label": "iOS / macOS app", "tools": ["xcode", "ios-simulator"], "ui": true },
6
- "android": { "label": "Android app", "tools": ["android-sdk", "android-emulator"], "ui": true },
7
- "flutter": { "label": "Flutter app", "tools": ["flutter"], "ui": true, "mobile": true },
8
- "react-native": { "label": "React Native app", "tools": ["react-native-cli"], "ui": true, "mobile": true },
9
- "expo": { "label": "Expo app", "tools": ["expo-cli"], "ui": true, "mobile": true },
10
- "electron": { "label": "Electron / desktop app", "tools": ["playwright"], "ui": true },
11
- "api": { "label": "API / backend", "tools": ["test-runner", "curl"], "ui": false },
12
- "cli-library": { "label": "CLI / library", "tools": ["test-runner"], "ui": false }
13
- },
14
- "tools": {
15
- "playwright": { "label": "Playwright + Chromium", "scope": "project", "size": "about 150 MB with Chromium", "sudo": false,
16
- "hostAlternative": "browser", "evidence": "{exec} playwright test" },
17
- "xcode": { "label": "Xcode (xcodebuild)", "scope": "system", "size": "about 12 GB", "sudo": true,
18
- "steps": ["Install Xcode from the App Store and open it once", "Run `sudo xcodebuild -license accept` yourself"] },
19
- "ios-simulator": { "label": "iOS Simulator runtime", "scope": "system", "size": "about 8 GB", "sudo": false,
20
- "hostAlternative": "simulator", "steps": ["Run `xcodebuild -downloadPlatform iOS`, or Xcode > Settings > Components"],
21
- "evidence": "xcrun simctl io booted screenshot <file>" },
22
- "android-sdk": { "label": "Android SDK platform tools (adb)", "scope": "system", "size": "about 1 GB", "sudo": false,
23
- "steps": ["Install Android Studio, then SDK Manager > SDK Platform-Tools", "Accept the SDK licenses yourself"] },
24
- "android-emulator": { "label": "Android emulator image", "scope": "system", "size": "about 4 GB", "sudo": false,
25
- "steps": ["Android Studio > Device Manager > create a virtual device"], "evidence": "adb exec-out screencap -p > <file>" },
26
- "flutter": { "label": "Flutter SDK", "scope": "system", "size": "about 2 GB", "sudo": false,
27
- "steps": ["Install the Flutter SDK (https://docs.flutter.dev/get-started/install) and run `flutter doctor`"] },
28
- "react-native-cli": { "label": "React Native CLI", "scope": "project", "size": "a few MB", "sudo": false, "package": "react-native" },
29
- "expo-cli": { "label": "Expo CLI", "scope": "project", "size": "a few MB", "sudo": false, "package": "expo" },
30
- "test-runner": { "label": "Project test runner", "scope": "project", "size": "declared by the project", "sudo": false },
31
- "curl": { "label": "HTTP check (curl)", "scope": "system", "size": "built in on macOS", "sudo": false,
32
- "steps": ["Install curl with your system package manager"], "evidence": "curl -sS <url>" }
6
+ "web": { "label": "Web app", "ui": true, "needs": ["ui"], "recommend": { "ui": "playwright" } },
7
+ "ios": { "label": "iOS / macOS app", "ui": true, "needs": ["toolchain", "ui"], "recommend": { "toolchain": "xcode", "ui": "ios-simulator" } },
8
+ "android": { "label": "Android app", "ui": true, "needs": ["toolchain", "ui"], "recommend": { "toolchain": "android-sdk", "ui": "android-emulator" } },
9
+ "flutter": { "label": "Flutter app", "ui": true, "mobile": true, "needs": ["toolchain"], "recommend": { "toolchain": "flutter" } },
10
+ "react-native": { "label": "React Native app", "ui": true, "mobile": true, "needs": ["toolchain"], "recommend": { "toolchain": "react-native-cli" } },
11
+ "expo": { "label": "Expo app", "ui": true, "mobile": true, "needs": ["toolchain"], "recommend": { "toolchain": "expo-cli" } },
12
+ "electron": { "label": "Electron / desktop app", "ui": true, "needs": ["ui"], "recommend": { "ui": "playwright" } },
13
+ "api": { "label": "API / backend", "ui": false, "needs": ["tests", "request"], "recommend": { "tests": "test-runner", "request": "curl" } },
14
+ "cli-library": { "label": "CLI / library", "ui": false, "needs": ["tests"], "recommend": { "tests": "test-runner" } }
33
15
  },
16
+ "hints": [
17
+ { "id": "playwright", "label": "Playwright", "role": "ui", "kinds": ["web", "electron"], "foundBy": "project",
18
+ "detect": { "actions": ["microsoft/playwright-github-action"], "dependencies": ["@playwright/test", "playwright"], "configFiles": ["playwright.config.ts", "playwright.config.js", "playwright.config.mjs", "playwright.config.cjs"], "scripts": "\\bplaywright\\s+test\\b", "commands": [], "hostTools": [] },
19
+ "canShow": ["picture", "structure", "interact", "request", "run"], "evidence": "{exec} playwright test",
20
+ "install": { "label": "Playwright + Chromium", "scope": "project", "packages": ["@playwright/test"], "then": [["{exec}", "playwright", "install", "chromium"]], "size": "about 150 MB with Chromium", "sudo": false } },
21
+ { "id": "cypress", "label": "Cypress", "role": "ui", "kinds": ["web", "electron"], "foundBy": "project",
22
+ "detect": { "actions": ["cypress-io/github-action"], "dependencies": ["cypress"], "configFiles": ["cypress.config.ts", "cypress.config.js", "cypress.config.mjs", "cypress.config.cjs", "cypress.json"], "scripts": "\\bcypress\\s+(run|open)\\b", "commands": [], "hostTools": [] },
23
+ "canShow": ["picture", "structure", "interact", "request", "run"], "evidence": "{exec} cypress run",
24
+ "install": { "scope": "project", "packages": ["cypress"], "size": "about 500 MB with its Electron runtime", "sudo": false } },
25
+ { "id": "webdriverio", "label": "WebdriverIO", "role": "ui", "kinds": ["web", "electron", "ios", "android"], "foundBy": "project",
26
+ "detect": { "dependencies": ["@wdio/cli", "webdriverio"], "configFiles": ["wdio.conf.ts", "wdio.conf.js", "wdio.conf.mjs", "wdio.conf.cjs"], "scripts": "\\bwdio\\b", "commands": [], "hostTools": [] },
27
+ "canShow": ["picture", "structure", "interact", "run"], "evidence": "{exec} wdio run wdio.conf.js",
28
+ "install": { "scope": "project", "packages": ["@wdio/cli"], "size": "tens of MB plus a browser driver", "sudo": false } },
29
+ { "id": "puppeteer", "label": "Puppeteer", "role": "ui", "kinds": ["web"], "foundBy": "project",
30
+ "detect": { "dependencies": ["puppeteer", "puppeteer-core"], "configFiles": [".puppeteerrc.cjs", ".puppeteerrc.json", "puppeteer.config.js"], "scripts": "\\bpuppeteer\\b", "commands": [], "hostTools": [] },
31
+ "canShow": ["picture", "structure", "interact"], "evidence": "node <puppeteer script>",
32
+ "install": { "scope": "project", "packages": ["puppeteer"], "size": "about 170 MB with Chrome for Testing", "sudo": false } },
33
+ { "id": "selenium", "label": "Selenium WebDriver", "role": "ui", "kinds": ["web"], "foundBy": "project",
34
+ "detect": { "dependencies": ["selenium-webdriver"], "configFiles": [], "scripts": "\\bselenium\\b", "commands": [], "hostTools": [] },
35
+ "canShow": ["picture", "structure", "interact"], "evidence": "node <selenium script>",
36
+ "install": { "scope": "project", "packages": ["selenium-webdriver"], "size": "a few MB plus a browser driver", "sudo": false } },
37
+ { "id": "storybook-test-runner", "label": "Storybook test runner", "role": "ui", "kinds": ["web"], "foundBy": "project",
38
+ "detect": { "dependencies": ["@storybook/test-runner"], "configFiles": [], "scripts": "\\btest-storybook\\b", "commands": [], "hostTools": [] },
39
+ "canShow": ["picture", "structure", "interact", "run"], "evidence": "{exec} test-storybook",
40
+ "install": { "scope": "project", "packages": ["@storybook/test-runner"], "size": "uses Playwright browsers", "sudo": false } },
41
+ { "id": "playwright-cli", "label": "Playwright CLI", "role": "ui", "kinds": ["web"], "foundBy": "project",
42
+ "detect": { "dependencies": ["@playwright/cli"], "configFiles": [], "scripts": "\\bplaywright-cli\\b", "commands": [["playwright-cli", "--version"]], "hostTools": [] },
43
+ "canShow": ["picture", "structure", "interact"], "evidence": "playwright-cli screenshot <url>",
44
+ "install": { "scope": "user", "steps": ["Run `npm install -g @playwright/cli`"], "commands": [["npm", "install", "-g", "@playwright/cli"]], "size": "a few MB; uses Playwright browsers", "sudo": false } },
45
+ { "id": "agent-browser", "label": "agent-browser", "role": "ui", "kinds": ["web"], "foundBy": "project",
46
+ "detect": { "dependencies": ["agent-browser"], "configFiles": [], "scripts": "\\bagent-browser\\b", "commands": [["agent-browser", "--version"]], "hostTools": [] },
47
+ "canShow": ["picture", "structure", "interact"], "evidence": "agent-browser screenshot <url>",
48
+ "install": { "scope": "user", "steps": ["Run `npm install -g agent-browser`, then `agent-browser install` for its Chromium"], "commands": [["npm", "install", "-g", "agent-browser"], ["agent-browser", "install"]], "size": "about 150 MB with its Chromium", "sudo": false } },
49
+ { "id": "chrome-headless", "label": "Chrome headless", "role": "ui", "kinds": ["web"], "foundBy": "project",
50
+ "detect": { "dependencies": [], "configFiles": [], "scripts": "(chrome|chromium)[^\\n]*--headless", "commands": [["google-chrome", "--version"], ["google-chrome-stable", "--version"]], "hostTools": [] },
51
+ "canShow": ["picture", "structure"], "evidence": "google-chrome --headless --screenshot=<file> <url>",
52
+ "install": { "scope": "user", "steps": ["Install Google Chrome"], "size": "about 500 MB", "sudo": false } },
53
+ { "id": "host-browser", "label": "Host browser", "role": "ui", "kinds": ["web"], "foundBy": "host",
54
+ "detect": { "dependencies": [], "configFiles": [], "commands": [], "hostTools": ["browser"] },
55
+ "canShow": ["picture", "structure", "interact"], "evidence": "the host's browser tool",
56
+ "install": { "scope": "user", "steps": ["Use a host with a built-in browser tool"], "size": "none", "sudo": false } },
57
+ { "id": "maestro", "label": "Maestro", "role": "ui", "kinds": ["ios", "android", "flutter", "react-native", "expo"], "foundBy": "project",
58
+ "detect": { "actions": ["mobile-dev-inc/action-maestro-cloud"], "dependencies": [], "configFiles": [".maestro"], "scripts": "\\bmaestro\\s+test\\b", "commands": [["maestro", "--version"]], "hostTools": [] },
59
+ "canShow": ["picture", "structure", "interact", "run"], "evidence": "maestro test .maestro",
60
+ "install": { "scope": "user", "steps": ["Install the Maestro CLI (https://maestro.mobile.dev)"], "size": "about 100 MB", "sudo": false } },
61
+ { "id": "detox", "label": "Detox", "role": "ui", "kinds": ["ios", "android", "react-native", "expo"], "foundBy": "project",
62
+ "detect": { "dependencies": ["detox"], "configFiles": [".detoxrc.js", ".detoxrc.json", ".detoxrc", "detox.config.js"], "scripts": "\\bdetox\\s+test\\b", "commands": [], "hostTools": [] },
63
+ "canShow": ["picture", "interact", "run"], "evidence": "{exec} detox test",
64
+ "install": { "scope": "project", "packages": ["detox"], "size": "a few MB plus a native build", "sudo": false } },
65
+ { "id": "appium", "label": "Appium", "role": "ui", "kinds": ["ios", "android"], "foundBy": "project",
66
+ "detect": { "dependencies": ["appium", "@wdio/appium-service"], "configFiles": [".appiumrc.json"], "scripts": "\\bappium\\b", "commands": [], "hostTools": [] },
67
+ "canShow": ["picture", "structure", "interact"], "evidence": "appium session screenshot",
68
+ "install": { "scope": "project", "packages": ["appium"], "size": "tens of MB plus platform drivers", "sudo": false } },
69
+ { "id": "ios-simulator", "label": "iOS Simulator runtime", "role": "ui", "kinds": ["ios"], "foundBy": "machine",
70
+ "detect": { "dependencies": [], "configFiles": [], "commands": [["xcrun", "simctl", "list", "runtimes"]], "match": "^iOS \\d", "hostTools": ["simulator"] },
71
+ "canShow": ["picture"], "evidence": "xcrun simctl io booted screenshot <file>",
72
+ "install": { "scope": "user", "steps": ["Run `xcodebuild -downloadPlatform iOS`, or Xcode > Settings > Components"], "size": "about 8 GB", "sudo": false } },
73
+ { "id": "android-emulator", "label": "Android emulator image", "role": "ui", "kinds": ["android"], "foundBy": "machine",
74
+ "detect": { "dependencies": [], "configFiles": [], "commands": [["emulator", "-list-avds"]], "match": "\\S", "hostTools": [] },
75
+ "canShow": ["picture"], "evidence": "adb exec-out screencap -p > <file>",
76
+ "install": { "scope": "user", "steps": ["Android Studio > Device Manager > create a virtual device"], "size": "about 4 GB", "sudo": false } },
77
+ { "id": "xcode", "label": "Xcode (xcodebuild)", "role": "toolchain", "kinds": ["ios"], "foundBy": "machine",
78
+ "detect": { "dependencies": [], "configFiles": [], "commands": [["xcodebuild", "-version"]], "hostTools": [] },
79
+ "canShow": ["run"], "evidence": null,
80
+ "install": { "scope": "user", "steps": ["Install Xcode from the App Store and open it once", "Run `sudo xcodebuild -license accept` yourself"], "size": "about 12 GB", "sudo": true, "licence": true, "signIn": true } },
81
+ { "id": "android-sdk", "label": "Android SDK platform tools (adb)", "role": "toolchain", "kinds": ["android"], "foundBy": "machine",
82
+ "detect": { "dependencies": [], "configFiles": [], "commands": [["adb", "version"]], "hostTools": [] },
83
+ "canShow": ["run"], "evidence": null,
84
+ "install": { "scope": "user", "steps": ["Install Android Studio, then SDK Manager > SDK Platform-Tools", "Accept the SDK licenses yourself"], "size": "about 1 GB", "sudo": false, "licence": true } },
85
+ { "id": "flutter", "label": "Flutter SDK", "role": "toolchain", "kinds": ["flutter"], "foundBy": "machine",
86
+ "detect": { "dependencies": [], "configFiles": [], "commands": [["flutter", "--version"]], "hostTools": [] },
87
+ "canShow": ["run"], "evidence": null,
88
+ "install": { "scope": "user", "steps": ["Install the Flutter SDK (https://docs.flutter.dev/get-started/install) and run `flutter doctor`"], "size": "about 2 GB", "sudo": false } },
89
+ { "id": "react-native-cli", "label": "React Native CLI", "role": "toolchain", "kinds": ["react-native"], "foundBy": "project",
90
+ "detect": { "dependencies": ["react-native"], "configFiles": [], "commands": [], "hostTools": [] },
91
+ "canShow": ["run"], "evidence": null,
92
+ "install": { "scope": "project", "packages": ["react-native"], "size": "a few MB", "sudo": false } },
93
+ { "id": "expo-cli", "label": "Expo CLI", "role": "toolchain", "kinds": ["expo"], "foundBy": "project",
94
+ "detect": { "dependencies": ["expo"], "configFiles": [], "commands": [], "hostTools": [] },
95
+ "canShow": ["run"], "evidence": null,
96
+ "install": { "scope": "project", "packages": ["expo"], "size": "a few MB", "sudo": false } },
97
+ { "id": "newman", "label": "Postman / Newman", "role": "request", "kinds": ["api"], "foundBy": "project",
98
+ "detect": { "actions": ["matt-ball/newman-action"], "dependencies": ["newman"], "configFiles": ["*.postman_collection.json"], "scripts": "\\bnewman\\s+run\\b", "commands": [["newman", "--version"]], "hostTools": [] },
99
+ "canShow": ["request", "run"], "evidence": "{exec} newman run <collection>",
100
+ "install": { "scope": "project", "packages": ["newman"], "size": "tens of MB", "sudo": false } },
101
+ { "id": "hurl", "label": "Hurl", "role": "request", "kinds": ["api"], "foundBy": "project",
102
+ "detect": { "dependencies": [], "configFiles": ["*.hurl"], "scripts": "\\bhurl\\b", "commands": [["hurl", "--version"]], "hostTools": [] },
103
+ "canShow": ["request", "run"], "evidence": "hurl --test <file>.hurl",
104
+ "install": { "scope": "user", "steps": ["Run `brew install hurl`, or install Hurl with your system package manager"], "commands": [["brew", "install", "hurl"]], "size": "a few MB", "sudo": false } },
105
+ { "id": "curl", "label": "HTTP check (curl)", "role": "request", "kinds": ["api"], "foundBy": "machine",
106
+ "detect": { "dependencies": [], "configFiles": [], "scripts": "\\bcurl\\s", "commands": [["curl", "--version"]], "hostTools": [] },
107
+ "canShow": ["request"], "evidence": "curl -sS <url>",
108
+ "install": { "scope": "user", "steps": ["Install curl with your system package manager"], "size": "built in on macOS", "sudo": false } },
109
+ { "id": "test-runner", "label": "Project test runner", "role": "tests", "kinds": ["api", "cli-library", "web", "electron", "ios", "android", "flutter", "react-native", "expo"], "foundBy": "project",
110
+ "detect": { "dependencies": [], "configFiles": [], "testCommand": true, "commands": [], "hostTools": [] }, "missingNote": "no test command declared",
111
+ "canShow": ["run"], "evidence": null,
112
+ "install": { "scope": "user", "steps": ["Declare a test command for this package"], "size": "declared by the project", "sudo": false } }
113
+ ],
34
114
  "optIn": {
35
115
  "doc-detective": { "label": "Doc Detective (docs as tests)", "scope": "project", "size": "several hundred MB with browsers and drivers (estimate)", "sudo": false,
36
116
  "license": "AGPL-3.0", "fits": "Docs that are step-by-step procedures: commands, API calls, UI clicks, links",