@oevery/rsp 4.1.0 → 4.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 (129) hide show
  1. package/dist/{chunk-JO6NDJM4.mjs → chunk-AUZYUJ46.mjs} +62 -4
  2. package/dist/chunk-DNRGBQS7.mjs +108 -0
  3. package/dist/cli.mjs +16 -9
  4. package/dist/{client-EHRWH5Q7.mjs → client-U2PN3VS4.mjs} +1 -1
  5. package/dist/viewer/app.css +2 -2
  6. package/dist/viewer/app.js +169 -169
  7. package/dist/viewer/chunks/abnfDiagram-S7VZAUFO-K5EOZOEF.js +1 -0
  8. package/dist/viewer/chunks/architecture-WOLXFQ4H-UAT5D5BF.js +1 -0
  9. package/dist/viewer/chunks/architectureDiagram-YGSQEFNW-UNPSYM2L.js +36 -0
  10. package/dist/viewer/chunks/blockDiagram-APKKGZFW-2F7TTPAV.js +140 -0
  11. package/dist/viewer/chunks/bpmnIcons-APHXDYXF-ZWPFFN3O.js +1 -0
  12. package/dist/viewer/chunks/c4Diagram-KJ2TOQU5-KNLN6CME.js +38 -0
  13. package/dist/viewer/chunks/chunk-274PZN6B.js +1 -0
  14. package/dist/viewer/chunks/chunk-2VGDQLQD.js +1 -0
  15. package/dist/viewer/chunks/chunk-33XESOCS.js +1 -0
  16. package/dist/viewer/chunks/chunk-3ZSL2TGQ.js +1 -0
  17. package/dist/viewer/chunks/chunk-432I4U3B.js +1 -0
  18. package/dist/viewer/chunks/chunk-4PJNGS3V.js +1 -0
  19. package/dist/viewer/chunks/chunk-54NLSLTF.js +9 -0
  20. package/dist/viewer/chunks/chunk-6QRHYJ5Q.js +1 -0
  21. package/dist/viewer/chunks/chunk-6RCFKBVR.js +1 -0
  22. package/dist/viewer/chunks/chunk-6Y2HP7DC.js +213 -0
  23. package/dist/viewer/chunks/chunk-7MAT7NHP.js +1 -0
  24. package/dist/viewer/chunks/chunk-AKHBD6LT.js +2 -0
  25. package/dist/viewer/chunks/chunk-CZIM56BV.js +1 -0
  26. package/dist/viewer/chunks/chunk-DN4Y7LXJ.js +1 -0
  27. package/dist/viewer/chunks/chunk-E2UQN267.js +1 -0
  28. package/dist/viewer/chunks/chunk-GBARLDDT.js +1 -0
  29. package/dist/viewer/chunks/chunk-H4YEV7VR.js +1 -0
  30. package/dist/viewer/chunks/chunk-HUVVDQHZ.js +1 -0
  31. package/dist/viewer/chunks/chunk-IAKC32WV.js +72 -0
  32. package/dist/viewer/chunks/chunk-JTW4SY4L.js +1 -0
  33. package/dist/viewer/chunks/chunk-JZV675LF.js +1 -0
  34. package/dist/viewer/chunks/chunk-KDUDYTWO.js +1 -0
  35. package/dist/viewer/chunks/chunk-KHX3A5RZ.js +331 -0
  36. package/dist/viewer/chunks/chunk-KPXJJSUR.js +15 -0
  37. package/dist/viewer/chunks/chunk-LEGNM6PH.js +1 -0
  38. package/dist/viewer/chunks/chunk-LYY4ZY72.js +1 -0
  39. package/dist/viewer/chunks/chunk-MKDEK2LU.js +1 -0
  40. package/dist/viewer/chunks/chunk-MYJRFART.js +129 -0
  41. package/dist/viewer/chunks/chunk-NUXZBURC.js +1 -0
  42. package/dist/viewer/chunks/chunk-NXHT5I2L.js +1 -0
  43. package/dist/viewer/chunks/chunk-OF62XRVM.js +62 -0
  44. package/dist/viewer/chunks/chunk-ONCOEVBS.js +1 -0
  45. package/dist/viewer/chunks/chunk-P44SH3OO.js +1 -0
  46. package/dist/viewer/chunks/chunk-PDXKDBIX.js +1 -0
  47. package/dist/viewer/chunks/chunk-PHKIAKHS.js +1 -0
  48. package/dist/viewer/chunks/chunk-PJDMAGPE.js +2 -0
  49. package/dist/viewer/chunks/chunk-RC2NPHSX.js +88 -0
  50. package/dist/viewer/chunks/chunk-T6DM5RSK.js +10 -0
  51. package/dist/viewer/chunks/chunk-U5STX66M.js +2 -0
  52. package/dist/viewer/chunks/chunk-UIAJQPOF.js +1 -0
  53. package/dist/viewer/chunks/chunk-UX2S3LP3.js +1 -0
  54. package/dist/viewer/chunks/chunk-VEMTQQ7Y.js +2 -0
  55. package/dist/viewer/chunks/chunk-WKCPBR3C.js +1 -0
  56. package/dist/viewer/chunks/chunk-WMQ4Y2MS.js +32 -0
  57. package/dist/viewer/chunks/chunk-YPWIQAHX.js +3 -0
  58. package/dist/viewer/chunks/chunk-Z4ZDIMO2.js +136 -0
  59. package/dist/viewer/chunks/chunk-ZATQCNXH.js +1 -0
  60. package/dist/viewer/chunks/chunk-ZE5RDJX6.js +1 -0
  61. package/dist/viewer/chunks/chunk-ZO62R4L2.js +1 -0
  62. package/dist/viewer/chunks/classDiagram-v2-L25IHNXF-5F2M2CZ4.js +217 -0
  63. package/dist/viewer/chunks/cose-bilkent-JH36ORCC-S56HJ5WN.js +1 -0
  64. package/dist/viewer/chunks/cynefin-EF2NZ3EQ-6WY2NCLE.js +1 -0
  65. package/dist/viewer/chunks/cynefinDiagram-L36ESFBY-DE6PZNQA.js +62 -0
  66. package/dist/viewer/chunks/dagre-SPEB5RXH-QEOTKFV2.js +4 -0
  67. package/dist/viewer/chunks/diagram-3B7GL73J-RZPIU7FY.js +200 -0
  68. package/dist/viewer/chunks/diagram-DNEMPZML-YD26TJKC.js +24 -0
  69. package/dist/viewer/chunks/diagram-L3MUGCDN-TJUEX4QI.js +41 -0
  70. package/dist/viewer/chunks/diagram-LA4NIPWU-3PUQS6UW.js +24 -0
  71. package/dist/viewer/chunks/diagram-MHCOC4E2-YBTBD4PG.js +3 -0
  72. package/dist/viewer/chunks/diagram-XPFHEONP-VF2TQBNR.js +30 -0
  73. package/dist/viewer/chunks/ebnfDiagram-UZSYDL2S-QE7DIEME.js +1 -0
  74. package/dist/viewer/chunks/elk-XV6XMXQE-X5OZRIL3.js +27 -0
  75. package/dist/viewer/chunks/erDiagram-EYBAPDEH-5B2S7VB4.js +99 -0
  76. package/dist/viewer/chunks/eventmodeling-K75KTNOO-CHCQYZBI.js +1 -0
  77. package/dist/viewer/chunks/flowDiagram-MALGAFMO-XJFC5NTN.js +1 -0
  78. package/dist/viewer/chunks/ganttDiagram-23REXITY-TUUZ3QYO.js +292 -0
  79. package/dist/viewer/chunks/gitGraph-VSP46ZUC-VFZPJQ6A.js +1 -0
  80. package/dist/viewer/chunks/gitGraphDiagram-STJD7YCW-4CVV5LSH.js +106 -0
  81. package/dist/viewer/chunks/info-OHQRW6UA-P4744SJ6.js +1 -0
  82. package/dist/viewer/chunks/infoDiagram-KBXO4MBG-Q2WYYNNN.js +2 -0
  83. package/dist/viewer/chunks/ishikawaDiagram-M35NCXHK-PLQPTX2U.js +70 -0
  84. package/dist/viewer/chunks/journeyDiagram-OPLOXDXO-FB73RE6F.js +139 -0
  85. package/dist/viewer/chunks/kanban-definition-BZKZHSQY-6FU4TXYJ.js +89 -0
  86. package/dist/viewer/chunks/katex-IN4S3RHS.js +257 -0
  87. package/dist/viewer/chunks/mindmap-definition-I2QAS2VK-ZQ36ABVW.js +98 -0
  88. package/dist/viewer/chunks/packet-JDAUHWVQ-NYXIQQVA.js +1 -0
  89. package/dist/viewer/chunks/pegDiagram-FD4XPPHP-5XXVT6XN.js +1 -0
  90. package/dist/viewer/chunks/pie-XZMESJXO-32CUE6KZ.js +1 -0
  91. package/dist/viewer/chunks/pieDiagram-J4AKIIQI-WRTBDFM5.js +39 -0
  92. package/dist/viewer/chunks/quadrantDiagram-XTYBLID2-YPBDQIAK.js +7 -0
  93. package/dist/viewer/chunks/radar-ABXABTNO-272FILRO.js +1 -0
  94. package/dist/viewer/chunks/railroad-I3PHUGI6-6EGAH4XA.js +1 -0
  95. package/dist/viewer/chunks/railroad-abnf-LNEFI6M7-G6E7ATER.js +1 -0
  96. package/dist/viewer/chunks/railroad-ebnf-DWYD2UWJ-MR4P6BDR.js +1 -0
  97. package/dist/viewer/chunks/railroad-peg-JR7BVNR7-WXLQUGUO.js +1 -0
  98. package/dist/viewer/chunks/railroadDiagram-MRQ6NCDL-XHZQ2BLY.js +1 -0
  99. package/dist/viewer/chunks/requirementDiagram-Y7LWUY3S-W5FHRRML.js +84 -0
  100. package/dist/viewer/chunks/sankeyDiagram-WGJFYUXA-OJJIRVTI.js +40 -0
  101. package/dist/viewer/chunks/sequenceDiagram-5NDRBG5M-D6T4DRNG.js +169 -0
  102. package/dist/viewer/chunks/sizeCapture-INFHLROL-WL3FTUJX.js +1 -0
  103. package/dist/viewer/chunks/stateDiagram-v2-FJ4FJNEA-LAXL7KGG.js +291 -0
  104. package/dist/viewer/chunks/swimlanes-UMQ2AFYF-XIJBD726.js +1 -0
  105. package/dist/viewer/chunks/swimlanesDiagram-OMPLPG4O-7O7MHFW7.js +8 -0
  106. package/dist/viewer/chunks/timeline-definition-SEUHKTQE-BAZQA47I.js +120 -0
  107. package/dist/viewer/chunks/treeView-D4JQ5SDB-6YMDAAPA.js +1 -0
  108. package/dist/viewer/chunks/treemap-SAJKECNS-2X573PPS.js +1 -0
  109. package/dist/viewer/chunks/usecaseDiagram-AFA6YXN4-4YCEMWJB.js +370 -0
  110. package/dist/viewer/chunks/vennDiagram-NNMJR3RB-GEMROLAE.js +34 -0
  111. package/dist/viewer/chunks/wardley-7MLQ67FV-DGTGHYYC.js +1 -0
  112. package/dist/viewer/chunks/wardleyDiagram-S7YFUSEH-K4HVD3SS.js +78 -0
  113. package/dist/viewer/chunks/xychartDiagram-GGNKY7IX-HVLWCUEO.js +7 -0
  114. package/dist/viewer/mermaid.js +12 -0
  115. package/dist/viewer-build.json +1 -1
  116. package/dist/viewer-service.mjs +69 -13
  117. package/package.json +10 -9
  118. package/skills/rsp/SKILL.md +9 -7
  119. package/skills/rsp/references/closeout.md +4 -4
  120. package/skills/rsp/references/durable-review.md +6 -9
  121. package/skills/rsp/references/work-model.md +4 -4
  122. package/skills/rsp-commit/SKILL.md +2 -2
  123. package/skills/rsp-doc/SKILL.md +1 -1
  124. package/skills/rsp-implement/SKILL.md +1 -1
  125. package/skills/rsp-review/SKILL.md +6 -6
  126. package/skills/rsp-review/references/document-review.md +2 -2
  127. package/skills/rsp-shape/references/planning.md +2 -2
  128. package/skills/rsp-verify/SKILL.md +1 -1
  129. package/dist/chunk-U56XMIOO.mjs +0 -66
