@warpgogol/forge 9.0.0 → 9.1.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 (383) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/bin/cli.ts +3 -2
  3. package/dist/bin/cli.js +3 -2
  4. package/dist/bin/cli.js.map +1 -1
  5. package/dist/os/agent/handlers/agent-tiers-validate.d.ts.map +1 -1
  6. package/dist/os/agent/handlers/agent-tiers-validate.js +5 -1
  7. package/dist/os/agent/handlers/agent-tiers-validate.js.map +1 -1
  8. package/dist/os/agent/index.d.ts.map +1 -1
  9. package/dist/os/agent/index.js +4 -0
  10. package/dist/os/agent/index.js.map +1 -1
  11. package/dist/os/authority/handlers/delegate.d.ts.map +1 -1
  12. package/dist/os/authority/handlers/delegate.js +2 -1
  13. package/dist/os/authority/handlers/delegate.js.map +1 -1
  14. package/dist/os/authority/index.d.ts.map +1 -1
  15. package/dist/os/authority/index.js +2 -1
  16. package/dist/os/authority/index.js.map +1 -1
  17. package/dist/os/checks/checks.module.d.ts.map +1 -1
  18. package/dist/os/checks/checks.module.js +5 -1
  19. package/dist/os/checks/checks.module.js.map +1 -1
  20. package/dist/os/checks/handlers/contribution-report.d.ts.map +1 -1
  21. package/dist/os/checks/handlers/contribution-report.js +5 -4
  22. package/dist/os/checks/handlers/contribution-report.js.map +1 -1
  23. package/dist/os/checks/handlers/counters-export.d.ts.map +1 -1
  24. package/dist/os/checks/handlers/counters-export.js +4 -0
  25. package/dist/os/checks/handlers/counters-export.js.map +1 -1
  26. package/dist/os/checks/handlers/counters-journal.d.ts.map +1 -1
  27. package/dist/os/checks/handlers/counters-journal.js +2 -1
  28. package/dist/os/checks/handlers/counters-journal.js.map +1 -1
  29. package/dist/os/checks/handlers/counters-validate.d.ts.map +1 -1
  30. package/dist/os/checks/handlers/counters-validate.js +5 -1
  31. package/dist/os/checks/handlers/counters-validate.js.map +1 -1
  32. package/dist/os/checks/index.d.ts.map +1 -1
  33. package/dist/os/checks/index.js +11 -0
  34. package/dist/os/checks/index.js.map +1 -1
  35. package/dist/os/compass/handlers/compass-docs-scaffold.js +1 -1
  36. package/dist/os/compass/handlers/compass-header-scaffold.d.ts.map +1 -1
  37. package/dist/os/compass/handlers/compass-header-scaffold.js +6 -1
  38. package/dist/os/compass/handlers/compass-header-scaffold.js.map +1 -1
  39. package/dist/os/compass/handlers/compass-invariants-generate.d.ts.map +1 -1
  40. package/dist/os/compass/handlers/compass-invariants-generate.js +3 -2
  41. package/dist/os/compass/handlers/compass-invariants-generate.js.map +1 -1
  42. package/dist/os/context/context.module.d.ts.map +1 -1
  43. package/dist/os/context/context.module.js +6 -1
  44. package/dist/os/context/context.module.js.map +1 -1
  45. package/dist/os/context/handlers/context-assemble.d.ts.map +1 -1
  46. package/dist/os/context/handlers/context-assemble.js +5 -1
  47. package/dist/os/context/handlers/context-assemble.js.map +1 -1
  48. package/dist/os/context/handlers/context-slate-eval.d.ts.map +1 -1
  49. package/dist/os/context/handlers/context-slate-eval.js +4 -0
  50. package/dist/os/context/handlers/context-slate-eval.js.map +1 -1
  51. package/dist/os/context/handlers/index-build.d.ts.map +1 -1
  52. package/dist/os/context/handlers/index-build.js +8 -5
  53. package/dist/os/context/handlers/index-build.js.map +1 -1
  54. package/dist/os/context/index.d.ts.map +1 -1
  55. package/dist/os/context/index.js +11 -0
  56. package/dist/os/context/index.js.map +1 -1
  57. package/dist/os/gate/handlers/gate-probe-catalog.d.ts.map +1 -1
  58. package/dist/os/gate/handlers/gate-probe-catalog.js +4 -0
  59. package/dist/os/gate/handlers/gate-probe-catalog.js.map +1 -1
  60. package/dist/os/gate/handlers/gate-probe.d.ts.map +1 -1
  61. package/dist/os/gate/handlers/gate-probe.js +4 -0
  62. package/dist/os/gate/handlers/gate-probe.js.map +1 -1
  63. package/dist/os/gate/index.d.ts.map +1 -1
  64. package/dist/os/gate/index.js +11 -0
  65. package/dist/os/gate/index.js.map +1 -1
  66. package/dist/os/instructions/instructions.module.d.ts.map +1 -1
  67. package/dist/os/instructions/instructions.module.js +2 -1
  68. package/dist/os/instructions/instructions.module.js.map +1 -1
  69. package/dist/os/knowledge/handlers/knowledge-authz-probe.d.ts.map +1 -1
  70. package/dist/os/knowledge/handlers/knowledge-authz-probe.js +7 -3
  71. package/dist/os/knowledge/handlers/knowledge-authz-probe.js.map +1 -1
  72. package/dist/os/knowledge/handlers/knowledge-conflicts-resolve.d.ts +11 -0
  73. package/dist/os/knowledge/handlers/knowledge-conflicts-resolve.d.ts.map +1 -0
  74. package/dist/os/knowledge/handlers/knowledge-conflicts-resolve.js +428 -0
  75. package/dist/os/knowledge/handlers/knowledge-conflicts-resolve.js.map +1 -0
  76. package/dist/os/knowledge/handlers/knowledge-rebuild.d.ts.map +1 -1
  77. package/dist/os/knowledge/handlers/knowledge-rebuild.js +4 -0
  78. package/dist/os/knowledge/handlers/knowledge-rebuild.js.map +1 -1
  79. package/dist/os/knowledge/index.d.ts +1 -0
  80. package/dist/os/knowledge/index.d.ts.map +1 -1
  81. package/dist/os/knowledge/index.js +13 -0
  82. package/dist/os/knowledge/index.js.map +1 -1
  83. package/dist/os/knowledge/knowledge.module.d.ts.map +1 -1
  84. package/dist/os/knowledge/knowledge.module.js +35 -1
  85. package/dist/os/knowledge/knowledge.module.js.map +1 -1
  86. package/dist/os/queue/manifest.d.ts.map +1 -1
  87. package/dist/os/queue/manifest.js +8 -7
  88. package/dist/os/queue/manifest.js.map +1 -1
  89. package/dist/os/resolver/resolver.module.d.ts.map +1 -1
  90. package/dist/os/resolver/resolver.module.js +2 -1
  91. package/dist/os/resolver/resolver.module.js.map +1 -1
  92. package/dist/os/rfc/handlers/implement-stamp-deviations.d.ts +1 -0
  93. package/dist/os/rfc/handlers/implement-stamp-deviations.d.ts.map +1 -1
  94. package/dist/os/rfc/handlers/implement-stamp-deviations.js +3 -0
  95. package/dist/os/rfc/handlers/implement-stamp-deviations.js.map +1 -1
  96. package/dist/os/rfc/handlers/implement-stamp-origin.d.ts.map +1 -1
  97. package/dist/os/rfc/handlers/implement-stamp-origin.js +10 -2
  98. package/dist/os/rfc/handlers/implement-stamp-origin.js.map +1 -1
  99. package/dist/os/rfc/handlers/implement-stamp-outcome.d.ts +2 -0
  100. package/dist/os/rfc/handlers/implement-stamp-outcome.d.ts.map +1 -1
  101. package/dist/os/rfc/handlers/implement-stamp-outcome.js +2 -0
  102. package/dist/os/rfc/handlers/implement-stamp-outcome.js.map +1 -1
  103. package/dist/os/rfc/handlers/implement-stamp.d.ts.map +1 -1
  104. package/dist/os/rfc/handlers/implement-stamp.js +176 -59
  105. package/dist/os/rfc/handlers/implement-stamp.js.map +1 -1
  106. package/dist/os/rfc/handlers/lifecycle.d.ts.map +1 -1
  107. package/dist/os/rfc/handlers/lifecycle.js +13 -6
  108. package/dist/os/rfc/handlers/lifecycle.js.map +1 -1
  109. package/dist/os/rfc/handlers/list-create.d.ts.map +1 -1
  110. package/dist/os/rfc/handlers/list-create.js +28 -2
  111. package/dist/os/rfc/handlers/list-create.js.map +1 -1
  112. package/dist/os/rfc/reachable-symbol.d.ts.map +1 -1
  113. package/dist/os/rfc/reachable-symbol.js +4 -2
  114. package/dist/os/rfc/reachable-symbol.js.map +1 -1
  115. package/dist/os/rfc/rfc.module.d.ts.map +1 -1
  116. package/dist/os/rfc/rfc.module.js +23 -7
  117. package/dist/os/rfc/rfc.module.js.map +1 -1
  118. package/dist/os/rfc/types.d.ts +22 -2
  119. package/dist/os/rfc/types.d.ts.map +1 -1
  120. package/dist/os/rfc/types.js +18 -2
  121. package/dist/os/rfc/types.js.map +1 -1
  122. package/dist/os/rfc/verifier/rfc-1391/support.d.ts.map +1 -1
  123. package/dist/os/rfc/verifier/rfc-1391/support.js +4 -0
  124. package/dist/os/rfc/verifier/rfc-1391/support.js.map +1 -1
  125. package/dist/os/session/handlers/save.d.ts.map +1 -1
  126. package/dist/os/session/handlers/save.js +5 -2
  127. package/dist/os/session/handlers/save.js.map +1 -1
  128. package/dist/os/session/handlers/session-audit-report.d.ts.map +1 -1
  129. package/dist/os/session/handlers/session-audit-report.js +4 -0
  130. package/dist/os/session/handlers/session-audit-report.js.map +1 -1
  131. package/dist/os/session/handlers/session-audit.d.ts.map +1 -1
  132. package/dist/os/session/handlers/session-audit.js +4 -0
  133. package/dist/os/session/handlers/session-audit.js.map +1 -1
  134. package/dist/os/trajectory/handlers/journal-io.d.ts +9 -0
  135. package/dist/os/trajectory/handlers/journal-io.d.ts.map +1 -1
  136. package/dist/os/trajectory/handlers/journal-io.js +20 -2
  137. package/dist/os/trajectory/handlers/journal-io.js.map +1 -1
  138. package/dist/os/trajectory/handlers/outcome-record.d.ts.map +1 -1
  139. package/dist/os/trajectory/handlers/outcome-record.js +4 -1
  140. package/dist/os/trajectory/handlers/outcome-record.js.map +1 -1
  141. package/dist/os/trajectory/handlers/trajectory-index.d.ts.map +1 -1
  142. package/dist/os/trajectory/handlers/trajectory-index.js +30 -8
  143. package/dist/os/trajectory/handlers/trajectory-index.js.map +1 -1
  144. package/dist/os/trajectory/handlers/trajectory-recall.d.ts.map +1 -1
  145. package/dist/os/trajectory/handlers/trajectory-recall.js +7 -4
  146. package/dist/os/trajectory/handlers/trajectory-recall.js.map +1 -1
  147. package/dist/os/trajectory/index.d.ts.map +1 -1
  148. package/dist/os/trajectory/index.js +11 -0
  149. package/dist/os/trajectory/index.js.map +1 -1
  150. package/dist/os/trajectory/trajectory.module.d.ts.map +1 -1
  151. package/dist/os/trajectory/trajectory.module.js +16 -9
  152. package/dist/os/trajectory/trajectory.module.js.map +1 -1
  153. package/dist/os/werkstatt/handlers/session-close.d.ts.map +1 -1
  154. package/dist/os/werkstatt/handlers/session-close.js +3 -0
  155. package/dist/os/werkstatt/handlers/session-close.js.map +1 -1
  156. package/dist/os/werkstatt/handlers/session-engine.d.ts.map +1 -1
  157. package/dist/os/werkstatt/handlers/session-engine.js +3 -0
  158. package/dist/os/werkstatt/handlers/session-engine.js.map +1 -1
  159. package/dist/os/werkstatt/handlers/session-open.d.ts.map +1 -1
  160. package/dist/os/werkstatt/handlers/session-open.js +3 -0
  161. package/dist/os/werkstatt/handlers/session-open.js.map +1 -1
  162. package/dist/os/werkstatt/handlers/session-status.d.ts.map +1 -1
  163. package/dist/os/werkstatt/handlers/session-status.js +3 -0
  164. package/dist/os/werkstatt/handlers/session-status.js.map +1 -1
  165. package/dist/os/yaml/handlers/scalars-validate.d.ts +28 -0
  166. package/dist/os/yaml/handlers/scalars-validate.d.ts.map +1 -0
  167. package/dist/os/yaml/handlers/scalars-validate.js +311 -0
  168. package/dist/os/yaml/handlers/scalars-validate.js.map +1 -0
  169. package/dist/os/yaml/index.d.ts +4 -0
  170. package/dist/os/yaml/index.d.ts.map +1 -0
  171. package/dist/os/yaml/index.js +15 -0
  172. package/dist/os/yaml/index.js.map +1 -0
  173. package/dist/os/yaml/yaml.module.d.ts +3 -0
  174. package/dist/os/yaml/yaml.module.d.ts.map +1 -0
  175. package/dist/os/yaml/yaml.module.js +58 -0
  176. package/dist/os/yaml/yaml.module.js.map +1 -0
  177. package/dist/src/authority/delegations.d.ts.map +1 -1
  178. package/dist/src/authority/delegations.js +5 -4
  179. package/dist/src/authority/delegations.js.map +1 -1
  180. package/dist/src/cli-flags.d.ts.map +1 -1
  181. package/dist/src/cli-flags.js +1 -5
  182. package/dist/src/cli-flags.js.map +1 -1
  183. package/dist/src/compass/invariant-parser.d.ts.map +1 -1
  184. package/dist/src/compass/invariant-parser.js +2 -1
  185. package/dist/src/compass/invariant-parser.js.map +1 -1
  186. package/dist/src/config/forge-config.d.ts +17 -0
  187. package/dist/src/config/forge-config.d.ts.map +1 -1
  188. package/dist/src/config/forge-config.js +33 -10
  189. package/dist/src/config/forge-config.js.map +1 -1
  190. package/dist/src/formal/exhaustive.d.ts.map +1 -1
  191. package/dist/src/formal/exhaustive.js +3 -2
  192. package/dist/src/formal/exhaustive.js.map +1 -1
  193. package/dist/src/formal/index.d.ts.map +1 -1
  194. package/dist/src/formal/index.js +4 -0
  195. package/dist/src/formal/index.js.map +1 -1
  196. package/dist/src/formal/proof-runner.d.ts.map +1 -1
  197. package/dist/src/formal/proof-runner.js +4 -3
  198. package/dist/src/formal/proof-runner.js.map +1 -1
  199. package/dist/src/formal/proof-spec.d.ts.map +1 -1
  200. package/dist/src/formal/proof-spec.js +3 -2
  201. package/dist/src/formal/proof-spec.js.map +1 -1
  202. package/dist/src/index.d.ts +1 -1
  203. package/dist/src/index.d.ts.map +1 -1
  204. package/dist/src/index.js +1 -1
  205. package/dist/src/index.js.map +1 -1
  206. package/dist/src/knowledge/index.d.ts +2 -2
  207. package/dist/src/knowledge/index.d.ts.map +1 -1
  208. package/dist/src/knowledge/index.js +4 -3
  209. package/dist/src/knowledge/index.js.map +1 -1
  210. package/dist/src/knowledge/parse.d.ts +1 -0
  211. package/dist/src/knowledge/parse.d.ts.map +1 -1
  212. package/dist/src/knowledge/parse.js +20 -18
  213. package/dist/src/knowledge/parse.js.map +1 -1
  214. package/dist/src/knowledge/schema.d.ts.map +1 -1
  215. package/dist/src/knowledge/schema.js +5 -4
  216. package/dist/src/knowledge/schema.js.map +1 -1
  217. package/dist/src/knowledge/sync.d.ts +61 -0
  218. package/dist/src/knowledge/sync.d.ts.map +1 -1
  219. package/dist/src/knowledge/sync.js +202 -7
  220. package/dist/src/knowledge/sync.js.map +1 -1
  221. package/dist/src/onboarding/agents-generate.js +1 -1
  222. package/dist/src/onboarding/compass-docs/semantic-layer-block.js +1 -1
  223. package/dist/src/onboarding/doctor.d.ts +2 -0
  224. package/dist/src/onboarding/doctor.d.ts.map +1 -1
  225. package/dist/src/onboarding/doctor.js +166 -26
  226. package/dist/src/onboarding/doctor.js.map +1 -1
  227. package/dist/src/onboarding/nested-agents-generate.js +1 -1
  228. package/dist/src/onboarding/nested-agents-templates.js +1 -1
  229. package/dist/src/onboarding/upgrade.d.ts.map +1 -1
  230. package/dist/src/onboarding/upgrade.js +18 -10
  231. package/dist/src/onboarding/upgrade.js.map +1 -1
  232. package/dist/src/reachability/command-mentions.d.ts.map +1 -1
  233. package/dist/src/reachability/command-mentions.js +4 -2
  234. package/dist/src/reachability/command-mentions.js.map +1 -1
  235. package/dist/src/registry.d.ts +20 -0
  236. package/dist/src/registry.d.ts.map +1 -1
  237. package/dist/src/registry.js +129 -67
  238. package/dist/src/registry.js.map +1 -1
  239. package/dist/src/validators/skill-validate.d.ts +5 -0
  240. package/dist/src/validators/skill-validate.d.ts.map +1 -1
  241. package/dist/src/validators/skill-validate.js +34 -8
  242. package/dist/src/validators/skill-validate.js.map +1 -1
  243. package/os/agent/handlers/agent-tiers-validate.ts +5 -1
  244. package/os/agent/index.ts +4 -0
  245. package/os/authority/handlers/delegate.ts +2 -1
  246. package/os/authority/index.ts +2 -1
  247. package/os/checks/checks.module.ts +5 -1
  248. package/os/checks/handlers/contribution-report.test.ts +6 -0
  249. package/os/checks/handlers/contribution-report.ts +5 -4
  250. package/os/checks/handlers/counters-export.test.ts +6 -0
  251. package/os/checks/handlers/counters-export.ts +4 -0
  252. package/os/checks/handlers/counters-journal.test.ts +6 -0
  253. package/os/checks/handlers/counters-journal.ts +2 -1
  254. package/os/checks/handlers/counters-validate.test.ts +6 -0
  255. package/os/checks/handlers/counters-validate.ts +5 -1
  256. package/os/checks/handlers/variant-candidates.test.ts +6 -0
  257. package/os/checks/index.ts +12 -0
  258. package/os/compass/handlers/compass-docs-scaffold.ts +1 -1
  259. package/os/compass/handlers/compass-header-scaffold.ts +6 -1
  260. package/os/compass/handlers/compass-invariants-generate.ts +3 -2
  261. package/os/context/context.module.ts +6 -1
  262. package/os/context/handlers/context-assemble.test.ts +6 -0
  263. package/os/context/handlers/context-assemble.ts +5 -1
  264. package/os/context/handlers/context-slate-eval.test.ts +6 -0
  265. package/os/context/handlers/context-slate-eval.ts +4 -0
  266. package/os/context/handlers/index-build.test.ts +33 -0
  267. package/os/context/handlers/index-build.ts +8 -5
  268. package/os/context/handlers/no-model-deps.test.ts +6 -0
  269. package/os/context/handlers/slate-fill.test.ts +6 -0
  270. package/os/context/index.ts +12 -0
  271. package/os/gate/handlers/gate-probe-catalog.test.ts +6 -0
  272. package/os/gate/handlers/gate-probe-catalog.ts +4 -0
  273. package/os/gate/handlers/gate-probe.test.ts +6 -0
  274. package/os/gate/handlers/gate-probe.ts +4 -0
  275. package/os/gate/index.ts +12 -0
  276. package/os/instructions/budget.test.ts +6 -0
  277. package/os/instructions/instructions.module.ts +2 -1
  278. package/os/knowledge/handlers/knowledge-authz-probe.test.ts +21 -0
  279. package/os/knowledge/handlers/knowledge-authz-probe.ts +7 -3
  280. package/os/knowledge/handlers/knowledge-conflicts-resolve.ts +571 -0
  281. package/os/knowledge/handlers/knowledge-rebuild.test.ts +6 -0
  282. package/os/knowledge/handlers/knowledge-rebuild.ts +4 -0
  283. package/os/knowledge/index.ts +14 -0
  284. package/os/knowledge/knowledge.module.ts +36 -1
  285. package/os/queue/decision-ledger.test.ts +32 -1
  286. package/os/queue/manifest.ts +8 -7
  287. package/os/resolver/handlers/resolver-doors-audit.test.ts +3 -0
  288. package/os/resolver/resolver.module.ts +2 -1
  289. package/os/rfc/handlers/implement-stamp-deviations.ts +4 -1
  290. package/os/rfc/handlers/implement-stamp-origin.ts +10 -2
  291. package/os/rfc/handlers/implement-stamp-outcome.ts +4 -2
  292. package/os/rfc/handlers/implement-stamp-stale.test.ts +2 -1
  293. package/os/rfc/handlers/implement-stamp.ts +188 -58
  294. package/os/rfc/handlers/lifecycle.test.ts +59 -1
  295. package/os/rfc/handlers/lifecycle.ts +25 -15
  296. package/os/rfc/handlers/list-create.test.ts +81 -0
  297. package/os/rfc/handlers/list-create.ts +34 -2
  298. package/os/rfc/handlers/validate-rules-rfc1334.test.ts +2 -1
  299. package/os/rfc/handlers/validate-rules-rfc1453.test.ts +2 -1
  300. package/os/rfc/handlers/validate-rules-rfc1454.test.ts +2 -1
  301. package/os/rfc/handlers/validate-rules-rfc1455.test.ts +2 -1
  302. package/os/rfc/reachable-symbol.ts +4 -2
  303. package/os/rfc/rfc-0000-template.md +16 -0
  304. package/os/rfc/rfc.module.ts +26 -7
  305. package/os/rfc/types.ts +32 -2
  306. package/os/rfc/verifier/rfc-1333/imp12-binding.acceptance.test.ts +12 -0
  307. package/os/rfc/verifier/rfc-1333/imp12-gate.acceptance.test.ts +12 -0
  308. package/os/rfc/verifier/rfc-1333/skills-and-types.acceptance.test.ts +12 -0
  309. package/os/rfc/verifier/rfc-1333/verify-workspace.acceptance.test.ts +12 -0
  310. package/os/rfc/verifier/rfc-1391/fixtures/no-report.proof.test.ts +4 -0
  311. package/os/rfc/verifier/rfc-1391/fixtures/small-domain.proof.test.ts +4 -0
  312. package/os/rfc/verifier/rfc-1391/support.ts +4 -0
  313. package/os/session/handlers/save.ts +5 -2
  314. package/os/session/handlers/session-audit-detectors.test.ts +6 -0
  315. package/os/session/handlers/session-audit-report.test.ts +6 -0
  316. package/os/session/handlers/session-audit-report.ts +4 -0
  317. package/os/session/handlers/session-audit.test.ts +6 -0
  318. package/os/session/handlers/session-audit.ts +4 -0
  319. package/os/trajectory/handlers/extract-units.test.ts +7 -1
  320. package/os/trajectory/handlers/journal-io.ts +20 -2
  321. package/os/trajectory/handlers/outcome-record.test.ts +6 -0
  322. package/os/trajectory/handlers/outcome-record.ts +4 -1
  323. package/os/trajectory/handlers/producer-trust.test.ts +6 -0
  324. package/os/trajectory/handlers/trajectory-index.test.ts +29 -0
  325. package/os/trajectory/handlers/trajectory-index.ts +31 -8
  326. package/os/trajectory/handlers/trajectory-recall.test.ts +27 -0
  327. package/os/trajectory/handlers/trajectory-recall.ts +7 -4
  328. package/os/trajectory/handlers/trajectory.test.ts +6 -0
  329. package/os/trajectory/handlers/verdict-binding.test.ts +40 -0
  330. package/os/trajectory/index.ts +12 -0
  331. package/os/trajectory/trajectory.module.ts +16 -9
  332. package/os/werkstatt/handlers/session-close.ts +3 -0
  333. package/os/werkstatt/handlers/session-engine.ts +3 -0
  334. package/os/werkstatt/handlers/session-open.ts +3 -0
  335. package/os/werkstatt/handlers/session-status.ts +3 -0
  336. package/os/yaml/handlers/scalars-validate.ts +343 -0
  337. package/os/yaml/index.ts +23 -0
  338. package/os/yaml/scalars.test.ts +152 -0
  339. package/os/yaml/yaml.module.ts +61 -0
  340. package/package.json +17 -1
  341. package/skills/fo/fo-knowledge-distill/SKILL.md +6 -5
  342. package/skills/fo/fo-memory-sync/SKILL.md +3 -0
  343. package/skills/fo/fo-memory-sync/fix-patterns.md +65 -0
  344. package/skills/fo/fo-memory-sync/learned-principles.md +10 -0
  345. package/skills/fo/fo-memory-sync/qa-log.md +30 -0
  346. package/skills/fo/fo-session-save/SKILL.md +2 -0
  347. package/skills/shared/grilling/SKILL.md +3 -0
  348. package/skills/shared/writing-great-skills/SKILL.md +12 -9
  349. package/src/authority/delegations.ts +5 -4
  350. package/src/cli-flags.ts +1 -5
  351. package/src/compass/invariant-parser.ts +2 -1
  352. package/src/config/forge-config.ts +40 -14
  353. package/src/formal/exhaustive.ts +3 -2
  354. package/src/formal/index.ts +4 -0
  355. package/src/formal/proof-runner.ts +4 -3
  356. package/src/formal/proof-spec.ts +3 -2
  357. package/src/index.ts +1 -0
  358. package/src/knowledge/index.ts +11 -2
  359. package/src/knowledge/parse.ts +20 -17
  360. package/src/knowledge/schema.ts +5 -4
  361. package/src/knowledge/sync.ts +281 -7
  362. package/src/onboarding/agents-generate.ts +1 -1
  363. package/src/onboarding/compass-docs/semantic-layer-block.ts +1 -1
  364. package/src/onboarding/doctor.ts +184 -26
  365. package/src/onboarding/nested-agents-generate.ts +1 -1
  366. package/src/onboarding/nested-agents-templates.ts +1 -1
  367. package/src/onboarding/upgrade.ts +18 -10
  368. package/src/reachability/command-mentions.ts +4 -2
  369. package/src/registry.ts +153 -74
  370. package/src/tests/cli-flags.test.ts +1 -1
  371. package/src/tests/discover-pack-skills.test.ts +26 -0
  372. package/src/tests/doctor-autonomy.test.ts +144 -0
  373. package/src/tests/doctor-dist-freshness.test.ts +24 -0
  374. package/src/tests/doctor-knowledge-conflicts.test.ts +135 -0
  375. package/src/tests/doctor-nested-agents.test.ts +30 -1
  376. package/src/tests/implement-stamp.test.ts +191 -8
  377. package/src/tests/knowledge-conflicts-resolve.pbt.test.ts +38 -0
  378. package/src/tests/knowledge-conflicts-resolve.test.ts +648 -0
  379. package/src/tests/knowledge-parse.test.ts +26 -1
  380. package/src/tests/session-handlers.test.ts +47 -0
  381. package/src/tests/skill-validate-knowledge.test.ts +93 -2
  382. package/src/tests/upgrade.test.ts +38 -0
  383. package/src/validators/skill-validate.ts +37 -9
