@jeger-ai/opengantry 3.2.6 → 3.4.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 (461) hide show
  1. package/README.md +12 -2
  2. package/dist/cli/commands/contract.d.ts +21 -0
  3. package/dist/cli/commands/contract.d.ts.map +1 -0
  4. package/dist/cli/commands/contract.js +113 -0
  5. package/dist/cli/commands/contract.js.map +1 -0
  6. package/dist/cli/commands/deps.d.ts +18 -0
  7. package/dist/cli/commands/deps.d.ts.map +1 -0
  8. package/dist/cli/commands/deps.js +63 -0
  9. package/dist/cli/commands/deps.js.map +1 -0
  10. package/dist/cli/commands/doctor.d.ts +3 -6
  11. package/dist/cli/commands/doctor.d.ts.map +1 -1
  12. package/dist/cli/commands/doctor.js +8 -1
  13. package/dist/cli/commands/doctor.js.map +1 -1
  14. package/dist/cli/commands/interrogate.js +3 -3
  15. package/dist/cli/commands/interrogate.js.map +1 -1
  16. package/dist/cli/commands/ledger.d.ts +24 -0
  17. package/dist/cli/commands/ledger.d.ts.map +1 -0
  18. package/dist/cli/commands/ledger.js +88 -0
  19. package/dist/cli/commands/ledger.js.map +1 -0
  20. package/dist/cli/commands/mission.d.ts +6 -0
  21. package/dist/cli/commands/mission.d.ts.map +1 -1
  22. package/dist/cli/commands/mission.js +43 -3
  23. package/dist/cli/commands/mission.js.map +1 -1
  24. package/dist/cli/commands/perimeter.d.ts.map +1 -1
  25. package/dist/cli/commands/perimeter.js +4 -0
  26. package/dist/cli/commands/perimeter.js.map +1 -1
  27. package/dist/cli/commands/policy.d.ts +10 -0
  28. package/dist/cli/commands/policy.d.ts.map +1 -0
  29. package/dist/cli/commands/policy.js +49 -0
  30. package/dist/cli/commands/policy.js.map +1 -0
  31. package/dist/cli/commands/tmvc-guard.d.ts.map +1 -1
  32. package/dist/cli/commands/tmvc-guard.js +1 -0
  33. package/dist/cli/commands/tmvc-guard.js.map +1 -1
  34. package/dist/cli/commands/triage.d.ts.map +1 -1
  35. package/dist/cli/commands/triage.js +2 -1
  36. package/dist/cli/commands/triage.js.map +1 -1
  37. package/dist/cli/commands/verify.d.ts.map +1 -1
  38. package/dist/cli/commands/verify.js +2 -11
  39. package/dist/cli/commands/verify.js.map +1 -1
  40. package/dist/cli/kernel.d.ts +10 -3
  41. package/dist/cli/kernel.d.ts.map +1 -1
  42. package/dist/cli/kernel.js +18 -2
  43. package/dist/cli/kernel.js.map +1 -1
  44. package/dist/cli/lib/adapter-preflight-checks.d.ts +55 -0
  45. package/dist/cli/lib/adapter-preflight-checks.d.ts.map +1 -0
  46. package/dist/cli/lib/adapter-preflight-checks.js +275 -0
  47. package/dist/cli/lib/adapter-preflight-checks.js.map +1 -0
  48. package/dist/cli/lib/attest-mission.d.ts.map +1 -1
  49. package/dist/cli/lib/attest-mission.js +7 -0
  50. package/dist/cli/lib/attest-mission.js.map +1 -1
  51. package/dist/cli/lib/break-glass.d.ts +1 -1
  52. package/dist/cli/lib/break-glass.d.ts.map +1 -1
  53. package/dist/cli/lib/break-glass.js +6 -0
  54. package/dist/cli/lib/break-glass.js.map +1 -1
  55. package/dist/cli/lib/command-boundary.d.ts +7 -3
  56. package/dist/cli/lib/command-boundary.d.ts.map +1 -1
  57. package/dist/cli/lib/command-boundary.js +20 -4
  58. package/dist/cli/lib/command-boundary.js.map +1 -1
  59. package/dist/cli/lib/constants.d.ts +13 -0
  60. package/dist/cli/lib/constants.d.ts.map +1 -1
  61. package/dist/cli/lib/constants.js +13 -0
  62. package/dist/cli/lib/constants.js.map +1 -1
  63. package/dist/cli/lib/contract/approve-prompt.d.ts +22 -0
  64. package/dist/cli/lib/contract/approve-prompt.d.ts.map +1 -0
  65. package/dist/cli/lib/contract/approve-prompt.js +71 -0
  66. package/dist/cli/lib/contract/approve-prompt.js.map +1 -0
  67. package/dist/cli/lib/contract/contract-hash.d.ts +19 -0
  68. package/dist/cli/lib/contract/contract-hash.d.ts.map +1 -0
  69. package/dist/cli/lib/contract/contract-hash.js +67 -0
  70. package/dist/cli/lib/contract/contract-hash.js.map +1 -0
  71. package/dist/cli/lib/contract/contract-scan.d.ts +27 -0
  72. package/dist/cli/lib/contract/contract-scan.d.ts.map +1 -0
  73. package/dist/cli/lib/contract/contract-scan.js +167 -0
  74. package/dist/cli/lib/contract/contract-scan.js.map +1 -0
  75. package/dist/cli/lib/contract/contract-types.d.ts +38 -0
  76. package/dist/cli/lib/contract/contract-types.d.ts.map +1 -0
  77. package/dist/cli/lib/contract/contract-types.js +11 -0
  78. package/dist/cli/lib/contract/contract-types.js.map +1 -0
  79. package/dist/cli/lib/contract/effective-scope.d.ts +21 -0
  80. package/dist/cli/lib/contract/effective-scope.d.ts.map +1 -0
  81. package/dist/cli/lib/contract/effective-scope.js +77 -0
  82. package/dist/cli/lib/contract/effective-scope.js.map +1 -0
  83. package/dist/cli/lib/contract/format.d.ts +20 -0
  84. package/dist/cli/lib/contract/format.d.ts.map +1 -0
  85. package/dist/cli/lib/contract/format.js +48 -0
  86. package/dist/cli/lib/contract/format.js.map +1 -0
  87. package/dist/cli/lib/contract/propose-gate.d.ts +21 -0
  88. package/dist/cli/lib/contract/propose-gate.d.ts.map +1 -0
  89. package/dist/cli/lib/contract/propose-gate.js +57 -0
  90. package/dist/cli/lib/contract/propose-gate.js.map +1 -0
  91. package/dist/cli/lib/contract/propose-imports.d.ts +26 -0
  92. package/dist/cli/lib/contract/propose-imports.d.ts.map +1 -0
  93. package/dist/cli/lib/contract/propose-imports.js +128 -0
  94. package/dist/cli/lib/contract/propose-imports.js.map +1 -0
  95. package/dist/cli/lib/contract/propose.d.ts +25 -0
  96. package/dist/cli/lib/contract/propose.d.ts.map +1 -0
  97. package/dist/cli/lib/contract/propose.js +100 -0
  98. package/dist/cli/lib/contract/propose.js.map +1 -0
  99. package/dist/cli/lib/contract/resolve-specifier.d.ts +34 -0
  100. package/dist/cli/lib/contract/resolve-specifier.d.ts.map +1 -0
  101. package/dist/cli/lib/contract/resolve-specifier.js +93 -0
  102. package/dist/cli/lib/contract/resolve-specifier.js.map +1 -0
  103. package/dist/cli/lib/defensive-profile-presets.d.ts +6 -0
  104. package/dist/cli/lib/defensive-profile-presets.d.ts.map +1 -1
  105. package/dist/cli/lib/defensive-profile-presets.js +15 -1
  106. package/dist/cli/lib/defensive-profile-presets.js.map +1 -1
  107. package/dist/cli/lib/deps/deps-fetch.d.ts +4 -0
  108. package/dist/cli/lib/deps/deps-fetch.d.ts.map +1 -0
  109. package/dist/cli/lib/deps/deps-fetch.js +16 -0
  110. package/dist/cli/lib/deps/deps-fetch.js.map +1 -0
  111. package/dist/cli/lib/deps/deps-resolve.d.ts +18 -0
  112. package/dist/cli/lib/deps/deps-resolve.d.ts.map +1 -0
  113. package/dist/cli/lib/deps/deps-resolve.js +66 -0
  114. package/dist/cli/lib/deps/deps-resolve.js.map +1 -0
  115. package/dist/cli/lib/deps/deps-slug.d.ts +5 -0
  116. package/dist/cli/lib/deps/deps-slug.d.ts.map +1 -0
  117. package/dist/cli/lib/deps/deps-slug.js +44 -0
  118. package/dist/cli/lib/deps/deps-slug.js.map +1 -0
  119. package/dist/cli/lib/doctor-adapter-preflight.d.ts +24 -0
  120. package/dist/cli/lib/doctor-adapter-preflight.d.ts.map +1 -0
  121. package/dist/cli/lib/doctor-adapter-preflight.js +98 -0
  122. package/dist/cli/lib/doctor-adapter-preflight.js.map +1 -0
  123. package/dist/cli/lib/doctor-core.d.ts +7 -1
  124. package/dist/cli/lib/doctor-core.d.ts.map +1 -1
  125. package/dist/cli/lib/doctor-core.js +36 -5
  126. package/dist/cli/lib/doctor-core.js.map +1 -1
  127. package/dist/cli/lib/doctor-integration.d.ts +2 -0
  128. package/dist/cli/lib/doctor-integration.d.ts.map +1 -1
  129. package/dist/cli/lib/doctor-integration.js +4 -2
  130. package/dist/cli/lib/doctor-integration.js.map +1 -1
  131. package/dist/cli/lib/doctor-preflight/eslint.d.ts +4 -0
  132. package/dist/cli/lib/doctor-preflight/eslint.d.ts.map +1 -0
  133. package/dist/cli/lib/doctor-preflight/eslint.js +41 -0
  134. package/dist/cli/lib/doctor-preflight/eslint.js.map +1 -0
  135. package/dist/cli/lib/doctor-preflight/index.d.ts +3 -0
  136. package/dist/cli/lib/doctor-preflight/index.d.ts.map +1 -0
  137. package/dist/cli/lib/doctor-preflight/index.js +3 -0
  138. package/dist/cli/lib/doctor-preflight/index.js.map +1 -0
  139. package/dist/cli/lib/doctor-preflight/tsc.d.ts +4 -0
  140. package/dist/cli/lib/doctor-preflight/tsc.d.ts.map +1 -0
  141. package/dist/cli/lib/doctor-preflight/tsc.js +42 -0
  142. package/dist/cli/lib/doctor-preflight/tsc.js.map +1 -0
  143. package/dist/cli/lib/doctor-substrate.d.ts +2 -2
  144. package/dist/cli/lib/doctor-substrate.d.ts.map +1 -1
  145. package/dist/cli/lib/doctor-types.d.ts +4 -4
  146. package/dist/cli/lib/doctor-types.d.ts.map +1 -1
  147. package/dist/cli/lib/draft-token.d.ts +7 -1
  148. package/dist/cli/lib/draft-token.d.ts.map +1 -1
  149. package/dist/cli/lib/draft-token.js +25 -3
  150. package/dist/cli/lib/draft-token.js.map +1 -1
  151. package/dist/cli/lib/errors.d.ts +2 -0
  152. package/dist/cli/lib/errors.d.ts.map +1 -1
  153. package/dist/cli/lib/errors.js +15 -2
  154. package/dist/cli/lib/errors.js.map +1 -1
  155. package/dist/cli/lib/gate-adapters/adapter-findings.d.ts +41 -0
  156. package/dist/cli/lib/gate-adapters/adapter-findings.d.ts.map +1 -0
  157. package/dist/cli/lib/gate-adapters/adapter-findings.js +99 -0
  158. package/dist/cli/lib/gate-adapters/adapter-findings.js.map +1 -0
  159. package/dist/cli/lib/gate-adapters/eslint-json-adapter.d.ts +14 -0
  160. package/dist/cli/lib/gate-adapters/eslint-json-adapter.d.ts.map +1 -0
  161. package/dist/cli/lib/gate-adapters/eslint-json-adapter.js +63 -0
  162. package/dist/cli/lib/gate-adapters/eslint-json-adapter.js.map +1 -0
  163. package/dist/cli/lib/gate-adapters/gate-adapter-id.d.ts +10 -0
  164. package/dist/cli/lib/gate-adapters/gate-adapter-id.d.ts.map +1 -0
  165. package/dist/cli/lib/gate-adapters/gate-adapter-id.js +12 -0
  166. package/dist/cli/lib/gate-adapters/gate-adapter-id.js.map +1 -0
  167. package/dist/cli/lib/gate-adapters/gate-adapter-types.d.ts +17 -0
  168. package/dist/cli/lib/gate-adapters/gate-adapter-types.d.ts.map +1 -0
  169. package/dist/cli/lib/gate-adapters/gate-adapter-types.js +2 -0
  170. package/dist/cli/lib/gate-adapters/gate-adapter-types.js.map +1 -0
  171. package/dist/cli/lib/gate-adapters/generic-spawn-adapter.d.ts +4 -0
  172. package/dist/cli/lib/gate-adapters/generic-spawn-adapter.d.ts.map +1 -0
  173. package/dist/cli/lib/gate-adapters/generic-spawn-adapter.js +12 -0
  174. package/dist/cli/lib/gate-adapters/generic-spawn-adapter.js.map +1 -0
  175. package/dist/cli/lib/gate-adapters/parsing-adapter.d.ts +5 -0
  176. package/dist/cli/lib/gate-adapters/parsing-adapter.d.ts.map +1 -0
  177. package/dist/cli/lib/gate-adapters/parsing-adapter.js +13 -0
  178. package/dist/cli/lib/gate-adapters/parsing-adapter.js.map +1 -0
  179. package/dist/cli/lib/gate-adapters/registry.d.ts +6 -0
  180. package/dist/cli/lib/gate-adapters/registry.d.ts.map +1 -0
  181. package/dist/cli/lib/gate-adapters/registry.js +13 -0
  182. package/dist/cli/lib/gate-adapters/registry.js.map +1 -0
  183. package/dist/cli/lib/gate-adapters/spawn-stream-core.d.ts +36 -0
  184. package/dist/cli/lib/gate-adapters/spawn-stream-core.d.ts.map +1 -0
  185. package/dist/cli/lib/gate-adapters/spawn-stream-core.js +99 -0
  186. package/dist/cli/lib/gate-adapters/spawn-stream-core.js.map +1 -0
  187. package/dist/cli/lib/gate-adapters/tsc-adapter.d.ts +16 -0
  188. package/dist/cli/lib/gate-adapters/tsc-adapter.d.ts.map +1 -0
  189. package/dist/cli/lib/gate-adapters/tsc-adapter.js +51 -0
  190. package/dist/cli/lib/gate-adapters/tsc-adapter.js.map +1 -0
  191. package/dist/cli/lib/gate-log-writer.d.ts +8 -0
  192. package/dist/cli/lib/gate-log-writer.d.ts.map +1 -1
  193. package/dist/cli/lib/gate-log-writer.js +35 -0
  194. package/dist/cli/lib/gate-log-writer.js.map +1 -1
  195. package/dist/cli/lib/gate.d.ts +2 -0
  196. package/dist/cli/lib/gate.d.ts.map +1 -1
  197. package/dist/cli/lib/gate.js +2 -2
  198. package/dist/cli/lib/gate.js.map +1 -1
  199. package/dist/cli/lib/git.d.ts +14 -2
  200. package/dist/cli/lib/git.d.ts.map +1 -1
  201. package/dist/cli/lib/git.js +22 -7
  202. package/dist/cli/lib/git.js.map +1 -1
  203. package/dist/cli/lib/gxt-config.d.ts +9 -0
  204. package/dist/cli/lib/gxt-config.d.ts.map +1 -1
  205. package/dist/cli/lib/gxt-config.js +16 -0
  206. package/dist/cli/lib/gxt-config.js.map +1 -1
  207. package/dist/cli/lib/gxt-error-codes.d.ts +17 -0
  208. package/dist/cli/lib/gxt-error-codes.d.ts.map +1 -1
  209. package/dist/cli/lib/gxt-error-codes.js +18 -0
  210. package/dist/cli/lib/gxt-error-codes.js.map +1 -1
  211. package/dist/cli/lib/import-scanner.d.ts +13 -3
  212. package/dist/cli/lib/import-scanner.d.ts.map +1 -1
  213. package/dist/cli/lib/import-scanner.js +185 -23
  214. package/dist/cli/lib/import-scanner.js.map +1 -1
  215. package/dist/cli/lib/init-tutorial.js +3 -4
  216. package/dist/cli/lib/init-tutorial.js.map +1 -1
  217. package/dist/cli/lib/interrogate/gaps.d.ts +2 -0
  218. package/dist/cli/lib/interrogate/gaps.d.ts.map +1 -1
  219. package/dist/cli/lib/interrogate/gaps.js +3 -4
  220. package/dist/cli/lib/interrogate/gaps.js.map +1 -1
  221. package/dist/cli/lib/interrogate/run.d.ts +1 -0
  222. package/dist/cli/lib/interrogate/run.d.ts.map +1 -1
  223. package/dist/cli/lib/interrogate/run.js +1 -0
  224. package/dist/cli/lib/interrogate/run.js.map +1 -1
  225. package/dist/cli/lib/kpi-scan.js +5 -1
  226. package/dist/cli/lib/kpi-scan.js.map +1 -1
  227. package/dist/cli/lib/ledger/ledger-append.d.ts +14 -0
  228. package/dist/cli/lib/ledger/ledger-append.d.ts.map +1 -0
  229. package/dist/cli/lib/ledger/ledger-append.js +63 -0
  230. package/dist/cli/lib/ledger/ledger-append.js.map +1 -0
  231. package/dist/cli/lib/ledger/ledger-chain.d.ts +24 -0
  232. package/dist/cli/lib/ledger/ledger-chain.d.ts.map +1 -0
  233. package/dist/cli/lib/ledger/ledger-chain.js +101 -0
  234. package/dist/cli/lib/ledger/ledger-chain.js.map +1 -0
  235. package/dist/cli/lib/ledger/ledger-entry.d.ts +79 -0
  236. package/dist/cli/lib/ledger/ledger-entry.d.ts.map +1 -0
  237. package/dist/cli/lib/ledger/ledger-entry.js +36 -0
  238. package/dist/cli/lib/ledger/ledger-entry.js.map +1 -0
  239. package/dist/cli/lib/ledger/ledger-export.d.ts +28 -0
  240. package/dist/cli/lib/ledger/ledger-export.d.ts.map +1 -0
  241. package/dist/cli/lib/ledger/ledger-export.js +36 -0
  242. package/dist/cli/lib/ledger/ledger-export.js.map +1 -0
  243. package/dist/cli/lib/legislate-from-intent.d.ts +9 -0
  244. package/dist/cli/lib/legislate-from-intent.d.ts.map +1 -0
  245. package/dist/cli/lib/legislate-from-intent.js +59 -0
  246. package/dist/cli/lib/legislate-from-intent.js.map +1 -0
  247. package/dist/cli/lib/legislate-gate-options.d.ts +3 -4
  248. package/dist/cli/lib/legislate-gate-options.d.ts.map +1 -1
  249. package/dist/cli/lib/legislate-gate-options.js +9 -4
  250. package/dist/cli/lib/legislate-gate-options.js.map +1 -1
  251. package/dist/cli/lib/legislate-policy-warn.d.ts +3 -0
  252. package/dist/cli/lib/legislate-policy-warn.d.ts.map +1 -0
  253. package/dist/cli/lib/legislate-policy-warn.js +17 -0
  254. package/dist/cli/lib/legislate-policy-warn.js.map +1 -0
  255. package/dist/cli/lib/legislate.d.ts +5 -1
  256. package/dist/cli/lib/legislate.d.ts.map +1 -1
  257. package/dist/cli/lib/legislate.js +38 -12
  258. package/dist/cli/lib/legislate.js.map +1 -1
  259. package/dist/cli/lib/mcp-doctor.d.ts +18 -0
  260. package/dist/cli/lib/mcp-doctor.d.ts.map +1 -0
  261. package/dist/cli/lib/mcp-doctor.js +35 -0
  262. package/dist/cli/lib/mcp-doctor.js.map +1 -0
  263. package/dist/cli/lib/mcp-draft-legislation.d.ts.map +1 -1
  264. package/dist/cli/lib/mcp-draft-legislation.js +39 -16
  265. package/dist/cli/lib/mcp-draft-legislation.js.map +1 -1
  266. package/dist/cli/lib/mcp-execute-legislation.d.ts.map +1 -1
  267. package/dist/cli/lib/mcp-execute-legislation.js +2 -0
  268. package/dist/cli/lib/mcp-execute-legislation.js.map +1 -1
  269. package/dist/cli/lib/mcp-governance-shared.d.ts +4 -1
  270. package/dist/cli/lib/mcp-governance-shared.d.ts.map +1 -1
  271. package/dist/cli/lib/mcp-governance-shared.js.map +1 -1
  272. package/dist/cli/lib/mcp-interrogate.js +3 -3
  273. package/dist/cli/lib/mcp-interrogate.js.map +1 -1
  274. package/dist/cli/lib/mcp-org.d.ts +19 -0
  275. package/dist/cli/lib/mcp-org.d.ts.map +1 -0
  276. package/dist/cli/lib/mcp-org.js +51 -0
  277. package/dist/cli/lib/mcp-org.js.map +1 -0
  278. package/dist/cli/lib/mcp-propose-contract.d.ts +22 -0
  279. package/dist/cli/lib/mcp-propose-contract.d.ts.map +1 -0
  280. package/dist/cli/lib/mcp-propose-contract.js +51 -0
  281. package/dist/cli/lib/mcp-propose-contract.js.map +1 -0
  282. package/dist/cli/lib/mcp-runtime.d.ts +1 -1
  283. package/dist/cli/lib/mcp-runtime.d.ts.map +1 -1
  284. package/dist/cli/lib/mcp-runtime.js +1 -1
  285. package/dist/cli/lib/mcp-runtime.js.map +1 -1
  286. package/dist/cli/lib/mcp-start-orchestration.d.ts.map +1 -1
  287. package/dist/cli/lib/mcp-start-orchestration.js +1 -0
  288. package/dist/cli/lib/mcp-start-orchestration.js.map +1 -1
  289. package/dist/cli/lib/mcp-tools-register.d.ts.map +1 -1
  290. package/dist/cli/lib/mcp-tools-register.js +110 -17
  291. package/dist/cli/lib/mcp-tools-register.js.map +1 -1
  292. package/dist/cli/lib/mission-changed.d.ts +27 -0
  293. package/dist/cli/lib/mission-changed.d.ts.map +1 -0
  294. package/dist/cli/lib/mission-changed.js +107 -0
  295. package/dist/cli/lib/mission-changed.js.map +1 -0
  296. package/dist/cli/lib/missions/formatter.d.ts +1 -1
  297. package/dist/cli/lib/missions/formatter.d.ts.map +1 -1
  298. package/dist/cli/lib/missions/formatter.js +5 -0
  299. package/dist/cli/lib/missions/formatter.js.map +1 -1
  300. package/dist/cli/lib/missions/parser.d.ts +3 -1
  301. package/dist/cli/lib/missions/parser.d.ts.map +1 -1
  302. package/dist/cli/lib/missions/parser.js +30 -0
  303. package/dist/cli/lib/missions/parser.js.map +1 -1
  304. package/dist/cli/lib/msn-allocate.d.ts.map +1 -1
  305. package/dist/cli/lib/msn-allocate.js +17 -24
  306. package/dist/cli/lib/msn-allocate.js.map +1 -1
  307. package/dist/cli/lib/planner-signature.d.ts +7 -0
  308. package/dist/cli/lib/planner-signature.d.ts.map +1 -1
  309. package/dist/cli/lib/planner-signature.js +18 -1
  310. package/dist/cli/lib/planner-signature.js.map +1 -1
  311. package/dist/cli/lib/policy/policy-bundle.d.ts +6 -0
  312. package/dist/cli/lib/policy/policy-bundle.d.ts.map +1 -0
  313. package/dist/cli/lib/policy/policy-bundle.js +62 -0
  314. package/dist/cli/lib/policy/policy-bundle.js.map +1 -0
  315. package/dist/cli/lib/policy/policy-doctor.d.ts +4 -0
  316. package/dist/cli/lib/policy/policy-doctor.d.ts.map +1 -0
  317. package/dist/cli/lib/policy/policy-doctor.js +34 -0
  318. package/dist/cli/lib/policy/policy-doctor.js.map +1 -0
  319. package/dist/cli/lib/policy/policy-fetch.d.ts +10 -0
  320. package/dist/cli/lib/policy/policy-fetch.d.ts.map +1 -0
  321. package/dist/cli/lib/policy/policy-fetch.js +78 -0
  322. package/dist/cli/lib/policy/policy-fetch.js.map +1 -0
  323. package/dist/cli/lib/policy/policy-resolve.d.ts +38 -0
  324. package/dist/cli/lib/policy/policy-resolve.d.ts.map +1 -0
  325. package/dist/cli/lib/policy/policy-resolve.js +194 -0
  326. package/dist/cli/lib/policy/policy-resolve.js.map +1 -0
  327. package/dist/cli/lib/policy/policy-types.d.ts +76 -0
  328. package/dist/cli/lib/policy/policy-types.d.ts.map +1 -0
  329. package/dist/cli/lib/policy/policy-types.js +3 -0
  330. package/dist/cli/lib/policy/policy-types.js.map +1 -0
  331. package/dist/cli/lib/policy-digest-doctor.d.ts +1 -0
  332. package/dist/cli/lib/policy-digest-doctor.d.ts.map +1 -1
  333. package/dist/cli/lib/policy-digest-doctor.js +4 -2
  334. package/dist/cli/lib/policy-digest-doctor.js.map +1 -1
  335. package/dist/cli/lib/runtime-env.d.ts +3 -0
  336. package/dist/cli/lib/runtime-env.d.ts.map +1 -1
  337. package/dist/cli/lib/runtime-env.js +12 -2
  338. package/dist/cli/lib/runtime-env.js.map +1 -1
  339. package/dist/cli/lib/runtime-exec.d.ts +5 -1
  340. package/dist/cli/lib/runtime-exec.d.ts.map +1 -1
  341. package/dist/cli/lib/runtime-exec.js +18 -1
  342. package/dist/cli/lib/runtime-exec.js.map +1 -1
  343. package/dist/cli/lib/staged-tmvc-guard.d.ts +3 -0
  344. package/dist/cli/lib/staged-tmvc-guard.d.ts.map +1 -1
  345. package/dist/cli/lib/staged-tmvc-guard.js +4 -2
  346. package/dist/cli/lib/staged-tmvc-guard.js.map +1 -1
  347. package/dist/cli/lib/start-orchestration.d.ts +2 -1
  348. package/dist/cli/lib/start-orchestration.d.ts.map +1 -1
  349. package/dist/cli/lib/start-orchestration.js +5 -3
  350. package/dist/cli/lib/start-orchestration.js.map +1 -1
  351. package/dist/cli/lib/surgeons/banned-import.js +1 -1
  352. package/dist/cli/lib/surgeons/banned-import.js.map +1 -1
  353. package/dist/cli/lib/surgeons/import-layer.d.ts.map +1 -1
  354. package/dist/cli/lib/surgeons/import-layer.js +1 -1
  355. package/dist/cli/lib/surgeons/import-layer.js.map +1 -1
  356. package/dist/cli/lib/surgeons/registry.d.ts.map +1 -1
  357. package/dist/cli/lib/surgeons/registry.js +2 -4
  358. package/dist/cli/lib/surgeons/registry.js.map +1 -1
  359. package/dist/cli/lib/types.d.ts +30 -0
  360. package/dist/cli/lib/types.d.ts.map +1 -1
  361. package/dist/cli/lib/types.js +5 -1
  362. package/dist/cli/lib/types.js.map +1 -1
  363. package/dist/cli/lib/verify-contract.d.ts +22 -0
  364. package/dist/cli/lib/verify-contract.d.ts.map +1 -0
  365. package/dist/cli/lib/verify-contract.js +110 -0
  366. package/dist/cli/lib/verify-contract.js.map +1 -0
  367. package/dist/cli/lib/verify-engine.d.ts +1 -1
  368. package/dist/cli/lib/verify-engine.d.ts.map +1 -1
  369. package/dist/cli/lib/verify-engine.js +38 -17
  370. package/dist/cli/lib/verify-engine.js.map +1 -1
  371. package/dist/cli/lib/verify-evidence-snippet.d.ts +7 -0
  372. package/dist/cli/lib/verify-evidence-snippet.d.ts.map +1 -0
  373. package/dist/cli/lib/verify-evidence-snippet.js +29 -0
  374. package/dist/cli/lib/verify-evidence-snippet.js.map +1 -0
  375. package/dist/cli/lib/verify-failure-normalize.d.ts.map +1 -1
  376. package/dist/cli/lib/verify-failure-normalize.js +30 -4
  377. package/dist/cli/lib/verify-failure-normalize.js.map +1 -1
  378. package/dist/cli/lib/verify-failure.d.ts +27 -5
  379. package/dist/cli/lib/verify-failure.d.ts.map +1 -1
  380. package/dist/cli/lib/verify-finding-gate-projector.d.ts +1 -1
  381. package/dist/cli/lib/verify-finding-gate-projector.d.ts.map +1 -1
  382. package/dist/cli/lib/verify-finding-gate-projector.js +6 -28
  383. package/dist/cli/lib/verify-finding-gate-projector.js.map +1 -1
  384. package/dist/cli/lib/verify-finding.d.ts +1 -1
  385. package/dist/cli/lib/verify-finding.d.ts.map +1 -1
  386. package/dist/cli/lib/verify-finding.js.map +1 -1
  387. package/dist/cli/lib/verify-hints.d.ts.map +1 -1
  388. package/dist/cli/lib/verify-hints.js +27 -3
  389. package/dist/cli/lib/verify-hints.js.map +1 -1
  390. package/dist/cli/lib/verify-interrogation.d.ts +2 -0
  391. package/dist/cli/lib/verify-interrogation.d.ts.map +1 -1
  392. package/dist/cli/lib/verify-interrogation.js +2 -2
  393. package/dist/cli/lib/verify-interrogation.js.map +1 -1
  394. package/dist/cli/lib/verify-options.d.ts +5 -14
  395. package/dist/cli/lib/verify-options.d.ts.map +1 -1
  396. package/dist/cli/lib/verify-org-phases.d.ts +18 -0
  397. package/dist/cli/lib/verify-org-phases.d.ts.map +1 -0
  398. package/dist/cli/lib/verify-org-phases.js +61 -0
  399. package/dist/cli/lib/verify-org-phases.js.map +1 -0
  400. package/dist/cli/lib/verify-payload.d.ts +1 -1
  401. package/dist/cli/lib/verify-payload.d.ts.map +1 -1
  402. package/dist/cli/lib/verify-payload.js +49 -27
  403. package/dist/cli/lib/verify-payload.js.map +1 -1
  404. package/dist/cli/lib/verify-phase-clock.d.ts +3 -2
  405. package/dist/cli/lib/verify-phase-clock.d.ts.map +1 -1
  406. package/dist/cli/lib/verify-phase-clock.js +17 -5
  407. package/dist/cli/lib/verify-phase-clock.js.map +1 -1
  408. package/dist/cli/lib/verify-phase-steps.d.ts +14 -7
  409. package/dist/cli/lib/verify-phase-steps.d.ts.map +1 -1
  410. package/dist/cli/lib/verify-phase-steps.js +33 -24
  411. package/dist/cli/lib/verify-phase-steps.js.map +1 -1
  412. package/dist/cli/lib/verify-presenters.d.ts +1 -0
  413. package/dist/cli/lib/verify-presenters.d.ts.map +1 -1
  414. package/dist/cli/lib/verify-presenters.js +15 -4
  415. package/dist/cli/lib/verify-presenters.js.map +1 -1
  416. package/dist/cli/lib/verify-remediation-pipeline.d.ts +2 -0
  417. package/dist/cli/lib/verify-remediation-pipeline.d.ts.map +1 -1
  418. package/dist/cli/lib/verify-remediation-pipeline.js +5 -2
  419. package/dist/cli/lib/verify-remediation-pipeline.js.map +1 -1
  420. package/dist/cli/lib/verify-run.d.ts +2 -2
  421. package/dist/cli/lib/verify-run.d.ts.map +1 -1
  422. package/dist/cli/lib/verify-run.js +27 -13
  423. package/dist/cli/lib/verify-run.js.map +1 -1
  424. package/dist/cli/lib/version.gen.d.ts +1 -1
  425. package/dist/cli/lib/version.gen.js +1 -1
  426. package/dist/cli/program-core.d.ts +1 -1
  427. package/dist/cli/program-core.d.ts.map +1 -1
  428. package/dist/cli/program-core.js +62 -5
  429. package/dist/cli/program-core.js.map +1 -1
  430. package/dist/cli/program-mission.d.ts.map +1 -1
  431. package/dist/cli/program-mission.js +97 -35
  432. package/dist/cli/program-mission.js.map +1 -1
  433. package/dist/cli/program-org.d.ts +3 -0
  434. package/dist/cli/program-org.d.ts.map +1 -0
  435. package/dist/cli/program-org.js +119 -0
  436. package/dist/cli/program-org.js.map +1 -0
  437. package/dist/cli/program-workflow.d.ts +6 -2
  438. package/dist/cli/program-workflow.d.ts.map +1 -1
  439. package/dist/cli/program-workflow.js +63 -6
  440. package/dist/cli/program-workflow.js.map +1 -1
  441. package/dist/cli/program.d.ts.map +1 -1
  442. package/dist/cli/program.js +11 -0
  443. package/dist/cli/program.js.map +1 -1
  444. package/package.json +2 -1
  445. package/templates/.gitagent/config.json +4 -0
  446. package/templates/.gitagent/foreman/MANIFEST.json +1 -0
  447. package/templates/.gitagent/foreman/PLANNER.signing.pub +3 -0
  448. package/templates/.gitagent/foreman/POLICY.pointer.json +11 -0
  449. package/templates/.gitagent/foreman/SUBSTRATE.version.json +1 -1
  450. package/templates/.gitagent/planner/MISSION-ARCHITECT.md +26 -5
  451. package/templates/.gitagent/planner/MISSION.schema.yaml +103 -0
  452. package/templates/.gitagent/planner/ORG-POLICY.schema.yaml +174 -0
  453. package/templates/.gitagent/planner/RULES.md +75 -22
  454. package/templates/.githooks/pre-commit +12 -0
  455. package/templates/.github/workflows/gxt-attest-ingest.yml +56 -6
  456. package/templates/.github/workflows/gxt-validate.yml +33 -0
  457. package/templates/.gitignore.gxt +1 -0
  458. package/templates/integrations/asset-catalog.json +2 -0
  459. package/templates/integrations/compatibility.json +1 -1
  460. package/templates/scripts/validate-mcp-dogfood.mjs +5 -0
  461. package/templates/scripts/verify-pr-missions.sh +20 -41
