@warpgogol/forge 9.7.0 → 10.0.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 (327) hide show
  1. package/AGENTS.md +50 -27
  2. package/CHANGELOG.md +52 -0
  3. package/bin/cli.js +0 -0
  4. package/dist/os/adr/handlers/archive.d.ts.map +1 -1
  5. package/dist/os/adr/handlers/archive.js +3 -7
  6. package/dist/os/adr/handlers/archive.js.map +1 -1
  7. package/dist/os/adr/handlers/list-create.d.ts.map +1 -1
  8. package/dist/os/adr/handlers/list-create.js +8 -6
  9. package/dist/os/adr/handlers/list-create.js.map +1 -1
  10. package/dist/os/audit/handlers/archive.d.ts.map +1 -1
  11. package/dist/os/audit/handlers/archive.js +3 -7
  12. package/dist/os/audit/handlers/archive.js.map +1 -1
  13. package/dist/os/codebase/handlers/codebase-measure-symbols.d.ts.map +1 -1
  14. package/dist/os/codebase/handlers/codebase-measure-symbols.js +35 -4
  15. package/dist/os/codebase/handlers/codebase-measure-symbols.js.map +1 -1
  16. package/dist/os/core/archive-regen.d.ts +1 -0
  17. package/dist/os/core/archive-regen.d.ts.map +1 -1
  18. package/dist/os/core/archive-regen.js +31 -6
  19. package/dist/os/core/archive-regen.js.map +1 -1
  20. package/dist/os/core/core.module.d.ts.map +1 -1
  21. package/dist/os/core/core.module.js +6 -69
  22. package/dist/os/core/core.module.js.map +1 -1
  23. package/dist/os/core/handlers/assets-helpers.d.ts.map +1 -1
  24. package/dist/os/core/handlers/assets-helpers.js +2 -3
  25. package/dist/os/core/handlers/assets-helpers.js.map +1 -1
  26. package/dist/os/core/handlers/determinism-check.d.ts.map +1 -1
  27. package/dist/os/core/handlers/determinism-check.js +2 -3
  28. package/dist/os/core/handlers/determinism-check.js.map +1 -1
  29. package/dist/os/core/handlers/pinned-check.d.ts +13 -0
  30. package/dist/os/core/handlers/pinned-check.d.ts.map +1 -1
  31. package/dist/os/core/handlers/pinned-check.js +25 -0
  32. package/dist/os/core/handlers/pinned-check.js.map +1 -1
  33. package/dist/os/core/handlers/pinned-types.d.ts +7 -0
  34. package/dist/os/core/handlers/pinned-types.d.ts.map +1 -1
  35. package/dist/os/core/handlers/pinned-validate.d.ts.map +1 -1
  36. package/dist/os/core/handlers/pinned-validate.js +24 -1
  37. package/dist/os/core/handlers/pinned-validate.js.map +1 -1
  38. package/dist/os/core/handlers/release-prepare.d.ts.map +1 -1
  39. package/dist/os/core/handlers/release-prepare.js +2 -4
  40. package/dist/os/core/handlers/release-prepare.js.map +1 -1
  41. package/dist/os/flow/digest.d.ts +73 -1
  42. package/dist/os/flow/digest.d.ts.map +1 -1
  43. package/dist/os/flow/digest.js +344 -92
  44. package/dist/os/flow/digest.js.map +1 -1
  45. package/dist/os/flow/evidence-lock.d.ts +36 -0
  46. package/dist/os/flow/evidence-lock.d.ts.map +1 -0
  47. package/dist/os/flow/evidence-lock.js +156 -0
  48. package/dist/os/flow/evidence-lock.js.map +1 -0
  49. package/dist/os/flow/flow.module.d.ts.map +1 -1
  50. package/dist/os/flow/flow.module.js +36 -14
  51. package/dist/os/flow/flow.module.js.map +1 -1
  52. package/dist/os/flow/git.d.ts +50 -3
  53. package/dist/os/flow/git.d.ts.map +1 -1
  54. package/dist/os/flow/git.js +144 -12
  55. package/dist/os/flow/git.js.map +1 -1
  56. package/dist/os/flow/handlers/flow-digest.d.ts.map +1 -1
  57. package/dist/os/flow/handlers/flow-digest.js +3 -5
  58. package/dist/os/flow/handlers/flow-digest.js.map +1 -1
  59. package/dist/os/flow/handlers/flow-peers.js +1 -1
  60. package/dist/os/flow/handlers/flow-peers.js.map +1 -1
  61. package/dist/os/flow/handlers/flow-push.d.ts +81 -0
  62. package/dist/os/flow/handlers/flow-push.d.ts.map +1 -1
  63. package/dist/os/flow/handlers/flow-push.js +642 -138
  64. package/dist/os/flow/handlers/flow-push.js.map +1 -1
  65. package/dist/os/flow/locks.d.ts +8 -0
  66. package/dist/os/flow/locks.d.ts.map +1 -1
  67. package/dist/os/flow/locks.js +6 -3
  68. package/dist/os/flow/locks.js.map +1 -1
  69. package/dist/os/{mission → flow}/open-missions.d.ts +1 -2
  70. package/dist/os/flow/open-missions.d.ts.map +1 -0
  71. package/dist/os/flow/open-missions.js +37 -0
  72. package/dist/os/flow/open-missions.js.map +1 -0
  73. package/dist/os/flow/preflight.d.ts.map +1 -1
  74. package/dist/os/flow/preflight.js +5 -3
  75. package/dist/os/flow/preflight.js.map +1 -1
  76. package/dist/os/flow/registry.d.ts +9 -5
  77. package/dist/os/flow/registry.d.ts.map +1 -1
  78. package/dist/os/flow/registry.js +2 -2
  79. package/dist/os/flow/registry.js.map +1 -1
  80. package/dist/os/friction/friction.module.d.ts.map +1 -1
  81. package/dist/os/friction/friction.module.js +30 -5
  82. package/dist/os/friction/friction.module.js.map +1 -1
  83. package/dist/os/friction/handlers/friction-add.d.ts.map +1 -1
  84. package/dist/os/friction/handlers/friction-add.js +10 -17
  85. package/dist/os/friction/handlers/friction-add.js.map +1 -1
  86. package/dist/os/friction/handlers/friction-migrate.d.ts.map +1 -1
  87. package/dist/os/friction/handlers/friction-migrate.js +188 -2
  88. package/dist/os/friction/handlers/friction-migrate.js.map +1 -1
  89. package/dist/os/friction/store.d.ts +4 -0
  90. package/dist/os/friction/store.d.ts.map +1 -1
  91. package/dist/os/friction/store.js +20 -0
  92. package/dist/os/friction/store.js.map +1 -1
  93. package/dist/os/friction/types.d.ts +12 -0
  94. package/dist/os/friction/types.d.ts.map +1 -1
  95. package/dist/os/friction/types.js +8 -0
  96. package/dist/os/friction/types.js.map +1 -1
  97. package/dist/os/gate/handlers/gate-probe-catalog.d.ts.map +1 -1
  98. package/dist/os/gate/handlers/gate-probe-catalog.js +38 -5
  99. package/dist/os/gate/handlers/gate-probe-catalog.js.map +1 -1
  100. package/dist/os/plan/handlers/archive.d.ts.map +1 -1
  101. package/dist/os/plan/handlers/archive.js +3 -7
  102. package/dist/os/plan/handlers/archive.js.map +1 -1
  103. package/dist/os/rfc/handlers/archive.d.ts.map +1 -1
  104. package/dist/os/rfc/handlers/archive.js +3 -7
  105. package/dist/os/rfc/handlers/archive.js.map +1 -1
  106. package/dist/os/rfc/handlers/list-create.d.ts.map +1 -1
  107. package/dist/os/rfc/handlers/list-create.js +15 -7
  108. package/dist/os/rfc/handlers/list-create.js.map +1 -1
  109. package/dist/os/session/handlers/archive.d.ts.map +1 -1
  110. package/dist/os/session/handlers/archive.js +3 -7
  111. package/dist/os/session/handlers/archive.js.map +1 -1
  112. package/dist/os/system/handlers/system-product-register.d.ts +24 -0
  113. package/dist/os/system/handlers/system-product-register.d.ts.map +1 -0
  114. package/dist/os/system/handlers/system-product-register.js +322 -0
  115. package/dist/os/system/handlers/system-product-register.js.map +1 -0
  116. package/dist/os/system/handlers/system-products-status.d.ts +23 -0
  117. package/dist/os/system/handlers/system-products-status.d.ts.map +1 -0
  118. package/dist/os/system/handlers/system-products-status.js +235 -0
  119. package/dist/os/system/handlers/system-products-status.js.map +1 -0
  120. package/dist/os/system/schemas.d.ts +13 -0
  121. package/dist/os/system/schemas.d.ts.map +1 -1
  122. package/dist/os/system/schemas.js +15 -0
  123. package/dist/os/system/schemas.js.map +1 -1
  124. package/dist/os/system/system.module.d.ts.map +1 -1
  125. package/dist/os/system/system.module.js +113 -3
  126. package/dist/os/system/system.module.js.map +1 -1
  127. package/dist/src/command-modules.d.ts.map +1 -1
  128. package/dist/src/command-modules.js +0 -2
  129. package/dist/src/command-modules.js.map +1 -1
  130. package/dist/src/config/forge-config.d.ts +2 -0
  131. package/dist/src/config/forge-config.d.ts.map +1 -1
  132. package/dist/src/config/forge-config.js +11 -10
  133. package/dist/src/config/forge-config.js.map +1 -1
  134. package/dist/src/index.d.ts +0 -2
  135. package/dist/src/index.d.ts.map +1 -1
  136. package/dist/src/index.js +0 -2
  137. package/dist/src/index.js.map +1 -1
  138. package/dist/src/onboarding/create.d.ts.map +1 -1
  139. package/dist/src/onboarding/create.js +27 -2
  140. package/dist/src/onboarding/create.js.map +1 -1
  141. package/dist/src/onboarding/doctor.d.ts +0 -5
  142. package/dist/src/onboarding/doctor.d.ts.map +1 -1
  143. package/dist/src/onboarding/doctor.js +6 -79
  144. package/dist/src/onboarding/doctor.js.map +1 -1
  145. package/dist/src/onboarding/npm-token-check.d.ts +1 -1
  146. package/dist/src/onboarding/npm-token-check.d.ts.map +1 -1
  147. package/dist/src/onboarding/npm-token-check.js +2 -2
  148. package/dist/src/onboarding/npm-token-check.js.map +1 -1
  149. package/dist/src/profiles/stack-profile.js +2 -2
  150. package/dist/src/types.js +2 -2
  151. package/dist/src/utils/hash.d.ts +1 -0
  152. package/dist/src/utils/hash.d.ts.map +1 -1
  153. package/dist/src/utils/hash.js +4 -0
  154. package/dist/src/utils/hash.js.map +1 -1
  155. package/dist/{os/mission → src/utils}/lockfile.d.ts +1 -18
  156. package/dist/src/utils/lockfile.d.ts.map +1 -0
  157. package/dist/src/utils/lockfile.js +70 -0
  158. package/dist/src/utils/lockfile.js.map +1 -0
  159. package/dist/src/utils/verifier-git.d.ts +27 -1
  160. package/dist/src/utils/verifier-git.d.ts.map +1 -1
  161. package/dist/src/utils/verifier-git.js +36 -6
  162. package/dist/src/utils/verifier-git.js.map +1 -1
  163. package/docs/reference/system-hub.md +104 -0
  164. package/os/adr/handlers/archive.ts +3 -11
  165. package/os/adr/handlers/list-create.test.ts +174 -0
  166. package/os/adr/handlers/list-create.ts +16 -8
  167. package/os/audit/handlers/archive.ts +3 -11
  168. package/os/codebase/handlers/codebase-measure-symbols.ts +32 -4
  169. package/os/core/archive-regen.ts +33 -7
  170. package/os/core/core.module.ts +10 -76
  171. package/os/core/docs-archive.test.ts +25 -0
  172. package/os/core/handlers/assets-helpers.ts +2 -4
  173. package/os/core/handlers/determinism-check.ts +2 -3
  174. package/os/core/handlers/lifecycle-handlers.test.ts +529 -0
  175. package/os/core/handlers/pinned-check.ts +30 -0
  176. package/os/core/handlers/pinned-types.ts +7 -0
  177. package/os/core/handlers/pinned-validate.ts +28 -3
  178. package/os/core/handlers/release-prepare.ts +2 -4
  179. package/os/correctness/gate/trust-boundary-cx18.test.ts +1 -1
  180. package/os/flow/digest.ts +436 -95
  181. package/os/flow/evidence-lock.ts +184 -0
  182. package/os/flow/flow.module.ts +37 -14
  183. package/os/flow/git.ts +206 -11
  184. package/os/flow/handlers/flow-digest.ts +12 -8
  185. package/os/flow/handlers/flow-peers.ts +1 -1
  186. package/os/flow/handlers/flow-push.ts +725 -137
  187. package/os/flow/locks.ts +24 -7
  188. package/os/flow/open-missions.ts +45 -0
  189. package/os/flow/preflight.ts +5 -3
  190. package/os/flow/registry.ts +7 -3
  191. package/os/flow/tests/digest-id-inputs.test.ts +106 -0
  192. package/os/flow/tests/digest-persist.test.ts +243 -0
  193. package/os/flow/tests/evidence-preflight-surface-skip.test.ts +218 -0
  194. package/os/flow/tests/flow-push-attest.test.ts +137 -0
  195. package/os/flow/tests/flow-push-review-baseline.test.ts +339 -0
  196. package/os/flow/tests/flow-push-verifier-batch.test.ts +134 -0
  197. package/os/flow/tests/release-lines.test.ts +136 -0
  198. package/os/flow/tests/state-roots.test.ts +1 -48
  199. package/os/friction/friction-add.test.ts +42 -0
  200. package/os/friction/friction-migrate.test.ts +67 -2
  201. package/os/friction/friction.module.ts +33 -5
  202. package/os/friction/handlers/friction-add.ts +10 -15
  203. package/os/friction/handlers/friction-migrate.ts +220 -1
  204. package/os/friction/store.ts +19 -0
  205. package/os/friction/types.ts +8 -0
  206. package/os/gate/handlers/gate-probe-catalog.ts +39 -7
  207. package/os/gate/handlers/gate-probe-ratchet.test.ts +57 -22
  208. package/os/plan/handlers/archive.ts +3 -11
  209. package/os/rfc/handlers/archive.ts +3 -11
  210. package/os/rfc/handlers/list-create.ts +22 -17
  211. package/os/rfc/handlers/validate-corpus.test.ts +149 -0
  212. package/os/rfc/probe-batch.test.ts +253 -0
  213. package/os/rfc/verifier/rfc-1391/ac10-operating-model-policy.acceptance.test.ts +63 -0
  214. package/os/session/handlers/archive.ts +3 -11
  215. package/os/system/handlers/system-product-register.ts +492 -0
  216. package/os/system/handlers/system-products-status.ts +395 -0
  217. package/os/system/schemas.ts +17 -0
  218. package/os/system/system.module.ts +117 -3
  219. package/os/system/tests/system-product-register.test.ts +304 -0
  220. package/os/system/tests/system-products-status.test.ts +154 -0
  221. package/package.json +161 -506
  222. package/profiles/root-agents-system.md +82 -0
  223. package/profiles/system.yaml +1 -0
  224. package/src/command-modules.ts +0 -2
  225. package/src/config/forge-config.ts +16 -11
  226. package/src/index.ts +0 -2
  227. package/src/onboarding/create-superfolder-guard.test.ts +73 -0
  228. package/src/onboarding/create.ts +28 -2
  229. package/src/onboarding/doctor.ts +9 -96
  230. package/src/onboarding/npm-token-check.ts +3 -3
  231. package/src/profiles/stack-profile.ts +2 -2
  232. package/src/tests/evidence-consult-serialization.test.ts +202 -0
  233. package/src/tests/pinned-validate.test.ts +194 -0
  234. package/src/tests/pkg-health-self-scan.test.ts +29 -0
  235. package/src/tests/profile-flow-hooks.test.ts +1 -0
  236. package/src/tests/profile-schema.test.ts +1 -0
  237. package/src/tests/rfc-evidence-sync.test.ts +369 -0
  238. package/src/tests/skill-agents-sync.test.ts +192 -0
  239. package/src/tests/stack-profile.test.ts +1 -0
  240. package/src/types.ts +2 -2
  241. package/src/utils/hash.ts +5 -0
  242. package/src/utils/lockfile.ts +78 -0
  243. package/src/utils/verifier-git.ts +53 -5
  244. package/dist/os/core/handlers/forge-autonomy-validate.d.ts +0 -25
  245. package/dist/os/core/handlers/forge-autonomy-validate.d.ts.map +0 -1
  246. package/dist/os/core/handlers/forge-autonomy-validate.js +0 -208
  247. package/dist/os/core/handlers/forge-autonomy-validate.js.map +0 -1
  248. package/dist/os/mission/handlers/archive.d.ts +0 -4
  249. package/dist/os/mission/handlers/archive.d.ts.map +0 -1
  250. package/dist/os/mission/handlers/archive.js +0 -587
  251. package/dist/os/mission/handlers/archive.js.map +0 -1
  252. package/dist/os/mission/importer-block.d.ts +0 -19
  253. package/dist/os/mission/importer-block.d.ts.map +0 -1
  254. package/dist/os/mission/importer-block.js +0 -124
  255. package/dist/os/mission/importer-block.js.map +0 -1
  256. package/dist/os/mission/index.d.ts +0 -2
  257. package/dist/os/mission/index.d.ts.map +0 -1
  258. package/dist/os/mission/index.js +0 -15
  259. package/dist/os/mission/index.js.map +0 -1
  260. package/dist/os/mission/lockfile.d.ts.map +0 -1
  261. package/dist/os/mission/lockfile.js +0 -138
  262. package/dist/os/mission/lockfile.js.map +0 -1
  263. package/dist/os/mission/mission.module.d.ts +0 -3
  264. package/dist/os/mission/mission.module.d.ts.map +0 -1
  265. package/dist/os/mission/mission.module.js +0 -63
  266. package/dist/os/mission/mission.module.js.map +0 -1
  267. package/dist/os/mission/open-missions.d.ts.map +0 -1
  268. package/dist/os/mission/open-missions.js +0 -42
  269. package/dist/os/mission/open-missions.js.map +0 -1
  270. package/dist/os/mission/types.d.ts +0 -23
  271. package/dist/os/mission/types.d.ts.map +0 -1
  272. package/dist/os/mission/types.js +0 -19
  273. package/dist/os/mission/types.js.map +0 -1
  274. package/dist/os/werkstatt/handlers/lock.d.ts +0 -10
  275. package/dist/os/werkstatt/handlers/lock.d.ts.map +0 -1
  276. package/dist/os/werkstatt/handlers/lock.js +0 -153
  277. package/dist/os/werkstatt/handlers/lock.js.map +0 -1
  278. package/dist/os/werkstatt/handlers/schema.d.ts +0 -33
  279. package/dist/os/werkstatt/handlers/schema.d.ts.map +0 -1
  280. package/dist/os/werkstatt/handlers/schema.js +0 -42
  281. package/dist/os/werkstatt/handlers/schema.js.map +0 -1
  282. package/dist/os/werkstatt/handlers/werkstatt-lock-recover.d.ts +0 -15
  283. package/dist/os/werkstatt/handlers/werkstatt-lock-recover.d.ts.map +0 -1
  284. package/dist/os/werkstatt/handlers/werkstatt-lock-recover.js +0 -171
  285. package/dist/os/werkstatt/handlers/werkstatt-lock-recover.js.map +0 -1
  286. package/dist/os/werkstatt/handlers/werkstatt-lock-status.d.ts +0 -18
  287. package/dist/os/werkstatt/handlers/werkstatt-lock-status.d.ts.map +0 -1
  288. package/dist/os/werkstatt/handlers/werkstatt-lock-status.js +0 -51
  289. package/dist/os/werkstatt/handlers/werkstatt-lock-status.js.map +0 -1
  290. package/dist/os/werkstatt/handlers/werkstatt-operation-validate.d.ts +0 -11
  291. package/dist/os/werkstatt/handlers/werkstatt-operation-validate.d.ts.map +0 -1
  292. package/dist/os/werkstatt/handlers/werkstatt-operation-validate.js +0 -86
  293. package/dist/os/werkstatt/handlers/werkstatt-operation-validate.js.map +0 -1
  294. package/dist/os/werkstatt/handlers/workspace-deps.d.ts +0 -12
  295. package/dist/os/werkstatt/handlers/workspace-deps.d.ts.map +0 -1
  296. package/dist/os/werkstatt/handlers/workspace-deps.js +0 -42
  297. package/dist/os/werkstatt/handlers/workspace-deps.js.map +0 -1
  298. package/dist/os/werkstatt/index.d.ts +0 -7
  299. package/dist/os/werkstatt/index.d.ts.map +0 -1
  300. package/dist/os/werkstatt/index.js +0 -18
  301. package/dist/os/werkstatt/index.js.map +0 -1
  302. package/dist/os/werkstatt/werkstatt.module.d.ts +0 -3
  303. package/dist/os/werkstatt/werkstatt.module.d.ts.map +0 -1
  304. package/dist/os/werkstatt/werkstatt.module.js +0 -91
  305. package/dist/os/werkstatt/werkstatt.module.js.map +0 -1
  306. package/os/core/handlers/forge-autonomy-validate.ts +0 -276
  307. package/os/correctness/gate/trust-boundary-cx19.test.ts +0 -514
  308. package/os/mission/handlers/archive.test.ts +0 -764
  309. package/os/mission/handlers/archive.ts +0 -719
  310. package/os/mission/handlers/ship-inflight-degraded.test.ts +0 -105
  311. package/os/mission/importer-block.ts +0 -119
  312. package/os/mission/index.ts +0 -15
  313. package/os/mission/lockfile.ts +0 -152
  314. package/os/mission/mission.module.ts +0 -68
  315. package/os/mission/open-missions.ts +0 -50
  316. package/os/mission/types.ts +0 -42
  317. package/os/werkstatt/handlers/lock.ts +0 -168
  318. package/os/werkstatt/handlers/schema.ts +0 -47
  319. package/os/werkstatt/handlers/werkstatt-lock-recover.ts +0 -206
  320. package/os/werkstatt/handlers/werkstatt-lock-status.ts +0 -82
  321. package/os/werkstatt/handlers/werkstatt-operation-validate.ts +0 -112
  322. package/os/werkstatt/handlers/workspace-deps.ts +0 -56
  323. package/os/werkstatt/index.ts +0 -39
  324. package/os/werkstatt/werkstatt.module.ts +0 -95
  325. package/src/tests/doctor-autonomy.test.ts +0 -246
  326. package/src/tests/forge-autonomy-validate.test.ts +0 -159
  327. package/src/tests/werkstatt-lock.test.ts +0 -357