@@ -6,7 +6,6 @@
6
6
  </non-goals>
7
7
  </MODULE_CONTRACT>
8
8
  <CHANGE_SUMMARY>
9
- <item>RFC-0303: extracted lifecycle logic from handlers.ts into handlers/lifecycle.ts.</item>
10
9
  <item>RFC-0465: added RFC_METADATA_CUTOFF check to RFC-CMD-02 and RFC-CMD-03 rules — pre-cutoff RFCs are exempt from command registration checks.</item>
11
10
  <item>RFC-0465 fix: added manifest-based fallback in getLiveCommands — reads docs/command-manifest.generated.yaml when commandRegistry returns empty (site-kernel mode).</item>
12
11
  <item>RFC-1097: step 6 — compass.migrate codemod run
@@ -15,6 +14,8 @@ Mechanical v1 to v2 header migration across the workspace: 942 files rewritten
15
14
  <item>RFC-1097: sweep — werkstatt-engine clean
16
15
 
17
16
  Sweep batch 4: 73 Compass headers on headerless engine files (certification, component-runtime, isolation, evolution, testing), real KEY_DECISIONS on 75 files (kernel, cache, dht, swim, gitmesh, runtime), ~80 purpose expansions (CONTRACT-02/PURPOSE-02), non-goals on 13 CONTRACT-03 files, CS-07 history literal fix repo-wide (253 files). Policy: .template.ts/.template.astro excludedPaths. werkstatt-engine now 0 diagnostics.</item>