@@ -20,7 +20,59 @@ allOf:
20
20
  required: [interrogation]
21
21
  then:
22
22
  required: [interrogation_sha256]
23
+ - if:
24
+ required: [contract]
25
+ then:
26
+ required: [contract_sha256]
23
27
  properties:
28
+ contract:
29
+ type: object
30
+ additionalProperties: false
31
+ description: >-
32
+ Planner-sealed mission cage (ADR-0045). Tighten-only: tmvc_roots must be
33
+ a subset of the skill's manifest roots; forbidden_zones and banned_imports
34
+ are unioned with skill and org-policy sets. Allowed/banned lists match
35
+ bare specifiers (exact or prefix); relative and tsconfig-alias imports are
36
+ resolved to repo paths and checked against forbidden zones. gantry verify
37
+ re-reads this block from the Planner stamp commit and fails
38
+ GXT_CONTRACT_TAMPERED on drift.
39
+ properties:
40
+ tmvc_roots:
41
+ type: array
42
+ items:
43
+ type: string
44
+ minLength: 1
45
+ forbidden_zones:
46
+ type: array
47
+ items:
48
+ type: string
49
+ minLength: 1
50
+ allowed_imports:
51
+ type: array
52
+ items:
53
+ type: string
54
+ minLength: 1
55
+ banned_imports:
56
+ type: array
57
+ items:
58
+ type: string
59
+ minLength: 1
60
+ allow_dynamic_specifiers:
61
+ type: boolean
62
+ default: false
63
+ description: >-
64
+ When false, import(expr) / require(expr) with a non-literal argument
65
+ under effective TMVC roots fails GXT_CONTRACT_IMPORT_DYNAMIC.
66
+ strict_relative_imports:
67
+ type: boolean
68
+ default: false
69
+ description: >-
70
+ When true, relative or alias imports resolving outside effective TMVC
71
+ roots fail GXT_CONTRACT_SCOPE_ESCAPE (forbidden zones always fail).
72
+ contract_sha256:
73
+ type: string
74
+ pattern: "^[0-9a-f]{64}$"
75
+ description: SHA-256 of the canonical (normalized, sorted) contract block.
24
76
  msn_id:
25
77
  type: string
26
78
  pattern: "^MSN-[0-9]{4}$"
@@ -35,6 +87,16 @@ properties:
35
87
  minLength: 1
36
88
  gate_success_substring:
37
89
  type: ["string", "null"]
90
+ gate_adapter:
91
+ type: string
92
+ enum: [generic, eslint, tsc]
93
+ default: generic
94
+ description: >-
95
+ Explicit gate output parser (ADR-0041). generic: exit code + optional
96
+ success substring only. eslint: gate_command must emit `eslint --format
97
+ json`; tsc: gate_command must emit plain tsc diagnostics. Adapters map
98
+ tool output to envelope v3 findings with offending_file/line/rule_id.
99
+ Routing is never inferred from gate_command text.
38
100
  virtual_capture:
39
101
  type: boolean
40
102
  default: false
@@ -208,3 +270,44 @@ properties:
208
270
  items:
209
271
  type: string
210
272
  minLength: 1
273
+ depends_on:
274
+ type: array
275
+ default: []
276
+ description: >-
277
+ Cross-repo mission dependencies (ADR-0044). Resolved offline from fetched
278
+ refs/gxt/deps/<slug> ledger chains. gantry deps fetch is the only network
279
+ path; verify/doctor/check read local refs only.
280
+ items:
281
+ type: object
282
+ additionalProperties: false
283
+ required:
284
+ - repo
285
+ - msn_id
286
+ properties:
287
+ repo:
288
+ type: string
289
+ minLength: 1
290
+ description: Canonical host/owner/repo or git URL.
291
+ ref:
292
+ type: string
293
+ default: refs/gxt/ledger
294
+ msn_id:
295
+ type: string
296
+ pattern: "^MSN-[0-9]{4}$"
297
+ require:
298
+ type: object
299
+ additionalProperties: false
300
+ properties:
301
+ verify_status:
302
+ type: string
303
+ enum: [passed]
304
+ default: passed
305
+ signed:
306
+ type: boolean
307
+ default: false
308
+ max_age_days:
309
+ type: number
310
+ exclusiveMinimum: 0
311
+ expected_repository_hash:
312
+ type: string
313
+ pattern: "^[0-9a-f]{64}$"
@@ -0,0 +1,174 @@
1
+ # ORG-POLICY.schema — JSON Schema (YAML encoding) for organization policy bundles
2
+ # Consumed by gantry (Ajv). ADR-0042. Version label for docs only.
3
+ $schema: https://json-schema.org/draft/2020-12/schema
4
+ $id: https://opengantry.local/schemas/org-policy.v1.json
5
+ title: OpenGantryOrgPolicy
6
+ type: object
7
+ additionalProperties: false
8
+ required:
9
+ - schema_version
10
+ - org_id
11
+ - policy_id
12
+ - version
13
+ properties:
14
+ schema_version:
15
+ type: string
16
+ const: "1.0.0"
17
+ org_id:
18
+ type: string
19
+ minLength: 1
20
+ policy_id:
21
+ type: string
22
+ minLength: 1
23
+ version:
24
+ type: string
25
+ minLength: 1
26
+ description: Semver or monotonic label for the bundle (not the CLI).
27
+ signers:
28
+ type: array
29
+ default: []
30
+ items:
31
+ type: object
32
+ additionalProperties: false
33
+ required:
34
+ - principal
35
+ properties:
36
+ principal:
37
+ type: string
38
+ minLength: 1
39
+ description: SSH or GPG principal allowed to sign the policy commit.
40
+ kind:
41
+ type: string
42
+ enum: [ssh, gpg]
43
+ mandatory_gates:
44
+ type: array
45
+ default: []
46
+ items:
47
+ type: object
48
+ additionalProperties: false
49
+ required:
50
+ - id
51
+ - command
52
+ properties:
53
+ id:
54
+ type: string
55
+ minLength: 1
56
+ command:
57
+ type: string
58
+ minLength: 1
59
+ adapter:
60
+ type: string
61
+ enum: [generic, eslint, tsc]
62
+ default: generic
63
+ success_substring:
64
+ type: ["string", "null"]
65
+ banned_imports:
66
+ type: array
67
+ default: []
68
+ items:
69
+ type: object
70
+ additionalProperties: false
71
+ required:
72
+ - specifier
73
+ properties:
74
+ specifier:
75
+ type: string
76
+ minLength: 1
77
+ scope:
78
+ type: string
79
+ enum: [changed, all]
80
+ default: changed
81
+ description: changed = gantry check-imports on the mission diff; all = whole tree.
82
+ producers:
83
+ type: object
84
+ default: {}
85
+ additionalProperties:
86
+ type: string
87
+ minLength: 1
88
+ description: >-
89
+ Map of KPI metric name to producer command. kpi_thresholds[].metric MUST
90
+ name a key in this object (CLI/schema error otherwise).
91
+ kpi_thresholds:
92
+ type: array
93
+ default: []
94
+ items:
95
+ type: object
96
+ additionalProperties: false
97
+ required:
98
+ - metric
99
+ - op
100
+ - value
101
+ properties:
102
+ metric:
103
+ type: string
104
+ minLength: 1
105
+ description: MUST match a key in producers.
106
+ op:
107
+ type: string
108
+ enum: ["<=", ">=", "==", "<", ">"]
109
+ value:
110
+ type: number
111
+ config_floor:
112
+ type: object
113
+ additionalProperties: false
114
+ properties:
115
+ planner_signature:
116
+ type: string
117
+ enum: [off, warn, require]
118
+ receipt_signature:
119
+ type: string
120
+ enum: [off, warn, require]
121
+ ledger_signature:
122
+ type: string
123
+ enum: [off, warn, require]
124
+ ledger_mode:
125
+ type: string
126
+ enum: [off, local]
127
+ flight_telemetry:
128
+ type: object
129
+ additionalProperties: false
130
+ properties:
131
+ body_mode:
132
+ type: string
133
+ enum: [hash_only, full]
134
+ break_glass:
135
+ type: object
136
+ additionalProperties: false
137
+ properties:
138
+ require_ledger_entry:
139
+ type: boolean
140
+ manifest_constraints:
141
+ type: object
142
+ additionalProperties: false
143
+ properties:
144
+ forbidden_zones_add:
145
+ type: array
146
+ items:
147
+ type: string
148
+ minLength: 1
149
+ path_risks_min:
150
+ type: object
151
+ additionalProperties:
152
+ type: string
153
+ enum: [Tier-1, Tier-2, Tier-3]
154
+ perimeter_protected_add:
155
+ type: array
156
+ items:
157
+ type: string
158
+ minLength: 1
159
+ expected_digests:
160
+ type: object
161
+ additionalProperties: false
162
+ properties:
163
+ schema_version:
164
+ type: string
165
+ const: "0.1.0"
166
+ manifest_sha256:
167
+ type: string
168
+ pattern: "^[0-9a-f]{64}$"
169
+ target_architecture_sha256:
170
+ type: ["string", "null"]
171
+ pattern: "^[0-9a-f]{64}$"
172
+ config_sha256:
173
+ type: ["string", "null"]
174
+ pattern: "^[0-9a-f]{64}$"
@@ -1,36 +1,89 @@
1
- # OpenGantry Rules (template)
1
+ # OpenGantry Rules (v0.6.2 — Forensic Truth)
2
2
 