@@ -0,0 +1,82 @@
1
+ <!-- Root AGENTS.md template for system-profile hub repositories.
2
+ Static prose only — dynamic sections (skills, capabilities, behavioral layer)
3
+ are inserted at the dynamicSections marker by runAgentsGenerate.
4
+ Placeholders: projectName, projectStack, projectPm,
5
+ rfcsDir, adrsDir, plansDir, auditsDir, specsDir,
6
+ skillsDir, dynamicSections -->
7
+
8
+ # Agent Guide: {{projectName}}
9
+
10
+ > This file is generated by `forge.agents.generate` from `forge.yaml`. It is a living document — edit freely to add project-specific guidance.
11
+
12
+ ## Project
13
+
14
+ - **Name:** {{projectName}}
15
+ - **Stack:** {{projectStack}}
16
+ - **Package manager:** {{projectPm}}
17
+ - **Role:** system hub — the coordination repository for a folder of product repositories (RFC-1508, RFC-1639)
18
+
19
+ ## Paths
20
+
21
+ - RFCs: `{{rfcsDir}}`
22
+ - ADRs: `{{adrsDir}}`
23
+ - Plans: `{{plansDir}}`
24
+ - Audits: `{{auditsDir}}`
25
+ - Specs: `{{specsDir}}`
26
+ - Skills: `{{skillsDir}}`
27
+
28
+ ## What this repository is
29
+
30
+ This is a **system hub**: it coordinates the product repositories around it but ships no product code itself. The canonical member roster lives in `system/products.yaml` (committed: `id`, `remote`, `offers[]`, `frozen`), the local checkout map in `system/products.local.yaml` (gitignored — machine-local), the allowed/forbidden contract matrix in `system/edges.yaml`, and cross-product work in `queue/`.
31
+
32
+ ## Member registry
33
+
34
+ - Register a product with `system.product.register --id <kebab> --remote <url> --folder ../<dir>`; adopt a folder of forge repositories at once with `system.product.register --discover` (scans the parent directory, skips `ignored[]`, `@`-worktrees, and remote-less candidates). Preview with `--dry-run`.
35
+ - `system/products.local.yaml` is gitignored per-machine state — recreate it by re-running `system.product.register --folder` on each checkout machine.
36
+ - `frozen: true` members are pinned by contract — health reports stay informational, never error.
37
+ - `ignored[]` names siblings that are deliberately not products (frozen snapshots, test clones) — it silences the unregistered-sibling warning.
38
+
39
+ ## Health sweep
40
+
41
+ - `system.products.status` reports each member against disk reality: resolved folder, declared profile, `forge.syncedVersion` vs this hub's baseline, dirty state, live `@`-worktrees, commits ahead — plus registry-vs-disk warnings for unregistered forge siblings and git checkouts without `forge.yaml`.
42
+ - `system.map.validate` is the registry contract gate (the integration gate runs it) — run it after any `system/` edit.
43
+
44
+ ## Frictions
45
+
46
+ - Frictions about **this hub's own machinery** are repo-level: `friction.add`.
47
+ - Frictions about **member repos or the folder as a whole** are folder-level: `friction.add --level folder` — records carry `origin` + `migratedFrom` provenance and live in this repo's `docs/frictions/`.
48
+
49
+ ## Task queue
50
+
51
+ Cross-product work flows through `queue/`: `system.task.create` → `system.task.move` → `system.task.dispatch` (opens a product worktree with the brief) → `system.task.collect`. `system.outbox.scan` turns committed product-side `docs/outbox/` requests into proposed tasks.
52
+
53
+ {{dynamicSections}}
54
+
55
+ ## RTK — Token Optimization
56
+
57
+ Always prefix shell commands with `rtk` to minimize token consumption. RTK filters and compresses command output before it reaches the LLM context, cutting up to 90% of bash output on common operations.
58
+
59
+ ```bash
60
+ rtk git status
61
+ rtk pnpm test
62
+ rtk ls src/
63
+ rtk grep "pattern" src/
64
+ rtk find "*.ts" .
65
+ ```
66
+
67
+ Meta commands:
68
+
69
+ ```bash
70
+ rtk gain # Show token savings
71
+ rtk gain --history # Command history with savings
72
+ rtk discover # Find missed RTK opportunities
73
+ rtk proxy <cmd> # Run raw (no filtering, for debugging)
74
+ ```
75
+
76
+ Use default RTK settings only — do not enable `--ultra-compact` or aggressive `read` modes unless the operator explicitly requests it.
77
+
78
+ ## Conventions
79
+
80
+ - Use `forge.yaml` as the single source of truth for project configuration.
81
+ - Regenerate this file with `forge.agents.generate` after changing `forge.yaml`.
82
+ - Follow the closest `AGENTS.md` for workspace or directory details.
@@ -1,6 +1,7 @@
1
1
  schema: forge/stack-profile@1