17
+ <item>RFC-1482: emit validation-compliant RFC skeletons and surface contract breaches at authoring time</item>
18
+ <history>RFC-0303</history>
18
19
  </CHANGE_SUMMARY>
19
20
  */
20
21
 
@@ -158,20 +159,29 @@ export async function collectRfcCommandLifecycleViolations(
158
159
  }
159
160
 
160
161
  for (const command of buckets.changed) {
161
- if (
162
- isPostCutoff &&
163
- status === "implemented" &&
164
- !(await getLiveCommands()).has(command) &&
165
- !removed.has(command)
166
- ) {
167
- addViolation(
168
- rfcId,
169
- relFile,
170
- "RFC-CMD-03",
171
- `implemented RFC lists "${command}" under commands.changed, but no live command is registered`,
172
- "error",
173
- { rfcId, command, status, bucket: "changed" },
174
- );
162
+ if (!isPostCutoff || removed.has(command)) continue;
163
+ if (!(await getLiveCommands()).has(command)) {
164
+ if (status === "implemented") {
165
+ addViolation(
166
+ rfcId,
167
+ relFile,
168
+ "RFC-CMD-03",
169
+ `implemented RFC lists "${command}" under commands.changed, but no live command is registered`,
170
+ "error",
171
+ { rfcId, command, status, bucket: "changed" },
172
+ );
173
+ } else if (status === "draft" || status === "reviewing" || status === "accepted") {
174
+ // RFC-1482: the registered-name contract surfaces at authoring
175
+ // time — same rule id, warning below the implemented gate.
176
+ addViolation(
177
+ rfcId,
178
+ relFile,
179
+ "RFC-CMD-03",
180
+ `${status} RFC lists "${command}" under commands.changed, but no live command is registered (surfaced early per RFC-1482; becomes an error at implemented)`,
181
+ "warning",
182
+ { rfcId, command, status, bucket: "changed" },
183
+ );
184
+ }
175
185
  }
176
186
  }
177
187
 
@@ -11,13 +11,19 @@ with candidates listed.
11
11
  <item>Not a template-content contract — fixtures carry the minimal template shape the handler rewrites.</item>
12
12
  </non-goals>
13
13
  </MODULE_CONTRACT>
14
+ <CHANGE_SUMMARY>
15
+ <item>RFC-1485: sweep compass headers — forge-os-rfc</item>
16
+ <item>RFC-1482: extract-safe RFC-1482 template path + changelog for 9.1.0</item>
17
+ </CHANGE_SUMMARY>
14
18
  */
15
19
 
16
20
  import { test, expect, describe, beforeEach, afterEach } from "vitest";
17
21
  import { mkdtemp, mkdir, writeFile, rm, readFile } from "node:fs/promises";
18
22
  import { join } from "node:path";
19
23
  import { tmpdir } from "node:os";
24
+ import { fileURLToPath } from "node:url";
20
25
  import { runRfcCreate } from "./list-create.ts";
26
+ import { runRfcValidate } from "./validate.ts";
21
27
 
22
28
  const TEMPLATE = `id: RFC-0000
23
29
  title: "Template"
@@ -140,3 +146,78 @@ describe("RFC-1467 rfc.create near-duplicate gate", () => {
140
146
  expect(result.data?.colliding).toBeUndefined();
141
147
  });
142
148
  });
149
+
150
+ // RFC-1482: the emitted skeleton must satisfy the contracts that gates enforce —
151
+ // seed the REAL canonical template so the assertions bind the shipped skeleton,
152
+ // not a fixture twin. `os/rfc/` carries the canonical template forge ships to
153
+ // consumers — the path must stay inside the package so the test also resolves
154
+ // in the standalone extracted layout (RFC-1252).
155
+ const REAL_TEMPLATE = fileURLToPath(new URL("../rfc-0000-template.md", import.meta.url));
156
+
157
+ async function seedRealTemplate() {
158
+ root = await mkdtemp(join(tmpdir(), "rfc1482-create-"));
159
+ const rfcDir = join(root, "docs", "rfcs");
160
+ await mkdir(rfcDir, { recursive: true });
161
+ const realTemplate = await readFile(REAL_TEMPLATE, "utf8");
162
+ await writeFile(join(rfcDir, "rfc-0000-template.md"), realTemplate);
163
+ }
164
+
165
+ describe("RFC-1482 validation-compliant skeleton", () => {
166
+ beforeEach(async () => {
167
+ await seedRealTemplate();
168
+ });
169
+ afterEach(async () => {
170
+ await rm(root, { recursive: true, force: true });
171
+ });
172
+
173
+ test("AC-1: emitted draft passes rfc.validate with zero V-45/V-48/V-50 violations", async () => {
174
+ const result = await runRfcCreate(
175
+ { flags: flags({ title: "Rotate the cache eviction cadence" }) } as never,
176
+ context(),
177
+ );
178
+ expect(result.data?.status).toBe("ok");
179
+ const id = result.data!.id!;
180
+ const v = await runRfcValidate({ argv: [], flags: { id } } as never, context());
181
+ const violations = v.data?.violations ?? [];
182
+ const named = violations.filter((x) => ["V-45", "V-48", "V-50"].includes(x.rule));
183
+ expect(named, JSON.stringify(violations, null, 1)).toEqual([]);
184
+ expect(v.data?.status, JSON.stringify(violations, null, 1)).toBe("pass");
185
+ });
186
+
187
+ test("AC-2: --proposed/--added seed commands.* and emit one reachable stub each", async () => {
188
+ const result = await runRfcCreate(
189
+ { flags: flags({ title: "Tame the registry loader", proposed: "foo.bar,baz.qux", added: "foo.new" }) } as never,
190
+ context(),
191
+ );
192
+ expect(result.data?.status).toBe("ok");
193
+ const body = await readFile(join(root, result.data!.file!), "utf8");
194
+ expect(body).toContain(" proposed:\n - foo.bar\n - baz.qux");
195
+ expect(body).toContain(" added:\n - foo.new");
196
+ const reachable = body.match(/^ - probe: reachable$/gm) ?? [];
197
+ expect(reachable).toHaveLength(3);
198
+ expect(body).toContain('command: "foo.bar"');
199
+ expect(body).toContain('command: "baz.qux"');
200
+ expect(body).toContain('command: "foo.new"');
201
+ });
202
+
203
+ test("AC-3: emitted skeleton carries '## Fixed inputs' header schema and no FI rows", async () => {
204
+ const result = await runRfcCreate(
205
+ { flags: flags({ title: "Rotate the cache eviction cadence" }) } as never,
206
+ context(),
207
+ );
208
+ const body = await readFile(join(root, result.data!.file!), "utf8");
209
+ expect(body).toContain("## Fixed inputs");
210
+ expect(body).toContain("| ID | Value | Source | Checked by |");
211
+ expect(body).not.toMatch(/^\|\s*FI-/m);
212
+ });
213
+
214
+ test("AC-6: no flags → zero reachable probe stubs in acceptance:", async () => {
215
+ const result = await runRfcCreate(
216
+ { flags: flags({ title: "Rotate the cache eviction cadence" }) } as never,
217
+ context(),
218
+ );
219
+ const body = await readFile(join(root, result.data!.file!), "utf8");
220
+ expect(body).not.toMatch(/^ - probe: reachable$/gm);
221
+ expect(body).not.toMatch(/^acceptance:/m);
222
+ });
223
+ });
@@ -6,12 +6,12 @@
6
6
  </non-goals>
7
7
  </MODULE_CONTRACT>
8
8
  <CHANGE_SUMMARY>
9
- <item>RFC-1139: CLI hint accuracy and agent-safety hygiene — rfc.create hint, EC-14-PARTIAL, amend delegation, ledger scope, sync footer, mission.open remnants</item>
10
9
  <item>RFC-1139: second hint fix (rfc.list empty-state) + read-only test fix</item>
11
10
  <item>RFC-1364: robust rfc index generation — bounded retry, RFC-IDX-04, atomic writes</item>
12
11
  <item>RFC-1467: block rfc.create on terminal-kind near-duplicates until --revisit acknowledges + V-52 validate mirror</item>
13
12
  <item>RFC-1467: address review r1 findings — object-shaped colliding payload, cite all colliding siblings, reviewBand field, supersede.propose escalation, flag-shape guard</item>
14
- <history>RFC-0303, RFC-1097, RFC-1138</history>
13
+ <item>RFC-1482: emit validation-compliant RFC skeletons and surface contract breaches at authoring time</item>
14
+ <history>RFC-0303, RFC-1097, RFC-1138, RFC-1139</history>
15
15
  </CHANGE_SUMMARY>
16
16
  */
17
17
 
@@ -173,6 +173,11 @@ export async function runRfcCreate(
173
173
  const kind = (input.flags["kind"] as string | undefined) ?? "architecture";
174
174
  const scope = (input.flags["scope"] as string | undefined) ?? "workspace";
175
175
  const satisfies = parseSatisfiesFlag(input.flags["satisfies"]);
176
+ // RFC-1482: seed commands.proposed/commands.added at authoring time so the
177
+ // draft's acceptance block can carry reachable-probe stubs (V-45) instead of
178
+ // discovering the breach on the first validate cycle.
179
+ const proposed = parseSatisfiesFlag(input.flags["proposed"]);
180
+ const added = parseSatisfiesFlag(input.flags["added"]);
176
181
 
177
182
  if (!RFC_KINDS.includes(kind as RfcKind)) {
178
183
  throw new Error(`Invalid kind: ${kind}. Must be one of: ${RFC_KINDS.join(", ")}`);
@@ -371,6 +376,33 @@ export async function runRfcCreate(
371
376
  `satisfies:\n${satisfies.map((id) => ` - ${id}`).join("\n")}`,
372
377
  );
373
378
  }
379
+ if (proposed.length > 0) {
380
+ content = content.replace(
381
+ /^ proposed: \[\]$/m,
382
+ ` proposed:\n${proposed.map((name) => ` - ${name}`).join("\n")}`,
383
+ );
384
+ }
385
+ if (added.length > 0) {
386
+ content = content.replace(
387
+ /^ added: \[\]$/m,
388
+ ` added:\n${added.map((name) => ` - ${name}`).join("\n")}`,
389
+ );
390
+ }
391
+ // RFC-1482: one reachable-probe stub per seeded command — V-45 covered at
392
+ // emission; with both buckets empty the commented template shape stays.
393
+ const probeSeeds = [...proposed, ...added];
394
+ if (probeSeeds.length > 0) {
395
+ const stubs = probeSeeds
396
+ .map((name) => ` - probe: reachable\n criterion: AC-1\n command: "${name}"`)
397
+ .join("\n");
398
+ const closing = content.indexOf("\n---\n");
399
+ if (closing !== -1) {
400
+ content =
401
+ content.slice(0, closing + 1) +
402
+ `acceptance:\n${stubs}\n` +
403
+ content.slice(closing + 1);
404
+ }
405
+ }
374
406
  // RFC-1467: cite the acknowledged/review-band precedents in `related`
375
407
  // and leave a NEEDS CLARIFICATION marker in the Decision section.
376
408
  if (citedIds.length > 0) {
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  <MODULE_CONTRACT>
3
- <purpose>RFC-1334: V-45 tests — post-cutoff proposed/added commands without a command-mode reachable probe warn.</purpose>
3
+ <purpose>validate-rules-rfc1334 coverage — RFC-1334 V-45: post-cutoff proposed/added commands without a command-mode reachable probe warn.</purpose>
4
4
  <non-goals>
5
5
  <item>Not a probe-execution suite.</item>
6
6
  </non-goals>
@@ -8,6 +8,7 @@
8
8
  <CHANGE_SUMMARY>
9
9
  <item>RFC-1334: tests for AC-8.</item>
10
10
  <item>RFC-1334: step 4 — reachable acceptance probe (symbol and command modes) and V-45</item>
11
+ <item>RFC-1485: sweep compass headers — forge-os-rfc</item>
11
12
  </CHANGE_SUMMARY>
12
13
  */
13
14
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  <MODULE_CONTRACT>
3
3
  <purpose>
4
- RFC-1453: V-47/V-48 tests — `page` probes require `target` on non-archived
4
+ RFC-1453: validate-rules-rfc1453 V-47/V-48 tests — `page` probes require `target` on non-archived
5
5
  files (error), archived files exempt; V-48 warns when packagesImpacted
6
6
  touches an outcomeSurfaces glob without a declared outcome probe (AC-8).
7
7
  </purpose>
@@ -12,6 +12,7 @@ touches an outcomeSurfaces glob without a declared outcome probe (AC-8).
12
12
  <CHANGE_SUMMARY>
13
13
  <item>RFC-1453: V-47 page-target + V-48 outcome-surface validation tests.</item>
14
14
  <item>RFC-1453: executed outcome probes, IMP-14 surface gate, outcome.serve + V-47/V-48</item>
15
+ <item>RFC-1485: sweep compass headers — forge-os-rfc</item>
15
16
  </CHANGE_SUMMARY>
16
17
  */
17
18
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  <MODULE_CONTRACT>
3
3
  <purpose>
4
- RFC-1454: V-49 tests — every `## Deviations` entry's `(review <reviewId>)`
4
+ RFC-1454: validate-rules-rfc1454 V-49 tests — every `## Deviations` entry's `(review <reviewId>)`
5
5
  provenance must resolve to a committed review report under the configured
6
6
  reviewsDir at HEAD (AC-4). Covers dangling review ids, resolvable entries,
7
7
  malformed section lines, and the no-entries fast path. Uses a real tmp git
@@ -14,6 +14,7 @@ repo because the committed-report index reads `git ls-tree`/`git show`.
14
14
  <CHANGE_SUMMARY>
15
15
  <item>RFC-1454: V-49 deviation-provenance validation tests.</item>
16
16
  <item>RFC-1454: review deviations recorded in the RFC — IMP-15 gate, V-49 provenance, skill contract</item>
17
+ <item>RFC-1485: sweep compass headers — forge-os-rfc</item>
17
18
  </CHANGE_SUMMARY>
18
19
  */
19
20
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  <MODULE_CONTRACT>
3
3
  <purpose>
4
- RFC-1455: V-50/V-51 tests — `## Fixed inputs` rows must bind exactly one
4
+ RFC-1455: validate-rules-rfc1455 V-50/V-51 tests — `## Fixed inputs` rows must bind exactly one
5
5
  existing AC-N whose outcome probe (page or file-contains) contains the
6
6
  declared value (V-50 error); verbatim prose without the section earns a
7
7
  V-51 warning. Covers fence-stripped parsing, escaped pipes, header-row
@@ -14,6 +14,7 @@ location, marked-literal extraction, and the createdAt cutoff.
14
14
  <CHANGE_SUMMARY>
15
15
  <item>RFC-1455: V-50/V-51 fixed-inputs binding validation tests.</item>
16
16
  <item>RFC-1455: fixed inputs bound to outcome probes — V-50/V-51 + skills</item>
17
+ <item>RFC-1485: sweep compass headers — forge-os-rfc</item>
17
18
  </CHANGE_SUMMARY>
18
19
  */
19
20
 
@@ -18,16 +18,18 @@ manifest's `reachableVia` edges and unions them with live doc-mention edges
18
18
  <item>Type-only imports and re-exports alone never count as usage.</item>
19
19
  <item>Barrel re-exports are followed to depth 5; bare specifiers resolve through workspace package.json exports.</item>
20
20
  <item>The tracked-file scan is memoized per workspace so several probes in one run share it.</item>
21
- <item>Command mode unions manifest edges with doc-mention edges over the same surface command.coverage.validate scans — a mention under a frozen tree (docs/rfcs, archives, …) never counts. The mention enumeration is git ls-files --cached --others --exclude-standard (tracked + untracked-non-ignored, for fs.glob parity — symbol mode stays tracked-only); a git failure surfaces in the probe detail rather than degrading to a bare no-edge result.</item>
21
+ <item>Command mode unions manifest edges with live doc-mention edges; mentions under frozen trees never count.</item>
22
+ <item>Mention enumeration is `git ls-files --cached --others --exclude-standard`; a git failure surfaces in the probe detail.</item>
22
23
  </KEY_DECISIONS>
23
24
  <CHANGE_SUMMARY>
24
- <item>RFC-1334: initial implementation.</item>
25
25
  <item>RFC-1334: step 4 — reachable acceptance probe (symbol and command modes) and V-45</item>
26
26
  <item>RFC-1351: step 1 — command mode unions reachableVia with live doc-mention edges via @warpgogol/forge/reachability (Q-1/A; manifest stays structural-only)</item>
27
27
  <item>RFC-1351: review F-1/F-2 — doc-scan fs.glob parity + surfaced scan failure + guarded-initializer note</item>
28
28
  <item>RFC-1351: review report persisted + KEY_DECISIONS enumeration note
29
29
 
30
30
  fo-review REVIEW-CODE-2026-10-20-01 (subagent isolation, blockLevel warning) — F-1/F-2 fixed in the previous commit; reachable-symbol KEY_DECISIONS item now records the doc-mention enumeration contract.</item>
31
+ <item>RFC-1485: sweep compass headers — forge-os-rfc</item>
32
+ <history>RFC-1334</history>
31
33
  </CHANGE_SUMMARY>
32
34
  */
33
35
 
@@ -60,6 +60,10 @@ nonGoals: []
60
60
  # OPTIONAL machine-checkable acceptance probes, executed on-demand
61
61
  # via `pnpm exec forge rfc.acceptance.run --id <this-rfc-id>` (never
62
62
  # automatically inside build pipelines).
63
+ # This skeleton satisfies V-45 (reachable probe per proposed/added command),
64
+ # V-48 (outcome probe per outcome-surface package), and V-50 (`## Fixed
65
+ # inputs` header schema, no unbound rows) by construction — commands seeded
66
+ # via --proposed/--added gain a reachable stub automatically.
63
67
  # RFC-1271: a probe MAY declare `expectationSource` — who authored the
64
68
  # expected result: self | requirement | independent | external — and
65
69
  # `limitations`, a free-text caveat about coverage gaps. Both optional.
@@ -226,6 +230,18 @@ interface ExampleResult {
226
230
  - [ ] DR-3: The RFC states whether the decision is reversible and at what cost
227
231
  -->
228
232
 
233
+ ## Fixed inputs
234
+
235
+ <!-- V-50 contract (RFC-1455): every value this RFC pins for the shipped
236
+ result (verbatim copy, labels, names, decided option values) is a row
237
+ bound to exactly one AC-N criterion whose probes observe the value.
238
+ Emit the header schema only — a live placeholder row would itself trip
239
+ V-50. Add rows only when the draft fixes real inputs; delete this
240
+ section's table when none exist. -->
241
+
242
+ | ID | Value | Source | Checked by |
243
+ | --- | --- | --- | --- |
244
+
229
245
  ## Acceptance criteria
230
246
 
231
247
  <!-- Authoring standard: see packages/forge/skills/fo/fo-idea-create-rfc/acceptance-criteria-standard.md (RFC-0996).
@@ -7,14 +7,14 @@
7
7
  </non-goals>
8
8
  </MODULE_CONTRACT>
9
9
  <CHANGE_SUMMARY>
10
- <item>RFC-1461: declare rules[] severity via CommandRuleDecl workspace-wide (RFC-1461)</item>
11
- <item>RFC-1463: composite gates report complete violation sets and self-ensure prerequisites — ensure/compositeGate metadata, executor ensure runner, blockedBy skip tracking, ENSURE-01..04 + GATE-CMP-01, runCompositeGate</item>
12
10
  <item>RFC-1467: block rfc.create on terminal-kind near-duplicates until --revisit acknowledges + V-52 validate mirror</item>
13
11
  <item>RFC-1474: per-rule check-execution counters
14
12
 
15
13
  Append-only counters.jsonl journaled per evaluated rule ({runId, ruleId, contract, outcome, at}; runId = commandInvocationId; outcomes pass|diagnostic|skipped|ensured; dry-run suppressed; append failures warn never fail). checks.counters.validate audits the journal against the validator inventory (COUNT-01/02); checks.counters.export projects deterministic per-rule totals (COUNT-03, generatedAt = max journal at; producer-tail tolerated). checks.contribution.report joins counters as the canonical firing source (CONTRIB-03 on absent/empty journal; coverage none|partial|complete; live effectiveCoverage positive). Validator inventory now includes every rules[]-declaring command — fail-closed gate surfaced 9 contract-declaration defects, fixed with domain contracts.</item>
16
14
  <item>RFC-1474: check-execution counters — apply re-review findings (structural skip flag, violations extraction, Date.parse ordering, DEV-5/6)</item>
17
- <history>RFC-0260, RFC-0795, RFC-1097, RFC-1173, RFC-1231, RFC-1237, RFC-1249, RFC-1271, RFC-1306, RFC-1322, RFC-1333, RFC-1351, RFC-1354, RFC-1364, RFC-1453, RFC-1458</history>
15
+ <item>RFC-1482: emit validation-compliant RFC skeletons and surface contract breaches at authoring time</item>
16
+ <item>RFC-1483: self-sufficient implement stamp — default repair pass, ordered remediation checklist, --no-repair</item>
17
+ <history>RFC-0260, RFC-0795, RFC-1097, RFC-1173, RFC-1231, RFC-1237, RFC-1249, RFC-1271, RFC-1306, RFC-1322, RFC-1333, RFC-1351, RFC-1354, RFC-1364, RFC-1453, RFC-1458, RFC-1461, RFC-1463</history>
18
18
  </CHANGE_SUMMARY>
19
19
  */
20
20
 
@@ -115,6 +115,16 @@ export async function createForgeRfcModule(): Promise<ForgeModule> {
115
115
  description:
116
116
  "RFC-1467: acknowledge a rejected/superseded precedent colliding with this title — required when a terminal-kind decision-log hit scores at or above the reproposal threshold.",
117
117
  },
118
+ proposed: {
119
+ kind: "string",
120
+ description:
121
+ "RFC-1482: comma-separated command names seeded into commands.proposed; each name gets one `probe: reachable` acceptance stub.",
122
+ },
123
+ added: {
124
+ kind: "string",
125
+ description:
126
+ "RFC-1482: comma-separated command names seeded into commands.added; each name gets one `probe: reachable` acceptance stub.",
127
+ },
118
128
  },
119
129
  execute: runRfcCreate,
120
130
  },