3
3
  Normative keywords **MUST**, **MUST NOT**, and **SHOULD** follow RFC 2119.
4
4
 
5
- ## 1. Governance and risk tiers
5
+ ## 1. Governance & risk tiers
6
6
 
7
- - **Tier 1 (SAFE)**: deterministic gate required; single-provider verifier is acceptable.
8
- - **Tier 2 (LOGIC)**: deterministic gate required; single-provider verifier output is advisory and a human audit is required before merge.
9
- - **Tier 3 (SUBSTRATE)**: strictest review path; human audit of trace-mapped evidence is mandatory.
7
+ - **Tier 1 (SAFE)**: Routine work; deterministic gate required; single-provider automated verifier permitted when trace mapping is satisfied.
8
+ - **Tier 2 (LOGIC)**: Deterministic gate required; single-provider verifier output is **ADVISORY_ONLY**; a human MUST audit trace references before merge.
9
+ - **Tier 3 (SUBSTRATE)**: Multi-provider verification **SHOULD** be used when available; if only one provider exists, a **mandatory full human audit** of trace-mapped evidence and gate logs is required before merge.
10
10
 
11
- ## 2. Segregation of duties
11
+ ## 2. Segregation of duties (SOD)
12
12
 
13
- - The agent executing the gate MUST NOT be the same actor declaring PASS.
14
- - Mission law is Planner-owned; executors MUST NOT silently rewrite mission law.
13
+ - The agent that executes the gate command (Executor) MUST NOT be the same agent that declares the gate **PASS** (Verifier).
14
+ - Mission law (work order) is Planner-owned; executors MUST NOT modify mission law during execution without Planner re-legislation.
15
15
 
