@warpgogol/forge 0.3.1

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 (516) hide show
  1. package/AGENTS.md +149 -0
  2. package/README.md +164 -0
  3. package/bin/cli.js +16 -0
  4. package/dist/bin/cli.d.ts +3 -0
  5. package/dist/bin/cli.d.ts.map +1 -0
  6. package/dist/bin/cli.js +265 -0
  7. package/dist/bin/cli.js.map +1 -0
  8. package/dist/os/adr/adr.module.d.ts +3 -0
  9. package/dist/os/adr/adr.module.d.ts.map +1 -0
  10. package/dist/os/adr/adr.module.js +112 -0
  11. package/dist/os/adr/adr.module.js.map +1 -0
  12. package/dist/os/adr/frontmatter-io.d.ts +11 -0
  13. package/dist/os/adr/frontmatter-io.d.ts.map +1 -0
  14. package/dist/os/adr/frontmatter-io.js +64 -0
  15. package/dist/os/adr/frontmatter-io.js.map +1 -0
  16. package/dist/os/adr/handlers/archive.d.ts +24 -0
  17. package/dist/os/adr/handlers/archive.d.ts.map +1 -0
  18. package/dist/os/adr/handlers/archive.js +162 -0
  19. package/dist/os/adr/handlers/archive.js.map +1 -0
  20. package/dist/os/adr/handlers/list-create.d.ts +5 -0
  21. package/dist/os/adr/handlers/list-create.d.ts.map +1 -0
  22. package/dist/os/adr/handlers/list-create.js +165 -0
  23. package/dist/os/adr/handlers/list-create.js.map +1 -0
  24. package/dist/os/adr/handlers/validate.d.ts +4 -0
  25. package/dist/os/adr/handlers/validate.d.ts.map +1 -0
  26. package/dist/os/adr/handlers/validate.js +219 -0
  27. package/dist/os/adr/handlers/validate.js.map +1 -0
  28. package/dist/os/adr/index.d.ts +8 -0
  29. package/dist/os/adr/index.d.ts.map +1 -0
  30. package/dist/os/adr/index.js +18 -0
  31. package/dist/os/adr/index.js.map +1 -0
  32. package/dist/os/adr/types.d.ts +59 -0
  33. package/dist/os/adr/types.d.ts.map +1 -0
  34. package/dist/os/adr/types.js +54 -0
  35. package/dist/os/adr/types.js.map +1 -0
  36. package/dist/os/audit/audit.module.d.ts +3 -0
  37. package/dist/os/audit/audit.module.d.ts.map +1 -0
  38. package/dist/os/audit/audit.module.js +44 -0
  39. package/dist/os/audit/audit.module.js.map +1 -0
  40. package/dist/os/audit/frontmatter-io.d.ts +12 -0
  41. package/dist/os/audit/frontmatter-io.d.ts.map +1 -0
  42. package/dist/os/audit/frontmatter-io.js +73 -0
  43. package/dist/os/audit/frontmatter-io.js.map +1 -0
  44. package/dist/os/audit/handlers/archive.d.ts +4 -0
  45. package/dist/os/audit/handlers/archive.d.ts.map +1 -0
  46. package/dist/os/audit/handlers/archive.js +167 -0
  47. package/dist/os/audit/handlers/archive.js.map +1 -0
  48. package/dist/os/audit/index.d.ts +6 -0
  49. package/dist/os/audit/index.d.ts.map +1 -0
  50. package/dist/os/audit/index.js +16 -0
  51. package/dist/os/audit/index.js.map +1 -0
  52. package/dist/os/audit/types.d.ts +12 -0
  53. package/dist/os/audit/types.d.ts.map +1 -0
  54. package/dist/os/audit/types.js +17 -0
  55. package/dist/os/audit/types.js.map +1 -0
  56. package/dist/os/compass/compass.module.d.ts +3 -0
  57. package/dist/os/compass/compass.module.d.ts.map +1 -0
  58. package/dist/os/compass/compass.module.js +162 -0
  59. package/dist/os/compass/compass.module.js.map +1 -0
  60. package/dist/os/compass/handlers/compass-audit-handler.d.ts +36 -0
  61. package/dist/os/compass/handlers/compass-audit-handler.d.ts.map +1 -0
  62. package/dist/os/compass/handlers/compass-audit-handler.js +238 -0
  63. package/dist/os/compass/handlers/compass-audit-handler.js.map +1 -0
  64. package/dist/os/compass/handlers/compass-change-summary-handler.d.ts +19 -0
  65. package/dist/os/compass/handlers/compass-change-summary-handler.d.ts.map +1 -0
  66. package/dist/os/compass/handlers/compass-change-summary-handler.js +205 -0
  67. package/dist/os/compass/handlers/compass-change-summary-handler.js.map +1 -0
  68. package/dist/os/compass/handlers/compass-inventory-handler.d.ts +28 -0
  69. package/dist/os/compass/handlers/compass-inventory-handler.d.ts.map +1 -0
  70. package/dist/os/compass/handlers/compass-inventory-handler.js +213 -0
  71. package/dist/os/compass/handlers/compass-inventory-handler.js.map +1 -0
  72. package/dist/os/compass/handlers/compass-inventory.d.ts +30 -0
  73. package/dist/os/compass/handlers/compass-inventory.d.ts.map +1 -0
  74. package/dist/os/compass/handlers/compass-inventory.js +418 -0
  75. package/dist/os/compass/handlers/compass-inventory.js.map +1 -0
  76. package/dist/os/compass/handlers/git-revision.d.ts +8 -0
  77. package/dist/os/compass/handlers/git-revision.d.ts.map +1 -0
  78. package/dist/os/compass/handlers/git-revision.js +99 -0
  79. package/dist/os/compass/handlers/git-revision.js.map +1 -0
  80. package/dist/os/compass/handlers/resolve-scan-root.d.ts +3 -0
  81. package/dist/os/compass/handlers/resolve-scan-root.d.ts.map +1 -0
  82. package/dist/os/compass/handlers/resolve-scan-root.js +41 -0
  83. package/dist/os/compass/handlers/resolve-scan-root.js.map +1 -0
  84. package/dist/os/compass/index.d.ts +8 -0
  85. package/dist/os/compass/index.d.ts.map +1 -0
  86. package/dist/os/compass/index.js +19 -0
  87. package/dist/os/compass/index.js.map +1 -0
  88. package/dist/os/core/core.module.d.ts +3 -0
  89. package/dist/os/core/core.module.d.ts.map +1 -0
  90. package/dist/os/core/core.module.js +318 -0
  91. package/dist/os/core/core.module.js.map +1 -0
  92. package/dist/os/core/index.d.ts +2 -0
  93. package/dist/os/core/index.d.ts.map +1 -0
  94. package/dist/os/core/index.js +13 -0
  95. package/dist/os/core/index.js.map +1 -0
  96. package/dist/os/mission/handlers/archive.d.ts +4 -0
  97. package/dist/os/mission/handlers/archive.d.ts.map +1 -0
  98. package/dist/os/mission/handlers/archive.js +209 -0
  99. package/dist/os/mission/handlers/archive.js.map +1 -0
  100. package/dist/os/mission/index.d.ts +2 -0
  101. package/dist/os/mission/index.d.ts.map +1 -0
  102. package/dist/os/mission/index.js +2 -0
  103. package/dist/os/mission/index.js.map +1 -0
  104. package/dist/os/mission/mission.module.d.ts +3 -0
  105. package/dist/os/mission/mission.module.d.ts.map +1 -0
  106. package/dist/os/mission/mission.module.js +44 -0
  107. package/dist/os/mission/mission.module.js.map +1 -0
  108. package/dist/os/mission/types.d.ts +23 -0
  109. package/dist/os/mission/types.d.ts.map +1 -0
  110. package/dist/os/mission/types.js +18 -0
  111. package/dist/os/mission/types.js.map +1 -0
  112. package/dist/os/naming/index.d.ts +3 -0
  113. package/dist/os/naming/index.d.ts.map +1 -0
  114. package/dist/os/naming/index.js +14 -0
  115. package/dist/os/naming/index.js.map +1 -0
  116. package/dist/os/naming/naming-convention.d.ts +25 -0
  117. package/dist/os/naming/naming-convention.d.ts.map +1 -0
  118. package/dist/os/naming/naming-convention.js +324 -0
  119. package/dist/os/naming/naming-convention.js.map +1 -0
  120. package/dist/os/naming/naming.module.d.ts +3 -0
  121. package/dist/os/naming/naming.module.d.ts.map +1 -0
  122. package/dist/os/naming/naming.module.js +33 -0
  123. package/dist/os/naming/naming.module.js.map +1 -0
  124. package/dist/os/plan/frontmatter-io.d.ts +12 -0
  125. package/dist/os/plan/frontmatter-io.d.ts.map +1 -0
  126. package/dist/os/plan/frontmatter-io.js +71 -0
  127. package/dist/os/plan/frontmatter-io.js.map +1 -0
  128. package/dist/os/plan/handlers/archive.d.ts +4 -0
  129. package/dist/os/plan/handlers/archive.d.ts.map +1 -0
  130. package/dist/os/plan/handlers/archive.js +166 -0
  131. package/dist/os/plan/handlers/archive.js.map +1 -0
  132. package/dist/os/plan/index.d.ts +6 -0
  133. package/dist/os/plan/index.d.ts.map +1 -0
  134. package/dist/os/plan/index.js +16 -0
  135. package/dist/os/plan/index.js.map +1 -0
  136. package/dist/os/plan/plan.module.d.ts +3 -0
  137. package/dist/os/plan/plan.module.d.ts.map +1 -0
  138. package/dist/os/plan/plan.module.js +44 -0
  139. package/dist/os/plan/plan.module.js.map +1 -0
  140. package/dist/os/plan/types.d.ts +12 -0
  141. package/dist/os/plan/types.d.ts.map +1 -0
  142. package/dist/os/plan/types.js +17 -0
  143. package/dist/os/plan/types.js.map +1 -0
  144. package/dist/os/rfc/acceptance.d.ts +15 -0
  145. package/dist/os/rfc/acceptance.d.ts.map +1 -0
  146. package/dist/os/rfc/acceptance.js +290 -0
  147. package/dist/os/rfc/acceptance.js.map +1 -0
  148. package/dist/os/rfc/decision-log.d.ts +6 -0
  149. package/dist/os/rfc/decision-log.d.ts.map +1 -0
  150. package/dist/os/rfc/decision-log.js +269 -0
  151. package/dist/os/rfc/decision-log.js.map +1 -0
  152. package/dist/os/rfc/dna-trace.d.ts +27 -0
  153. package/dist/os/rfc/dna-trace.d.ts.map +1 -0
  154. package/dist/os/rfc/dna-trace.js +214 -0
  155. package/dist/os/rfc/dna-trace.js.map +1 -0
  156. package/dist/os/rfc/frontmatter-io.d.ts +14 -0
  157. package/dist/os/rfc/frontmatter-io.d.ts.map +1 -0
  158. package/dist/os/rfc/frontmatter-io.js +98 -0
  159. package/dist/os/rfc/frontmatter-io.js.map +1 -0
  160. package/dist/os/rfc/handlers/archive.d.ts +24 -0
  161. package/dist/os/rfc/handlers/archive.d.ts.map +1 -0
  162. package/dist/os/rfc/handlers/archive.js +161 -0
  163. package/dist/os/rfc/handlers/archive.js.map +1 -0
  164. package/dist/os/rfc/handlers/check.d.ts +4 -0
  165. package/dist/os/rfc/handlers/check.d.ts.map +1 -0
  166. package/dist/os/rfc/handlers/check.js +195 -0
  167. package/dist/os/rfc/handlers/check.js.map +1 -0
  168. package/dist/os/rfc/handlers/implement-stamp.d.ts +4 -0
  169. package/dist/os/rfc/handlers/implement-stamp.d.ts.map +1 -0
  170. package/dist/os/rfc/handlers/implement-stamp.js +334 -0
  171. package/dist/os/rfc/handlers/implement-stamp.js.map +1 -0
  172. package/dist/os/rfc/handlers/index-graph.d.ts +13 -0
  173. package/dist/os/rfc/handlers/index-graph.d.ts.map +1 -0
  174. package/dist/os/rfc/handlers/index-graph.js +189 -0
  175. package/dist/os/rfc/handlers/index-graph.js.map +1 -0
  176. package/dist/os/rfc/handlers/lifecycle.d.ts +13 -0
  177. package/dist/os/rfc/handlers/lifecycle.d.ts.map +1 -0
  178. package/dist/os/rfc/handlers/lifecycle.js +150 -0
  179. package/dist/os/rfc/handlers/lifecycle.js.map +1 -0
  180. package/dist/os/rfc/handlers/list-create.d.ts +6 -0
  181. package/dist/os/rfc/handlers/list-create.d.ts.map +1 -0
  182. package/dist/os/rfc/handlers/list-create.js +235 -0
  183. package/dist/os/rfc/handlers/list-create.js.map +1 -0
  184. package/dist/os/rfc/handlers/pipeline-status.d.ts +26 -0
  185. package/dist/os/rfc/handlers/pipeline-status.d.ts.map +1 -0
  186. package/dist/os/rfc/handlers/pipeline-status.js +124 -0
  187. package/dist/os/rfc/handlers/pipeline-status.js.map +1 -0
  188. package/dist/os/rfc/handlers/shared.d.ts +22 -0
  189. package/dist/os/rfc/handlers/shared.d.ts.map +1 -0
  190. package/dist/os/rfc/handlers/shared.js +99 -0
  191. package/dist/os/rfc/handlers/shared.js.map +1 -0
  192. package/dist/os/rfc/handlers/supersede-propose.d.ts +4 -0
  193. package/dist/os/rfc/handlers/supersede-propose.d.ts.map +1 -0
  194. package/dist/os/rfc/handlers/supersede-propose.js +200 -0
  195. package/dist/os/rfc/handlers/supersede-propose.js.map +1 -0
  196. package/dist/os/rfc/handlers/validate-rules.d.ts +29 -0
  197. package/dist/os/rfc/handlers/validate-rules.d.ts.map +1 -0
  198. package/dist/os/rfc/handlers/validate-rules.js +461 -0
  199. package/dist/os/rfc/handlers/validate-rules.js.map +1 -0
  200. package/dist/os/rfc/handlers/validate.d.ts +4 -0
  201. package/dist/os/rfc/handlers/validate.d.ts.map +1 -0
  202. package/dist/os/rfc/handlers/validate.js +101 -0
  203. package/dist/os/rfc/handlers/validate.js.map +1 -0
  204. package/dist/os/rfc/handlers.d.ts +7 -0
  205. package/dist/os/rfc/handlers.d.ts.map +1 -0
  206. package/dist/os/rfc/handlers.js +19 -0
  207. package/dist/os/rfc/handlers.js.map +1 -0
  208. package/dist/os/rfc/index.d.ts +18 -0
  209. package/dist/os/rfc/index.d.ts.map +1 -0
  210. package/dist/os/rfc/index.js +24 -0
  211. package/dist/os/rfc/index.js.map +1 -0
  212. package/dist/os/rfc/rfc.module.d.ts +3 -0
  213. package/dist/os/rfc/rfc.module.d.ts.map +1 -0
  214. package/dist/os/rfc/rfc.module.js +355 -0
  215. package/dist/os/rfc/rfc.module.js.map +1 -0
  216. package/dist/os/rfc/types.d.ts +448 -0
  217. package/dist/os/rfc/types.d.ts.map +1 -0
  218. package/dist/os/rfc/types.js +95 -0
  219. package/dist/os/rfc/types.js.map +1 -0
  220. package/dist/os/rfc/verification-evidence.d.ts +8 -0
  221. package/dist/os/rfc/verification-evidence.d.ts.map +1 -0
  222. package/dist/os/rfc/verification-evidence.js +182 -0
  223. package/dist/os/rfc/verification-evidence.js.map +1 -0
  224. package/dist/os/session/atif-parser.d.ts +29 -0
  225. package/dist/os/session/atif-parser.d.ts.map +1 -0
  226. package/dist/os/session/atif-parser.js +138 -0
  227. package/dist/os/session/atif-parser.js.map +1 -0
  228. package/dist/os/session/frontmatter-io.d.ts +31 -0
  229. package/dist/os/session/frontmatter-io.d.ts.map +1 -0
  230. package/dist/os/session/frontmatter-io.js +146 -0
  231. package/dist/os/session/frontmatter-io.js.map +1 -0
  232. package/dist/os/session/handlers/archive.d.ts +4 -0
  233. package/dist/os/session/handlers/archive.d.ts.map +1 -0
  234. package/dist/os/session/handlers/archive.js +209 -0
  235. package/dist/os/session/handlers/archive.js.map +1 -0
  236. package/dist/os/session/handlers/list.d.ts +4 -0
  237. package/dist/os/session/handlers/list.d.ts.map +1 -0
  238. package/dist/os/session/handlers/list.js +147 -0
  239. package/dist/os/session/handlers/list.js.map +1 -0
  240. package/dist/os/session/handlers/save.d.ts +6 -0
  241. package/dist/os/session/handlers/save.d.ts.map +1 -0
  242. package/dist/os/session/handlers/save.js +285 -0
  243. package/dist/os/session/handlers/save.js.map +1 -0
  244. package/dist/os/session/handlers/validate.d.ts +4 -0
  245. package/dist/os/session/handlers/validate.d.ts.map +1 -0
  246. package/dist/os/session/handlers/validate.js +188 -0
  247. package/dist/os/session/handlers/validate.js.map +1 -0
  248. package/dist/os/session/index.d.ts +9 -0
  249. package/dist/os/session/index.d.ts.map +1 -0
  250. package/dist/os/session/index.js +20 -0
  251. package/dist/os/session/index.js.map +1 -0
  252. package/dist/os/session/session.module.d.ts +3 -0
  253. package/dist/os/session/session.module.d.ts.map +1 -0
  254. package/dist/os/session/session.module.js +113 -0
  255. package/dist/os/session/session.module.js.map +1 -0
  256. package/dist/os/session/types.d.ts +101 -0
  257. package/dist/os/session/types.d.ts.map +1 -0
  258. package/dist/os/session/types.js +52 -0
  259. package/dist/os/session/types.js.map +1 -0
  260. package/dist/os/spec/spec-materialize.d.ts +21 -0
  261. package/dist/os/spec/spec-materialize.d.ts.map +1 -0
  262. package/dist/os/spec/spec-materialize.js +342 -0
  263. package/dist/os/spec/spec-materialize.js.map +1 -0
  264. package/dist/os/spec/spec-schema.d.ts +132 -0
  265. package/dist/os/spec/spec-schema.d.ts.map +1 -0
  266. package/dist/os/spec/spec-schema.js +118 -0
  267. package/dist/os/spec/spec-schema.js.map +1 -0
  268. package/dist/os/spec/spec-status.d.ts +33 -0
  269. package/dist/os/spec/spec-status.d.ts.map +1 -0
  270. package/dist/os/spec/spec-status.js +222 -0
  271. package/dist/os/spec/spec-status.js.map +1 -0
  272. package/dist/os/spec/spec-validate.d.ts +4 -0
  273. package/dist/os/spec/spec-validate.d.ts.map +1 -0
  274. package/dist/os/spec/spec-validate.js +435 -0
  275. package/dist/os/spec/spec-validate.js.map +1 -0
  276. package/dist/os/spec/spec.module.d.ts +3 -0
  277. package/dist/os/spec/spec.module.d.ts.map +1 -0
  278. package/dist/os/spec/spec.module.js +67 -0
  279. package/dist/os/spec/spec.module.js.map +1 -0
  280. package/dist/os/werkstatt/handlers/lock.d.ts +10 -0
  281. package/dist/os/werkstatt/handlers/lock.d.ts.map +1 -0
  282. package/dist/os/werkstatt/handlers/lock.js +127 -0
  283. package/dist/os/werkstatt/handlers/lock.js.map +1 -0
  284. package/dist/os/werkstatt/handlers/schema.d.ts +32 -0
  285. package/dist/os/werkstatt/handlers/schema.d.ts.map +1 -0
  286. package/dist/os/werkstatt/handlers/schema.js +41 -0
  287. package/dist/os/werkstatt/handlers/schema.js.map +1 -0
  288. package/dist/os/werkstatt/handlers/werkstatt-lock-recover.d.ts +15 -0
  289. package/dist/os/werkstatt/handlers/werkstatt-lock-recover.d.ts.map +1 -0
  290. package/dist/os/werkstatt/handlers/werkstatt-lock-recover.js +142 -0
  291. package/dist/os/werkstatt/handlers/werkstatt-lock-recover.js.map +1 -0
  292. package/dist/os/werkstatt/handlers/werkstatt-lock-status.d.ts +18 -0
  293. package/dist/os/werkstatt/handlers/werkstatt-lock-status.d.ts.map +1 -0
  294. package/dist/os/werkstatt/handlers/werkstatt-lock-status.js +43 -0
  295. package/dist/os/werkstatt/handlers/werkstatt-lock-status.js.map +1 -0
  296. package/dist/os/werkstatt/handlers/werkstatt-operation-validate.d.ts +11 -0
  297. package/dist/os/werkstatt/handlers/werkstatt-operation-validate.d.ts.map +1 -0
  298. package/dist/os/werkstatt/handlers/werkstatt-operation-validate.js +79 -0
  299. package/dist/os/werkstatt/handlers/werkstatt-operation-validate.js.map +1 -0
  300. package/dist/os/werkstatt/index.d.ts +7 -0
  301. package/dist/os/werkstatt/index.d.ts.map +1 -0
  302. package/dist/os/werkstatt/index.js +18 -0
  303. package/dist/os/werkstatt/index.js.map +1 -0
  304. package/dist/os/werkstatt/werkstatt.module.d.ts +3 -0
  305. package/dist/os/werkstatt/werkstatt.module.d.ts.map +1 -0
  306. package/dist/os/werkstatt/werkstatt.module.js +58 -0
  307. package/dist/os/werkstatt/werkstatt.module.js.map +1 -0
  308. package/dist/os/workflow/handlers.d.ts +12 -0
  309. package/dist/os/workflow/handlers.d.ts.map +1 -0
  310. package/dist/os/workflow/handlers.js +254 -0
  311. package/dist/os/workflow/handlers.js.map +1 -0
  312. package/dist/os/workflow/index.d.ts +4 -0
  313. package/dist/os/workflow/index.d.ts.map +1 -0
  314. package/dist/os/workflow/index.js +18 -0
  315. package/dist/os/workflow/index.js.map +1 -0
  316. package/dist/os/workflow/types.d.ts +69 -0
  317. package/dist/os/workflow/types.d.ts.map +1 -0
  318. package/dist/os/workflow/types.js +23 -0
  319. package/dist/os/workflow/types.js.map +1 -0
  320. package/dist/os/workflow/workflow.module.d.ts +3 -0
  321. package/dist/os/workflow/workflow.module.d.ts.map +1 -0
  322. package/dist/os/workflow/workflow.module.js +48 -0
  323. package/dist/os/workflow/workflow.module.js.map +1 -0
  324. package/dist/src/cli-output.d.ts +5 -0
  325. package/dist/src/cli-output.d.ts.map +1 -0
  326. package/dist/src/cli-output.js +52 -0
  327. package/dist/src/cli-output.js.map +1 -0
  328. package/dist/src/config/forge-config.d.ts +170 -0
  329. package/dist/src/config/forge-config.d.ts.map +1 -0
  330. package/dist/src/config/forge-config.js +259 -0
  331. package/dist/src/config/forge-config.js.map +1 -0
  332. package/dist/src/forge-module.d.ts +16 -0
  333. package/dist/src/forge-module.d.ts.map +1 -0
  334. package/dist/src/forge-module.js +15 -0
  335. package/dist/src/forge-module.js.map +1 -0
  336. package/dist/src/index.d.ts +30 -0
  337. package/dist/src/index.d.ts.map +1 -0
  338. package/dist/src/index.js +48 -0
  339. package/dist/src/index.js.map +1 -0
  340. package/dist/src/migration-adapters/git-utils.d.ts +3 -0
  341. package/dist/src/migration-adapters/git-utils.d.ts.map +1 -0
  342. package/dist/src/migration-adapters/git-utils.js +46 -0
  343. package/dist/src/migration-adapters/git-utils.js.map +1 -0
  344. package/dist/src/migration-adapters/ignored-files.d.ts +12 -0
  345. package/dist/src/migration-adapters/ignored-files.d.ts.map +1 -0
  346. package/dist/src/migration-adapters/ignored-files.js +190 -0
  347. package/dist/src/migration-adapters/ignored-files.js.map +1 -0
  348. package/dist/src/migration-adapters/index.d.ts +8 -0
  349. package/dist/src/migration-adapters/index.d.ts.map +1 -0
  350. package/dist/src/migration-adapters/index.js +17 -0
  351. package/dist/src/migration-adapters/index.js.map +1 -0
  352. package/dist/src/migration-adapters/node-typescript-pnpm/index.d.ts +3 -0
  353. package/dist/src/migration-adapters/node-typescript-pnpm/index.d.ts.map +1 -0
  354. package/dist/src/migration-adapters/node-typescript-pnpm/index.js +141 -0
  355. package/dist/src/migration-adapters/node-typescript-pnpm/index.js.map +1 -0
  356. package/dist/src/migration-adapters/phaser-pnpm/index.d.ts +3 -0
  357. package/dist/src/migration-adapters/phaser-pnpm/index.d.ts.map +1 -0
  358. package/dist/src/migration-adapters/phaser-pnpm/index.js +142 -0
  359. package/dist/src/migration-adapters/phaser-pnpm/index.js.map +1 -0
  360. package/dist/src/migration-adapters/registry.d.ts +6 -0
  361. package/dist/src/migration-adapters/registry.d.ts.map +1 -0
  362. package/dist/src/migration-adapters/registry.js +58 -0
  363. package/dist/src/migration-adapters/registry.js.map +1 -0
  364. package/dist/src/migration-adapters/types.d.ts +35 -0
  365. package/dist/src/migration-adapters/types.d.ts.map +1 -0
  366. package/dist/src/migration-adapters/types.js +31 -0
  367. package/dist/src/migration-adapters/types.js.map +1 -0
  368. package/dist/src/onboarding/agents-generate.d.ts +11 -0
  369. package/dist/src/onboarding/agents-generate.d.ts.map +1 -0
  370. package/dist/src/onboarding/agents-generate.js +415 -0
  371. package/dist/src/onboarding/agents-generate.js.map +1 -0
  372. package/dist/src/onboarding/create.d.ts +12 -0
  373. package/dist/src/onboarding/create.d.ts.map +1 -0
  374. package/dist/src/onboarding/create.js +232 -0
  375. package/dist/src/onboarding/create.js.map +1 -0
  376. package/dist/src/onboarding/doctor.d.ts +30 -0
  377. package/dist/src/onboarding/doctor.d.ts.map +1 -0
  378. package/dist/src/onboarding/doctor.js +380 -0
  379. package/dist/src/onboarding/doctor.js.map +1 -0
  380. package/dist/src/onboarding/extended-behavioral-layer.d.ts +10 -0
  381. package/dist/src/onboarding/extended-behavioral-layer.d.ts.map +1 -0
  382. package/dist/src/onboarding/extended-behavioral-layer.js +82 -0
  383. package/dist/src/onboarding/extended-behavioral-layer.js.map +1 -0
  384. package/dist/src/onboarding/init.d.ts +25 -0
  385. package/dist/src/onboarding/init.d.ts.map +1 -0
  386. package/dist/src/onboarding/init.js +260 -0
  387. package/dist/src/onboarding/init.js.map +1 -0
  388. package/dist/src/onboarding/scaffold-project.d.ts +12 -0
  389. package/dist/src/onboarding/scaffold-project.d.ts.map +1 -0
  390. package/dist/src/onboarding/scaffold-project.js +167 -0
  391. package/dist/src/onboarding/scaffold-project.js.map +1 -0
  392. package/dist/src/onboarding/scaffold.d.ts +15 -0
  393. package/dist/src/onboarding/scaffold.d.ts.map +1 -0
  394. package/dist/src/onboarding/scaffold.js +120 -0
  395. package/dist/src/onboarding/scaffold.js.map +1 -0
  396. package/dist/src/onboarding/upgrade.d.ts +17 -0
  397. package/dist/src/onboarding/upgrade.d.ts.map +1 -0
  398. package/dist/src/onboarding/upgrade.js +293 -0
  399. package/dist/src/onboarding/upgrade.js.map +1 -0
  400. package/dist/src/profiles/stack-profile.d.ts +51 -0
  401. package/dist/src/profiles/stack-profile.d.ts.map +1 -0
  402. package/dist/src/profiles/stack-profile.js +119 -0
  403. package/dist/src/profiles/stack-profile.js.map +1 -0
  404. package/dist/src/registry.d.ts +38 -0
  405. package/dist/src/registry.d.ts.map +1 -0
  406. package/dist/src/registry.js +135 -0
  407. package/dist/src/registry.js.map +1 -0
  408. package/dist/src/skill-schema.d.ts +30 -0
  409. package/dist/src/skill-schema.d.ts.map +1 -0
  410. package/dist/src/skill-schema.js +34 -0
  411. package/dist/src/skill-schema.js.map +1 -0
  412. package/dist/src/types.d.ts +153 -0
  413. package/dist/src/types.d.ts.map +1 -0
  414. package/dist/src/types.js +17 -0
  415. package/dist/src/types.js.map +1 -0
  416. package/dist/src/utils/fs-atomic.d.ts +7 -0
  417. package/dist/src/utils/fs-atomic.d.ts.map +1 -0
  418. package/dist/src/utils/fs-atomic.js +81 -0
  419. package/dist/src/utils/fs-atomic.js.map +1 -0
  420. package/dist/src/utils/fs-idempotent.d.ts +2 -0
  421. package/dist/src/utils/fs-idempotent.d.ts.map +1 -0
  422. package/dist/src/utils/fs-idempotent.js +30 -0
  423. package/dist/src/utils/fs-idempotent.js.map +1 -0
  424. package/dist/src/utils/fs.d.ts +8 -0
  425. package/dist/src/utils/fs.d.ts.map +1 -0
  426. package/dist/src/utils/fs.js +60 -0
  427. package/dist/src/utils/fs.js.map +1 -0
  428. package/dist/src/utils/generated-marker.d.ts +21 -0
  429. package/dist/src/utils/generated-marker.d.ts.map +1 -0
  430. package/dist/src/utils/generated-marker.js +128 -0
  431. package/dist/src/utils/generated-marker.js.map +1 -0
  432. package/dist/src/utils/hash.d.ts +2 -0
  433. package/dist/src/utils/hash.d.ts.map +1 -0
  434. package/dist/src/utils/hash.js +18 -0
  435. package/dist/src/utils/hash.js.map +1 -0
  436. package/dist/src/utils/index.d.ts +7 -0
  437. package/dist/src/utils/index.d.ts.map +1 -0
  438. package/dist/src/utils/index.js +19 -0
  439. package/dist/src/utils/index.js.map +1 -0
  440. package/dist/src/utils/string-utils.d.ts +2 -0
  441. package/dist/src/utils/string-utils.d.ts.map +1 -0
  442. package/dist/src/utils/string-utils.js +19 -0
  443. package/dist/src/utils/string-utils.js.map +1 -0
  444. package/dist/src/validators/port-validate.d.ts +12 -0
  445. package/dist/src/validators/port-validate.d.ts.map +1 -0
  446. package/dist/src/validators/port-validate.js +73 -0
  447. package/dist/src/validators/port-validate.js.map +1 -0
  448. package/dist/src/validators/skill-validate.d.ts +14 -0
  449. package/dist/src/validators/skill-validate.d.ts.map +1 -0
  450. package/dist/src/validators/skill-validate.js +487 -0
  451. package/dist/src/validators/skill-validate.js.map +1 -0
  452. package/os/rfc/rfc-0000-template.md +222 -0
  453. package/package.json +262 -0
  454. package/profiles/astro-typescript-turborepo.yaml +144 -0
  455. package/profiles/forge-shell.yaml +77 -0
  456. package/profiles/phaser-turborepo.yaml +144 -0
  457. package/skills/_shared/fo-pipeline-conventions.md +119 -0
  458. package/skills/_shared/fo-session-summary.md +95 -0
  459. package/skills/fo/fo-add-tests/SKILL.md +166 -0
  460. package/skills/fo/fo-add-tests/mocking.md +60 -0
  461. package/skills/fo/fo-add-tests/pbt-guide.md +193 -0
  462. package/skills/fo/fo-add-tests/tests-reference.md +92 -0
  463. package/skills/fo/fo-architecture/SKILL.md +83 -0
  464. package/skills/fo/fo-architecture/architecture-vocabulary.md +104 -0
  465. package/skills/fo/fo-architecture/deepening.md +37 -0
  466. package/skills/fo/fo-architecture/design-it-twice.md +44 -0
  467. package/skills/fo/fo-architecture/html-report.md +104 -0
  468. package/skills/fo/fo-compass-annotate/SKILL.md +128 -0
  469. package/skills/fo/fo-compass-annotate/reference/comment-styles.md +25 -0
  470. package/skills/fo/fo-compass-annotate/reference/learned-principles.md +12 -0
  471. package/skills/fo/fo-compass-annotate/reference/risk-patterns.md +23 -0
  472. package/skills/fo/fo-compass-annotate/templates/audit-prompt.md +36 -0
  473. package/skills/fo/fo-compass-annotate/templates/header-format.md +57 -0
  474. package/skills/fo/fo-compass-annotate/templates/header-prompt.md +35 -0
  475. package/skills/fo/fo-doc-audit/SKILL.md +264 -0
  476. package/skills/fo/fo-extract-dna/SKILL.md +248 -0
  477. package/skills/fo/fo-fix/SKILL.md +152 -0
  478. package/skills/fo/fo-fix/bug-diagnosis.md +128 -0
  479. package/skills/fo/fo-handoff/SKILL.md +58 -0
  480. package/skills/fo/fo-harvest/SKILL.md +80 -0
  481. package/skills/fo/fo-idea/SKILL.md +242 -0
  482. package/skills/fo/fo-idea-audit/SKILL.md +248 -0
  483. package/skills/fo/fo-idea-create-adr/SKILL.md +130 -0
  484. package/skills/fo/fo-idea-create-rfc/SKILL.md +130 -0
  485. package/skills/fo/fo-idea-enhance/SKILL.md +218 -0
  486. package/skills/fo/fo-idea-i-just-want-to-see-the-plan/SKILL.md +36 -0
  487. package/skills/fo/fo-idea-i-just-want-to-see-the-result/SKILL.md +167 -0
  488. package/skills/fo/fo-idea-implement/SKILL.md +463 -0
  489. package/skills/fo/fo-idea-plan/SKILL.md +230 -0
  490. package/skills/fo/fo-idea-status/SKILL.md +103 -0
  491. package/skills/fo/fo-memory-sync/SKILL.md +204 -0
  492. package/skills/fo/fo-memory-sync/fix-patterns.md +24 -0
  493. package/skills/fo/fo-memory-sync/learned-principles.md +6 -0
  494. package/skills/fo/fo-memory-sync/qa-log.md +5 -0
  495. package/skills/fo/fo-qa/SKILL.md +142 -0
  496. package/skills/fo/fo-review/SKILL.md +273 -0
  497. package/skills/fo/fo-session-retro/SKILL.md +276 -0
  498. package/skills/fo/fo-session-save/SKILL.md +71 -0
  499. package/skills/fo/fo-session-save/fix-patterns.md +33 -0
  500. package/skills/fo/fo-session-save/learned-principles.md +19 -0
  501. package/skills/fo/fo-session-save/qa-log.md +11 -0
  502. package/skills/fo/fo-spec-ingest/SKILL.md +127 -0
  503. package/skills/fo/fo-triage/SKILL.md +97 -0
  504. package/skills/meta/forge-bootstrap/SKILL.md +335 -0
  505. package/skills/meta/forge-bootstrap/forge-about.md +35 -0
  506. package/skills/meta/forge-bootstrap/milestone-gallery/.gitkeep +0 -0
  507. package/skills/meta/forge-bootstrap/operator-profile-template.md +53 -0
  508. package/skills/meta/forge-bootstrap/project-narrative-template.md +31 -0
  509. package/skills/meta/port-to-forge/SKILL.md +65 -0
  510. package/skills/meta/skill-create/SKILL.md +73 -0
  511. package/skills/shared/grilling/SKILL.md +28 -0
  512. package/skills/shared/grilling/learned-principles.md +12 -0
  513. package/skills/shared/grilling/qa-log.md +10 -0
  514. package/skills/shared/my-preferences/SKILL.md +77 -0
  515. package/skills/shared/windows-ai-tooling/SKILL.md +200 -0
  516. package/skills/shared/writing-great-skills/SKILL.md +132 -0