@@ -525,9 +535,11 @@ export async function createForgeRfcModule(): Promise<ForgeModule> {
525
535
  "RFC-IMP-09 stale-evidence gate from RFC-1271) then atomically sets " +
526
536
  "status: implemented, implementedAt, and updatedAt. For probe-bearing RFCs the " +
527
537
  "evidence envelope is re-emitted post-mutation so it binds the implemented-state " +
528
- "file (RFC-1271). --check-criteria flips evidenced unchecked criteria " +
529
- "in the same atomic write and refreshes a missing/stale envelope in-process " +
530
- "(RFC-1322). Use --dry-run to preview. Required flags: `--id`.",
538
+ "file (RFC-1271). Self-repairing by default (RFC-1483): unchecked-but-evidenced " +
539
+ "criteria flip and a missing/stale envelope re-emits inside the same atomic " +
540
+ "write (the RFC-1322 --check-criteria machinery, now the default); --no-repair " +
541
+ "restores fail-fast gating, and unrepairable failures print the ordered " +
542
+ "remediation checklist. Use --dry-run to preview. Required flags: `--id`.",
531
543
  scope: "workspace",
532
544
  mutatesState: true,
533
545
  writes: ["docs/rfcs/**/*.md", "docs/rfcs/verification/*.generated.yaml"],
@@ -572,7 +584,14 @@ export async function createForgeRfcModule(): Promise<ForgeModule> {
572
584
  "RFC-1322: auto-check unchecked acceptance criteria whose (evidence: ...) " +
573
585
  "annotation resolves (test:/file:/<path>:<line> exists; probe:AC-N passes in " +
574
586
  "the evidence envelope), refreshing a missing/stale envelope in-process first. " +
575
- "Unresolvable annotations abort with STAMP-CHECK-01 before any RFC mutation.",
587
+ "Unresolvable annotations abort with STAMP-CHECK-01 before any RFC mutation. " +
588
+ "RFC-1483: retained as an accepted alias — this repair path is the default.",
589
+ },
590
+ "no-repair": {
591
+ kind: "boolean",
592
+ description:
593
+ "RFC-1483: restore the pre-self-repair blocking behavior — no criteria flips, " +
594
+ "no in-process envelope emit; the first prerequisite defect fails the run.",
576
595
  },
577
596
  },