16
- ## 3. Trace-mapped verification
16
+ ## 3. Trace-mapped verification (anti-lie)
17
17
 
18
- - PASS claims MUST quote `EXECUTOR_LOG.md` with a valid anchor (line or timestamp).
19
- - Missing quotes/anchors for claimed PASS is evidence tampering and MUST fail verification.
18
+ - For every claimed verifier **PASS**, the Verifier MUST provide a **Trace Reference**: a verbatim substring copied from `EXECUTOR_LOG.md` and an anchor (**line number** or **timestamp**) that ties the quote to the execution trace.
19
+ - Verifiers MUST NOT use source-code quotations as the sole or primary evidence for PASS; code may supplement only after a valid trace reference exists.
20
+ - If the quoted substring does **not** appear in `EXECUTOR_LOG.md`, or no valid trace reference is provided for a claimed PASS → **Evidence Tampering** → the mission MUST auto-fail (no merge).
21
+ - **`gantry verify` stale-evidence (v1.1+):** for committed PASS quote lines, verify binds the line's attestation commit (`git blame` on `EXECUTOR_LOG.md`) to the mission skill's full `tmvc_roots` via `git diff --name-only`; TMVC drift after attestation → **STALE** (`GXT_TRACE_STALE`). Uncommitted quote lines skip stale check until committed.
20
22
 