@@ -9,12 +9,13 @@ import {
9
9
  readProjectFile,
10
10
  readProjectRuntime,
11
11
  selectArchitecture
12
- } from "./chunk-JO6NDJM4.mjs";
12
+ } from "./chunk-AUZYUJ46.mjs";
13
13
  import {
14
14
  VIEWER_PROTOCOL,
15
15
  snapshotViewerRuntime,
16
+ viewerEntries,
16
17
  viewerRuntime
17
- } from "./chunk-U56XMIOO.mjs";
18
+ } from "./chunk-DNRGBQS7.mjs";
18
19
  import {
19
20
  readCurrentDocument
20
21
  } from "./chunk-LGDCIQYL.mjs";
@@ -161,7 +162,7 @@ async function renderDocument(root, model, file) {
161
162
  case "inlineCode":
162
163
  return `<code>${escape(node.value)}</code>`;
163
164
  case "code":
164
- return `<pre><code>${escape(node.value)}</code></pre>`;
165
+ return node.lang === "mermaid" ? `<figure data-rsp-mermaid><pre><code>${escape(node.value)}</code></pre></figure>` : `<pre><code>${escape(node.value)}</code></pre>`;
165
166
  case "blockquote":
166
167
  return `<blockquote>${children()}</blockquote>`;
167
168
  case "list":
@@ -184,6 +185,17 @@ async function renderDocument(root, model, file) {
184
185
  case "linkReference": {
185
186
  const value = node.type === "link" ? node.url : definitions.get(node.identifier.toLowerCase())?.url;
186
187
  const href = value === void 0 ? void 0 : url(value);
188
+ if (!href && value && !/^[a-z][\w+.-]*:|^[/\\#]/i.test(value)) {
189
+ try {
190
+ const target = posix.normalize(posix.join(posix.dirname(file), decodeURIComponent(value.split(/[?#]/)[0])));
191
+ if (permitted(model, target) && /\.(?:[cm]?[jt]sx?|vue|svelte|py|rs|go|java|kt|c|cpp|h|hpp|cs|sh|json|ya?ml|toml)$/i.test(target)) {
192
+ const fragment = new URL(value, "http://document.local/").hash;
193
+ const locator = `${target}${/^#L\d+(?:-L\d+)?$/.test(fragment) ? fragment : ""}`;
194
+ return `${children()} <button type="button" data-source-locator="${escape(locator)}"><span data-rsp-reading-status="copySource">Copy source path</span>: <code>${escape(locator)}</code></button>`;
195
+ }
196
+ } catch {
197
+ }
198
+ }
187
199
  return href ? `<a href="${href}" rel="noopener noreferrer"${/^https?:/i.test(href) ? ' target="_blank"' : ""}>${children()}</a>` : `${children()}<span data-rsp-reading-status="unavailableLink"> (unavailable link)</span>`;
188
200
  }
189
201
  case "image": {
@@ -229,6 +241,13 @@ async function layoutArchitecture(architecture, workspace, focus) {
229
241
  const targetName = (edge) => edge.source === edge.target && containers.has(edge.source) ? selfNames[edge.target] : needsReference(edge) || containers.has(edge.target) ? referenceNames[edge.target] : names[edge.target];
230
242
  const views = focus ? [{ id: "", title: `${nodeById.get(focus)?.title ?? focus} relationships`, node: "", include: [focus] }] : [{ id: "", title: "All registered nodes", node: "", include: architecture.nodes.map((node) => node.id) }, ...architecture.views];
231
243
  const viewNames = Object.fromEntries(views.map((view, index) => [view.id, `v${index}`]));
244
+ const scenarioViews = focus ? [] : architecture.views.filter((view) => view.scenario);
245
+ const scenarioNames = Object.fromEntries(scenarioViews.map((view, index) => [
246
+ view.id,
247
+ Object.fromEntries(view.scenario.participants.map((participant, role) => [`p${index}r${role}`, participant]))
248
+ ]));
249
+ const scenarioReferences = Object.fromEntries(Object.values(scenarioNames).flatMap((roles) => Object.entries(roles).map(([alias, participant]) => [alias, participant.node])));
250
+ const collaborationViews = Object.fromEntries(scenarioViews.map((view) => [view.id, `${viewNames[view.id]}c`]));
232
251
  viewNames[""] = "v0";
233
252
  const focusView = focus ? `v${views.length - 1}` : void 0;
234
253
  const relationTags = new Map(architecture.relations.map((edge, index) => [edge.id, `e${index}`]));
@@ -245,11 +264,38 @@ async function layoutArchitecture(architecture, workspace, focus) {
245
264
  return pipe(...diagramNodes.filter((node) => !node.parent).map(element), ...Object.entries(references).map(([alias, id]) => {
246
265
  const node = nodeById.get(id);
247
266
  return h.component(alias, { ...properties(node), title: `${node.title} (relationship reference)`, description: { txt: `Reference to ${node.id}. ${node.description}` } });
248
- }), ...architecture.relations.map((edge) => h.rel(sourceName(edge), targetName(edge), { kind: "relation", title: edge.type, tags: [relationTags.get(edge.id)], description: { txt: edge.description } })));
267
+ }), ...Object.values(scenarioNames).flatMap((roles) => Object.entries(roles).map(([alias, participant]) => h.component(alias, {
268
+ ...properties(nodeById.get(participant.node)),
269
+ title: participant.title ?? nodeById.get(participant.node).title,
270
+ description: { txt: nodeById.get(participant.node).title }
271
+ }))), ...architecture.relations.map((edge) => h.rel(sourceName(edge), targetName(edge), {
272
+ kind: "relation",
273
+ title: edge.label ?? edge.type,
274
+ tags: [relationTags.get(edge.id)],
275
+ description: { txt: edge.description },
276
+ ...edge.type === "return" ? { line: "dashed" } : edge.type === "event" ? { line: "dotted" } : {}
277
+ })));
249
278
  }).views((helpers, compose) => {
250
279
  const h = helpers;
251
280
  const pipe = compose;
252
- return pipe(...views.map((view, index) => {
281
+ return pipe(...views.flatMap((view, index) => {
282
+ const scenario = architecture.views.find((candidate) => candidate.id === view.id)?.scenario;
283
+ if (scenario) {
284
+ const roles = scenarioNames[view.id];
285
+ const aliasFor = (id) => Object.entries(roles).find(([, participant]) => participant.id === id)[0];
286
+ return ["sequence", "diagram"].map((variant) => h.dynamicView(variant === "sequence" ? viewNames[view.id] : collaborationViews[view.id], { title: view.title, variant }).with(
287
+ ...Object.keys(roles).map((alias2) => h.$include(alias2, { with: { size: "sm", padding: "xs", textSize: "sm" } })),
288
+ ...scenario.steps.map((step) => (builder2) => builder2.step({
289
+ source: aliasFor(step.source),
290
+ target: aliasFor(step.target),
291
+ astPath: step.id,
292
+ title: step.label,
293
+ description: { txt: step.description ?? step.type },
294
+ line: step.type === "return" ? "dashed" : step.type === "event" ? "dotted" : "solid",
295
+ ...step.type === "return" ? { isBackward: true } : step.type === "event" ? { head: "open" } : {}
296
+ }))
297
+ ));
298
+ }
253
299
  const isFocus = !!focus && index === views.length - 1;
254
300
  const projection = selectArchitecture(architecture, isFocus ? { kind: "focus", id: focus } : view.id ? { kind: "view", id: view.id } : { kind: "full" });
255
301
  const include = [...projection.visible].map((id) => names[id]);
@@ -268,8 +314,17 @@ async function layoutArchitecture(architecture, workspace, focus) {
268
314
  }));
269
315
  });
270
316
  const data = (await layoutLikeC4Model(builder.toLikeC4Model({ id: workspace }))).$data;
271
- const relationIds = Object.fromEntries(Object.values(data.relations).map((edge) => [edge.id, architecture.relations.find((item) => relationTags.get(item.id) === edge.tags?.[0]).id]));
272
- return { data, names, viewNames, references, relationIds, focusView };
317
+ const relationIds = Object.fromEntries(Object.values(data.relations).flatMap((edge) => {
318
+ const original = architecture.relations.find((item) => relationTags.get(item.id) === edge.tags?.[0]);
319
+ return original ? [[edge.id, original.id]] : [];
320
+ }));
321
+ const stepIds = Object.fromEntries(scenarioViews.flatMap(
322
+ (view) => [viewNames[view.id], collaborationViews[view.id]].map((alias) => {
323
+ const edges = data.views[alias].edges;
324
+ return [alias, Object.fromEntries(edges.map((edge) => [edge.id, edge.astPath]))];
325
+ })
326
+ ));
327
+ return { data, names, viewNames, references: { ...references, ...scenarioReferences }, relationIds, focusView, collaborationViews, scenarioNames, stepIds };
273
328
  }
274
329
 
275
330
  // src/viewer/workspaces.ts
@@ -443,11 +498,12 @@ async function createViewerService(options) {
443
498
  return;
444
499
  }
445
500
  if (url.pathname === "/") {
446
- send(200, "text/html; charset=utf-8", '<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>RSP Architecture</title><link rel="stylesheet" href="/app.css"></head><body><div id="root"></div><script type="module" src="/app.js"></script></body></html>');
501
+ send(200, "text/html; charset=utf-8", `<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>RSP Architecture</title><link rel="stylesheet" href="/${viewerEntries.style}"></head><body><div id="root"></div><script type="module" src="/${viewerEntries.app}"></script></body></html>`);
447
502
  return;
448
503
  }
449
- if (["/app.js", "/app.css"].includes(url.pathname)) {
450
- send(200, url.pathname.endsWith(".css") ? "text/css" : "text/javascript", runtime.assets.get(url.pathname));
504
+ const asset = runtime.assets.get(url.pathname);
505
+ if (asset) {
506
+ send(200, asset.type, asset.content);
451
507
  return;
452
508
  }
453
509
  if (!authorized(request.headers.authorization, options.readToken)) {
@@ -499,9 +555,9 @@ async function createViewerService(options) {
499
555
  json({ workspace: id, ...await renderDocument(workspace.root, workspace.model, file) });
500
556
  return;
501
557
  }
502
- const asset = await readAsset(workspace.root, workspace.model, file);
503
- response.setHeader("ETag", `"${asset.revision}"`);
504
- send(200, asset.type, asset.content);
558
+ const image = await readAsset(workspace.root, workspace.model, file);
559
+ response.setHeader("ETag", `"${image.revision}"`);
560
+ send(200, image.type, image.content);
505
561
  } catch (error) {
506
562
  send(409, "text/plain; charset=utf-8", error.message);
507
563
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@oevery/rsp",
3
3
  "type": "module",
4
- "version": "4.1.0",
4
+ "version": "4.2.0",
5
5
  "description": "RSP (Reliable Software Practice), a repository-native engineering workflow for humans and AI agents",
6
6
  "author": "oevery",
7
7
  "license": "MIT",
@@ -40,8 +40,8 @@
40
40
  "skills:package-check": "node scripts/skill-package-check.mjs",
41
41
  "prepublishOnly": "pnpm run release:check",
42
42
  "release": "release-it",
43
- "build": "tsup && node scripts/build-viewer.mjs",
44
- "dev": "tsup --watch",
43
+ "build": "node scripts/build.mjs",
44
+ "dev": "node scripts/dev.mjs",
45
45
  "docs:build": "vitepress build docs",
46
46
  "docs:check": "node scripts/docs-check.mjs",
47
47
  "doctor": "node dist/cli.mjs doctor",
@@ -82,7 +82,7 @@
82
82
  "@radix-ui/react-slot": "1.5.0",
83
83
  "@radix-ui/react-tooltip": "1.4.1",
84
84
  "@release-it/conventional-changelog": "12.0.2",
85
- "@tailwindcss/cli": "4.3.3",
85
+ "@tailwindcss/cli": "4.3.4",
86
86
  "@types/hast": "^3.0.5",
87
87
  "@types/mdast": "^4.0.4",
88
88
  "@types/node": "^22.20.1",
@@ -91,18 +91,19 @@
91
91
  "class-variance-authority": "0.7.1",
92
92
  "clsx": "2.1.1",
93
93
  "esbuild": "^0.28.2",
94
- "eslint": "^10.13.0",
94
+ "eslint": "^10.14.0",
95
95
  "ink-testing-library": "^4.0.0",
96
+ "mermaid": "12.3.0",
96
97
  "playwright-core": "1.64.1",
97
98
  "react-dom": "~19.3.1",
98
- "release-it": "21.1.1",
99
+ "release-it": "21.1.2",
99
100
  "smol-toml": "^1.9.1",
100
101
  "tailwind-merge": "3.7.0",
101
- "tailwindcss": "4.3.3",
102
+ "tailwindcss": "4.3.4",
102
103
  "tsup": "^9.0.0",
103
104
  "typescript": "^5.9.3",
104
105
  "vitepress": "^1.6.4",
105
- "vitest": "^5.0.5",
106
- "wrangler": "^4.151.3"
106
+ "vitest": "^5.1.0",
107
+ "wrangler": "4.157.0"
107
108
  }
108
109
  }
@@ -4,7 +4,7 @@ description: Coordinate authorized direct, Change or Group work; select capabili
4
4
  license: MIT
5
5
  metadata:
6
6
  author: oevery
7
- version: "2026.11.04.1"
7
+ version: "2026.11.06.1"
8
8
  ---
9
9
 
10
10
  # RSP Core
@@ -15,15 +15,17 @@ Carry the authorized request through execution, applicable evidence and needed k
15
15
 
16
16
  Before mutation, read nearest instructions and relevant CONTEXT; establish intent, authority and the existing owner from evidence. Use known paths and discover missing context as needed. An explicit WorkRef wins; multiple focus markers alone do not block work. Preserve dirty work and its owner. Before switching owners, check overlapping product and knowledge paths; overlap transfers no authority.
17
17
 
18
- - **Direct:** a clear bounded request needing no durable continuity. Create no Change and run no tracking preflight merely to execute it.
19
- - **Change:** one delivery/acceptance boundary needing sustained work or cross-session recovery. Read its six sections and relevant Specs; Focus is only a sparse recovery pointer.
18
+ - **Direct:** a local, explicit modification with a clear result and verification boundary. Interface changes, multiple files, strict checks or repeated execution alone require no Change or tracking preflight.
19
+ - **Change:** one delivery/acceptance boundary whose implementation needs a shared record of related behavior, responsibility, compatibility or acceptance decisions. Actual staged delivery, handoff or deferred obligations can also require this record. It need not span sessions or split into independently deliverable parts. Read its six sections and relevant Specs; Focus is only a sparse recovery pointer.
20
20
  - **Group:** independently acceptable/deliverable child Changes with dependencies or integration obligations. Read the Brief then select a child; the Brief is not executable work. File count, complexity and agent count alone do not create a Group.
21
21
 
22
+ Read-only advice, diagnosis and review create no implementation Change. Establish actual impact before selecting new work; reconsider when authorized scope materially expands, not for routine corrections or failed checks. Continue a matching existing owner only for the same outcome or remaining obligations; shared files or modules alone establish no ownership. A short plan or design discussion alone requires no Change. Preserve explicit user and project tracking requirements.
23
+
22
24
  Load the [work model](references/work-model.md) when tracked identities are missing from context; required tracking cannot be bypassed by relabelling work Direct. Use rsp status for needed owner, dependency or recovery facts, and JSON for exact dependency data. Required dependency checks and fresh archive readiness still apply.
23
25
 
24
26
  Use the CLI invocation selected by the project AGENTS entry; `rsp` in these Skills denotes that selection. Resolve needed settings through the selected CLI's successful `rsp config --json` summary. Reuse it until relevant drift or recovery; raw YAML is diagnostic only. Projection failure blocks choices depending on unknown settings, while independent authorized work continues.
25
27
 
26
- Select capabilities from their descriptions and the task contract. Executors load applicable methods and inspect sources; Core consults method details when needed for its own work or a concrete coordination question. Select the responsibility needed now:
28
+ Select capabilities from their descriptions and the task contract. Executors reuse applicable entrypoint and method text already in context, load missing or changed instructions, and inspect sources; Core consults method details when needed for its own work or a concrete coordination question. Select the responsibility needed now:
27
29
 
28
30
  - rsp-shape: bounded read-only design or authorized planning; reopen planning only for material unresolved choices.
29
31
  - rsp-implement: diagnosis, authorized implementation or accepted-finding correction, including ordinary own checks.
@@ -40,7 +42,7 @@ Implement owns ordinary self-checks. Main-agent inspection can assess results, b
40
42
 
41
43
  Reuse traceable observations, checks and reviews while their target, acceptance boundary and relevant inputs still apply. Changed code, dependencies, configuration, tools or environment invalidate affected evidence; role changes and delivery-scope confirmation alone do not. Include excluded worktree inputs when assessing a staged slice, and recognize behavior changes in normative Specs or executable Skills even when stored as Markdown.
42
44
 
43
- Check paths, diff, outcomes, omissions and evidence applicability. Reuse executor checks when applicable. Independent semantic review may use implementer test evidence; required independent execution must run. Preserve original evidence and verdicts with their existing owner; Change retains only applicable conclusions and material failure dispositions. Add no evidence ledger.
45
+ Check paths, diff, outcomes, omissions and evidence applicability. Reuse executor checks when applicable. Independent semantic review may use implementer test evidence; required independent execution must run. Preserve original evidence and verdicts with their existing owner; apply the current work record rules to Change summaries. Add no evidence ledger.
44
46
 
45
47
  For required correction/re-review, load [review convergence](references/coordination-review.md). Batch compatible findings into one correction, run covering checks, then review finding resolution and new risks in the correction. Stop for changed scope/authority, unsafe replay, missing required capability, non-convergence or no new discriminating evidence. Required failures remain incomplete.
46
48
 
@@ -56,9 +58,9 @@ Load [interruption recovery](references/coordination-recovery.md) for pause/resu
56
58
 
57
59
  ## Maintain records and prepare delivery
58
60
 
59
- During execution apply the [current work record rules](references/work-model.md#current-work-records), loading them when absent from context. Update affected Tasks/Verify directly when scope, contract, design and knowledge remain accurate; do not append attempts or postpone current-state corrections until archive. Use the same work model for Blockers syntax. Passing checks or recovery alone adds no whole-document rewrite. Focus supplies only missing recovery context, never acceptance or authority.
61
+ For tracked work, apply the [current work record rules](references/work-model.md#current-work-records) during execution. Load them only when absent from context. Update affected Tasks/Verify directly when scope, contract, design and knowledge remain accurate; do not append attempts or postpone current-state corrections until archive. Use the same work model for Blockers syntax. Passing checks or recovery alone adds no whole-document rewrite. Focus supplies only missing recovery context, never acceptance or authority.
60
62
 
61
- Ordinary completion and checkpoint commits leave Change open; a generic commit request does not establish final delivery. At established final delivery or an explicit close request, load [delivery closeout](references/closeout.md). workflow.closeout is ask (default), auto or manual; no setting grants Git, push, publication, deployment, approval or human acceptance authority.
63
+ Ordinary completion and checkpoint commits leave Change open. Before a tracked commit, inspect actual remaining Tasks: incomplete work selects a checkpoint; all Tasks complete selects [delivery closeout](references/closeout.md), even with missing or failed verification. Reuse an explicit applicable checkpoint or closure choice without asking again. Also load closeout for established final delivery or an explicit close request. workflow.closeout is ask (default), auto or manual; no setting grants Git, push, publication, deployment, approval or human acceptance authority.
62
64
 
63
65
  For necessary stable-knowledge updates, load [durable writeback](references/durable-review.md) to establish facts, update their owners and reconcile affected records. Final delivery or closure additionally requires whole-Change convergence and consistency checks. Reuse applicable evidence and fill missing or invalidated coverage and separately required review. Already-accurate records need no edit; current readiness is a lifecycle observation, not semantic acceptance.
64
66
 
@@ -1,16 +1,16 @@
1
1
  # Final delivery and lifecycle closeout
2
2
 
3
- Load for an established final-delivery boundary, an explicit close request, or a delivery question requiring checkpoint classification. Ordinary completion never activates closeout. A generic commit request defaults to a checkpoint unless final delivery is already established; checkpoints keep Change open and require only the authorized slice and applicable evidence.
3
+ Load for an established final-delivery boundary, an explicit close request, or a tracked commit whose Tasks are complete. Inspect actual remaining work and correct inaccurate records before classification. Task completion triggers a closure decision, not archive eligibility; missing or failed checks do not suppress the decision. Ordinary completion without a delivery request leaves work open. Reuse an explicit applicable checkpoint or closure choice. Checkpoints keep Change open and require their own applicable evidence.
4
4
 
5
5
  ## Decide closure independently of Git
6
6
 
7
7
  Use the validated workflow.closeout setting from rsp config --json:
8
8
 
9
- - ask (default): prepare a concrete final boundary, applicable evidence and required knowledge/Change updates, then ask whether to close before terminal staging. Reuse explicit closure authority already granted; do not ask twice.
10
- - auto: close eligible work at established final delivery without another closure request, subject to nearer denial.
9
+ - ask (default): inspect the concrete boundary, existing evidence and specific gaps, then ask before staging whether to finish necessary checks and records, archive when eligible and commit if authorized, or make only an eligible checkpoint and leave work open. Do not require every check or final-record update before asking. A selected conditional closeout authorizes its necessary preparation and eligible archive; do not ask again when gates pass.
10
+ - auto: prepare closeout for a completed-task delivery or established final delivery and close only eligible work, subject to nearer denial.
11
11
  - manual: close only on an explicit close request. Authorized final commits may leave work open and must report that fact.
12
12
 
13
- Explicit refusal keeps work open. A decision to leave it open does not block an otherwise authorized commit. Neither policy, readiness nor archive grants Git authority. An explicit standalone close request can close eligible work without a commit. Do not interpret finishing implementation, a pass, a successor task or elapsed time as final delivery.
13
+ Explicit refusal keeps work open. A decision to leave it open does not block an otherwise authorized, verified commit. Neither policy, readiness nor archive grants Git authority. An explicit standalone close request can close eligible work without a commit. A pass, a successor task or elapsed time alone selects no closure. After closeout is selected, resolve failures within existing authority; if blocked, report the gap without silently falling back to a checkpoint commit.
14
14
 
15
15
  ## Reconcile the final boundary
16
16
 
@@ -21,10 +21,10 @@ If inspection reports only `RSP project requires an update` without update autho
21
21
  Apply this sequence only for established final delivery or preparation/audit of closure. Routine knowledge updates use the bounded writeback above.
22
22
 
23
23
  1. **Verify outcome facts.** Establish the approved delivered result from current implementation, authoritative contracts and decisive evidence. Distinguish passed, failed, unverified and superseded conclusions. This establishes truth, not a preliminary full-document rewrite; plans and recovery notes alone cannot establish current facts.
24
- 2. **Distill Focus as needed.** Integrate only verified outcomes, evidence applicability or material limits missing from Change; no useful addition means no edit. Resolve or safely transfer outstanding recovery obligations before discarding their notes. Recovery state alone supplies no required acceptance evidence.
24
+ 2. **Distill Focus as needed.** Integrate only verified outcomes, evidence applicability or material limits missing from Change; no useful addition means no edit. Resolve or safely transfer outstanding recovery obligations before discarding their notes. Recovery state alone supplies no required acceptance evidence; clearing Focus cannot substitute for knowledge writeback.
25
25
  3. **Write back knowledge as needed.** Using the verified result and Change delta, decide current facts and lasting rationale independently using the methods below. Update existing owners only when justified. No stable change means no edit; a delivered contract that leaves its authoritative Spec stale requires correction before closeout. Do not copy the whole Change or its verification history into knowledge documents.
26
- 4. **Converge the whole Change.** After necessary writeback, use `rsp-doc`'s artifact method to reconcile all six sections under the [current work record rules](work-model.md#current-work-records). Retain the delivered delta, relevant design and result comparisons, applicable scoped evidence, material failure dispositions/limits and knowledge-update references; leave already-converged text unchanged. Remove obsolete plans and duplicate or misplaced content without moving history into a new report or Focus. Group integration conclusions stay in the Brief. Without Doc, perform the same bounded convergence locally without installation or replacing required Review.
27
- 5. **Check final consistency, then archive when authorized.** Compare the final Change and knowledge owners with the verified result; an earlier review of another revision or a passing readiness command proves no text quality. Reuse applicable implementation/test evidence, check new knowledge/document edits, and fill only missing or invalidated coverage. Document-only writeback and archive preparation do not themselves invalidate code checks. Complete separately required Review before the archive gate below. Fix prose defects in scope, but return material contract or implementation contradictions to the decision, implementation or verification owner. Unresolved Required failures still block closeout.
26
+ 4. **Converge the whole Change.** After necessary writeback, use `rsp-doc`'s artifact method to reconcile all six sections under the [current work record rules](work-model.md#current-work-records), including Verify admission. Retain the delivered delta, relevant design and knowledge-update references; leave already-converged text unchanged. Remove obsolete plans and duplicate or misplaced content. Group integration conclusions stay in the Brief. Without Doc, perform the same bounded convergence locally without installation or replacing required Review.
27
+ 5. **Check final consistency.** Compare the final Change and knowledge owners with the verified result; an earlier review of another revision or a passing readiness command proves no text quality. Reuse applicable implementation/test evidence, check new knowledge/document edits, and fill only missing or invalidated coverage. Document-only writeback and archive preparation do not themselves invalidate code checks. Retain separately required Review as an unresolved obligation until its result is available. Fix prose defects in scope, but return material contract or implementation contradictions to the decision, implementation or verification owner. Return unresolved Required failures with the convergence result.
28
28
 
29
29
  These are dependency constraints, not persisted phases or mandatory separate tool calls. Edit only what needs writeback; required updates cannot be waived. Resolve stale statements from verified outcomes. Preserve settled planning, unrelated style and original evidence/verdict owners; add no no-op reports. Author checks establish no independent review.
30
30
 
@@ -75,10 +75,7 @@ Create or update a Decision Record only for a hard-to-reverse or surprising choi
75
75
 
76
76
  Never use generated indexes, archives, or the managed RSP block as ordinary writeback targets. Keep narrative history, debugging notes, task chronology, and transient evidence out of Specs and Decisions.
77
77
 
78
- ## Prepare the Change for archive
78
+ ## Return the convergence result
79
79
 
80
- Before archive, require the converged final Change, completed or unnecessary knowledge writeback, applicable passing verification, current readiness and every separately required Review clean. Authorized archive preserves Change and clears its Focus marker; clearing the Capsule cannot substitute for writeback. Archive grants no local commit authority.
81
-
82
- ## Deliver with explicit boundaries
83
-
84
- [Delivery closeout](closeout.md) owns checkpoint/final classification, the ask/auto/manual closure decision, Group-close sequence and exact Git handoff. Ordinary completion leaves work open. Apply the selected policy and current gates regardless of delegation. Git delivery separately needs explicit authority for one independently reviewable logical commit; closure grants none. Reuse applicable evidence.
80
+ Return the converged records and unresolved gaps to [delivery closeout](closeout.md),
81
+ which owns the closure decision, archive gates and Git handoff.
@@ -4,9 +4,9 @@ Read when selecting, reporting or operating a tracked RSP owner, or writing/revi
4
4
 
5
5
  ## Work shapes
6
6
 
7
- Direct work is a clear bounded request without durable continuity needs. Change retains one acceptance/delivery boundary for sustained work or recovery. Group coordinates independently acceptable/deliverable child Changes with dependencies or integration obligations. Complexity, file count and worker count alone select neither Group nor delegation. Agent topology is a separate execution choice.
7
+ Direct handles local explicit modifications. Change retains one acceptance/delivery boundary whose related implementation decisions or actual staged, handoff or deferred obligations need a shared record. Session duration, interface edits and strict verification alone do not select a Change; independent slices are not required. Group coordinates independently acceptable/deliverable child Changes with dependencies or integration obligations. Complexity, file count and worker count alone select neither Group nor delegation. Agent topology is a separate execution choice. Core owns selection and scope reassessment; existing ownership follows the same outcome or remaining obligations, not shared paths.
8
8
 
9
- Ordinary completion and checkpoint commits leave a Change open. Final delivery or an explicit close request uses the closeout policy; reopen is exceptional recovery, not the normal iteration path.
9
+ Ordinary completion and checkpoint commits leave a Change open. A tracked commit with completed Tasks, established final delivery or an explicit close request uses the closeout policy. Task completion triggers the decision even when verification remains incomplete; eligibility still gates archive. Reopen is exceptional recovery, not the normal iteration path.
10
10
 
11
11
  ## Identity and ownership
12
12
 
@@ -31,7 +31,7 @@ Use only the selected owner's relevant artifacts and authoritative project conte
31
31
  A Change retains six sections: Proposal, Spec, Design, Tasks, Verify and Blockers. During work it states the current authorized intent, approach and actual progress; at closeout it records the delivered outcome. Update affected content as facts change instead of appending rounds, dates or session summaries. Keep a date only when it matters to provenance or applicability. Record cleanup never authorizes dropping unmet scope or acceptance obligations.
32
32
 
33
33
  - **Tasks:** keep current checkable work and completion. Replace, split or merge tasks within authorized scope; reopen or rewrite invalidated results. Routine attempts, fixes, retries and individual check runs are not new tasks. Completion proves neither verification nor independent or human acceptance.
34
- - **Verify:** keep declared acceptance checks and their required/optional distinction, then retain only information needed to judge acceptance, evidence applicability or locate necessary evidence. Do not restate results already expressed by check items. Commands, counts, candidate/environment details and review steps belong here only when their omission would change those judgments or prevent that lookup; occurrence alone is no reason to retain them. Replace superseded conclusions only within their covered scope, preserve still-applicable reused evidence, and distinguish full review, correction-only re-review and human acceptance. Mark invalidated coverage incomplete. Keep shared evidence once and detailed execution/review records with their existing owner; no run history or debugging narrative.
34
+ - **Verify:** allow only Required/Optional checklists and an optional `### Conclusions` with short, non-nested bullets. No prose paragraphs, tables, logs or process subsections. Check applicable passes; uncheck failed, unrun or invalidated coverage. Revise check items when authorized scope or acceptance changes without dropping unmet obligations. An item may include a brief result or evidence locator, not repeated results, run counts or repair history. Conclusions hold only current acceptance limits, evidence applicability conditions or required failure dispositions that the checklist cannot express; one fact per bullet. Replace stale conclusions rather than append rounds. Preserve full-review, correction-only re-review and human-acceptance scope. Remove resolved findings unless they still affect acceptance, evidence reuse or required audit. Keep detailed evidence with its existing owner.
35
35
  - **Focus:** keep only additional context needed to resume safely or avoid costly repeated discovery; refer to Change state without maintaining a second task, verification or blocker list. The conditional [Focus method](focus-continuation.md) owns replacement and cleanup. Ordinary progress needs no snapshot.
36
36
 
37
- Keep decision rationale, useful before/after outcome comparisons and material failure dispositions with their existing owner. For resolved ordinary failures, remove the attempt narrative; preserve any effect on acceptance or evidence validity. Routine history stays in conversation and raw evidence with its existing owner. Removing stale prose does not delete reports, conversation or Git history, require a new log, or move discarded history into Focus or an appendix.
37
+ Keep decision rationale and useful outcome comparisons in their owning sections; they do not exempt Verify text from the admission rule above. Do not relocate discarded narration into another section, Focus, an appendix or a new report. Prose cleanup does not remove tests, raw evidence, reports, conversation or Git history.
@@ -4,7 +4,7 @@ description: Inspect or create one authorized exact-scope local commit for direc
4
4
  license: MIT
5
5
  metadata:
6
6
  author: oevery
7
- version: "2026.10.16.1"
7
+ version: "2026.11.06.1"
8
8
  ---
9
9
 
10
10
  # RSP Commit
@@ -36,7 +36,7 @@ Purpose is separate from kind:
36
36
  - A checkpoint keeps the Change open and delivers a verified current slice without claiming completed acceptance, closing an issue or requiring archive.
37
37
  - A terminal delivery claims completion only for its selected boundary. Tracked terminal inputs require complete Tasks, decisive Required Verify and no active blocker; legacy unclassified Verify is Required. Optional omissions remain explicit but do not block. Direct work uses its own acceptance, not an invented lifecycle gate.
38
38
 
39
- A generic commit request is a checkpoint unless final delivery is already established. For tracked final delivery, resolve the closure decision through [Core closeout](../rsp/references/closeout.md) before staging, including direct invocation; do not repeat an already settled decision. Commit pauses for its owning capability to perform necessary writing or authorized lifecycle work. Lifecycle authority stays upstream. If terminal delivery includes authorized archive or Group closeout, require that action and its inspected diff before staging. Do not archive, update Specs or clean up a Change inside Commit. A valid explicitly authorized local commit without lifecycle authority does not gain it or require an invented archive.
39
+ Before staging a tracked commit, inspect the selected owner's Tasks and actual remaining scope. Incomplete Tasks select a checkpoint; all Tasks complete selects [Core closeout](../rsp/references/closeout.md), even when Required checks or review are incomplete or failed. Generic commit wording must not bypass that decision. Reuse an explicit applicable checkpoint or closure choice; do not ask twice. For multiple included WorkRefs, assess their boundaries separately rather than infer Group completion. Commit pauses for its owning capability to correct stale records, perform necessary writing or authorized lifecycle work. If terminal delivery includes authorized archive or Group closeout, require that action and its inspected diff before staging. Do not archive, update Specs or clean up a Change inside Commit. A checkpoint still needs its own applicable verification; absent lifecycle authority neither grants closure nor prohibits an otherwise authorized checkpoint.
40
40
 
41
41
  ## Audit before staging
42
42
 
@@ -25,7 +25,7 @@ Write a grounded artifact usable without the author conversation. Use the artifa
25
25
  - README and procedures supply the starting point, prerequisites, actions and recognizable success. Concepts and decisions explain meanings, reasons, alternatives and consequences; references supply exact, navigable contracts.
26
26
  - CONTEXT defines vocabulary and relationships and directs readers to authoritative owners. Specs state what consumers may rely on, including conditions, failures and exceptions; add scenarios only to resolve ambiguity. Scoped operating instructions own commands, authority and required checks.
27
27
  - For architecture models or changes to their bound documents, use [architecture knowledge](../rsp/references/architecture.md) for synchronization and reference checks.
28
- - Before writing a Change, load the [current work record rules](../rsp/references/work-model.md#current-work-records) when absent from context; the same resource owns Blockers syntax. Keep its six sections current during iteration and reconcile the whole record for closeout. Readers must find the outcome, applicable evidence and remaining work without reconstructing attempts; preserve useful before/after results and decision reasons when removing chronology.
28
+ - Before writing a Change, load the [current work record rules](../rsp/references/work-model.md#current-work-records) when absent from context; the same resource owns Verify admission and Blockers syntax. Keep its six sections current during iteration and reconcile the whole record for closeout. Apply those rules to existing text as well as additions.
29
29
 
30
30
  ## Check facts and reading paths
31
31
 
@@ -79,7 +79,7 @@ After final mutation, establish minimum sufficient evidence for tracked Required
79
79
 
80
80
  - Reuse traceable passing results when the tested boundary and relevant code, dependencies, configuration, tools, inputs and environment still apply. Phase changes and unrelated edits do not invalidate evidence.
81
81
  - Run missing, failed or invalidated checks and risk-justified additions, including checks affected by integration. Named checks retain their method and coverage; explicit reruns and independent execution remain binding.
82
- - For an unfixed method, choose the cheapest decisive existing test, static check, build or acceptance evidence; a new test is not required.
82
+ - If no verification method is prescribed, choose the lowest-cost existing test, static check, build or other evidence that decisively establishes acceptance. A new test is not required.
83
83
  - Match the actual target, inputs, coverage and completion to the declared check. Invocation errors or incomplete observations do not by themselves prove a product defect. Record command, tested scope, result, source and omissions, distinguishing reused evidence from new execution. Failed, unavailable or untraceable evidence cannot establish completion.
84
84
 
85
85
  Before completion, apply the same admission criteria to retained tests. Remove disposable probes, fixtures and helpers that add no distinct future confidence unless retention is required by user, Change or project authority; establish sufficient evidence for the final retained state.
@@ -29,7 +29,7 @@ The user request fixes the requested outcome and allowed operations subject to n
29
29
 
30
30
  ## Select perspectives before loading
31
31
 
32
- Select methods from the judged content and its risks. Supporting references inform the judgment without becoming additional review targets. Respect narrower requested scope and reuse applicable instructions already in context.
32
+ Select methods from the judged content and its risks. Two perspectives require neither two reports nor two reviewers. Supporting references inform the judgment without becoming additional review targets. Respect narrower requested scope and reuse applicable instructions already in context.
33
33
 
34
34
  - **[Code](references/code-review.md):** behavior, contracts, safety and failures of executable content; also ownership, dependency and verification lenses for explicitly bounded structural discovery. Within change review, structural inspection stays with a concrete risk in the fixed boundary. A prose behavior claim alone can remain Document grounding.
35
35
  - **[Document](references/document-review.md):** factual explanation, usability, navigation and maintenance of reviewed content, including API/TSDoc comments, requirements and human- or agent-facing guidance.
@@ -39,11 +39,11 @@ When fixed reviewed artifacts include changelogs, release notes, migration guide
39
39
 
40
40
  ## Inspect the fixed scope
41
41
 
42
- Inspect checkout state and the selected diff or structural boundary, then authority, then the smallest behavior chain and evidence needed for the question. Match checks to each perspective, actual content and changed risk. Report a comment/implementation or example/contract discrepancy once, with evidence from both sides; presume neither correct. Stop when applicable judgments are supported. Do not broaden scope or execute snippets without authority.
42
+ Inspect checkout state and the selected diff or structural boundary, then authority, then the smallest behavior chain and evidence needed for the question. Report a comment/implementation or example/contract discrepancy once, with evidence from both sides; presume neither correct. Stop when applicable judgments are supported. Do not broaden scope or execute snippets without authority.
43
43
 
44
- When the reviewed scope affects modeled structure, responsibilities, dependencies or bindings, apply [architecture knowledge](../rsp/references/architecture.md) within that scope.
44
+ Reuse traceable check evidence while its tested scope and relevant code, dependencies, configuration, tools, inputs and environment still apply. Before running an authorized check, identify the evidence gap, invalidated result, changed risk or explicit execution requirement it addresses. Apply this selection to tests and non-test checks alike; low cost alone does not justify extra execution. Distinguish reused evidence from new observations.
45
45
 
46
- Reuse traceable test evidence while its tested scope and relevant code, dependencies, configuration, tools, inputs and environment still apply. Run authorized checks only for gaps, invalidated results, changed risk or explicitly required execution. Distinguish reused evidence from new observations.
46
+ When the reviewed scope affects modeled structure, responsibilities, dependencies or bindings, apply [architecture knowledge](../rsp/references/architecture.md) within that scope.
47
47
 
48
48
  For re-review, inspect the actual correction and affected behavior against the original scope, expanding within it for evidenced consequences. Earlier clean verdicts do not establish a changed target; unchanged tests need no rerun solely for a new judgment. Perform the requested semantic review: neither passing tests nor an implementer summary supplies that judgment or required independence.
49
49
 
@@ -53,7 +53,7 @@ Missing comparison or authority blocks dependent pipelines; other gaps follow th
53
53
 
54
54
  ## Report
55
55
 
56
- Responses follow explicit language instruction, personal instructions, then conversation language, never project artifact-language settings. Preserve paths, commands, identifiers, WorkOwner/WorkRefs, `P0`-`P3` and `issues_found | clean | skipped | blocked`; use localized narration with differing machine values as secondary exact tokens.
56
+ Responses follow explicit language instruction, personal instructions, then conversation language, never project artifact-language settings. Preserve paths, commands, identifiers, WorkOwner/WorkRefs and `P0`-`P3`; use localized narration with differing machine values as secondary exact tokens. Use `blocked | findings | clean` for the overall verdict. For per-file or per-perspective results, preserve the caller's required schema, including `issues_found` or `skipped` where specified.
57
57
 
58
58
  Preserve the information below without mandatory headings or one line per field. Use a compact report for a clean bounded review, omit empty Findings and unrelated no-op fields, and honor explicitly required formats:
59
59
 
@@ -62,7 +62,7 @@ Preserve the information below without mandatory headings or one line per field.
62
62
  - Coverage: each perspective's checked content, material omissions and unverified scope, including non-actionable gaps; distinguish reused evidence from new observations.
63
63
  - Verdict: `blocked | findings | clean`; give the next action only when an issue, blocker or requested follow-up remains. Do not repeat the findings or evidence.
64
64
 
65
- Use `clean` only for an applicable judgment with no actionable issue, `skipped` for an inapplicable perspective when the requested format requires it, and `blocked` when required scope, authority or decisive evidence is missing. Findings may establish a defect, an explicit-requirement violation, or an evidenced simplification; fewer lines alone, speculative impact and taste-only cleanup do not qualify. Do not invent a wrong-result bug for a supported simplification. Missing evidence alone is a coverage limit. Retain supported findings while blocking only affected judgments. Two perspectives require neither two reports nor two reviewers.
65
+ Use `clean` only for an applicable judgment with no actionable issue, `skipped` for an inapplicable perspective when the requested format requires it, and `blocked` when required scope, authority or decisive evidence is missing. Findings may establish a defect, an explicit-requirement violation, or an evidenced simplification; fewer lines alone, speculative impact and taste-only cleanup do not qualify. Do not invent a wrong-result bug for a supported simplification. Missing evidence alone is a coverage limit. Retain supported findings while blocking only affected judgments.
66
66
 
67
67
  Order findings by severity and path: P0 critical security/data/breakage risk; P1 normal-path contract failure; P2 meaningful edge/maintenance risk; P3 narrow actionable improvement. Assess findings by consequence and confidence, not lines removed or ease of correction.
68
68
 
@@ -17,9 +17,9 @@ Classify each document by its semantic role: requirement/Change, implementation
17
17
 
18
18
  Check ownership by meaning, not file shape. CONTEXT owns canonical terms, domain relationships, and navigation; AGENTS owns operating rules; README owns introduction and usage. Specs own current contracts and necessary constraints, including design-reference tables when they define normative evidence. Change Spec owns only the delta and acceptance; Design owns the approach, Tasks the work, and Verify the evidence. Decision Records own rationale. Short summaries and references are valid; parallel full definitions are not.
19
19
 
20
- Within fixed work-record scope, load the [current work record rules](../../rsp/references/work-model.md#current-work-records) when absent from context. Check that Tasks reflects current work, each Verify detail serves acceptance, applicability or necessary evidence lookup without repeating check results, and Focus contains only additional recovery context without a second state list or execution timeline. A record can still contain unnecessary execution detail without chronological headings. Preserve useful before/after comparisons, material failure dispositions and distinct review/acceptance boundaries. When judging blockers/readiness, compare actual impediments and the declaration with parsed state under the same work model. A claim of no blockers that parses as blocked is an inconsistency.
20
+ Within fixed work-record scope, load the [current work record rules](../../rsp/references/work-model.md#current-work-records) when absent from context. Check Tasks, Verify and Focus against their respective rules, including current limits and stale conclusions. Existing text has no exemption. When judging blockers/readiness, compare actual impediments and the declaration with parsed state under the same work model. A claim of no blockers that parses as blocked is an inconsistency.
21
21
 
22
- For closeout, inspect the final whole Change or archived artifact after needs-based writeback, not only added Verify lines or an earlier candidate. Check that any writeback uses verified results, necessary knowledge corrections are complete and the final Change reflects them without duplicating current specifications. Already-accurate knowledge needs no edit; required corrections cannot be waived. Whole-Change convergence removes stale operation permissions, attempt/session chronology and response-only handoff/readiness blocks while retaining the contract delta, material failures, version-bound results and evidence references. Return substantive inconsistencies to their owner; prose cleanup cannot resolve them. Do not hide failures, relabel reports or grant cleanup authority. CLI readiness cannot establish this semantic result.
22
+ For closeout, inspect the final whole Change or archived artifact after needs-based writeback, not only added Verify lines or an earlier candidate. Check that any writeback uses verified results, necessary knowledge corrections are complete and the final Change reflects them without duplicating current specifications. Already-accurate knowledge needs no edit; required corrections cannot be waived. Whole-Change convergence follows the current work record rules and removes stale operation permissions and response-only handoff/readiness blocks. Return substantive inconsistencies to their owner; prose cleanup cannot resolve them. Do not conceal unmet checks or limits, relabel reports or grant cleanup authority. CLI readiness cannot establish this semantic result.
23
23
 
24
24
  Specialized Spec headings and omitted unnecessary scenarios are not defects; scaffold hints are optional writing aids, not requirements or evidence. Material promises, decisions, and limits must remain visible outside comments. Do not request extra sections, tests, or bulk historical rewrites merely for template conformity.
25
25
 
@@ -16,7 +16,7 @@ Keep one observable outcome per Change:
16
16
  - `Spec`: settled contract delta and acceptance, referencing affected existing Specs rather than copying the baseline or inventing public promises;
17
17
  - `Design`: approach, responsibility boundaries, and necessary tradeoffs, not repeated requirements or tasks;
18
18
  - `Tasks`: current checkable work, with prescribed order only where correctness, safety, or migration requires it;
19
- - `Verify`: required/optional checks proving settled acceptance, not adding new public requirements; then applicable scoped results and gaps;
19
+ - `Verify`: settled acceptance evidence under the current work record rules below; do not introduce new public requirements;
20
20
  - `Blockers`: dependencies and decisions, or `none`.
21
21
 
22
22
  Keep the six sections; small changes need only proportionate content. Plain-prose HTML scaffold hints may remain or be removed; they guide writing, never supply requirements, evidence, or completed content. Resolve body placeholders and keep all material decisions visible outside comments.
@@ -35,7 +35,7 @@ A Change is ready only when:
35
35
  - product and mutation authority are settled;
36
36
  - affected boundaries and material constraints are known;
37
37
  - no hidden assumption can change implementation or acceptance;
38
- - Tasks are executable without performing them;
38
+ - Tasks are concrete enough for implementation to begin. Shaping does not execute them;
39
39
  - Verify proves the result without process chronology; Blockers are truthful;
40
40
  - one Change or a justified shallow Group is the smallest sufficient owner.
41
41
 
@@ -62,6 +62,6 @@ Long-running verification remains active while its boundary and stop conditions
62
62
 
63
63
  ## Stop and return
64
64
 
65
- Stop when evidence is missing, the environment is unavailable, the boundary changes or a required check cannot be observed. Use the caller's canonical stop reason only when supplied. For direct invocation, identify the missing input or changed boundary and the required next action; do not invent a completed verification result before the declared boundary is established.
65
+ Stop the affected verification if required evidence cannot be collected or observed, the required environment is unavailable, or the declared boundary changes. Use the caller's canonical stop reason only when supplied. For direct invocation, identify the missing input or changed boundary and the required next action; do not invent a completed verification result before the declared boundary is established.
66
66
 
67
67
  On cancellation, wait until the command or owned process is observed stopped before beginning conflicting work. Return the result, decisive evidence, omissions and next action to the caller or user. Retry only with new evidence and safe replay inside the declared boundary.
@@ -1,66 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- PKG_ROOT
4
- } from "./chunk-P3KO3GZW.mjs";
5
-
6
- // src/viewer/runtime.ts
7
- import { createHash } from "crypto";
8
- import { readdir, readFile, realpath } from "fs/promises";
9
- import { homedir } from "os";
10
- import { join, sep } from "path";
11
- var VIEWER_PROTOCOL = 1;
12
- async function viewerRuntime(installation = PKG_ROOT) {
13
- const root = await realpath(installation);
14
- const { version } = JSON.parse(await readFile(join(root, "package.json"), "utf8"));
15
- const build = (await readFile(join(root, "dist/viewer-build.json"), "utf8")).trim();
16
- const identity = createHash("sha256").update(JSON.stringify({ root, version, build, protocol: VIEWER_PROTOCOL })).digest("hex");
17
- const directory = join(homedir(), ".cache", "rsp", "viewer");
18
- return { root, version, build, identity, directory, recordPath: join(directory, `${identity}.json`), lockPath: join(directory, `${identity}.lock`) };
19
- }
20
- async function snapshotViewerRuntime(root, identity) {
21
- const runtime = await viewerRuntime(root);
22
- if (runtime.identity !== identity)
23
- throw new Error("Viewer build changed during startup; retry");
24
- const hash = createHash("sha256");
25
- const assets = /* @__PURE__ */ new Map();
26
- for (const file of (await readdir(join(root, "dist"), { recursive: true })).map((file2) => file2.split(sep).join("/")).sort()) {
27
- if (!/\.(?:mjs|js|css)$/.test(file))
28
- continue;
29
- const content = await readFile(join(root, "dist", file));
30
- hash.update(file).update(content);
31
- if (file === "viewer/app.js" || file === "viewer/app.css")
32
- assets.set(`/${file.slice("viewer/".length)}`, content);
33
- }
34
- if (hash.digest("hex") !== JSON.parse(runtime.build).identity || assets.size !== 2 || (await viewerRuntime(root)).identity !== identity) {
35
- throw new Error("Viewer assets do not match the startup build; rebuild or reinstall and retry");
36
- }
37
- return { version: runtime.version, assets };
38
- }
39
- async function serviceRequest(record, path, body, timeoutMs = 2500) {
40
- const response = await fetch(`http://127.0.0.1:${record.port}${path}`, { method: body === void 0 ? "GET" : "POST", headers: { Authorization: `Bearer ${record.adminToken}`, ...body === void 0 ? {} : { "Content-Type": "application/json" } }, ...body === void 0 ? {} : { body: JSON.stringify(body) }, signal: AbortSignal.timeout(timeoutMs) });
41
- if (!response.ok)
42
- throw new Error(await response.text());
43
- const result = await response.json();
44
- if (result.identity !== record.identity || result.protocol !== VIEWER_PROTOCOL)
45
- throw new Error("Viewer identity/protocol mismatch");
46
- return result;
47
- }
48
- async function discoverService(path, identity) {
49
- try {
50
- const record = JSON.parse(await readFile(path, "utf8"));
51
- if (record.identity !== identity || record.protocol !== VIEWER_PROTOCOL || !Number.isInteger(record.port) || record.port < 1 || record.port > 65535 || typeof record.adminToken !== "string")
52
- return null;
53
- await serviceRequest(record, "/control/status");
54
- return record;
55
- } catch {
56
- return null;
57
- }
58
- }
59
-
60
- export {
61
- VIEWER_PROTOCOL,
62
- viewerRuntime,
63
- snapshotViewerRuntime,
64
- serviceRequest,
65
- discoverService
66
- };