578
597
  execute: runRfcImplementStamp,
package/os/rfc/types.ts CHANGED
@@ -12,12 +12,12 @@
12
12
  * </non-goals>
13
13
  * </MODULE_CONTRACT>
14
14
  * * <CHANGE_SUMMARY>
15
- <item>RFC-1445: run-probe timeoutMs + RFC-1445 outcome probe AC-9 (RFC-1445)</item>
16
15
  <item>RFC-1458: emit requirement-mapped verdict events from deploy.smoke.run</item>
17
16
  <item>RFC-1467: block rfc.create on terminal-kind near-duplicates until --revisit acknowledges + V-52 validate mirror</item>
18
17
  <item>RFC-1467: address review r1 findings — object-shaped colliding payload, cite all colliding siblings, reviewBand field, supersede.propose escalation, flag-shape guard</item>
19
18
  <item>RFC-1467: declare supersede.propose escalation fields + repair dead related-injector regex</item>
20
- <history>RFC-0465, RFC-0478, RFC-0480, RFC-0795, RFC-0998, RFC-0999, RFC-1097, RFC-1249, RFC-1271, RFC-1306, RFC-1310, RFC-1320, RFC-1322, RFC-1330, RFC-1333, RFC-1334, RFC-1336, RFC-1364, RFC-1383, RFC-1391, RFC-1401, RFC-1453, RFC-1454, RFC-1455</history>
19
+ <item>RFC-1483: self-sufficient implement stamp — default repair pass, ordered remediation checklist, --no-repair</item>
20
+ <history>RFC-0465, RFC-0478, RFC-0480, RFC-0795, RFC-0998, RFC-0999, RFC-1097, RFC-1249, RFC-1271, RFC-1306, RFC-1310, RFC-1320, RFC-1322, RFC-1330, RFC-1333, RFC-1334, RFC-1336, RFC-1364, RFC-1383, RFC-1391, RFC-1401, RFC-1445, RFC-1453, RFC-1454, RFC-1455</history>
21
21
  </CHANGE_SUMMARY>