21
- ## 4. Dynamic TMVC
23
+ ## 4. Dynamic TMVC (roots + context requests)
22
24
 
23
- - Work is bounded to manifest roots unless explicit mission expansion is approved.
24
- - Access outside effective TMVC requires a context request recorded in `EXECUTOR_LOG.md`.
25
- - Access into forbidden zones MUST fail closed unless Planner policy explicitly allows it.
25
+ - TMVC is anchored by **tmvc_roots** from [`.gitagent/foreman/MANIFEST.json`](.gitagent/foreman/MANIFEST.json) unless the Planner narrows scope further in the mission **`contract.tmvc_roots`** ([ADR-0045](../out-of-scope/ADR-0045-mission-contracts.md)).
26
+ - The mission `contract` block is **Planner law** under §2. Executors MUST NOT edit `contract` or `contract_sha256`. Drift versus the Planner stamp commit is **Evidence Tampering** under §3 (`GXT_CONTRACT_TAMPERED`).
27
+ - Effective TMVC = `contract.tmvc_roots` when present, else the skill roots. Effective forbidden zones and banned imports are the **union** of skill, contract, and org policy (tighten-only; §8). `contract.tmvc_roots` MUST be a subset of skill roots (empty skill roots accept Planner-declared roots).
28
+ - Executors MAY discover and edit files only under the **effective** TMVC roots (recursive within each root) unless the mission explicitly allows expansion steps.
29
+ - Any access **outside** the effective TMVC boundary MUST be preceded by a **Context Request** recorded in `EXECUTOR_LOG.md` (path, reason, proposed files). The Verifier MUST accept or reject before such access proceeds.
30
+ - Expansion into any **effective forbidden_zones** path MUST NOT proceed; escalate to Planner or fail closed per mission.
26
31
 
27
- ## 5. Mission commit indexing
32
+ ## 4.5 Interrogation record (legislation gate)
28
33
 
29
- - Mission-related commits MUST begin with `[MSN-XXXX]` in the subject line.
30
- - Keep mission files for `gantry verify` under `.gitagent/missions/`.
34
+ - Before legislation, **`gantry interrogate`** / **`gxt_interrogate`** MUST compute gap findings from manifest, `TARGET_ARCHITECTURE.yaml`, and ADR hints. A Planner MUST NOT legislate while any computed finding lacks a documented `operator_answer` in the mission `interrogation` block.
35
+ - The `interrogation` block in mission YAML is the authoritative operator rationale for computed gaps. Placeholder or fabricated answers are **Evidence Tampering** under §3.
36
+ - `interrogation_sha256` is a checksum for schema consistency, not a cryptographic seal; the Planner stamp commit is the seal on mission bytes (§6.1).
37
+ - Tier-3 gap findings SHOULD reference ADRs (`adr_refs`) rather than inline prose alone.
31
38
 
32
- ## 6. Break-glass (v0.8.0)
39
+ ## 5. Rule 4.4 — Planner-driven manifest sync
33
40
 