2
2
  id: system
3
3
  displayName: System repository
4
+ rootAgentsMdTemplate: root-agents-system.md
4
5
  detect:
5
6
  anyOf:
6
7
  - system.marker
@@ -19,14 +19,12 @@ export async function loadForgeCommandModules(): Promise<ForgeModule[]> {
19
19
  await import("../os/adr/adr.module.ts").then((m) => m.createForgeAdrModule()),
20
20
  await import("../os/plan/plan.module.ts").then((m) => m.createForgePlanModule()),
21
21
  await import("../os/audit/audit.module.ts").then((m) => m.createForgeAuditModule()),
22
- await import("../os/mission/mission.module.ts").then((m) => m.createForgeMissionModule()),
23
22
  await import("../os/spec/spec.module.ts").then((m) => m.createForgeSpecModule()),
24
23
  await import("../os/program/program.module.ts").then((m) => m.createForgeProgramModule()),
25
24
  await import("../os/plugin/plugin.module.ts").then((m) => m.forgePluginModule),
26
25
  await import("../os/workflow/workflow.module.ts").then((m) => m.createForgeWorkflowModule()),
27
26
  await import("../os/naming/naming.module.ts").then((m) => m.createForgeNamingModule()),
28
27
  await import("../os/compass/compass.module.ts").then((m) => m.forgeCompassModule),
29
- await import("../os/werkstatt/werkstatt.module.ts").then((m) => m.forgeWerkstattModule),
30
28
  await import("../os/session/session.module.ts").then((m) => m.createForgeSessionModule()),
31
29
  await import("../os/exploration/exploration.module.ts").then((m) =>
32
30
  m.createForgeExplorationModule(),
@@ -6,19 +6,12 @@
6
6
  </non-goals>
7
7
  </MODULE_CONTRACT>
8
8
  <CHANGE_SUMMARY>
9
- <item>RFC-1615: round-1 acceptance counterexamples CX-6..CX-12</item>
10
- <item>RFC-1616: external verification trust boundary
11
-
12
- policy.digest (canonical SHA-256 over the frozen surface), adversarial.run
13
- with a 12-scenario catalog replayed through the real gate in a scratch
14
- clone, flow.push verifier-trailer hard stop (fail-closed on unreadable
15
- forge.yaml), project.owner + push.requireVerifierReview config, trust-boundary
16
- scaffold (CODEOWNERS + forge-policy workflow) and reference docs.</item>
17
- <item>RFC-1616: close verifier r1 counterexamples for the RFC-1616 trust boundary</item>
18
9
  <item>RFC-1616: close RFC-1616 r2 trust-boundary counterexamples</item>
19
10
  <item>RFC-1616: close RFC-1616 r5 trust-boundary counterexamples</item>
20
11
  <item>RFC-1617: outcomeBuildTimeoutMs binding for sites exceeding the 15-minute probe build cap; regenerate command manifest; heal SKILL-17 id + twin drift</item>
21
- <history>RFC-0391, RFC-0393, RFC-0537, RFC-0538, RFC-0539, RFC-0540, RFC-0543, RFC-0546, RFC-0639, RFC-0640, RFC-0643, RFC-0661, RFC-0662, RFC-0704, RFC-1097, RFC-1224, RFC-1332, RFC-1365, RFC-1391, RFC-1453, RFC-1481, RFC-1493, RFC-1539, RFC-1578, RFC-1579, RFC-1580, RFC-1591, RFC-1596, RFC-1615</history>
12
+ <item>RFC-1639: revert container-scope contracts — superfolder governance moves to the system hub</item>
13
+ <item>RFC-1643: committed verifier-review baseline for flow.push</item>
14
+ <history>RFC-0391, RFC-0393, RFC-0537, RFC-0538, RFC-0539, RFC-0540, RFC-0543, RFC-0546, RFC-0639, RFC-0640, RFC-0643, RFC-0661, RFC-0662, RFC-0704, RFC-1097, RFC-1224, RFC-1332, RFC-1365, RFC-1391, RFC-1453, RFC-1481, RFC-1493, RFC-1539, RFC-1578, RFC-1579, RFC-1580, RFC-1591, RFC-1596, RFC-1615, RFC-1616</history>
22
15
  </CHANGE_SUMMARY>
23
16
  */
24
17
 
@@ -464,6 +457,14 @@ export const forgeConfigSchema = z
464
457
  push: z
465
458
  .object({
466
459
  requireVerifierReview: z.boolean().optional(),
460
+ /**
461
+ * RFC-1643: committed review baseline — a full commit sha. Trailer
462
+ * commits that are ancestors of it no longer stop FLOW-PUSH-08
463
+ * (still scanned and reported). Loosely typed on purpose: shape is
464
+ * judged at push time (FLOW-PUSH-16), a malformed value must not
465
+ * brick every command that loads forge.yaml.
466
+ */
467
+ verifierReviewedThrough: z.string().optional(),
467
468
  /**
468
469
  * RFC-1616 r5 (CX-80): the declared trusted remote — the anchor
469
470
  * outside session-writable config that `flow.push` parity checks
@@ -539,7 +540,11 @@ export interface ForgeConfig {
539
540
  /** RFC-1578: raw `correctness:` section — validated by correctness.manifest.validate (CORR-02). */
540
541
  correctness?: Record<string, unknown>;
541
542
  /** RFC-1616 (Q-5): push-time trust-boundary controls — `requireVerifierReview` defaults to true; `expectedRemote` anchors the trusted remote. */
542
- push?: { requireVerifierReview?: boolean; expectedRemote?: string };
543
+ push?: {
544
+ requireVerifierReview?: boolean;
545
+ verifierReviewedThrough?: string;
546
+ expectedRemote?: string;
547
+ };
543
548
  /** RFC-1615: the declared policy surface — judged frozen by correctness.gate. */
544
549
  policy?: ForgePolicy;
545
550
  }
package/src/index.ts CHANGED
@@ -187,12 +187,10 @@ export { createForgeRfcModule } from "../os/rfc/rfc.module.ts";
187
187
  export { createForgeWorkflowModule } from "../os/workflow/workflow.module.ts";
188
188
  export { createForgeNamingModule } from "../os/naming/naming.module.ts";
189
189
  export { forgeCompassModule } from "../os/compass/compass.module.ts";
190
- export { forgeWerkstattModule } from "../os/werkstatt/werkstatt.module.ts";
191
190
  export { createForgeSpecModule } from "../os/spec/spec.module.ts";
192
191
  export { createForgeAdrModule } from "../os/adr/adr.module.ts";
193
192
  export { createForgePlanModule } from "../os/plan/plan.module.ts";
194
193
  export { createForgeAuditModule } from "../os/audit/audit.module.ts";
195
- export { createForgeMissionModule } from "../os/mission/mission.module.ts";
196
194
  export { createForgeExplorationModule } from "../os/exploration/exploration.module.ts";
197
195
  export { createForgeNotesModule } from "../os/notes/notes.module.ts";
198
196
  export { createForgeProgramModule } from "../os/program/program.module.ts";
@@ -0,0 +1,73 @@
1
+ /*
2
+ <MODULE_CONTRACT>
3
+ <purpose>Unit tests for the forge.create superfolder guard (RFC-1639 AC-7, CREATE-SUPERFOLDER-01) — a directory of forge-governed children refuses scaffolding in favour of the system-hub model.</purpose>
4
+ <non-goals>
5
+ <item>Not a contract source of truth — the implementation under test owns the behaviour.</item>
6
+ </non-goals>
7
+ </MODULE_CONTRACT>
8
+ <CHANGE_SUMMARY>
9
+ <item>RFC-1639: step 5-6 — acceptance tests, system-hub reference, regenerated manifests</item>
10
+ </CHANGE_SUMMARY>
11
+ */
12
+
13
+ import { test, expect, describe, beforeEach, afterEach } from "vitest";
14
+ import fs from "node:fs/promises";
15
+ import path from "node:path";
16
+ import os from "node:os";
17
+
18
+ import type { ForgeRuntimeContext } from "../types.ts";
19
+ import { runCreate } from "./create.ts";
20
+
21
+ let tmpDir: string;
22
+
23
+ beforeEach(async () => {
24
+ tmpDir = await fs.mkdtemp(path.join(os.tmpdir(), "create-superfolder-"));
25
+ });
26
+
27
+ afterEach(async () => {
28
+ await fs.rm(tmpDir, { recursive: true, force: true });
29
+ });
30
+
31
+ function ctx(): ForgeRuntimeContext {
32
+ const sink = (_msg: string, _details?: unknown): void => {};
33
+ return {
34
+ workspaceRoot: tmpDir,
35
+ logger: { section: sink, info: sink, warn: sink, error: sink, success: sink },
36
+ dryRun: false,
37
+ outputFormat: "json",
38
+ };
39
+ }
40
+
41
+ async function childWithForge(name: string): Promise<void> {
42
+ await fs.mkdir(path.join(tmpDir, name), { recursive: true });
43
+ await fs.writeFile(path.join(tmpDir, name, "forge.yaml"), 'schema: "forge/workspace@1"\n');
44
+ }
45
+
46
+ describe("forge.create — CREATE-SUPERFOLDER-01 (RFC-1639)", () => {
47
+ test("a directory of ≥2 forge-governed children refuses with the hub diagnostic", async () => {
48
+ await childWithForge("alpha");
49
+ await childWithForge("beta");
50
+ const result = await runCreate(
51
+ { argv: [], flags: { "in-place": true, profile: "typescript" } },
52
+ ctx(),
53
+ );
54
+ expect(result.exitCode).toBe(1);
55
+ expect(result.data?.status).toBe("fail");
56
+ const msg = result.data?.errors.join("\n") ?? "";
57
+ expect(msg).toContain("CREATE-SUPERFOLDER-01");
58
+ expect(msg).toContain("system-profile hub");
59
+ expect(result.data?.filesCreated).toEqual([]);
60
+ });
61
+
62
+ test("a single forge-governed child falls through to the plain empty-dir refusal", async () => {
63
+ await childWithForge("alpha");
64
+ const result = await runCreate(
65
+ { argv: [], flags: { "in-place": true, profile: "typescript" } },
66
+ ctx(),
67
+ );
68
+ expect(result.exitCode).toBe(1);
69
+ const msg = result.data?.errors.join("\n") ?? "";
70
+ expect(msg).toContain("Directory is not empty");
71
+ expect(msg).not.toContain("CREATE-SUPERFOLDER-01");
72
+ });
73
+ });
@@ -9,7 +9,6 @@
9
9
  </non-goals>
10
10
  </MODULE_CONTRACT>
11
11
  <CHANGE_SUMMARY>
12
- <item>RFC-1500: step 2 — forge.create adopts the fixed branch model</item>
13
12
  <item>RFC-1500: link branch-model guide in committed NEXT_STEPS.md (review r1)</item>
14
13
  <item>RFC-1578: correctness manifest, validator, promotes gate
15
14
 
@@ -20,7 +19,8 @@ F1 code-only anchor scan (markdown fences never declare anchors); F2 generated i
20
19
  <item>RFC-1578: close review REVIEW-CODE-2026-11-12-09 findings
21
20
 
22
21
  N1 index-hint rows count only for files in the workspace listing; N2 forge create leaves exempt repositories unbound; N3 listing test stages a file. Record DEV-3/DEV-4 amendments (CORR-07 future/escaping captures, index as re-verified hint) in the RFC Deviations section.</item>
23
- <history>RFC-0544, RFC-0548, RFC-0550, RFC-0640, RFC-0643, RFC-0664, RFC-0877, RFC-1097, RFC-1224</history>
22
+ <item>RFC-1639: step 3-4 — friction.migrate --from ingest, friction.add --level, CREATE-SUPERFOLDER-01 guard</item>
23
+ <history>RFC-0544, RFC-0548, RFC-0550, RFC-0640, RFC-0643, RFC-0664, RFC-0877, RFC-1097, RFC-1224, RFC-1500</history>
24
24
  </CHANGE_SUMMARY>
25
25
  */
26
26
 
@@ -258,6 +258,32 @@ export async function runCreate(
258
258
  } catch {
259
259
  dirEntries = [];
260
260
  }
261
+ // RFC-1639 (CREATE-SUPERFOLDER-01): a directory whose immediate children
262
+ // already carry forge.yaml is a superfolder — its governance belongs in a
263
+ // system-profile hub repository, never in a folder-level forge.yaml. The
264
+ // guard bounds the command; a hand-written forge.yaml is untouched.
265
+ let forgeChildren = 0;
266
+ for (const name of dirEntries) {
267
+ if (await fio.exists(path.join(targetDir, name, "forge.yaml"))) forgeChildren++;
268
+ }
269
+ if (forgeChildren >= 2) {
270
+ const msg =
271
+ `CREATE-SUPERFOLDER-01: ${targetDir} already holds ${forgeChildren} forge-governed repositories — ` +
272
+ `this is a superfolder. Folder-level governance lives in a system-profile hub repository ` +
273
+ `(profile: system — system/products.yaml, friction registry, task queue), never in a ` +
274
+ `forge.yaml at this level. Refusing to scaffold.`;
275
+ errors.push(msg);
276
+ if (outputFormat === "pretty") {
277
+ logger.error(msg);
278
+ }
279
+ return {
280
+ data: { command: "forge.create", status: "fail", projectDir: targetDir, profile, filesCreated: [], errors },
281
+ nextSteps: failNextSteps,
282
+ exitCode: 1,
283
+ summary: `forge.create: failed — ${msg}`,
284
+ };
285
+ }
286
+
261
287
  const unexpectedEntries = dirEntries.filter((e) => !ALLOWED_EXISTING_DIRS.has(e));
262
288
  if (unexpectedEntries.length > 0) {
263
289
  const msg = `Directory is not empty. Found: ${unexpectedEntries.slice(0, 10).join(", ")}${unexpectedEntries.length > 10 ? ` (and ${unexpectedEntries.length - 10} more)` : ""}. The target directory must be empty. Refusing to scaffold.`;
@@ -2,7 +2,7 @@
2
2
  <MODULE_CONTRACT>
3
3
  <purpose>forge.doctor — diagnoses forge state in an existing project.
4
4
  Checks for forge.yaml, AGENTS.md, PREFERENCES.md, .agents/skills/, docs/rfcs/,
5
- @warpgogol/* import autonomy guard, and bindings contract (RFC-0393).</purpose>
5
+ bindings contract (RFC-0393).</purpose>
6
6
  <non-goals>
7
7
  <item>Do not modify files — doctor is read-only diagnostics.</item>
8
8
  </non-goals>
@@ -27,7 +27,7 @@ import {
27
27
  commentStyleForPath,
28
28
  } from "../utils/index.ts";
29
29
  import { readFileSync, existsSync } from "../utils/sync-fs.ts";
30
- import { join, relative, dirname, resolve, sep } from "node:path";
30
+ import { join, relative, dirname, resolve } from "node:path";
31
31
  import picomatch from "picomatch";
32
32
  import { parse as parseYaml } from "yaml";
33
33
  import { forgePluginManifestSchema } from "../plugin/forge-plugin-manifest.ts";
@@ -77,10 +77,6 @@ interface DoctorCheck {
77
77
  unmappedFiles?: string[];
78
78
  }
79
79
 
80
- interface ForbiddenImport {
81
- file: string;
82
- specifier: string;
83
- }
84
80
 
85
81
  interface BindingValidation {
86
82
  resolved: string[];
@@ -99,26 +95,6 @@ async function pathExists(target: string, io: WorkspaceIO): Promise<boolean> {
99
95
  return io.exists(target);
100
96
  }
101
97
 
102
- // FORGE-AUTONOMY-01 (RFC-0940, ADR-0019): `import type` statements are exempt
103
- // (erased at compile time); `os/werkstatt/` is the declared werkstatt-adapter
104
- // boundary and may import @warpgogol/*; other `os/` dirs may not import
105
- // @warpgogol/werkstatt-engine but may use @warpgogol/werkstatt-shared (exempt
106
- // shared infrastructure); `src/` and the rest of the tree may not carry any
107
- // runtime @warpgogol/* import. dist/, tests dirs, and *.test.ts/*.spec.ts/
108
- // *.d.ts are generated or fixture surfaces, not scanned source.
109
- const FORBIDDEN_IMPORT_PATTERN =
110
- /(?:^|\n)\s*(import\s+[^;]+?\s+from\s+|require\s*\(\s*)["'`](@warpgogol\/[^"'`]+)["'`]/g;
111
-
112
- const AUTONOMY_EXCLUDE_DIRS = new Set([
113
- "node_modules",
114
- "dist",
115
- "tests",
116
- "tests-handoff",
117
- "templates",
118
- ]);
119
- const AUTONOMY_EXCLUDE_SUFFIXES = [".test.ts", ".spec.ts", ".d.ts"];
120
- const ENGINE_SPECIFIER = "@warpgogol/werkstatt-engine";
121
-
122
98
  // Per-check fix hints for the pretty-output failure line — a generic
123
99
  // "run 'forge create'" hint is wrong for checks create cannot repair.
124
100
  const CHECK_FIX_HINTS: Record<string, string> = {
@@ -129,59 +105,10 @@ const CHECK_FIX_HINTS: Record<string, string> = {
129
105
  "npm-token (@warpgogol)": "configure a @warpgogol npm token in .npmrc",
130
106
  "git-branch": "rename the default branch to 'main'",
131
107
  "domain-invariants": "fix the reported invariant violations",
132
- "autonomy-guard":
133
- "remove the flagged @warpgogol/* imports or place them behind the os/werkstatt/ adapter boundary (FORGE-AUTONOMY-01)",
134
108
  bindings: "fix the invalid forge.yaml bindings",
135
109
  "outcome-config": "declare the outcomeBuild/outcomeServe bindings or drop the outcomeSurfaces entry",
136
110
  };
137
111
 
138
- function isForbiddenSpecifier(specifier: string, relToForge: string): boolean {
139
- if (relToForge.startsWith("os/werkstatt/")) return false;
140
- if (relToForge.startsWith("os/")) {
141
- return specifier === ENGINE_SPECIFIER || specifier.startsWith(`${ENGINE_SPECIFIER}/`);
142
- }
143
- return true;
144
- }
145
-
146
- async function scanForForbiddenImports(
147
- dir: string,
148
- forgeRoot: string,
149
- workspaceRoot: string,
150
- io: WorkspaceIO,
151
- ): Promise<ForbiddenImport[]> {
152
- const violations: ForbiddenImport[] = [];
153
- const entries = await io.readdir(dir).catch(() => []);
154
-
155
- for (const entry of entries) {
156
- const fullPath = join(dir, entry.name);
157
-
158
- if (entry.isDirectory) {
159
- if (AUTONOMY_EXCLUDE_DIRS.has(entry.name)) continue;
160
- const sub = await scanForForbiddenImports(fullPath, forgeRoot, workspaceRoot, io);
161
- violations.push(...sub);
162
- } else if (
163
- entry.name.endsWith(".ts") &&
164
- !AUTONOMY_EXCLUDE_SUFFIXES.some((suffix) => entry.name.endsWith(suffix))
165
- ) {
166
- const relToForge = relative(forgeRoot, fullPath).split(sep).join("/");
167
- const content = await io.readFile(fullPath).catch(() => "");
168
- let match: RegExpExecArray | null;
169
- const pattern = new RegExp(FORBIDDEN_IMPORT_PATTERN.source, "g");
170
- while ((match = pattern.exec(content)) !== null) {
171
- if (/\bimport\s+type\b/.test(match[1]!)) continue;
172
- const specifier = match[2]!;
173
- if (!isForbiddenSpecifier(specifier, relToForge)) continue;
174
- violations.push({
175
- file: relative(workspaceRoot, fullPath),
176
- specifier,
177
- });
178
- }
179
- }
180
- }
181
-
182
- return violations;
183
- }
184
-
185
112
  // ---------------------------------------------------------------------------
186
113
  // Bindings validation (RFC-0393)
187
114
  // ---------------------------------------------------------------------------
@@ -1481,7 +1408,7 @@ function checkPrerequisites(prerequisites: ProfilePrerequisite[]): DoctorCheck {
1481
1408
  export async function runDoctor(
1482
1409
  input: ForgeCommandInput,
1483
1410
  context: ForgeRuntimeContext,
1484
- ): Promise<ForgeCommandResult<{ command: string; checks: DoctorCheck[]; allPass: boolean; forbiddenImports: ForbiddenImport[]; bindings: BindingValidation; domain?: DomainReport; fixes?: DoctorFixResult[] }>> {
1411
+ ): Promise<ForgeCommandResult<{ command: string; checks: DoctorCheck[]; allPass: boolean; bindings: BindingValidation; domain?: DomainReport; fixes?: DoctorFixResult[] }>> {
1485
1412
  const { workspaceRoot, logger, outputFormat, dryRun } = context;
1486
1413
  const fio = resolveIo(context.io);
1487
1414
  const strict = input.flags["strict"] === true;
@@ -1559,7 +1486,7 @@ export async function runDoctor(
1559
1486
  name: "npm-token (@warpgogol)",
1560
1487
  status: tokenCheck.canFetch ? "pass" : "fail",
1561
1488
  message: tokenCheck.canFetch
1562
- ? `npm token fetches @warpgogol/werkstatt-engine (${tokenCheck.registry ?? "default registry"})`
1489
+ ? `registry fetches @warpgogol/forge (${tokenCheck.registry ?? "default registry"})`
1563
1490
  : tokenCheck.fixHint!,
1564
1491
  });
1565
1492
  }
@@ -1567,7 +1494,7 @@ export async function runDoctor(
1567
1494
  // Check git branch is 'main' (not 'master')
1568
1495
  checks.push(checkGitBranch(workspaceRoot));
1569
1496
 
1570
- // Check @warpgogol/* forbidden imports (autonomy guard)
1497
+
1571
1498
  let forgeRoot: string;
1572
1499
  try {
1573
1500
  forgeRoot = resolveForgeRoot(workspaceRoot);
@@ -1575,6 +1502,9 @@ export async function runDoctor(
1575
1502
  forgeRoot = join(workspaceRoot, "packages", "forge");
1576
1503
  }
1577
1504
 
1505
+ // Source-scanning checks distinguish development checkouts from immutable npm installs.
1506
+ const forgeSourceCheckout = isForgeSourceCheckout(forgeRoot);
1507
+
1578
1508
  // RFC-0640: Resolve domain report for domain-aware checks
1579
1509
  const domainReport = resolveDomainReport(workspaceRoot, forgeRoot);
1580
1510
 
@@ -1648,23 +1578,6 @@ export async function runDoctor(
1648
1578
  : `${invalidProfiles.length} profile(s) invalid (advisory): ${invalidProfiles.map((p) => p.id).join(", ")}`,
1649
1579
  });
1650
1580
 
1651
- // Source-scanning checks only make sense on a forge development checkout —
1652
- // the published tarball ships src/ and os/, but an installed package's
1653
- // source is immutable and a finding there is not actionable for consumers.
1654
- const forgeSourceCheckout = isForgeSourceCheckout(forgeRoot);
1655
- const forbiddenImports = forgeSourceCheckout
1656
- ? await scanForForbiddenImports(forgeRoot, forgeRoot, workspaceRoot, fio)
1657
- : [];
1658
- checks.push({
1659
- name: "autonomy-guard",
1660
- status: forbiddenImports.length === 0 ? "pass" : "fail",
1661
- message:
1662
- forbiddenImports.length === 0
1663
- ? forgeSourceCheckout
1664
- ? "No @warpgogol/* imports in forge source"
1665
- : "npm-installed forge — source autonomy check skipped"
1666
- : `${forbiddenImports.length} @warpgogol/* import(s) found in forge source — remove them`,
1667
- });
1668
1581
 
1669
1582
  // Check bindings contract (RFC-0393)
1670
1583
  const bindingsResult = await validateBindings(workspaceRoot, fio);
@@ -1798,7 +1711,7 @@ export async function runDoctor(
1798
1711
  const fixFailed = fixes.some((f) => f.action === "failed");
1799
1712
 
1800
1713
  return {
1801
- data: { command: "forge.doctor", checks: finalChecks, allPass, forbiddenImports, bindings: bindingsResult, domain: domainReport, ...(fix ? { fixes } : {}) },
1714
+ data: { command: "forge.doctor", checks: finalChecks, allPass, bindings: bindingsResult, domain: domainReport, ...(fix ? { fixes } : {}) },
1802
1715
  exitCode: hasFails || fixFailed ? 1 : 0,
1803
1716
  summary: allPass
1804
1717
  ? "forge.doctor: all checks passed"
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  <MODULE_CONTRACT>
3
- <purpose>Non-interactive npm-token probe for the private @warpgogol registry scope (RFC-1125) — parses .npmrc for the @warpgogol scope registry and auth token presence, probes the registry via `npm view @warpgogol/werkstatt-engine version` (injectable for tests) before pnpm install runs in forge create, re-verifies post-install in forge.doctor, and returns a structured NpmTokenCheck with an actionable fixHint on failure.</purpose>
3
+ <purpose>Non-interactive npm-token probe for the private @warpgogol registry scope (RFC-1125) — parses .npmrc for the @warpgogol scope registry and auth token presence, probes the registry via `npm view @warpgogol/forge version` (injectable for tests) before pnpm install runs in forge create, re-verifies post-install in forge.doctor, and returns a structured NpmTokenCheck with an actionable fixHint on failure.</purpose>
4
4
  <non-goals>
5
5
  <item>Do not prompt the operator — the probe is non-interactive (create.ts forbids prompts).</item>
6
6
  <item>Do not accept tokens via CLI flags — tokens must not appear in argv/history.</item>
@@ -22,7 +22,7 @@ export interface NpmTokenCheck {
22
22
  registry: string | null;
23
23
  /** A usable token is configured — NPM_TOKEN env or a real _authToken value. */
24
24
  tokenPresent: boolean;
25
- /** `npm view @warpgogol/werkstatt-engine version` succeeded from workspaceRoot. */
25
+ /** `npm view @warpgogol/forge version` succeeded from workspaceRoot. */
26
26
  canFetch: boolean;
27
27
  /** Actionable remediation when canFetch is false; null on success. */
28
28
  fixHint: string | null;
@@ -37,7 +37,7 @@ export interface NpmTokenProbeDeps {
37
37
  }
38
38
 
39
39
  const WARPGOGOL_SCOPE = "@warpgogol";
40
- const PROBE_PACKAGE = "@warpgogol/werkstatt-engine";
40
+ const PROBE_PACKAGE = "@warpgogol/forge";
41
41
  const PROBE_TIMEOUT_MS = 15_000;
42
42
  const PLACEHOLDER_TOKENS = new Set(["YOUR_NPM_TOKEN", ""]);
43
43
 
@@ -7,7 +7,6 @@
7
7
  </non-goals>
8
8
  </MODULE_CONTRACT>
9
9
  <CHANGE_SUMMARY>
10
- <item>RFC-0679: add assets field to stackProfileSchema for asset management commands.</item>
11
10
  <item>RFC-0680: add release field to stackProfileSchema for release lifecycle commands.</item>
12
11
  <item>ADR-0043: add scriptDir field for agent-generated script directory convention.</item>
13
12
  <item>RFC-1097: step 6 — compass.migrate codemod run
@@ -16,7 +15,8 @@ Mechanical v1 to v2 header migration across the workspace: 942 files rewritten
16
15
  <item>RFC-1097: sweep — packages/forge + services clean
17
16
 
18
17
  Sweep batch 2: real KEY_DECISIONS on 10 files, expanded purposes (CONTRACT-02/PURPOSE-02), headers on mission/index + gen-upstreams, sanitizeItemText in summary.record (literal Compass tags corrupted history), excludedPaths for wrangler types, test-fixtures testPattern. forge+services now 0 diagnostics under --mode error.</item>
19
- <history>RFC-0392, RFC-0638, RFC-0674</history>
18
+ <item>RFC-1639: revert container-scope contracts — superfolder governance moves to the system hub</item>
19
+ <history>RFC-0392, RFC-0638, RFC-0674, RFC-0679</history>
20
20
  </CHANGE_SUMMARY>
21
21
  */
22
22