22
22
  ***************************************************************/
23
23
 
@@ -755,6 +755,17 @@ export interface RfcImplementStampData {
755
755
  evidencePath?: string;
756
756
  evidenceReEmitted?: boolean;
757
757
  metricsPath?: string;
758
+ /** RFC-1483: prerequisite repairs applied (or, under --dry-run, computed) in-flight. */
759
+ repaired?: StampRepair[];
760
+ /** RFC-1483: true when the result is a dry-run projection — repaired[] then lists computed-not-written repairs. */
761
+ dryRun?: boolean;
762
+ }
763
+
764
+ /** RFC-1483: one prerequisite repair applied inside the atomic stamp write. */
765
+ export interface StampRepair {
766
+ kind: "criteria-checked" | "envelope-emitted";
767
+ /** e.g. "AC-3,AC-7" for flipped criteria, or the regenerated envelope path. */
768
+ detail: string;
758
769
  }
759
770
 
760
771
  export type RfcImplementStampRule =
@@ -799,8 +810,27 @@ export type RfcImplementStampRule =
799
810
  export interface RfcImplementStampViolation {
800
811
  rule: RfcImplementStampRule;
801
812
  message: string;
813
+ /** RFC-1483: the satisfying command or edit — printed as part of the ordered remediation checklist. */
814
+ fixHint?: string;
802
815
  }