34
- - Set `GXT_BYPASS_SECRET` to match `.gitagent/foreman/BYPASS.sha256` (SHA-256 hex of the team secret).
35
- - Use `gantry verify --break-glass --reason "..."` only in emergencies; push `refs/notes/gxt-bypass` with the branch.
36
- - Forbidden-zone runtime policy is never bypassed.
41
+ - Any change that adds, removes, or renames a skill entry or materially edits per-skill fields in `MANIFEST.json` MUST include those manifest edits in the **same commit set** as the skill definition change.
42
+ - The Verifier MUST fail the mission if manifest state does not match the repository’s skill reality.
43
+
44
+ ## 6. Git-native mission index
45
+
46
+ - Every mission-related commit message MUST start with **`[MSN-XXXX]`** (four digits, e.g. `MSN-0007`) so history is greppable: `git log --grep='MSN-0007'`.
47
+ - No tracked synthetic mission-history index file is required in the repository; git history is the index.
48
+
49
+ ## 6.1 Planner legislation proof (`gantry verify` v0.6.2)
50
+
51
+ - Missions verified by **`gantry verify`** MUST live under **`.gitagent/missions/`** (repo-relative).
52
+ - Before the deterministic gate runs, **`gantry verify`** requires **native Git evidence** that the Planner legislated this mission for its MSN:
53
+ - Among the last **200** commits (configurable later), the **newest** commit whose subject begins with **`[MSN-XXXX]`** (matching the mission’s MSN) and whose **author email** is listed in **`GANTRY_PLANNER_EMAILS`** (comma-separated allowlist; silent legacy fallback: `GAPMAN_PLANNER_EMAILS`) is the **Planner stamp**.
54
+ - That stamp commit MUST **modify** the mission file passed to `--mission`.
55
+ - Architectural ADRs under [`.gitagent/out-of-scope/`](../out-of-scope/) are the record of prior decisions. **Planner** MUST review relevant ADRs when authoring or amending missions. **`gantry triage`** MAY emit non-binding `adr_hints` when ADR `match_terms` overlap intent; those hints do **not** change Foreman routing (still manifest-only binary).
56
+
57
+ ## 6.2 Break-glass (`gantry verify` v0.8.0)
58
+
59
+ - Emergency bypass MUST NOT rely on forgeable commit-subject strings alone. Authorization requires **`GXT_BYPASS_SECRET`** matching the SHA-256 anchor in [`.gitagent/foreman/BYPASS.sha256`](../foreman/BYPASS.sha256) (never commit the plaintext secret).
60
+ - **`gantry verify --break-glass --reason "<text>"`** skips git-proof, gate, and trace when authorized; it MUST write a forensic record as a **`refs/notes/gxt-bypass`** git note (or `--audit-commit` when notes cannot be pushed).
61
+ - PR CI accepts GXT-touched commits that either have a normal **`[MSN-XXXX]`** subject or a valid **gxt-bypass** note on that commit. Push notes with the branch: `git push origin refs/notes/gxt-bypass`.
62
+ - Break-glass does **not** disable **`gantry runtime exec`** forbidden-zone enforcement. Planner MUST review bypass usage post-incident.
63
+
64
+ ## 7. Local history (no bloat)
65
+
66
+ - Bulky traces live under `.gitagent/history/` (git-ignored). Optional local `MISSION_LOG.md` may be generated from `git log` when needed; it MUST NOT be required in-repo for v0.6.2.
67
+
68
+ ## 8. Organization policy floor (v3.3.0)
69
+
70
+ - When `.gitagent/foreman/POLICY.pointer.json` is present, Executors and Verifiers MUST treat the cached org policy bundle as a **tighten-only floor** ([ADR-0042](../out-of-scope/ADR-0042-org-policy-bundle.md)): sets are unioned, risk tiers take the maximum, signature and telemetry tiers take the stricter value. Policy MUST NOT loosen local law.
71
+ - **`gantry policy pull`** is the only network path for policy. **`gantry doctor`** and **`gantry verify`** MUST read the pointer plus `.gitagent/history/policy/` cache only — no sockets.
72
+ - A present pointer with missing cache, sha mismatch, or invalid signer is fail-closed (`GXT_POLICY_*`). A missing pointer is opt-in (no failure).
73
+ - `kpi_thresholds[].metric` MUST name a key in the bundle `producers` map.
74
+ - Receipt schema stays **0.2.0**; policy digests belong in ledger entries ([ADR-0043](../out-of-scope/ADR-0043-compliance-ledger-git-ref.md)), not receipts.
75
+
76
+ ## 9. Compliance ledger (v3.3.0)
77
+
78
+ - When `.gitagent/config.json` `ledger.mode` is `local`, verify, attest, break-glass, and policy-pull MUST append a digest-only entry to **`refs/gxt/ledger`** ([ADR-0043](../out-of-scope/ADR-0043-compliance-ledger-git-ref.md)).
79
+ - Append MUST use compare-and-swap `git update-ref` with bounded retries and jitter. Exhaustion MUST fail closed (`GXT_LEDGER_CAS_EXHAUSTED`) so parallel CI jobs never fork the chain.
80
+ - Unsigned ledger entries are checksums, not proofs. `ledger.signature` `require` demands `git commit -S`.
81
+ - A break-glass bypass with no `break_glass` ledger row is a failed control ([ADR-0021](../out-of-scope/ADR-0021-break-glass-protocol.md)).
82
+ - Ledger payloads MUST NOT contain source bodies or gate stdout.
83
+
84
+ ## 10. Cross-repository mission dependencies (v3.3.0)
85
+
86
+ - Optional mission `depends_on[]` is resolved **offline** from fetched `refs/gxt/deps/<slug>` ([ADR-0044](../out-of-scope/ADR-0044-cross-repo-mission-dependencies.md)).
87
+ - **`gantry deps fetch`** is the only network path. Verify's `dependencies` phase, `gantry deps check`, and doctor MUST NOT fetch.
88
+ - Same-org proof: recompute `repository_hash` for `depends_on.repo` with the consumer's `GANTRY_ORG_PEPPER` and require equality with the entry. Mismatch → `GXT_DEPENDENCY_ORG_MISMATCH`.
89
+ - Unfetched, unsatisfied, unsigned (when required), or stale entries MUST fail closed (`GXT_DEPENDENCY_*`). Cross-repo *trigger* (workflow dispatch) is advisory glue, not enforcement.
@@ -23,4 +23,16 @@ fi
23
23
 
24
24
  echo "pre-commit: gantry tmvc guard --mission ${mission} (advisory default)" >&2
25
25
  "${GANTRY_CLI[@]}" tmvc guard --mission "$mission"