@@ -0,0 +1,248 @@
1
+ ---
2
+ name: fo-extract-dna
3
+ description: Discover implicit architectural invariants, grill the operator about each, and delegate to fo-idea-create-rfc. After acceptance, append to architecture-dna.md. Use when extracting DNA.
4
+ invocation: user
5
+ category: fo
6
+ concerns: document-only
7
+ dependsOn: ['my-preferences']
8
+ languagePolicy: ref(PREFERENCES.md)
9
+ bindings:
10
+ requires: [commands.validateRfc]
11
+ optional: [paths.invariantsFile]
12
+ triggers: ["extract DNA invariant", "discover architectural invariants", "formalize implicit architectural rules"]
13
+ ---
14
+
15
+ # Extract DNA
16
+
17
+ Before starting, read `PREFERENCES.md` at the repository root. If the file is missing or `aiLanguage` is unset, ask the operator once and create the file using the `my-preferences` skill semantics.
18
+
19
+ > **This is a document-only skill.** It produces RFC files in `docs/rfcs/` and, after RFC acceptance, appends entries to `docs/architecture-dna.md` — nothing else. It must never modify, create, or delete source code files in `apps/`, `packages/`, `services/`, or any other directory. It must not run build commands, tests, or validation suites other than `rfc.validate`, `dna.registry.validate`, and `rfc.dna.trace.validate`. Implementation of the RFC's code changes is handled by `fo-idea-implement` after the RFC is accepted.
20
+
21
+ ## Purpose
22
+
23
+ The codebase contains **implicit architectural invariants** — rules that developers and agents consistently follow but that have never been formally recorded in `ref(forge.yaml bindings.paths.invariantsFile)`. These are DNA candidates waiting to be discovered and formalized.
24
+
25
+ This skill is the **discovery entry point**: it scans the codebase or listens to the operator's description, identifies patterns that look like stable invariants, grills the operator about each one, and — at agreement — routes through the normal RFC governance pipeline to establish them formally.
26
+
27
+ **What this skill is NOT:**
28
+
29
+ - It is not a shortcut that bypasses RFC acceptance. DNA entries are appended to the registry **only after** the establishing RFC is accepted.
30
+ - It is not a bulk scanner that auto-generates DNA. Every candidate requires operator discussion and explicit agreement.
31
+ - It is not a replacement for `fo-idea`. `fo-idea` starts from an operator's idea and routes to RFC/ADR. `fo-extract-dna` starts from **codebase patterns** or **operator-described conventions** and routes to RFC with a DNA-establishment focus.
32
+
33
+ ## Process
34
+
35
+ ### 1. Identify the discovery mode
36
+
37
+ The operator may trigger this skill in one of two modes:
38
+
39
+ - **Codebase scan mode** — "find implicit DNA in the codebase", "what invariants exist but aren't recorded", "scan for architectural patterns". The skill scans the codebase to discover candidates.
40
+ - **Convention description mode** — the operator describes a convention they follow ("we always do X", "components must never do Y", "all Z goes through W"). The skill evaluates whether this is a DNA-grade invariant.
41
+
42
+ If the operator's request is ambiguous, ask using `ask_user_question`:
43
+
44
+ > "Should I scan the codebase for implicit invariants, or do you have a specific convention in mind to evaluate?"
45
+
46
+ ### 2. Read the existing DNA registry
47
+
48
+ Before proposing any candidate, read `ref(forge.yaml bindings.paths.invariantsFile)` in full. Record:
49
+
50
+ - All existing `DNA-N` ids and their titles (to avoid duplicates).
51
+ - The next available `DNA-N` number (max existing + 1).
52
+ - Which invariants are marked "Foundational invariant (pre-RFC)" vs "Established by RFC-XXXX".
53
+ - Which invariants have been "Reclassified to feature".
54
+
55
+ Also read the RFC template (`os/rfc/rfc-0000-template.md` inside `@warpgogol/forge`) to understand the `satisfies` field and the "DNA-N established by this RFC" marker pattern.
56
+
57
+ ### 3. Discover DNA candidates
58
+
59
+ #### 3a. Codebase scan mode
60
+
61
+ Scan the codebase for patterns that **look like stable invariants but are not yet recorded**. Look for:
62
+
63
+ - **Structural conventions** — directory layouts, file naming, import boundaries that are consistently followed across `apps/*` and `packages/*`.
64
+ - **Code patterns** — repeated type signatures, consistent error handling shapes, uniform export patterns across packages.
65
+ - **Enforcement gaps** — conventions that have a lint/check command but no DNA entry documenting the invariant.
66
+ - **Cross-workspace contracts** — interfaces or schemas shared between packages that are treated as stable but never formalized.
67
+ - **Negative space** — things that are **never done** (e.g. "no app imports from another app" before it was recorded as an invariant).
68
+
69
+ For each candidate, check:
70
+
71
+ 1. Is this already covered by an existing DNA-N? If yes, skip.
72
+ 2. Is this a **stable invariant** (not a temporary convention or migration-period rule)?
73
+ 3. Is this **enforceable** — could a Site OS command check it, or is it a documentation-only rule?
74
+ 4. Is this **cross-workspace** (applies to multiple apps/packages, not just one)?
75
+
76
+ Present candidates as a numbered list with a one-line summary each. Do not propose more than 5 candidates in one batch — the operator needs to discuss each.
77
+
78
+ #### 3b. Convention description mode
79
+
80
+ Take the operator's description and evaluate it against the DNA criteria:
81
+
82
+ - Is the convention **stable** (followed consistently, not in flux)?
83
+ - Is it **cross-workspace** (not local to one package/app)?
84
+ - Does it **warrant DNA status** (permanent, not a feature or product decision)?
85
+ - Is it **enforceable** (can a command verify it)?
86
+ - Is it already covered by an existing DNA-N?
87
+
88
+ If the convention is local, temporary, or a product decision, explain why it is not DNA-grade and suggest an ADR instead.
89
+
90
+ ### 4. Grill each candidate
91
+
92
+ For each DNA candidate that the operator agrees to pursue, invoke the `/grilling` skill to stress-test it. The grilling examines:
93
+
94
+ - **Formulation** — is the invariant stated precisely enough to be checkable? Vague formulations like "code should be clean" are not DNA-grade.
95
+ - **Scope** — is this truly cross-workspace, or is it local to one package/app? Local invariants are ADRs, not DNA.
96
+ - **Enforcement** — what Site OS command would enforce this? If no command exists and none is planned, is this really an invariant or just a convention?
97
+ - **Stability** — is this a temporary rule during a migration? DNA invariants are permanent until superseded by another RFC.
98
+ - **Overlap** — does this overlap with or contradict an existing DNA-N? If it extends or refines an existing one, the RFC should amend the original, not create a parallel entry.
99
+ - **Cost of violation** — what breaks if this invariant is violated? If nothing breaks, it is not an invariant.
100
+ - **Agent clarity** — will an AI agent understand this invariant from the DNA entry alone, without reading the RFC? DNA entries are referenced by agents who may not read the full RFC.
101
+
102
+ Address every concern the grilling raises by adjusting the formulation, scope, or enforcement plan. Do not proceed to RFC creation until the grilling is satisfied with the candidate.
103
+
104
+ ### 5. Present the DNA candidate summary
105
+
106
+ After grilling, present a structured summary for each candidate:
107
+
108
+ ```
109
+ ## DNA Candidate: DNA-<N> · <Title>
110
+
111
+ **Formulation:** <one-sentence invariant statement, present tense>
112
+ **Scope:** workspace | package
113
+ **Enforcement:** <Site OS command name> or "documentation-only (no command)"
114
+ **Established by:** RFC-XXXX (to be created)
115
+ **Cost of violation:** <what breaks>
116
+ **Related DNA:** <existing DNA-N that this extends, refines, or complements>
117
+ **Grilling verdict:** passed | adjusted | rejected
118
+ ```
119
+
120
+ Ask the operator to confirm or adjust using `ask_user_question`. Do not proceed to RFC creation until the operator explicitly confirms each candidate.
121
+
122
+ ### 6. Delegate to fo-idea-create-rfc
123
+
124
+ For each confirmed DNA candidate, invoke `/fo-idea-create-rfc` **inline** with the following specifics:
125
+
126
+ - **title** — the DNA candidate title (imperative sentence).
127
+ - **kind** — `architecture` (DNA-establishing RFCs are always architecture kind).
128
+ - **scope** — `workspace` (DNA invariants are cross-workspace by definition).
129
+ - **satisfies** — leave empty; this RFC **establishes** a new DNA, it does not satisfy an existing one.
130
+ - **In the RFC body**, ensure the "Architectural fit" section contains the canonical marker:
131
+
132
+ ```
133
+ DNA-<N> established by this RFC.
134
+ ```
135
+
136
+ This marker is what `dna.registry.validate` (DNA-REG-03 rule) scans for. Without it, the registry guard will not flag the missing entry.
137
+
138
+ - **In the "Design" section**, include the proposed DNA registry entry text:
139
+
140
+ ```markdown
141
+ ## DNA-<N> · <Title>
142
+
143
+ <One-paragraph invariant description. Present tense, stating the rule as fact.>
144
+ Enforced by `<command.name>`. Established by RFC-XXXX.
145
+ ```
146
+
147
+ If the invariant is foundational (pre-RFC, already followed but never recorded), use:
148
+
149
+ ```markdown
150
+ Foundational invariant (pre-RFC). Enforced by `<command.name>`.
151
+ ```
152
+
153
+ If no command enforces it yet, the RFC must either:
154
+ - Propose a new command (making this a command-kind RFC in addition to architecture), or
155
+ - Explicitly state that enforcement is documentation-only and explain why that is acceptable for this invariant.
156
+
157
+ Let the creation skill run fully — it will grill, create the file, fill all sections, validate, and report. Do not duplicate its work.
158
+
159
+ ### 7. Report after RFC creation
160
+
161
+ After the RFC is created, present:
162
+
163
+ ```
164
+ ## DNA Extraction Summary
165
+
166
+ ### Candidates discovered: <N>
167
+ ### Candidates confirmed: <M>
168
+ ### RFCs created: <K>
169
+
170
+ | # | DNA ID | Title | RFC | Status |
171
+ | --- | --- | --- | --- | --- |
172
+ | 1 | DNA-<N> | <title> | RFC-XXXX | draft |
173
+
174
+ ### Next steps
175
+ - Human architecture review for each RFC draft (status may not change before acceptance).
176
+ - After acceptance: run /fo-extract-dna --register to append DNA entries to `ref(forge.yaml bindings.paths.invariantsFile)`.
177
+ ```
178
+
179
+ **Do not append to `ref(forge.yaml bindings.paths.invariantsFile)` while the RFC is in `draft` status.** The DNA registry entry is added only after the RFC is accepted.
180
+
181
+ ### 8. Post-acceptance registration (separate invocation)
182
+
183
+ When the operator invokes this skill with `--register` (or says "register DNA", "append DNA", "the RFC was accepted"), perform the registration step:
184
+
185
+ 1. **Verify RFC status** — read the RFC frontmatter. If `status` is not `accepted` or `implemented`, stop with:
186
+
187
+ > "RFC-XXXX is `draft`. DNA entries may only be appended to the registry after the RFC is accepted. Run the skill again after architecture review."
188
+
189
+ 2. **Read the current registry** — parse `ref(forge.yaml bindings.paths.invariantsFile)` to find the max DNA-N number and confirm the new DNA-N is not already present.
190
+
191
+ 3. **Append the entry** — add the `## DNA-<N> · <Title>` block at the **bottom** of `ref(forge.yaml bindings.paths.invariantsFile)`, using the text from the RFC's Design section. The entry must include:
192
+ - The invariant description (present tense, as fact).
193
+ - `Enforced by \`<command>\`.` (if a command exists or is proposed).
194
+ - `Established by RFC-XXXX.` (the accepting RFC id).
195
+
196
+ 4. **Validate** — run:
197
+
198
+ ```sh
199
+ ref(forge.yaml bindings.commands.validateRfc) --dna.registry.validate --json
200
+ ```
201
+
202
+ Fix any violations. Common issues:
203
+ - DNA-REG-01: gap in numbering (entries must be contiguous from 1).
204
+ - DNA-REG-02: citation points to a non-existent RFC.
205
+ - DNA-REG-03: RFC says "DNA-N established by this RFC" but registry has no entry (this should now be resolved).
206
+ - DNA-REG-05: enforcer command is not registered or not pipelined.
207
+
208
+ 5. **Run DNA trace validation** — run:
209
+
210
+ ```sh
211
+ ref(forge.yaml bindings.commands.validateRfc) --dna.trace.validate --json
212
+ ```
213
+
214
+ This verifies the bidirectional trace between the new DNA entry and the RFC's `satisfies` field.
215
+
216
+ 6. **Commit** — stage only `ref(forge.yaml bindings.paths.invariantsFile)` and commit:
217
+
218
+ ```txt
219
+ dna: register DNA-<N> <short title>
220
+
221
+ Append DNA-<N> (<title>) to the canonical registry, established by RFC-XXXX.
222
+ ```
223
+
224
+ Stage only `ref(forge.yaml bindings.paths.invariantsFile)` — do not stage unrelated changes. Another agent may be working in a different session; `git add -A` or `git add .` is forbidden.
225
+
226
+ 7. **Report**:
227
+
228
+ ```
229
+ DNA-<N> registered in `ref(forge.yaml bindings.paths.invariantsFile)`
230
+ Established by: RFC-XXXX
231
+ Enforced by: <command> (or: documentation-only)
232
+ dna.registry.validate: pass
233
+ rfc.dna.trace.validate: pass
234
+ ```
235
+
236
+ ## Constraints
237
+
238
+ - **Document-only. This skill must never modify, create, or delete source code files.** It must not touch files in `apps/`, `packages/`, `services/`, `tools/`, `scripts/`, or any other source directory. The only files this skill may produce or modify are RFC files in `docs/rfcs/` (via the delegated `fo-idea-create-rfc` skill) and `docs/architecture-dna.md` (during the post-acceptance registration step). If you feel the urge to "quickly implement the enforcer command while I'm here" — stop. That is not this skill's job.
239
+ - **No bypass of RFC acceptance.** DNA entries are appended to `ref(forge.yaml bindings.paths.invariantsFile)` only after the establishing RFC is `accepted` or `implemented`. The skill must verify RFC status before appending. Draft RFCs do not register DNA.
240
+ - **Grilling is mandatory for every candidate.** Do not skip step 4 — every DNA candidate must survive grilling before an RFC is created. The operator's verbal agreement is necessary but not sufficient; the grilling may reveal formulation, scope, or enforcement problems that the operator had not considered.
241
+ - **Operator confirmation is mandatory before RFC creation.** Do not create an RFC for a candidate the operator has not explicitly confirmed. Use `ask_user_question` in step 5.
242
+ - **One RFC per DNA candidate.** If multiple candidates are confirmed, each gets its own RFC. Do not bundle multiple DNA invariants into a single RFC — each invariant must be independently reviewable, acceptable, and supersedeable.
243
+ - **Do not append to `ref(forge.yaml bindings.paths.invariantsFile)` directly during RFC creation.** The registration step (step 8) is a separate invocation, performed after the RFC is accepted. This separation preserves the human review gate.
244
+ - **Do not renumber or delete existing DNA entries.** The registry header says "Agents MUST NOT delete or renumber items; add new entries only at the bottom." This is a non-negotiable rule from `ref(forge.yaml bindings.paths.invariantsFile)`.
245
+ - **Do not create invariant entries for features or product decisions.** Invariants are architectural rules. Features are governed by RFCs but recorded as features. If a candidate is a feature, suggest an RFC without an invariant entry.
246
+ - **Do not create DNA entries for local conventions.** If a convention is local to one package or one app, it is an ADR, not DNA. Route to `fo-idea-create-adr` instead.
247
+ - **Commit only your own files.** Stage only the files this skill produces or modifies — RFC files, `ref(forge.yaml bindings.paths.invariantsFile)`, and nothing else. Do not stage unrelated changes. Another agent may be working in a different session; `git add -A` or `git add .` is forbidden.
248
+ - **The canonical marker phrase is load-bearing.** The RFC body must contain exactly `DNA-<N> established by this RFC` (with the correct number) so that `dna.registry.validate` DNA-REG-03 rule can detect it. Do not paraphrase this phrase.
@@ -0,0 +1,152 @@
1
+ ---
2
+ name: fo-fix
3
+ description: Iterative fix workflow for AI-generated work. Calls fo-review if needed, applies findings, runs scoped typecheck, commits, and delegates doc updates to fo-doc-audit.
4
+ invocation: user
5
+ category: fo
6
+ concerns: code-mutation
7
+ dependsOn: ['my-preferences']
8
+ languagePolicy: ref(PREFERENCES.md)
9
+ bindings:
10
+ requires: [commands.typecheck]
11
+ optional: [commands.test, paths.invariantsFile]
12
+ triggers: ["fix issues from review", "apply review findings and fix", "iterative fix workflow for code"]
13
+ ---
14
+
15
+ # fo-fix
16
+
17
+ Before starting, read `PREFERENCES.md` at the repository root. If the file is missing or `aiLanguage` is unset, ask the operator once and create the file using the `my-preferences` skill semantics.
18
+
19
+ Turn a review into corrected code and a green build, then commit. Run in the session where the AI-generated work already lives.
20
+
21
+ This skill also handles two related fix scenarios:
22
+
23
+ - **Bug diagnosis** — when the operator reports a bug, regression, or performance issue that requires systematic diagnosis before fixing. See `bug-diagnosis.md` for the 6-phase diagnosis loop (build feedback loop → reproduce → hypothesise → instrument → fix + regression test → cleanup + post-mortem).
24
+ - **Merge conflict resolution** — when an in-progress git merge or rebase has conflicts. See "Merge conflict resolution" below.
25
+
26
+ ## Preconditions
27
+
28
+ - The artifact (code, docs, etc.) must be present in the current session or workspace.
29
+ - There must be enough context to apply fixes without guessing.
30
+ - For bug diagnosis: the operator has reported a specific symptom (broken, throwing, failing, slow).
31
+
32
+ ## Process
33
+
34
+ ### 1. Check for an existing review
35
+
36
+ Scan the current session for evidence of a review:
37
+
38
+ - A persisted review report in `docs/reviews/code/**/*.md` (written by `/fo-review`).
39
+ - A previous `/fo-review` invocation or its output in the current session — look for axis sections like `### Axis A — Structural correctness`, `### Axis B — DNA alignment`, etc.
40
+ - Markdown sections like `[Critical errors]`, `[Warnings / architectural notes]`, or `[Concrete refactor]` (legacy format, still supported).
41
+ - A user statement such as "fix the issues from the review".
42
+
43
+ If no review is found, run `/fo-review` (or execute its process inline) on the artifact, wait for the review output, and use that as the fix list.
44
+
45
+ ### 2. Apply fixes
46
+
47
+ Use the review findings as the fix list. The verdict is **not** a stop signal — even an `Approved` review (legacy or lax criteria) may contain findings that must be fixed. Read every axis section and process every finding, regardless of what the verdict line says.
48
+
49
+ Process findings by axis severity:
50
+
51
+ 1. **Verdict Rejected** — the change has a fundamental flaw (DNA violation, backward compatibility layer, storage policy bypass). Fix all failures before anything else.
52
+ 2. **Axis B / D / E failures** — DNA alignment, forward-only compliance, and agent-facing clarity are hard failures. Fix these next. Do not skip without explicit user approval.
53
+ 3. **Axis A / C / F / G findings** — structural correctness, ecosystem fit, pragmatism, and blind spots. Fix **all** findings, including cosmetic ones. Do not skip or downgrade a finding because it is "minor" or "cosmetic" — if the reviewer flagged it, it gets fixed.
54
+ 4. **Spec compliance gaps** — missing or partial requirements from the original spec. Fix in order of importance.
55
+
56
+ **No discretionary skipping.** Every finding in the review report must be addressed with a code change. If a finding is truly a false positive, the agent MUST explain why in the session output and get explicit user approval before skipping — but the default is to fix, not to skip.
57
+
58
+ If the review used the legacy format (`[Critical errors]`, `[Warnings]`, `[Concrete refactor]`), map: Critical → priority 1, Warnings → priority 2, Refactor → priority 3.
59
+
60
+ For each finding:
61
+
62
+ - If it includes a concrete line range or code snippet, apply the change directly.
63
+ - If it is ambiguous, ask the user before changing.
64
+ - Do not delete or weaken existing tests without explicit direction.
65
+ - Prefer minimal upstream fixes over downstream workarounds.
66
+
67
+ After applying fixes, update any tests that should cover the change, then run the relevant package tests before the full build when that saves time.
68
+
69
+ ### 3. Run scoped typecheck verification
70
+
71
+ **MUST NOT run root `root build` or `turbo run build`.** These commands build every workspace in the monorepo and are prohibitively expensive for iterative fix workflows. See root AGENTS.md §Build verification discipline.
72
+
73
+ Before running verification, classify the changes made in step 2:
74
+
75
+ - **Code changes** — any modification to executable source: `.ts`, `.tsx`, `.js`, `.mjs`, `.cjs`, `.astro`, `.json`, `.jsonc`, `.yaml`, `.yml`, `.css`, `.scss`, `.html`, `.vue`, `.svelte`, `.py`, `.go`, `.rs`, or any file that is imported/resolved at build time.
76
+ - **Comment-only changes** — changes inside `// ...`, `/* ... */`, `<!-- ... -->`, or `# ...` without any change to the surrounding executable code.
77
+ - **Documentation-only changes** — changes confined to `.md` files (including `AGENTS.md`, `README.md`, RFC files, ADR files, `docs/**`) that are not imported as code or rendered by the build.
78
+
79
+ If **all** changes are comment-only or documentation-only (no code changes whatsoever), **skip verification** and note in the session output:
80
+
81
+ > "Сборка пропущена: изменения затрагивают только комментарии или документацию, исполняемый код не изменён."
82
+
83
+ Otherwise, determine which workspaces were touched by the fixes in step 2 and run scoped typecheck verification for each:
84
+
85
+ - **For each touched `apps/*` workspace:**
86
+
87
+ ```sh
88
+ pnpm --filter <app-name> exec astro check
89
+ ```
90
+
91
+ - **For each touched `packages/*` workspace:**
92
+
93
+ ```sh
94
+ pnpm --filter <package-name> run build:check
95
+ ```
96
+
97
+ (For packages, `build:check` is `tsc --noEmit` — a lightweight typecheck, not a full build.)
98
+
99
+ If a workspace cannot be determined from the diff, ask the operator which workspace to verify.
100
+
101
+ All scoped checks must pass. If any fails:
102
+
103
+ - Read the error output and identify the root cause.
104
+ - Fix the cause, not the symptom.
105
+ - Re-run the failing check.
106
+ - Repeat until all scoped checks pass.
107
+
108
+ ### 4. Commit the fixes
109
+
110
+ Stage and commit the changes with a descriptive message.
111
+
112
+ ```text
113
+ git add ...
114
+ git commit -m "fix(scope): ..."
115
+ ```
116
+
117
+ Do not commit secrets, API keys, or unrelated changes.
118
+
119
+ ### 5. Compass header update (fo-compass-annotate)
120
+
121
+ If the fix touched any source files (`.ts`, `.astro`, `.js`, `.mjs`, `.css`), invoke the `fo-compass-annotate` skill via the `skill` tool with `--changed` flag to update Compass headers (MODULE_CONTRACT, CHANGE_SUMMARY) on changed files. Wait for it to complete.
122
+
123
+ If no source files were touched, skip this step.
124
+
125
+ ### 6. Documentation audit (fo-doc-audit)
126
+
127
+ This step is **always** performed — it is not optional and must not be skipped.
128
+
129
+ Invoke `fo-doc-audit` via the `skill` tool. It analyzes the session's changes, checks all documentation surfaces (AGENTS.md, README, Compass XML, `ref(forge.yaml bindings.paths.invariantsFile)`, templates, generated artifacts, COMMANDS.md/PACKAGE_GRAPH.md), applies needed updates, and commits them separately. Wait for it to complete.
130
+
131
+ If `fo-doc-audit` reports that no updates are needed, state this explicitly and move on — the check itself is the mandatory part, not the outcome.
132
+
133
+ ## Merge conflict resolution
134
+
135
+ When invoked to resolve an in-progress git merge or rebase conflict:
136
+
137
+ 1. **See the current state** of the merge/rebase. Check git history and the conflicting files.
138
+ 2. **Find the primary sources** for each conflict. Understand why each change was made and what the original intent was. Read commit messages, check PRs, check original issues/tickets.
139
+ 3. **Resolve each hunk.** Preserve both intents where possible. Where incompatible, pick the one matching the merge's stated goal and note the trade-off. Do **not** invent new behaviour. Always resolve; never `--abort`.
140
+ 4. **Documentation audit.** Invoke `fo-doc-audit` via the `skill` tool. It analyzes the merge changes, checks all documentation surfaces, applies needed updates, and commits them. If no updates are needed, it states this explicitly.
141
+ 5. **Run automated checks.** Discover the project's automated checks and run them — typically typecheck, then tests, then format. Fix anything the merge broke. Follow the scoped verification rules in step 3 above.
142
+ 6. **Finish the merge/rebase.** Stage everything and commit. If rebasing, continue the rebase process until all commits are rebased.
143
+
144
+ ## Completion criteria
145
+
146
+ - The review findings were all addressed with code changes. No finding was skipped without explicit user approval for each individual skip.
147
+ - Root `root build` / `turbo run build` was **not** run.
148
+ - Scoped typecheck verification (`astro check` for touched apps, `tsc --noEmit` for touched packages) passes for every touched workspace, **or** verification was skipped because all changes were comment-only or documentation-only.
149
+ - At least one fix commit exists on the branch.
150
+ - `fo-doc-audit` was invoked and documentation surfaces were checked; any doc changes are committed separately.
151
+ - For bug diagnosis: the 6-phase loop in `bug-diagnosis.md` was followed, or phases skipped were explicitly justified.
152
+ - For merge conflicts: all hunks resolved, automated checks pass, merge/rebase completed.
@@ -0,0 +1,128 @@
1
+ # Bug Diagnosis Loop
2
+
3
+ A discipline for hard bugs and performance regressions. Use when fixing a bug that requires systematic diagnosis — not for straightforward review findings that point directly at the fix.
4
+
5
+ Skip phases only when explicitly justified.
6
+
7
+ ## Phase 1 — Build a feedback loop
8
+
9
+ **This is the skill.** Everything else is mechanical. If you have a **tight** pass/fail signal for the bug — one that goes red on _this_ bug — you will find the cause. If you don't have one, no amount of staring at code will save you.
10
+
11
+ Spend disproportionate effort here. **Be aggressive. Be creative. Refuse to give up.**
12
+
13
+ ### Ways to construct one — try them in roughly this order
14
+
15
+ 1. **Failing test** at whatever seam reaches the bug — unit, integration, e2e.
16
+ 2. **Curl / HTTP script** against a running dev server.
17
+ 3. **CLI invocation** with a fixture input, diffing stdout against a known-good snapshot.
18
+ 4. **Headless browser script** (Playwright / Puppeteer) — drives the UI, asserts on DOM/console/network.
19
+ 5. **Replay a captured trace.** Save a real network request / payload / event log to disk; replay it through the code path in isolation.
20
+ 6. **Throwaway harness.** Spin up a minimal subset of the system (one service, mocked deps) that exercises the bug code path with a single function call.
21
+ 7. **Property / fuzz loop.** If the bug is "sometimes wrong output", run 1000 random inputs and look for the failure mode.
22
+ 8. **Bisection harness.** If the bug appeared between two known states (commit, dataset, version), automate "boot at state X, check, repeat" so you can `git bisect run` it.
23
+ 9. **Differential loop.** Run the same input through old-version vs new-version (or two configs) and diff outputs.
24
+ 10. **HITL bash script.** Last resort. If a human must click, drive _them_ with a structured script so the loop is still structured. Captured output feeds back to you.
25
+
26
+ Build the right feedback loop, and the bug is 90% fixed.
27
+
28
+ ### Tighten the loop
29
+
30
+ Treat the loop as a product. Once you have _a_ loop, **tighten** it:
31
+
32
+ - Can I make it faster? (Cache setup, skip unrelated init, narrow the test scope.)
33
+ - Can I make the signal sharper? (Assert on the specific symptom, not "didn't crash".)
34
+ - Can I make it more deterministic? (Pin time, seed RNG, isolate filesystem, freeze network.)
35
+
36
+ A 30-second flaky loop is barely better than no loop; a 2-second deterministic one is tight — a debugging superpower.
37
+
38
+ ### Non-deterministic bugs
39
+
40
+ The goal is not a clean repro but a **higher reproduction rate**. Loop the trigger 100x, parallelise, add stress, narrow timing windows, inject sleeps. A 50%-flake bug is debuggable; 1% is not — keep raising the rate until it's debuggable.
41
+
42
+ ### When you genuinely cannot build a loop
43
+
44
+ Stop and say so explicitly. List what you tried. Ask the operator for: (a) access to whatever environment reproduces it, (b) a captured artifact (HAR file, log dump, core dump, screen recording with timestamps), or (c) permission to add temporary production instrumentation. Do **not** proceed to hypothesise without a loop.
45
+
46
+ ### Completion criterion — a tight loop that goes red
47
+
48
+ Phase 1 is done when the loop is **tight** and **red-capable**: you can name **one command** that you have **already run at least once**, and that is:
49
+
50
+ - **Red-capable** — it drives the actual bug code path and asserts the **user's exact symptom**, so it can go red on this bug and green once fixed.
51
+ - **Deterministic** — same verdict every run (flaky bugs: a pinned, high reproduction rate).
52
+ - **Fast** — seconds, not minutes.
53
+ - **Agent-runnable** — you can run it unattended.
54
+
55
+ If you catch yourself reading code to build a theory before this command exists, **stop — jumping straight to a hypothesis is the exact failure this skill prevents.** No red-capable command, no Phase 2.
56
+
57
+ ## Phase 2 — Reproduce + minimise
58
+
59
+ Run the loop. Watch it go red — the bug appears.
60
+
61
+ Confirm:
62
+
63
+ - The loop produces the failure mode the **user** described — not a different failure that happens to be nearby. Wrong bug = wrong fix.
64
+ - The failure is reproducible across multiple runs (or, for non-deterministic bugs, reproducible at a high enough rate to debug against).
65
+ - You have captured the exact symptom (error message, wrong output, slow timing) so later phases can verify the fix actually addresses it.
66
+
67
+ ### Minimise
68
+
69
+ Once it's red, shrink the repro to the **smallest scenario that still goes red**. Cut inputs, callers, config, data, and steps **one at a time**, re-running the loop after each cut — keep only what's load-bearing for the failure.
70
+
71
+ A minimal repro shrinks the hypothesis space in Phase 3 and becomes the clean regression test in Phase 5.
72
+
73
+ Done when **every remaining element is load-bearing** — removing any one of them makes the loop go green.
74
+
75
+ ## Phase 3 — Hypothesise
76
+
77
+ Generate **3-5 ranked hypotheses** before testing any of them. Single-hypothesis generation anchors on the first plausible idea.
78
+
79
+ Each hypothesis must be **falsifiable**: state the prediction it makes.
80
+
81
+ > Format: "If <X> is the cause, then <changing Y> will make the bug disappear / <changing Z> will make it worse."
82
+
83
+ If you cannot state the prediction, the hypothesis is a vibe — discard or sharpen it.
84
+
85
+ **Show the ranked list to the operator before testing.** They often have domain knowledge that re-ranks instantly. Don't block on it — proceed with your ranking if the operator is AFK.
86
+
87
+ ## Phase 4 — Instrument
88
+
89
+ Each probe must map to a specific prediction from Phase 3. **Change one variable at a time.**
90
+
91
+ Tool preference:
92
+
93
+ 1. **Debugger / REPL inspection** if the env supports it. One breakpoint beats ten logs.
94
+ 2. **Targeted logs** at the boundaries that distinguish hypotheses.
95
+ 3. Never "log everything and grep".
96
+
97
+ **Tag every debug log** with a unique prefix, e.g. `[DEBUG-a4f2]`. Cleanup at the end becomes a single grep. Untagged logs survive; tagged logs die.
98
+
99
+ **Perf branch.** For performance regressions, logs are usually wrong. Instead: establish a baseline measurement (timing harness, `performance.now()`, profiler, query plan), then bisect. Measure first, fix second.
100
+
101
+ ## Phase 5 — Fix + regression test
102
+
103
+ Write the regression test **before the fix** — but only if there is a **correct seam** for it.
104
+
105
+ A correct seam is one where the test exercises the **real bug pattern** as it occurs at the call site. If the only available seam is too shallow, a regression test there gives false confidence.
106
+
107
+ **If no correct seam exists, that itself is the finding.** Note it. The codebase architecture is preventing the bug from being locked down. Flag this for a potential `fo-architecture` investigation.
108
+
109
+ If a correct seam exists:
110
+
111
+ 1. Turn the minimised repro into a failing test at that seam.
112
+ 2. Watch it fail.
113
+ 3. Apply the fix.
114
+ 4. Watch it pass.
115
+ 5. Re-run the Phase 1 feedback loop against the original (un-minimised) scenario.
116
+
117
+ ## Phase 6 — Cleanup + post-mortem
118
+
119
+ Required before declaring done:
120
+
121
+ - Original repro no longer reproduces (re-run the Phase 1 loop)
122
+ - Regression test passes (or absence of seam is documented)
123
+ - All `[DEBUG-...]` instrumentation removed (`grep` the prefix)
124
+ - Throwaway prototypes deleted (or moved to a clearly-marked debug location)
125
+ - The hypothesis that turned out correct is stated in the commit / PR message — so the next debugger learns
126
+ - **AI and human documentation updated** — analyze whether the bug fix altered a contract, convention, workflow, or pattern that ecosystem developers should know about. If so, update the relevant `AGENTS.md` or `README` files before committing. If no updates are needed, state this explicitly.
127
+
128
+ **Then ask: what would have prevented this bug?** If the answer involves architectural change (no good test seam, tangled callers, hidden coupling) hand off to `fo-architecture` with the specifics. Make the recommendation **after** the fix is in, not before.
@@ -0,0 +1,58 @@
1
+ ---
2
+ name: fo-handoff
3
+ description: Compact the current conversation into a handoff document for another agent to pick up. Saves to OS temp directory, not the workspace.
4
+ invocation: user
5
+ category: fo
6
+ concerns: document-only
7
+ dependsOn: ['my-preferences']
8
+ languagePolicy: ref(PREFERENCES.md)
9
+ triggers: ["create a handoff document", "compact conversation for next agent", "prepare handoff for another agent"]
10
+ ---
11
+
12
+ # fo-handoff
13
+
14
+ Before starting, read `PREFERENCES.md` at the repository root. If the file is missing or `aiLanguage` is unset, ask the operator once and create the file using the `my-preferences` skill semantics.
15
+
16
+ Write a handoff document summarising the current conversation so a fresh agent can continue the work. Save to the temporary directory of the user's OS — not the current workspace.
17
+
18
+ ## Process
19
+
20
+ ### 1. Gather context
21
+
22
+ Review the current conversation to identify:
23
+
24
+ - What was being worked on
25
+ - What was completed
26
+ - What remains to be done
27
+ - Any blockers, open questions, or decisions pending
28
+
29
+ ### 2. Write the handoff document
30
+
31
+ Include:
32
+
33
+ - **Suggested skills** — which skills the next agent should invoke and why.
34
+ - **References to existing artifacts** — specs, plans, ADRs, issues, commits, diffs. Reference them by path or URL instead of duplicating content.
35
+ - **Current state** — what the codebase looks like now, what's uncommitted, what's in progress.
36
+ - **Next steps** — concrete, actionable items the next agent should pick up.
37
+
38
+ Do not duplicate content already captured in other artifacts (specs, plans, ADRs, issues, commits, diffs). Reference them by path or URL instead.
39
+
40
+ Redact any sensitive information, such as API keys, passwords, or personally identifiable information.
41
+
42
+ ### 3. Save
43
+
44
+ Save to the OS temporary directory — not the current workspace. On Windows, use `$env:TEMP`. On macOS/Linux, use `/tmp`.
45
+
46
+ If the operator passed arguments, treat them as a description of what the next session will focus on and tailor the doc accordingly.
47
+
48
+ ### 4. Report
49
+
50
+ Tell the operator the absolute path of the handoff document and suggest opening a fresh session that references it. Report in `aiLanguage`.
51
+
52
+ ## Constraints
53
+
54
+ - **Do not save to the workspace.** The handoff document goes to the OS temp directory.
55
+ - **Do not duplicate existing artifacts.** Reference them by path or URL.
56
+ - **Redact sensitive information.** API keys, passwords, PII.
57
+ - **Commit only your own files.** This skill does not commit anything — the handoff doc is in the temp directory. See `_shared/fo-pipeline-conventions.md` §Commit discipline.
58
+ - **Session summary.** End every session with the closing block defined in `_shared/fo-session-summary.md`.