803
816
 
817
+ /**
818
+ * RFC-1483: the prerequisite chain order — emit envelope → check/annotate
819
+ * criteria → clean tree → implementation commit → provenance → hash tail.
820
+ * violations[] are sorted by this list before the report prints: the printed
821
+ * list IS the ordered remediation checklist. Unlisted rules keep their
822
+ * original relative order, appended after the listed ones.
823
+ */
824
+ export const PREREQUISITE_ORDER: readonly RfcImplementStampRule[] = [
825
+ "RFC-IMP-06",
826
+ "RFC-IMP-02",
827
+ "STAMP-CHECK-01",
828
+ "RFC-IMP-04",
829
+ "RFC-IMP-03",
830
+ "STAMP-GOV-01",
831
+ "RFC-IMP-09",
832
+ ];
833
+
804
834
  export interface RfcImplementStampResult {
805
835
  command: "rfc.implement.stamp";
806
836
  status: "pass" | "fail";
@@ -1,3 +1,15 @@
1
+ /*
2
+ <MODULE_CONTRACT>
3
+ <purpose>Unit tests for RFC-IMP-12 candidate binding — covers the imp12 binding acceptance suite surface and its observable contract.</purpose>
4
+ <non-goals>
5
+ <item>TODO(compass): record the boundary this file must not take on.</item>
6
+ </non-goals>
7
+ </MODULE_CONTRACT>
8
+ <CHANGE_SUMMARY>
9
+ <item>RFC-1485: sweep compass headers — forge-os-rfc</item>
10
+ </CHANGE_SUMMARY>
11
+ */
12
+
1
13
  // RFC-1333 Design "Stamp gate RFC-IMP-12" — candidate binding: descendants of
2
14
  // candidateSha up to the implementation commit may touch only verifier-trailer
3
15
  // commits and docs/**.
@@ -1,3 +1,15 @@
1
+ /*
2
+ <MODULE_CONTRACT>
3
+ <purpose>Unit tests for RFC-IMP-12 — covers the imp12 gate acceptance suite surface and its observable contract.</purpose>
4
+ <non-goals>
5
+ <item>TODO(compass): record the boundary this file must not take on.</item>
6
+ </non-goals>
7
+ </MODULE_CONTRACT>
8
+ <CHANGE_SUMMARY>
9
+ <item>RFC-1485: sweep compass headers — forge-os-rfc</item>
10
+ </CHANGE_SUMMARY>
11
+ */
12
+
1
13
  // RFC-1333 AC-5, AC-6 — RFC-IMP-12 gate (pure evaluator).
2
14
  import { describe, expect, it } from "vitest";
3
15
  import { evaluateAcceptanceVerificationGate } from "../../handlers/implement-stamp-origin.ts";
@@ -1,3 +1,15 @@
1
+ /*
2
+ <MODULE_CONTRACT>
3
+ <purpose>Unit tests for RFC-1333 skills/types — covers the skills and types acceptance suite surface and its observable contract.</purpose>
4
+ <non-goals>
5
+ <item>TODO(compass): record the boundary this file must not take on.</item>
6
+ </non-goals>
7
+ </MODULE_CONTRACT>
8
+ <CHANGE_SUMMARY>
9
+ <item>RFC-1485: sweep compass headers — forge-os-rfc</item>
10
+ </CHANGE_SUMMARY>
11
+ */
12
+
1
13
  // RFC-1333 AC-3, AC-4, AC-7, AC-8, AC-9.
2
14
  import { readFileSync } from "node:fs";
3
15
  import { describe, expect, expectTypeOf, it } from "vitest";
@@ -1,3 +1,15 @@
1
+ /*
2
+ <MODULE_CONTRACT>
3
+ <purpose>Unit tests for RFC-1333 rfc.verify.workspace — covers the verify workspace acceptance suite surface and its observable contract.</purpose>
4
+ <non-goals>
5
+ <item>TODO(compass): record the boundary this file must not take on.</item>
6
+ </non-goals>
7
+ </MODULE_CONTRACT>
8
+ <CHANGE_SUMMARY>
9
+ <item>RFC-1485: sweep compass headers — forge-os-rfc</item>
10
+ </CHANGE_SUMMARY>
11
+ */
12
+
1
13
  // RFC-1333 AC-1, AC-2, AC-10, Design step 2/3 — rfc.verify.workspace export.
2
14
  import { execFileSync } from "node:child_process";
3
15
  import { existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
@@ -5,6 +5,9 @@ no-report.proof.test.ts — RFC-1391 verifier fixture: a proof entry that never
5
5
  calls exhaustive(), so the run produces no report and the verdict must be
6
6
  `error` (never `proved`, never `refuted`).
7
7
  </purpose>
8
+ <non-goals>
9
+ <item>TODO(compass): record the boundary this file must not take on.</item>
10
+ </non-goals>
8
11
  </MODULE_CONTRACT>
9
12
  <CHANGE_SUMMARY>
10
13
  <item>RFC-1391 r1 verification: shared verifier support module.</item>
@@ -22,6 +25,7 @@ config is error not unavailable, and both surfaces share one path; {entry} is
22
25
  required in formal.tools.command; spec/entry paths are confined to the
23
26
  workspace; the exhaustive entry dispatches per packageManager; proved runs
24
27
  record log, counterexample stays the refuted-path record.</item>
28
+ <item>RFC-1485: sweep compass headers — forge-os-rfc</item>
25
29
  </CHANGE_SUMMARY>
26
30
  */
27
31
 
@@ -5,6 +5,9 @@ small-domain.proof.test.ts — RFC-1391 verifier fixture: a proof entry
5
5
  enumerating exactly 3 inputs through exhaustive(), used to exercise the
6
6
  proved path and the cardinality gate.
7
7
  </purpose>
8
+ <non-goals>
9
+ <item>TODO(compass): record the boundary this file must not take on.</item>
10
+ </non-goals>
8
11
  </MODULE_CONTRACT>
9
12
  <CHANGE_SUMMARY>
10
13
  <item>RFC-1391 r1 verification: shared verifier support module.</item>
@@ -22,6 +25,7 @@ config is error not unavailable, and both surfaces share one path; {entry} is
22
25
  required in formal.tools.command; spec/entry paths are confined to the
23
26
  workspace; the exhaustive entry dispatches per packageManager; proved runs
24
27
  record log, counterexample stays the refuted-path record.</item>
28
+ <item>RFC-1485: sweep compass headers — forge-os-rfc</item>
25
29
  </CHANGE_SUMMARY>
26
30
  */
27
31
 
@@ -5,6 +5,9 @@ Shared fixture builders for the RFC-1391 independent verifier checks —
5
5
  tmp-workspace and runtime-context helpers only. Nothing here re-implements
6
6
  production logic; expectations live in the *.acceptance.test.ts files.
7
7
  </purpose>
8
+ <non-goals>
9
+ <item>TODO(compass): record the boundary this file must not take on.</item>
10
+ </non-goals>
8
11
  </MODULE_CONTRACT>
9
12
  <CHANGE_SUMMARY>
10
13
  <item>RFC-1391 r1 verification: shared verifier support module.</item>
@@ -22,6 +25,7 @@ config is error not unavailable, and both surfaces share one path; {entry} is
22
25
  required in formal.tools.command; spec/entry paths are confined to the
23
26
  workspace; the exhaustive entry dispatches per packageManager; proved runs
24
27
  record log, counterexample stays the refuted-path record.</item>
28
+ <item>RFC-1485: sweep compass headers — forge-os-rfc</item>
25
29
  </CHANGE_SUMMARY>
26
30
  */
27
31
 
@@ -85,8 +85,11 @@ function extractFilePaths(content: string): string[] {
85
85
  async function extractCommitHashes(content: string, cwd: string): Promise<string[]> {
86
86
  const matches = content.match(COMMIT_HASH_PATTERN);
87
87
  if (!matches) return [];
88
- // Filter to plausible git hashes (7-40 hex chars, but exclude pure version numbers)
89
- const candidates = [...new Set(matches.filter((h) => !/^\d+$/.test(h) || h.length > 8))];
88
+ // 7-40 hex candidates; all-digit tokens are NOT pre-filtered — a
89
+ // digit-only sha-prefix is a valid commit and `git cat-file` below
90
+ // is the authority on what resolves (digit tokens that are dates or
91
+ // ids simply report `missing` there).
92
+ const candidates = [...new Set(matches)];
90
93
  if (candidates.length === 0) return [];
91
94
 
92
95
  // A hex token is recorded as a commit only when it resolves to a commit
@@ -1,7 +1,13 @@
1
1
  /*
2
2
  <MODULE_CONTRACT>
3
3
  <purpose>RFC-1471 session.audit detector tests — AUDIT-10..14 fire on their seeded session shapes; clean session produces zero findings.</purpose>
4
+ <non-goals>
5
+ <item>TODO(compass): record the boundary this file must not take on.</item>
6
+ </non-goals>
4
7
  </MODULE_CONTRACT>
8
+ <CHANGE_SUMMARY>
9
+ <item>RFC-1485: sweep compass headers — forge-os-tail</item>
10
+ </CHANGE_SUMMARY>
5
11
  */
6
12
 
7
13
  import { test, expect, describe } from "vitest";
@@ -1,7 +1,13 @@
1
1
  /*
2
2
  <MODULE_CONTRACT>
3
3
  <purpose>RFC-1471 session.audit.report tests — sidecar aggregation into docs/metrics/session-audit.generated.yaml, --window filter, unlinked finding classes.</purpose>
4
+ <non-goals>
5
+ <item>TODO(compass): record the boundary this file must not take on.</item>
6
+ </non-goals>
4
7
  </MODULE_CONTRACT>
8
+ <CHANGE_SUMMARY>
9
+ <item>RFC-1485: sweep compass headers — forge-os-tail</item>
10
+ </CHANGE_SUMMARY>
5
11
  */
6
12
 
7
13
  import { test, expect, describe, beforeEach, afterEach } from "vitest";