26
+
27
+ # Advisory contract import scan over staged source files (mission contract cage, ADR-0045).
28
+ staged_sources=()
29
+ while IFS= read -r f; do
30
+ case "$f" in
31
+ *.ts|*.tsx|*.mts|*.cts|*.js|*.jsx|*.mjs|*.cjs) staged_sources+=("$f") ;;
32
+ esac
33
+ done < <(git diff --cached --name-only --diff-filter=ACMR)
34
+ if [[ ${#staged_sources[@]} -gt 0 ]]; then
35
+ echo "pre-commit: gantry contract check --mission ${mission} (advisory, ${#staged_sources[@]} staged source file(s))" >&2
36
+ "${GANTRY_CLI[@]}" contract check --mission "$mission" --file "${staged_sources[@]}" >&2 || true
37
+ fi
26
38
  exit 0
@@ -9,12 +9,18 @@ permissions:
9
9
  jobs:
10
10
  attest_ingest:
11
11
  runs-on: ubuntu-latest
12
+ env:
13
+ HAS_ORG_EXPORT: ${{ vars.GANTRY_ORG_ID != '' && secrets.GANTRY_ORG_PEPPER != '' }}
14
+ HAS_PLANE_INGEST: ${{ vars.PLANE_INGEST_URL != '' && secrets.PLANE_INGEST_TOKEN != '' }}
12
15
  steps:
13
16
  - uses: actions/checkout@v7
14
17
  with:
15
18
  ref: ${{ github.event.pull_request.head.sha }}
16
19
  fetch-depth: 0
17
20
 
21
+ - name: Install ripgrep
22
+ run: sudo apt-get update && sudo apt-get install -y ripgrep
23
+
18
24
  - uses: actions/setup-node@v7
19
25
  with:
20
26
  node-version: 24
@@ -28,13 +34,40 @@ jobs:
28
34
  echo "GANTRY_SIGNER_PRINCIPAL_KIND=github_actor" >> "$GITHUB_ENV"
29
35
  echo "GANTRY_BRANCH_NAME=${{ github.event.pull_request.head.ref }}" >> "$GITHUB_ENV"
30
36
 
37
+ - name: Resolve ingest configuration
38
+ run: |
39
+ if [ "${HAS_ORG_EXPORT}" != "true" ]; then
40
+ echo "Skipping envelope export: GANTRY_ORG_ID or GANTRY_ORG_PEPPER not configured"
41
+ fi
42
+ if [ "${HAS_PLANE_INGEST}" != "true" ]; then
43
+ echo "Skipping plane ingest: PLANE_INGEST_URL or PLANE_INGEST_TOKEN not configured"
44
+ fi
45
+
31
46
  - name: Resolve changed mission
32
47
  id: mission
33
48
  run: |
34
- m="$(git diff --name-only --diff-filter=ACMRT \
35
- "${{ github.event.pull_request.base.sha }}...HEAD" \
36
- -- '.gitagent/missions/*.yaml' | head -n1)"
37
- echo "path=$m" >> "$GITHUB_OUTPUT"
49
+ json="$(node dist/cli/index.js mission changed --base-ref "${{ github.event.pull_request.base.sha }}" --json)" || {
50
+ echo "$json"
51
+ exit 1
52
+ }
53
+ path="$(printf '%s' "$json" | node -e '
54
+ let s = "";
55
+ process.stdin.setEncoding("utf8");
56
+ process.stdin.on("data", (c) => { s += c; });
57
+ process.stdin.on("end", () => {
58
+ const j = JSON.parse(s);
59
+ if (j.status !== "ok") {
60
+ console.error(j.message || "mission changed failed");
61
+ process.exit(1);
62
+ }
63
+ process.stdout.write((j.missions && j.missions[0]) || "");
64
+ });
65
+ ')"
66
+ echo "path=$path" >> "$GITHUB_OUTPUT"
67
+
68
+ - name: Fetch cross-repo mission dependencies
69
+ if: steps.mission.outputs.path != ''
70
+ run: node dist/cli/index.js deps fetch --mission "${{ steps.mission.outputs.path }}"
38
71
 
39
72
  - name: Verify and export envelope
40
73
  id: verify
@@ -45,19 +78,29 @@ jobs:
45
78
  GANTRY_ORG_PEPPER: ${{ secrets.GANTRY_ORG_PEPPER }}
46
79
  GANTRY_ORG_PEPPER_VERSION: ${{ vars.GANTRY_ORG_PEPPER_VERSION || '1' }}
47
80
  run: |
81
+ extra=()
82
+ if [ "${HAS_ORG_EXPORT}" != "true" ] || [ -z "${GANTRY_ORG_ID}" ] || [ -z "${GANTRY_ORG_PEPPER}" ]; then
83
+ echo "Skipping envelope export: GANTRY_ORG_ID or GANTRY_ORG_PEPPER not configured"
84
+ else
85
+ extra+=(--export envelope.json)
86
+ fi
48
87
  node dist/cli/index.js verify \
49
88
  --mission "${{ steps.mission.outputs.path }}" \
50
89
  --audience verifier \
51
90
  --ci \
52
91
  --base-ref "${{ github.event.pull_request.base.sha }}" \
53
- --export envelope.json
92
+ "${extra[@]}"
54
93
 
55
94
  - name: Ingest to control plane
56
- if: steps.mission.outputs.path != '' && hashFiles('envelope.json') != ''
95
+ if: steps.mission.outputs.path != '' && hashFiles('envelope.json') != '' && env.HAS_PLANE_INGEST == 'true'
57
96
  env:
58
97
  PLANE_INGEST_URL: ${{ vars.PLANE_INGEST_URL }}
59
98
  PLANE_INGEST_TOKEN: ${{ secrets.PLANE_INGEST_TOKEN }}
60
99
  run: |
100
+ if [ -z "${PLANE_INGEST_URL}" ] || [ -z "${PLANE_INGEST_TOKEN}" ]; then
101
+ echo "Skipping plane ingest: PLANE_INGEST_URL or PLANE_INGEST_TOKEN not configured"
102
+ exit 0
103
+ fi
61
104
  code="$(curl -sS -o response.json -w '%{http_code}' \
62
105
  -X POST "$PLANE_INGEST_URL/api/v1/attestations/ingest" \
63
106
  -H "Authorization: Bearer $PLANE_INGEST_TOKEN" \
@@ -84,6 +127,13 @@ jobs:
84
127
  echo "ingest poll timeout (request_id=$request_id)" >&2
85
128
  exit 1
86
129
 
130
+ - name: Append compliance ledger and push ref
131
+ if: steps.mission.outputs.path != '' && hashFiles('envelope.json') != '' && env.HAS_ORG_EXPORT == 'true'
132
+ continue-on-error: true
133
+ run: |
134
+ node dist/cli/index.js ledger append --from-envelope envelope.json || true
135
+ git push origin refs/gxt/ledger || echo "ledger push skipped (ref absent or no permission)"
136
+
87
137
  - name: Push pre-commit agent events
88
138
  if: steps.mission.outputs.path != ''
89
139
  continue-on-error: true
@@ -162,6 +162,39 @@ jobs:
162
162
  - name: Build gantry
163
163
  run: npm run build
164
164
 
165
+ - name: Fetch cross-repo mission dependencies
166
+ env:
167
+ BASE_SHA: ${{ github.event.pull_request.base.sha }}
168
+ HEAD_SHA: ${{ github.event.pull_request.head.sha }}
169
+ run: |
170
+ json="$(node dist/cli/index.js mission changed --base-ref "$BASE_SHA" --head-ref "$HEAD_SHA" --json)" || {
171
+ echo "$json"
172
+ exit 1
173
+ }
174
+ mapfile -t missions < <(
175
+ printf '%s' "$json" | node -e '
176
+ let s = "";
177
+ process.stdin.setEncoding("utf8");
178
+ process.stdin.on("data", (c) => { s += c; });
179
+ process.stdin.on("end", () => {
180
+ const j = JSON.parse(s);
181
+ if (j.status !== "ok") process.exit(1);
182
+ for (const m of j.missions || []) console.log(m);
183
+ });
184
+ '
185
+ )
186
+ if [ ${#missions[@]} -eq 1 ] && [ -z "${missions[0]:-}" ]; then
187
+ missions=()
188
+ fi
189
+ if [ ${#missions[@]} -eq 0 ]; then
190
+ echo "deps fetch: no PR-changed missions"
191
+ exit 0
192
+ fi
193
+ for m in "${missions[@]}"; do
194
+ [ -n "$m" ] || continue
195
+ node dist/cli/index.js deps fetch --mission "$m"
196
+ done
197
+
165
198
  - name: Full verify on PR-changed missions
166
199
  env:
167
200
  BASE_SHA: ${{ github.event.pull_request.base.sha }}
@@ -2,6 +2,7 @@
2
2
  .gitagent/foreman/PLANNER.allowlist.local
3
3
  .gitagent/foreman/ORG.export.local
4
4
  .gitagent/history/
5
+ .gitagent/history/policy/
5
6
  .gitagent/history/credentials/
6
7
  .gitagent/history/.ignored-last-error.json
7
8
  .gitagent/history/.draft-token-replay.json
@@ -14,6 +14,7 @@
14
14
  { "targetPath": ".gitagent/config.json", "mode": "scaffold_only", "tags": ["core"] },
15
15
  { "targetPath": ".gitagent/foreman/BYPASS.sha256", "mode": "scaffold_only", "tags": ["core"] },
16
16
  { "targetPath": ".gitagent/foreman/MANIFEST.json", "mode": "scaffold_only", "tags": ["core"] },
17
+ { "targetPath": ".gitagent/foreman/POLICY.pointer.json", "mode": "scaffold_only", "tags": ["core"] },
17
18
  { "targetPath": ".gitagent/foreman/SUBSTRATE.version.json", "mode": "scaffold_only", "tags": ["core"] },
18
19
  { "targetPath": ".gitagent/missions/README.md", "mode": "scaffold_only", "tags": ["core"] },
19
20
  { "targetPath": ".gitagent/planner/ARCHITECTURE-ACCESS.md", "mode": "scaffold_only", "tags": ["core"] },
@@ -22,6 +23,7 @@
22
23
  { "targetPath": ".gitagent/planner/KPI-REPORT.schema.yaml", "mode": "managed_strict", "tags": ["core"] },
23
24
  { "targetPath": ".gitagent/planner/MISSION-ARCHITECT.md", "mode": "scaffold_only", "tags": ["core"] },
24
25
  { "targetPath": ".gitagent/planner/MISSION.schema.yaml", "mode": "managed_strict", "tags": ["core"] },
26
+ { "targetPath": ".gitagent/planner/ORG-POLICY.schema.yaml", "mode": "managed_strict", "tags": ["core"] },
25
27
  { "targetPath": ".gitagent/planner/RULES.md", "mode": "scaffold_only", "tags": ["core"] },
26
28
  { "targetPath": ".githooks/post-checkout", "mode": "managed_strict", "executable": true, "tags": ["hooks"] },
27
29
  { "targetPath": ".githooks/pre-commit", "mode": "managed_strict", "executable": true, "tags": ["hooks"] },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schema_version": "1",
3
- "opengantry_version": "3.2.6",
3
+ "opengantry_version": "3.4.0",
4
4
  "asset_catalog": "integrations/asset-catalog.json",
5
5
  "integrations": {
6
6
  "cursor": {
@@ -5,6 +5,7 @@ import { handleDraftLegislation } from "../dist/cli/lib/mcp-draft-legislation.js
5
5
  import { handleExecuteLegislation } from "../dist/cli/lib/mcp-execute-legislation.js";
6
6
  import { handleCheckSignature } from "../dist/cli/lib/mcp-check-signature.js";
7
7
  import { handlePinMission, handleRuntimeEnv } from "../dist/cli/lib/mcp-runtime.js";
8
+ import { handleDoctor } from "../dist/cli/lib/mcp-doctor.js";
8
9
 
9
10
  const dest = process.env.GXT_DOGFOOD_TMP;
10
11
  if (!dest) throw new Error("GXT_DOGFOOD_TMP unset");
@@ -50,4 +51,8 @@ if (pinned.status !== "pinned") throw new Error("pin failed");
50
51
  const env = handleRuntimeEnv(executed.mission_file_path);
51
52
  if (env.status !== "ok") throw new Error(`runtime env failed: ${JSON.stringify(env)}`);
52
53
 
54
+ const doctor = handleDoctor({});
55
+ if (doctor.status === "error") throw new Error(`doctor failed: ${JSON.stringify(doctor)}`);
56
+ if (!Array.isArray(doctor.lines)) throw new Error("doctor lines missing");
57
+
53
58
  console.log("OK: MCP dogfood flow passed");