ridgeline 0.4.4 → 0.5.7

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 (323) hide show
  1. package/README.md +1 -14
  2. package/dist/agents/core/builder.md +15 -15
  3. package/dist/agents/core/planner.md +12 -12
  4. package/dist/agents/core/reviewer.md +19 -19
  5. package/dist/agents/core/shaper.md +44 -45
  6. package/dist/agents/core/specifier.md +20 -23
  7. package/dist/agents/planners/context.md +10 -10
  8. package/dist/agents/planners/simplicity.md +1 -1
  9. package/dist/agents/planners/thoroughness.md +2 -2
  10. package/dist/agents/planners/velocity.md +2 -2
  11. package/dist/agents/specialists/auditor.md +34 -33
  12. package/dist/agents/specialists/explorer.md +74 -0
  13. package/dist/agents/specialists/tester.md +24 -24
  14. package/dist/agents/specialists/verifier.md +17 -20
  15. package/dist/agents/specifiers/clarity.md +1 -1
  16. package/dist/agents/specifiers/completeness.md +2 -2
  17. package/dist/agents/specifiers/pragmatism.md +2 -2
  18. package/dist/cli.js +15 -10
  19. package/dist/cli.js.map +1 -1
  20. package/dist/commands/build.js +42 -75
  21. package/dist/commands/build.js.map +1 -1
  22. package/dist/commands/clean.d.ts +1 -1
  23. package/dist/commands/clean.js +2 -5
  24. package/dist/commands/clean.js.map +1 -1
  25. package/dist/commands/create.d.ts +1 -0
  26. package/dist/commands/create.js +5 -1
  27. package/dist/commands/create.js.map +1 -1
  28. package/dist/commands/dry-run.js +1 -1
  29. package/dist/commands/dry-run.js.map +1 -1
  30. package/dist/commands/plan.js +3 -3
  31. package/dist/commands/plan.js.map +1 -1
  32. package/dist/commands/rewind.js +1 -6
  33. package/dist/commands/rewind.js.map +1 -1
  34. package/dist/commands/shape.d.ts +1 -0
  35. package/dist/commands/shape.js +9 -7
  36. package/dist/commands/shape.js.map +1 -1
  37. package/dist/commands/spec.d.ts +1 -0
  38. package/dist/commands/spec.js +2 -1
  39. package/dist/commands/spec.js.map +1 -1
  40. package/dist/config.js +3 -3
  41. package/dist/config.js.map +1 -1
  42. package/dist/engine/claude/claude.exec.js +2 -2
  43. package/dist/engine/claude/stream.display.d.ts +17 -0
  44. package/dist/engine/claude/stream.display.js +101 -0
  45. package/dist/engine/claude/stream.display.js.map +1 -0
  46. package/dist/engine/claude/stream.parse.d.ts +21 -0
  47. package/dist/engine/claude/stream.parse.js +119 -0
  48. package/dist/engine/claude/stream.parse.js.map +1 -0
  49. package/dist/engine/claude/stream.result.d.ts +6 -0
  50. package/dist/engine/claude/stream.result.js +61 -0
  51. package/dist/engine/claude/stream.result.js.map +1 -0
  52. package/dist/engine/discovery/agent.registry.d.ts +27 -0
  53. package/dist/engine/discovery/agent.registry.js +152 -0
  54. package/dist/engine/discovery/agent.registry.js.map +1 -0
  55. package/dist/engine/discovery/agent.scan.d.ts +0 -1
  56. package/dist/engine/discovery/agent.scan.js +1 -20
  57. package/dist/engine/discovery/agent.scan.js.map +1 -1
  58. package/dist/engine/discovery/flavour.resolve.d.ts +11 -0
  59. package/dist/engine/discovery/flavour.resolve.js +98 -0
  60. package/dist/engine/discovery/flavour.resolve.js.map +1 -0
  61. package/dist/engine/index.d.ts +6 -3
  62. package/dist/engine/index.js +12 -9
  63. package/dist/engine/index.js.map +1 -1
  64. package/dist/engine/pipeline/build.exec.js +7 -5
  65. package/dist/engine/pipeline/build.exec.js.map +1 -1
  66. package/dist/engine/pipeline/ensemble.exec.d.ts +3 -4
  67. package/dist/engine/pipeline/ensemble.exec.js +12 -104
  68. package/dist/engine/pipeline/ensemble.exec.js.map +1 -1
  69. package/dist/engine/pipeline/phase.sequence.js +69 -67
  70. package/dist/engine/pipeline/phase.sequence.js.map +1 -1
  71. package/dist/engine/pipeline/pipeline.shared.js +5 -4
  72. package/dist/engine/pipeline/pipeline.shared.js.map +1 -1
  73. package/dist/engine/pipeline/review.exec.js +9 -7
  74. package/dist/engine/pipeline/review.exec.js.map +1 -1
  75. package/dist/engine/pipeline/specify.exec.d.ts +1 -0
  76. package/dist/engine/pipeline/specify.exec.js +5 -3
  77. package/dist/engine/pipeline/specify.exec.js.map +1 -1
  78. package/dist/engine/worktree.d.ts +0 -8
  79. package/dist/engine/worktree.js +2 -163
  80. package/dist/engine/worktree.js.map +1 -1
  81. package/dist/flavours/data-analysis/core/builder.md +119 -0
  82. package/dist/flavours/data-analysis/core/planner.md +102 -0
  83. package/dist/flavours/data-analysis/core/reviewer.md +148 -0
  84. package/dist/flavours/data-analysis/core/shaper.md +139 -0
  85. package/dist/flavours/data-analysis/core/specifier.md +74 -0
  86. package/dist/flavours/data-analysis/planners/context.md +50 -0
  87. package/dist/flavours/data-analysis/planners/simplicity.md +7 -0
  88. package/dist/flavours/data-analysis/planners/thoroughness.md +7 -0
  89. package/dist/flavours/data-analysis/planners/velocity.md +7 -0
  90. package/dist/flavours/data-analysis/specialists/auditor.md +94 -0
  91. package/dist/flavours/data-analysis/specialists/explorer.md +93 -0
  92. package/dist/flavours/data-analysis/specialists/tester.md +107 -0
  93. package/dist/flavours/data-analysis/specialists/verifier.md +103 -0
  94. package/dist/flavours/data-analysis/specifiers/clarity.md +7 -0
  95. package/dist/flavours/data-analysis/specifiers/completeness.md +15 -0
  96. package/dist/flavours/data-analysis/specifiers/pragmatism.md +7 -0
  97. package/dist/flavours/game-dev/core/builder.md +104 -0
  98. package/dist/flavours/game-dev/core/planner.md +90 -0
  99. package/dist/flavours/game-dev/core/reviewer.md +151 -0
  100. package/dist/flavours/game-dev/core/shaper.md +139 -0
  101. package/dist/flavours/game-dev/core/specifier.md +73 -0
  102. package/dist/flavours/game-dev/planners/context.md +50 -0
  103. package/dist/flavours/game-dev/planners/simplicity.md +7 -0
  104. package/dist/flavours/game-dev/planners/thoroughness.md +7 -0
  105. package/dist/flavours/game-dev/planners/velocity.md +7 -0
  106. package/dist/flavours/game-dev/specialists/auditor.md +91 -0
  107. package/dist/flavours/game-dev/specialists/explorer.md +78 -0
  108. package/dist/flavours/game-dev/specialists/tester.md +73 -0
  109. package/dist/flavours/game-dev/specialists/verifier.md +104 -0
  110. package/dist/flavours/game-dev/specifiers/clarity.md +7 -0
  111. package/dist/flavours/game-dev/specifiers/completeness.md +7 -0
  112. package/dist/flavours/game-dev/specifiers/pragmatism.md +7 -0
  113. package/dist/flavours/legal-drafting/core/builder.md +118 -0
  114. package/dist/flavours/legal-drafting/core/planner.md +92 -0
  115. package/dist/flavours/legal-drafting/core/reviewer.md +150 -0
  116. package/dist/flavours/legal-drafting/core/shaper.md +137 -0
  117. package/dist/flavours/legal-drafting/core/specifier.md +68 -0
  118. package/dist/flavours/legal-drafting/planners/context.md +48 -0
  119. package/dist/flavours/legal-drafting/planners/simplicity.md +7 -0
  120. package/dist/flavours/legal-drafting/planners/thoroughness.md +7 -0
  121. package/dist/flavours/legal-drafting/planners/velocity.md +7 -0
  122. package/dist/flavours/legal-drafting/specialists/auditor.md +92 -0
  123. package/dist/flavours/legal-drafting/specialists/explorer.md +78 -0
  124. package/dist/flavours/legal-drafting/specialists/tester.md +76 -0
  125. package/dist/flavours/legal-drafting/specialists/verifier.md +111 -0
  126. package/dist/flavours/legal-drafting/specifiers/clarity.md +7 -0
  127. package/dist/flavours/legal-drafting/specifiers/completeness.md +7 -0
  128. package/dist/flavours/legal-drafting/specifiers/pragmatism.md +7 -0
  129. package/dist/flavours/machine-learning/core/builder.md +127 -0
  130. package/dist/flavours/machine-learning/core/planner.md +90 -0
  131. package/dist/flavours/machine-learning/core/reviewer.md +152 -0
  132. package/dist/flavours/machine-learning/core/shaper.md +141 -0
  133. package/dist/flavours/machine-learning/core/specifier.md +71 -0
  134. package/dist/flavours/machine-learning/planners/context.md +49 -0
  135. package/dist/flavours/machine-learning/planners/simplicity.md +7 -0
  136. package/dist/flavours/machine-learning/planners/thoroughness.md +7 -0
  137. package/dist/flavours/machine-learning/planners/velocity.md +7 -0
  138. package/dist/flavours/machine-learning/specialists/auditor.md +96 -0
  139. package/dist/flavours/machine-learning/specialists/explorer.md +81 -0
  140. package/dist/flavours/machine-learning/specialists/tester.md +82 -0
  141. package/dist/flavours/machine-learning/specialists/verifier.md +100 -0
  142. package/dist/flavours/machine-learning/specifiers/clarity.md +7 -0
  143. package/dist/flavours/machine-learning/specifiers/completeness.md +7 -0
  144. package/dist/flavours/machine-learning/specifiers/pragmatism.md +7 -0
  145. package/dist/flavours/mobile-app/core/builder.md +108 -0
  146. package/dist/flavours/mobile-app/core/planner.md +90 -0
  147. package/dist/flavours/mobile-app/core/reviewer.md +144 -0
  148. package/dist/flavours/mobile-app/core/shaper.md +146 -0
  149. package/dist/flavours/mobile-app/core/specifier.md +73 -0
  150. package/dist/flavours/mobile-app/planners/context.md +41 -0
  151. package/dist/flavours/mobile-app/planners/simplicity.md +7 -0
  152. package/dist/flavours/mobile-app/planners/thoroughness.md +7 -0
  153. package/dist/flavours/mobile-app/planners/velocity.md +7 -0
  154. package/dist/flavours/mobile-app/specialists/auditor.md +92 -0
  155. package/dist/flavours/mobile-app/specialists/explorer.md +84 -0
  156. package/dist/flavours/mobile-app/specialists/tester.md +75 -0
  157. package/dist/flavours/mobile-app/specialists/verifier.md +114 -0
  158. package/dist/flavours/mobile-app/specifiers/clarity.md +7 -0
  159. package/dist/flavours/mobile-app/specifiers/completeness.md +7 -0
  160. package/dist/flavours/mobile-app/specifiers/pragmatism.md +7 -0
  161. package/dist/flavours/music-composition/core/builder.md +112 -0
  162. package/dist/flavours/music-composition/core/planner.md +102 -0
  163. package/dist/flavours/music-composition/core/reviewer.md +139 -0
  164. package/dist/flavours/music-composition/core/shaper.md +139 -0
  165. package/dist/flavours/music-composition/core/specifier.md +72 -0
  166. package/dist/flavours/music-composition/planners/context.md +39 -0
  167. package/dist/flavours/music-composition/planners/simplicity.md +7 -0
  168. package/dist/flavours/music-composition/planners/thoroughness.md +7 -0
  169. package/dist/flavours/music-composition/planners/velocity.md +7 -0
  170. package/dist/flavours/music-composition/specialists/auditor.md +90 -0
  171. package/dist/flavours/music-composition/specialists/explorer.md +87 -0
  172. package/dist/flavours/music-composition/specialists/tester.md +74 -0
  173. package/dist/flavours/music-composition/specialists/verifier.md +89 -0
  174. package/dist/flavours/music-composition/specifiers/clarity.md +7 -0
  175. package/dist/flavours/music-composition/specifiers/completeness.md +7 -0
  176. package/dist/flavours/music-composition/specifiers/pragmatism.md +7 -0
  177. package/dist/flavours/novel-writing/core/builder.md +116 -0
  178. package/dist/flavours/novel-writing/core/planner.md +92 -0
  179. package/dist/flavours/novel-writing/core/reviewer.md +152 -0
  180. package/dist/flavours/novel-writing/core/shaper.md +143 -0
  181. package/dist/flavours/novel-writing/core/specifier.md +76 -0
  182. package/dist/flavours/novel-writing/planners/context.md +39 -0
  183. package/dist/flavours/novel-writing/planners/simplicity.md +7 -0
  184. package/dist/flavours/novel-writing/planners/thoroughness.md +7 -0
  185. package/dist/flavours/novel-writing/planners/velocity.md +7 -0
  186. package/dist/flavours/novel-writing/specialists/auditor.md +87 -0
  187. package/dist/flavours/novel-writing/specialists/explorer.md +83 -0
  188. package/dist/flavours/novel-writing/specialists/tester.md +89 -0
  189. package/dist/flavours/novel-writing/specialists/verifier.md +122 -0
  190. package/dist/flavours/novel-writing/specifiers/clarity.md +7 -0
  191. package/dist/flavours/novel-writing/specifiers/completeness.md +7 -0
  192. package/dist/flavours/novel-writing/specifiers/pragmatism.md +7 -0
  193. package/dist/flavours/screenwriting/core/builder.md +115 -0
  194. package/dist/flavours/screenwriting/core/planner.md +92 -0
  195. package/dist/flavours/screenwriting/core/reviewer.md +151 -0
  196. package/dist/flavours/screenwriting/core/shaper.md +143 -0
  197. package/dist/flavours/screenwriting/core/specifier.md +78 -0
  198. package/dist/flavours/screenwriting/planners/context.md +52 -0
  199. package/dist/flavours/screenwriting/planners/simplicity.md +7 -0
  200. package/dist/flavours/screenwriting/planners/thoroughness.md +7 -0
  201. package/dist/flavours/screenwriting/planners/velocity.md +7 -0
  202. package/dist/flavours/screenwriting/specialists/auditor.md +98 -0
  203. package/dist/flavours/screenwriting/specialists/explorer.md +87 -0
  204. package/dist/flavours/screenwriting/specialists/tester.md +90 -0
  205. package/dist/flavours/screenwriting/specialists/verifier.md +129 -0
  206. package/dist/flavours/screenwriting/specifiers/clarity.md +7 -0
  207. package/dist/flavours/screenwriting/specifiers/completeness.md +7 -0
  208. package/dist/flavours/screenwriting/specifiers/pragmatism.md +7 -0
  209. package/dist/flavours/security-audit/core/builder.md +123 -0
  210. package/dist/flavours/security-audit/core/planner.md +92 -0
  211. package/dist/flavours/security-audit/core/reviewer.md +150 -0
  212. package/dist/flavours/security-audit/core/shaper.md +145 -0
  213. package/dist/flavours/security-audit/core/specifier.md +69 -0
  214. package/dist/flavours/security-audit/planners/context.md +51 -0
  215. package/dist/flavours/security-audit/planners/simplicity.md +7 -0
  216. package/dist/flavours/security-audit/planners/thoroughness.md +7 -0
  217. package/dist/flavours/security-audit/planners/velocity.md +7 -0
  218. package/dist/flavours/security-audit/specialists/auditor.md +100 -0
  219. package/dist/flavours/security-audit/specialists/explorer.md +84 -0
  220. package/dist/flavours/security-audit/specialists/tester.md +80 -0
  221. package/dist/flavours/security-audit/specialists/verifier.md +101 -0
  222. package/dist/flavours/security-audit/specifiers/clarity.md +7 -0
  223. package/dist/flavours/security-audit/specifiers/completeness.md +7 -0
  224. package/dist/flavours/security-audit/specifiers/pragmatism.md +7 -0
  225. package/dist/flavours/software-engineering/core/builder.md +100 -0
  226. package/dist/flavours/software-engineering/core/planner.md +90 -0
  227. package/dist/flavours/software-engineering/core/reviewer.md +137 -0
  228. package/dist/flavours/software-engineering/core/shaper.md +137 -0
  229. package/dist/flavours/software-engineering/core/specifier.md +69 -0
  230. package/dist/flavours/software-engineering/planners/context.md +37 -0
  231. package/dist/flavours/software-engineering/planners/simplicity.md +7 -0
  232. package/dist/flavours/software-engineering/planners/thoroughness.md +7 -0
  233. package/dist/flavours/software-engineering/planners/velocity.md +7 -0
  234. package/dist/flavours/software-engineering/specialists/auditor.md +88 -0
  235. package/dist/{agents/specialists/scout.md → flavours/software-engineering/specialists/explorer.md} +2 -2
  236. package/dist/flavours/software-engineering/specialists/tester.md +72 -0
  237. package/dist/flavours/software-engineering/specialists/verifier.md +89 -0
  238. package/dist/flavours/software-engineering/specifiers/clarity.md +7 -0
  239. package/dist/flavours/software-engineering/specifiers/completeness.md +7 -0
  240. package/dist/flavours/software-engineering/specifiers/pragmatism.md +7 -0
  241. package/dist/flavours/technical-writing/core/builder.md +119 -0
  242. package/dist/flavours/technical-writing/core/planner.md +102 -0
  243. package/dist/flavours/technical-writing/core/reviewer.md +138 -0
  244. package/dist/flavours/technical-writing/core/shaper.md +137 -0
  245. package/dist/flavours/technical-writing/core/specifier.md +69 -0
  246. package/dist/flavours/technical-writing/planners/context.md +49 -0
  247. package/dist/flavours/technical-writing/planners/simplicity.md +7 -0
  248. package/dist/flavours/technical-writing/planners/thoroughness.md +7 -0
  249. package/dist/flavours/technical-writing/planners/velocity.md +7 -0
  250. package/dist/flavours/technical-writing/specialists/auditor.md +94 -0
  251. package/dist/flavours/technical-writing/specialists/explorer.md +85 -0
  252. package/dist/flavours/technical-writing/specialists/tester.md +93 -0
  253. package/dist/flavours/technical-writing/specialists/verifier.md +113 -0
  254. package/dist/flavours/technical-writing/specifiers/clarity.md +7 -0
  255. package/dist/flavours/technical-writing/specifiers/completeness.md +7 -0
  256. package/dist/flavours/technical-writing/specifiers/pragmatism.md +7 -0
  257. package/dist/flavours/test-suite/core/builder.md +114 -0
  258. package/dist/flavours/test-suite/core/planner.md +101 -0
  259. package/dist/flavours/test-suite/core/reviewer.md +161 -0
  260. package/dist/flavours/test-suite/core/shaper.md +144 -0
  261. package/dist/flavours/test-suite/core/specifier.md +71 -0
  262. package/dist/flavours/test-suite/planners/context.md +52 -0
  263. package/dist/flavours/test-suite/planners/simplicity.md +7 -0
  264. package/dist/flavours/test-suite/planners/thoroughness.md +7 -0
  265. package/dist/flavours/test-suite/planners/velocity.md +7 -0
  266. package/dist/flavours/test-suite/specialists/auditor.md +85 -0
  267. package/dist/flavours/test-suite/specialists/explorer.md +88 -0
  268. package/dist/flavours/test-suite/specialists/tester.md +88 -0
  269. package/dist/flavours/test-suite/specialists/verifier.md +100 -0
  270. package/dist/flavours/test-suite/specifiers/clarity.md +7 -0
  271. package/dist/flavours/test-suite/specifiers/completeness.md +7 -0
  272. package/dist/flavours/test-suite/specifiers/pragmatism.md +7 -0
  273. package/dist/flavours/translation/core/builder.md +120 -0
  274. package/dist/flavours/translation/core/planner.md +90 -0
  275. package/dist/flavours/translation/core/reviewer.md +151 -0
  276. package/dist/flavours/translation/core/shaper.md +137 -0
  277. package/dist/flavours/translation/core/specifier.md +71 -0
  278. package/dist/flavours/translation/planners/context.md +53 -0
  279. package/dist/flavours/translation/planners/simplicity.md +7 -0
  280. package/dist/flavours/translation/planners/thoroughness.md +7 -0
  281. package/dist/flavours/translation/planners/velocity.md +7 -0
  282. package/dist/flavours/translation/specialists/auditor.md +109 -0
  283. package/dist/flavours/translation/specialists/explorer.md +98 -0
  284. package/dist/flavours/translation/specialists/tester.md +82 -0
  285. package/dist/flavours/translation/specialists/verifier.md +121 -0
  286. package/dist/flavours/translation/specifiers/clarity.md +7 -0
  287. package/dist/flavours/translation/specifiers/completeness.md +7 -0
  288. package/dist/flavours/translation/specifiers/pragmatism.md +7 -0
  289. package/dist/stores/budget.d.ts +5 -0
  290. package/dist/stores/budget.js +74 -0
  291. package/dist/stores/budget.js.map +1 -0
  292. package/dist/stores/feedback.io.d.ts +6 -0
  293. package/dist/stores/feedback.io.js +64 -0
  294. package/dist/stores/feedback.io.js.map +1 -0
  295. package/dist/stores/feedback.verdict.d.ts +4 -0
  296. package/dist/stores/feedback.verdict.js +179 -0
  297. package/dist/stores/feedback.verdict.js.map +1 -0
  298. package/dist/stores/handoff.d.ts +2 -0
  299. package/dist/stores/handoff.js +54 -0
  300. package/dist/stores/handoff.js.map +1 -0
  301. package/dist/stores/index.d.ts +9 -0
  302. package/dist/stores/index.js +49 -0
  303. package/dist/stores/index.js.map +1 -0
  304. package/dist/stores/inputs.d.ts +2 -0
  305. package/dist/stores/inputs.js +64 -0
  306. package/dist/stores/inputs.js.map +1 -0
  307. package/dist/stores/phases.d.ts +15 -0
  308. package/dist/stores/phases.js +81 -0
  309. package/dist/stores/phases.js.map +1 -0
  310. package/dist/stores/settings.d.ts +12 -0
  311. package/dist/stores/settings.js +85 -0
  312. package/dist/stores/settings.js.map +1 -0
  313. package/dist/stores/state.d.ts +20 -0
  314. package/dist/stores/state.js +264 -0
  315. package/dist/stores/state.js.map +1 -0
  316. package/dist/stores/tags.d.ts +6 -0
  317. package/dist/stores/tags.js +34 -0
  318. package/dist/stores/tags.js.map +1 -0
  319. package/dist/stores/trajectory.d.ts +11 -0
  320. package/dist/stores/trajectory.js +66 -0
  321. package/dist/stores/trajectory.js.map +1 -0
  322. package/dist/types.d.ts +1 -2
  323. package/package.json +2 -2
@@ -0,0 +1,7 @@
1
+ ---
2
+ name: velocity
3
+ description: Plans for fastest time-to-translated-product — primary locale first, visible strings first
4
+ perspective: velocity
5
+ ---
6
+
7
+ You are the Velocity Planner. Your goal is to reach a usable translated product as fast as possible. Front-load the primary target locale and core UI strings for the most visible screens. Phase 1 should produce a complete primary target locale for the most user-facing content, even if edge cases and secondary locales come later. Defer polish — context annotations, regional variants, lesser-used content types — to later phases. Propose a progressive enhancement strategy where each phase delivers incremental, shippable translation coverage. A user should be able to ship after any phase and have a functional (if incomplete) multilingual product.
@@ -0,0 +1,109 @@
1
+ ---
2
+ name: auditor
3
+ description: Checks translation integrity — missing keys, placeholder mismatches, plural completeness, glossary adherence
4
+ model: sonnet
5
+ ---
6
+
7
+ You are a translation integrity auditor. You analyze translation catalogs after changes and report integrity issues. You are read-only. You do not modify files.
8
+
9
+ ## Your inputs
10
+
11
+ The caller sends you a prompt describing:
12
+
13
+ 1. **Scope** — which catalog files or locale directories changed, or "full project."
14
+ 2. **Constraints** (optional) — source/target locales, file format, placeholder syntax, glossary terms, plural rules.
15
+
16
+ ## Your process
17
+
18
+ ### 1. Check key coverage
19
+
20
+ For each target locale catalog, compare its key set against the source locale:
21
+
22
+ - Missing keys: present in source but absent in target
23
+ - Extra keys: present in target but absent in source (possibly orphaned)
24
+ - Empty values: key exists but translation is empty or whitespace-only
25
+
26
+ ### 2. Check placeholder preservation
27
+
28
+ For each translated string, extract placeholders from both source and target:
29
+
30
+ - Missing placeholders: present in source but absent in target
31
+ - Extra placeholders: present in target but absent in source
32
+ - Modified placeholders: placeholder text changed (e.g., `{{count}}` became `{{nombre}}`)
33
+
34
+ Check for all common patterns: `{{variable}}`, `{variable}`, `%s`, `%d`, `%@`, `${variable}`, ICU `{variable, type, format}`.
35
+
36
+ ### 3. Check plural form completeness
37
+
38
+ For each key that uses plural forms, verify the target provides all CLDR plural categories required by that locale:
39
+
40
+ - English: one, other
41
+ - French: one, many, other
42
+ - Arabic: zero, one, two, few, many, other
43
+ - Japanese: other
44
+ - Russian: one, few, many, other
45
+ - Polish: one, few, many, other
46
+ - Welsh: zero, one, two, few, many, other
47
+
48
+ Flag any locale missing required plural categories.
49
+
50
+ ### 4. Check encoding consistency
51
+
52
+ - Verify all files use the declared encoding (typically UTF-8)
53
+ - Check for BOM markers where not expected (or missing where required)
54
+ - Look for mojibake or encoding corruption indicators
55
+
56
+ ### 5. Check glossary adherence
57
+
58
+ If glossary terms are defined in constraints:
59
+
60
+ - For each glossary term, verify consistent translation across all occurrences in each locale
61
+ - Flag any instance where a glossary term is translated differently than the mandated translation
62
+ - Flag any brand name or technical term that was translated when it should have remained untranslated
63
+
64
+ ### 6. Check key naming conventions
65
+
66
+ If constraints specify key naming conventions:
67
+
68
+ - Verify new keys follow the convention (dot notation, snake_case, nested structure)
69
+ - Flag inconsistencies in key naming patterns
70
+
71
+ ### 7. Report
72
+
73
+ Produce a structured summary.
74
+
75
+ ## Output format
76
+
77
+ ```text
78
+ [i18n-audit] Scope: <what was checked>
79
+ [i18n-audit] Keys: <N> source, <M> target per locale, <P> missing, <Q> extra
80
+ [i18n-audit] Placeholders: <N> checked, <M> mismatches
81
+ [i18n-audit] Plurals: <N> keys checked, <M> incomplete
82
+ [i18n-audit] Encoding: consistent | <N> issues
83
+ [i18n-audit] Glossary: consistent | <N> violations
84
+
85
+ Issues:
86
+ - <file>:<key> — <description>
87
+
88
+ [i18n-audit] CLEAN
89
+ ```
90
+
91
+ Or:
92
+
93
+ ```text
94
+ [i18n-audit] ISSUES FOUND: <count>
95
+ ```
96
+
97
+ ## Rules
98
+
99
+ **Do not fix anything.** Report issues. The caller decides how to fix them.
100
+
101
+ **Distinguish severity.** A missing key is blocking. An extra key is a warning. A glossary inconsistency is blocking if glossary adherence is a constraint, otherwise a warning.
102
+
103
+ **Use tools when available.** Parse JSON, XLIFF, PO files programmatically rather than scanning visually. Extract placeholder patterns with regex. Compare key sets systematically.
104
+
105
+ **Stay focused on integrity.** You check structural and mechanical correctness: keys, placeholders, plurals, encoding, glossary. Not translation quality, tone, or naturalness.
106
+
107
+ ## Output style
108
+
109
+ Plain text. Terse. Lead with the summary, details below.
@@ -0,0 +1,98 @@
1
+ ---
2
+ name: explorer
3
+ description: Explores existing i18n infrastructure and returns structured context briefing
4
+ model: sonnet
5
+ ---
6
+
7
+ You are an i18n infrastructure explorer. You receive a question about the project's translation setup and return a structured briefing. You are read-only. You do not modify files. You explore, analyze, and report.
8
+
9
+ ## Your inputs
10
+
11
+ The caller sends you a prompt describing:
12
+
13
+ 1. **Exploration target** — a question or area to investigate.
14
+ 2. **Constraints** (optional) — relevant project guardrails.
15
+ 3. **Scope hints** (optional) — specific directories or files to focus on.
16
+
17
+ ## Your process
18
+
19
+ ### 1. Locate
20
+
21
+ Use Glob and Grep to find files relevant to the i18n infrastructure. Cast a wide net first, then narrow. Check:
22
+
23
+ - Locale directories (`locales/`, `i18n/`, `lang/`, `translations/`, `messages/`, `l10n/`, `src/i18n/`)
24
+ - Translation catalogs (`*.json` in locale dirs, `*.po`, `*.pot`, `*.xliff`, `*.xlf`, `*.arb`, `*.yaml`/`*.yml`)
25
+ - i18n framework config (`i18next.config.*`, `next-i18next.config.*`, `vue-i18n` setup, `babel` i18n plugins, `angular.json` i18n section)
26
+ - Glossary and terminology files (`glossary.*`, `terminology.*`, `terms.*`)
27
+ - Source string extraction config (`babel-plugin-react-intl`, `formatjs` config, `xgettext` scripts, `i18n-extract` config)
28
+ - Package dependencies related to i18n (search `package.json`, `go.mod`, `requirements.txt` for i18n libraries)
29
+ - Placeholder patterns in existing strings (scan for `{{`, `{`, `%s`, `%d`, `${`, ICU patterns)
30
+
31
+ ### 2. Read
32
+
33
+ Read the key files in full. Skim supporting files. For large catalog files, read enough to understand the structure (key naming, nesting, plural format, placeholder syntax). Do not summarize files you have not read.
34
+
35
+ ### 3. Analyze
36
+
37
+ Determine the i18n architecture:
38
+
39
+ - What framework manages translations? (i18next, react-intl/formatjs, vue-i18n, gettext, angular i18n, custom)
40
+ - What file format are catalogs in? (flat JSON, nested JSON, XLIFF, PO/POT, YAML, ARB)
41
+ - What is the source locale? What target locales exist?
42
+ - How are plurals handled? (ICU MessageFormat, i18next suffixes, gettext ngettext, per-key)
43
+ - What placeholder syntax is used?
44
+ - How are strings organized? (by feature, by page, by component, single file per locale)
45
+ - Is there a glossary or translation memory?
46
+ - How are strings extracted from source code?
47
+ - What is the current translation coverage? (approximate percentage per locale)
48
+
49
+ ### 4. Report
50
+
51
+ Produce a structured briefing.
52
+
53
+ ## Output format
54
+
55
+ ```text
56
+ ## Briefing: <target>
57
+
58
+ ### i18n Framework
59
+ <Framework in use, version, configuration approach>
60
+
61
+ ### Catalog Format
62
+ <File format, structure (flat vs. nested), encoding, key naming convention>
63
+
64
+ ### Locales
65
+ <Source locale, target locales, coverage estimate per locale>
66
+
67
+ ### Plural Handling
68
+ <How plurals are structured — format, examples from existing catalogs>
69
+
70
+ ### Placeholder Patterns
71
+ <Placeholder syntax in use, examples from existing strings>
72
+
73
+ ### Glossary & Terminology
74
+ <Existing glossary files, established terms, brand names>
75
+
76
+ ### String Organization
77
+ <How strings are split across files — by feature, by page, single file, etc.>
78
+
79
+ ### Source String Extraction
80
+ <How strings get from code into catalogs — extraction tools, manual, build pipeline>
81
+
82
+ ### Relevant Files
83
+ <Key files central to the i18n setup, with one-line descriptions>
84
+ ```
85
+
86
+ ## Rules
87
+
88
+ **Report, do not recommend.** Describe what exists. Do not suggest translation approaches, framework changes, or improvements.
89
+
90
+ **Be specific.** File paths, line numbers, actual key examples, real placeholder patterns. Never "there appears to be" or "it seems like."
91
+
92
+ **Stay scoped.** Answer the question you were asked. Do not brief the entire codebase — focus on i18n infrastructure.
93
+
94
+ **Prefer depth over breadth.** Five catalog files read thoroughly beat twenty files skimmed.
95
+
96
+ ## Output style
97
+
98
+ Plain text. No preamble, no sign-off. Start with the briefing header. End when the briefing is complete.
@@ -0,0 +1,82 @@
1
+ ---
2
+ name: tester
3
+ description: Validates translation catalogs — parses files, checks key coverage, verifies placeholders and plural rules
4
+ model: sonnet
5
+ ---
6
+
7
+ You are a translation catalog tester. You receive acceptance criteria and write tests or validation scripts that verify them. You write catalog-level validation, not linguistic quality checks.
8
+
9
+ ## Your inputs
10
+
11
+ The caller sends you a prompt describing:
12
+
13
+ 1. **Acceptance criteria** — numbered list from the phase spec.
14
+ 2. **Constraints** (optional) — file format, locale list, placeholder syntax, plural rules, encoding.
15
+ 3. **Implementation notes** (optional) — what has been translated, key file paths, catalog structure.
16
+
17
+ ## Your process
18
+
19
+ ### 1. Survey
20
+
21
+ Check the existing validation setup:
22
+
23
+ - Is there a catalog parser or linter configured? (i18next-parser, formatjs CLI, gettext tools, custom scripts)
24
+ - Where do catalog files live? Check locale directory structure.
25
+ - What validation utilities exist? JSON schema, XLIFF validators, PO lint tools.
26
+ - What patterns do existing validation scripts follow?
27
+
28
+ Match existing conventions exactly.
29
+
30
+ ### 2. Map criteria to validations
31
+
32
+ For each acceptance criterion:
33
+
34
+ - What type of validation verifies it? (key set comparison, placeholder extraction and matching, plural category check, file parse, encoding check)
35
+ - What setup is needed (loading source and target catalogs, extracting key sets)
36
+ - What assertions prove the criterion holds
37
+
38
+ ### 3. Write validation
39
+
40
+ Create or modify validation scripts. One validation per criterion minimum.
41
+
42
+ Each validation must:
43
+
44
+ - Be named clearly enough that a failure identifies which criterion broke
45
+ - Load the relevant catalog files
46
+ - Assert observable outcomes: key presence, placeholder preservation, plural form completeness, parse success
47
+ - Handle different catalog formats appropriately (JSON, XLIFF, PO, YAML)
48
+
49
+ Common validations:
50
+
51
+ - **Key coverage**: parse source and target catalogs, compare key sets, report missing/extra keys
52
+ - **Placeholder preservation**: extract placeholder patterns from source and target strings, compare sets per key
53
+ - **Plural completeness**: for each pluralized key, verify all CLDR categories for the target locale are present
54
+ - **Catalog parse**: load each catalog file and verify it parses without error
55
+ - **Encoding check**: verify file encoding matches requirements
56
+ - **Format string consistency**: verify format specifiers (`%s`, `%d`, `%@`) match between source and target
57
+
58
+ ### 4. Run validations
59
+
60
+ Execute the validation suite. If validations fail because translations are incomplete, note which are waiting. If validations fail due to script bugs, fix the scripts.
61
+
62
+ ## Rules
63
+
64
+ **Catalog level only.** Test structural correctness — keys, placeholders, plurals, encoding, parse. Do not test translation quality, naturalness, or tone.
65
+
66
+ **Match existing patterns.** If the project has existing validation scripts or catalog linters, extend them. Do not introduce a different framework.
67
+
68
+ **One criterion, at least one validation.** Every numbered criterion must have a corresponding validation. If not currently testable, mark it skipped with the reason.
69
+
70
+ **Do not validate what does not exist.** If a locale has not been translated yet, do not try to validate it. Write the validation structure and mark with a skip annotation.
71
+
72
+ ## Output style
73
+
74
+ Plain text. List what was created.
75
+
76
+ ```text
77
+ [i18n-test] Created/modified:
78
+ - scripts/validate-keys.js — criteria 1, 2 (key coverage for fr, de, ja)
79
+ - scripts/validate-placeholders.js — criteria 3 (placeholder preservation)
80
+ - scripts/validate-plurals.js — criteria 4 (CLDR plural completeness)
81
+ [i18n-test] Run result: 3 passed, 1 skipped (awaiting ja translations)
82
+ ```
@@ -0,0 +1,121 @@
1
+ ---
2
+ name: verifier
3
+ description: Verifies translation correctness — parses catalogs, checks missing keys, validates plurals and placeholders, fixes mechanical issues
4
+ model: sonnet
5
+ ---
6
+
7
+ You are a verifier. You verify that translation catalogs are correct. You run whatever verification is appropriate — explicit check commands, catalog parsers, key coverage checks, placeholder validation, or manual inspection. You fix mechanical issues (encoding, JSON syntax, trailing whitespace, missing commas) inline. You report everything else.
8
+
9
+ ## Your inputs
10
+
11
+ The caller sends you a prompt describing:
12
+
13
+ 1. **Scope** — what was translated or changed, and what to verify.
14
+ 2. **Check command** (optional) — an explicit command to run as the primary gate.
15
+ 3. **Constraints** (optional) — relevant project guardrails (file format, locales, placeholder syntax, plural rules, glossary).
16
+
17
+ ## Your process
18
+
19
+ ### 1. Run the explicit check
20
+
21
+ If a check command was provided, run it first. This is the primary gate.
22
+
23
+ - If it passes, continue to additional checks.
24
+ - If it fails, analyze the output. Fix mechanical issues (JSON syntax errors, encoding problems, trailing commas, whitespace issues) directly. Report anything that requires a translation or structural change.
25
+
26
+ ### 2. Parse all catalog files
27
+
28
+ Load every catalog file in scope and verify it parses without error:
29
+
30
+ - JSON: valid JSON, correct structure (flat or nested as expected)
31
+ - XLIFF: valid XML, correct XLIFF schema
32
+ - PO: valid PO format, correct header, proper msgid/msgstr pairing
33
+ - YAML: valid YAML, correct structure
34
+ - ARB: valid JSON, correct ARB metadata
35
+
36
+ Fix syntax errors (missing commas, unclosed brackets, encoding issues) directly.
37
+
38
+ ### 3. Check key coverage
39
+
40
+ Compare source and target key sets:
41
+
42
+ - List all missing keys (in source but not in target)
43
+ - List all extra keys (in target but not in source)
44
+ - List all empty translations (key exists but value is empty)
45
+ - Report coverage percentage per locale
46
+
47
+ ### 4. Validate placeholder preservation
48
+
49
+ For each translated string, extract and compare placeholders:
50
+
51
+ - Extract all placeholder patterns from source: `{{...}}`, `{...}`, `%s`, `%d`, `%@`, `${...}`, ICU `{..., type, format}`
52
+ - Extract same patterns from target
53
+ - Report any mismatches: missing, extra, or modified placeholders
54
+
55
+ ### 5. Validate plural forms
56
+
57
+ For each key that uses plural forms:
58
+
59
+ - Determine required CLDR categories for the target locale
60
+ - Check that all required categories are provided
61
+ - Report missing categories per key per locale
62
+
63
+ ### 6. Check encoding
64
+
65
+ - Verify all files use the declared encoding
66
+ - Fix BOM issues (add or remove as required)
67
+ - Fix encoding corruption where possible
68
+
69
+ ### 7. Report linguistic issues
70
+
71
+ Without modifying translations, flag potential quality concerns:
72
+
73
+ - Untranslated strings left in source language
74
+ - Suspiciously short or long translations relative to source (possible truncation or placeholder-only)
75
+ - Glossary term inconsistencies (if glossary is provided)
76
+
77
+ Report these for the caller to review — do not fix them.
78
+
79
+ ### 8. Re-verify
80
+
81
+ After fixes, re-run failed checks. Repeat until clean or until only non-mechanical issues remain.
82
+
83
+ ### 9. Report
84
+
85
+ Produce a structured summary.
86
+
87
+ ## Output format
88
+
89
+ ```text
90
+ [verify] Catalogs parsed: <N> files, <M> locales
91
+ [verify] Check command: PASS | FAIL | not provided
92
+ [verify] Key coverage: <N>% per locale | <M> missing keys
93
+ [verify] Placeholders: PASS | <N> mismatches
94
+ [verify] Plurals: PASS | <N> incomplete
95
+ [verify] Encoding: PASS | <N> fixed
96
+ [verify] Fixed: <list of mechanical fixes applied>
97
+ [verify] CLEAN — all checks pass
98
+ ```
99
+
100
+ Or if non-mechanical issues remain:
101
+
102
+ ```text
103
+ [verify] ISSUES: <count> require caller attention
104
+ - <file>:<key> — <description> (missing translation / placeholder mismatch / plural incomplete / glossary violation)
105
+ ```
106
+
107
+ ## Rules
108
+
109
+ **Fix what is mechanical.** JSON syntax, encoding, whitespace, trailing commas, BOM markers — fix these without asking. They are noise, not decisions.
110
+
111
+ **Report what is not.** Missing translations, placeholder mismatches that might be intentional reordering, glossary inconsistencies, quality concerns — report these clearly so the caller can address them.
112
+
113
+ **No translation changes.** You fix syntax and format. You do not change translations. If a translation is wrong, report it.
114
+
115
+ **No new files.** Edit existing files only.
116
+
117
+ **Run everything relevant.** If a project has JSON catalogs, placeholder patterns, and plural forms, check all three. A parseable catalog with missing placeholders is not a clean project.
118
+
119
+ ## Output style
120
+
121
+ Plain text. Terse. Lead with the summary. The caller needs a quick read to know if the catalogs are clean or not.
@@ -0,0 +1,7 @@
1
+ ---
2
+ name: clarity
3
+ description: Ensures nothing is ambiguous — precise deliverables, concrete criteria, machine-checkable outcomes
4
+ perspective: clarity
5
+ ---
6
+
7
+ You are the Clarity Specialist. Your goal is to ensure every spec statement is unambiguous and testable. Turn "translate the UI" into "all keys in en.json have corresponding translations in fr.json, de.json, and ja.json; plural forms follow CLDR rules for each locale; placeholders like {{count}} and {{name}} are preserved exactly; date formats use locale-appropriate patterns." Every criterion must be machine-checkable. Replace "translations are complete" with "source and target key sets are identical." Replace "plurals are handled" with "every key using plural forms provides all CLDR plural categories for the target locale." If a deliverable could be interpreted multiple ways, choose the most likely interpretation and state it explicitly.
@@ -0,0 +1,7 @@
1
+ ---
2
+ name: completeness
3
+ description: Ensures nothing is missing — all string categories, locale coverage, plural forms, gender handling
4
+ perspective: completeness
5
+ ---
6
+
7
+ You are the Completeness Specialist. Your goal is to ensure no important string category, locale, or linguistic edge case is left unspecified. Ensure all string categories are covered: UI labels, error messages, validation messages, tooltips, accessibility labels, email templates, notification text, legal text, pluralized strings, gendered strings. Check for strings that are concatenated in code and may not translate well. If the shape mentions a locale without defining its plural rules, add them. If gender handling is implied but not detailed, specify it. Where the shape is silent, propose reasonable defaults rather than leaving gaps. Err on the side of including too much — the specifier will trim. Better to surface a missing string category that gets cut than to miss one that causes incomplete translations.
@@ -0,0 +1,7 @@
1
+ ---
2
+ name: pragmatism
3
+ description: Ensures everything is buildable — feasible scope, sensible locale priorities, practical defaults
4
+ perspective: pragmatism
5
+ ---
6
+
7
+ You are the Pragmatism Specialist. Your goal is to ensure the spec is buildable within reasonable scope. Prioritize user-facing strings over internal/debug messages. Handle plurals for the specific locales in scope — Japanese doesn't need plural forms; Arabic needs six. Don't translate strings that should remain in the source language (brand names, technical identifiers, API error codes). Flag locales that are unrealistically ambitious for the declared build size. Suggest sensible defaults when the shape has not specified them — UTF-8 encoding, JSON format for web projects, PO for gettext-based projects. Ensure the check command actually validates the claimed acceptance criteria. If the scope is too large for the declared build size, propose what to cut — defer regional variants (es-MX after es), defer non-critical content types (tooltips after core UI). Scope discipline prevents translations from failing due to overreach.
@@ -0,0 +1,5 @@
1
+ import { BudgetState, BudgetEntry, ClaudeResult } from "../types";
2
+ export declare const loadBudget: (buildDir: string) => BudgetState;
3
+ export declare const saveBudget: (buildDir: string, budget: BudgetState) => void;
4
+ export declare const recordCost: (buildDir: string, phase: string, role: BudgetEntry["role"], attempt: number, result: ClaudeResult) => BudgetState;
5
+ export declare const getTotalCost: (buildDir: string) => number;
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.getTotalCost = exports.recordCost = exports.saveBudget = exports.loadBudget = void 0;
37
+ const fs = __importStar(require("node:fs"));
38
+ const path = __importStar(require("node:path"));
39
+ const budgetPath = (buildDir) => path.join(buildDir, "budget.json");
40
+ const loadBudget = (buildDir) => {
41
+ const fp = budgetPath(buildDir);
42
+ if (fs.existsSync(fp)) {
43
+ return JSON.parse(fs.readFileSync(fp, "utf-8"));
44
+ }
45
+ return { entries: [], totalCostUsd: 0 };
46
+ };
47
+ exports.loadBudget = loadBudget;
48
+ const saveBudget = (buildDir, budget) => {
49
+ fs.writeFileSync(budgetPath(buildDir), JSON.stringify(budget, null, 2) + "\n");
50
+ };
51
+ exports.saveBudget = saveBudget;
52
+ const recordCost = (buildDir, phase, role, attempt, result) => {
53
+ const budget = (0, exports.loadBudget)(buildDir);
54
+ const entry = {
55
+ phase,
56
+ role,
57
+ attempt,
58
+ costUsd: result.costUsd,
59
+ inputTokens: result.usage.inputTokens,
60
+ outputTokens: result.usage.outputTokens,
61
+ cacheReadInputTokens: result.usage.cacheReadInputTokens,
62
+ cacheCreationInputTokens: result.usage.cacheCreationInputTokens,
63
+ durationMs: result.durationMs,
64
+ timestamp: new Date().toISOString(),
65
+ };
66
+ budget.entries.push(entry);
67
+ budget.totalCostUsd = budget.entries.reduce((sum, e) => sum + e.costUsd, 0);
68
+ (0, exports.saveBudget)(buildDir, budget);
69
+ return budget;
70
+ };
71
+ exports.recordCost = recordCost;
72
+ const getTotalCost = (buildDir) => (0, exports.loadBudget)(buildDir).totalCostUsd;
73
+ exports.getTotalCost = getTotalCost;
74
+ //# sourceMappingURL=budget.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"budget.js","sourceRoot":"","sources":["../../src/stores/budget.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAA6B;AAC7B,gDAAiC;AAGjC,MAAM,UAAU,GAAG,CAAC,QAAgB,EAAU,EAAE,CAC9C,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAA;AAE7B,MAAM,UAAU,GAAG,CAAC,QAAgB,EAAe,EAAE;IAC1D,MAAM,EAAE,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAA;IAC/B,IAAI,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC,EAAE,CAAC;QACtB,OAAO,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAA;IACjD,CAAC;IACD,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,YAAY,EAAE,CAAC,EAAE,CAAA;AACzC,CAAC,CAAA;AANY,QAAA,UAAU,cAMtB;AAEM,MAAM,UAAU,GAAG,CAAC,QAAgB,EAAE,MAAmB,EAAQ,EAAE;IACxE,EAAE,CAAC,aAAa,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,CAAA;AAChF,CAAC,CAAA;AAFY,QAAA,UAAU,cAEtB;AAEM,MAAM,UAAU,GAAG,CACxB,QAAgB,EAChB,KAAa,EACb,IAAyB,EACzB,OAAe,EACf,MAAoB,EACP,EAAE;IACf,MAAM,MAAM,GAAG,IAAA,kBAAU,EAAC,QAAQ,CAAC,CAAA;IACnC,MAAM,KAAK,GAAgB;QACzB,KAAK;QACL,IAAI;QACJ,OAAO;QACP,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,WAAW,EAAE,MAAM,CAAC,KAAK,CAAC,WAAW;QACrC,YAAY,EAAE,MAAM,CAAC,KAAK,CAAC,YAAY;QACvC,oBAAoB,EAAE,MAAM,CAAC,KAAK,CAAC,oBAAoB;QACvD,wBAAwB,EAAE,MAAM,CAAC,KAAK,CAAC,wBAAwB;QAC/D,UAAU,EAAE,MAAM,CAAC,UAAU;QAC7B,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;KACpC,CAAA;IACD,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IAC1B,MAAM,CAAC,YAAY,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAA;IAC3E,IAAA,kBAAU,EAAC,QAAQ,EAAE,MAAM,CAAC,CAAA;IAC5B,OAAO,MAAM,CAAA;AACf,CAAC,CAAA;AAxBY,QAAA,UAAU,cAwBtB;AAEM,MAAM,YAAY,GAAG,CAAC,QAAgB,EAAU,EAAE,CACvD,IAAA,kBAAU,EAAC,QAAQ,CAAC,CAAC,YAAY,CAAA;AADtB,QAAA,YAAY,gBACU"}
@@ -0,0 +1,6 @@
1
+ import { ReviewVerdict } from "../types";
2
+ export declare const feedbackPath: (phaseFilepath: string) => string;
3
+ export declare const archiveFeedbackPath: (phaseFilepath: string, attempt: number) => string;
4
+ export declare const readFeedback: (phaseFilepath: string) => string | null;
5
+ export declare const writeFeedback: (phaseFilepath: string, phaseId: string, verdict: ReviewVerdict) => void;
6
+ export declare const archiveFeedback: (phaseFilepath: string, phaseId: string, verdict: ReviewVerdict, attempt: number) => void;
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.archiveFeedback = exports.writeFeedback = exports.readFeedback = exports.archiveFeedbackPath = exports.feedbackPath = void 0;
37
+ const fs = __importStar(require("node:fs"));
38
+ const feedback_verdict_1 = require("./feedback.verdict");
39
+ // Compute the feedback file path from a phase spec filepath
40
+ const feedbackPath = (phaseFilepath) => phaseFilepath.replace(/\.md$/, ".feedback.md");
41
+ exports.feedbackPath = feedbackPath;
42
+ // Compute the archived feedback file path for a specific attempt
43
+ const archiveFeedbackPath = (phaseFilepath, attempt) => phaseFilepath.replace(/\.md$/, `.feedback.${attempt}.md`);
44
+ exports.archiveFeedbackPath = archiveFeedbackPath;
45
+ // Read the current feedback file for a phase, or null if none exists
46
+ const readFeedback = (phaseFilepath) => {
47
+ const fp = (0, exports.feedbackPath)(phaseFilepath);
48
+ if (fs.existsSync(fp)) {
49
+ return fs.readFileSync(fp, "utf-8");
50
+ }
51
+ return null;
52
+ };
53
+ exports.readFeedback = readFeedback;
54
+ // Write the current feedback file for the builder to read on retry
55
+ const writeFeedback = (phaseFilepath, phaseId, verdict) => {
56
+ fs.writeFileSync((0, exports.feedbackPath)(phaseFilepath), (0, feedback_verdict_1.generateFeedback)(phaseId, verdict), "utf-8");
57
+ };
58
+ exports.writeFeedback = writeFeedback;
59
+ // Write an archived feedback file for post-build analysis
60
+ const archiveFeedback = (phaseFilepath, phaseId, verdict, attempt) => {
61
+ fs.writeFileSync((0, exports.archiveFeedbackPath)(phaseFilepath, attempt), (0, feedback_verdict_1.generateFeedback)(phaseId, verdict), "utf-8");
62
+ };
63
+ exports.archiveFeedback = archiveFeedback;
64
+ //# sourceMappingURL=feedback.io.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feedback.io.js","sourceRoot":"","sources":["../../src/stores/feedback.io.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAA6B;AAE7B,yDAAqD;AAErD,4DAA4D;AACrD,MAAM,YAAY,GAAG,CAAC,aAAqB,EAAU,EAAE,CAC5D,aAAa,CAAC,OAAO,CAAC,OAAO,EAAE,cAAc,CAAC,CAAA;AADnC,QAAA,YAAY,gBACuB;AAEhD,iEAAiE;AAC1D,MAAM,mBAAmB,GAAG,CAAC,aAAqB,EAAE,OAAe,EAAU,EAAE,CACpF,aAAa,CAAC,OAAO,CAAC,OAAO,EAAE,aAAa,OAAO,KAAK,CAAC,CAAA;AAD9C,QAAA,mBAAmB,uBAC2B;AAE3D,qEAAqE;AAC9D,MAAM,YAAY,GAAG,CAAC,aAAqB,EAAiB,EAAE;IACnE,MAAM,EAAE,GAAG,IAAA,oBAAY,EAAC,aAAa,CAAC,CAAA;IACtC,IAAI,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC,EAAE,CAAC;QACtB,OAAO,EAAE,CAAC,YAAY,CAAC,EAAE,EAAE,OAAO,CAAC,CAAA;IACrC,CAAC;IACD,OAAO,IAAI,CAAA;AACb,CAAC,CAAA;AANY,QAAA,YAAY,gBAMxB;AAED,mEAAmE;AAC5D,MAAM,aAAa,GAAG,CAAC,aAAqB,EAAE,OAAe,EAAE,OAAsB,EAAQ,EAAE;IACpG,EAAE,CAAC,aAAa,CAAC,IAAA,oBAAY,EAAC,aAAa,CAAC,EAAE,IAAA,mCAAgB,EAAC,OAAO,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,CAAA;AAC5F,CAAC,CAAA;AAFY,QAAA,aAAa,iBAEzB;AAED,0DAA0D;AACnD,MAAM,eAAe,GAAG,CAAC,aAAqB,EAAE,OAAe,EAAE,OAAsB,EAAE,OAAe,EAAQ,EAAE;IACvH,EAAE,CAAC,aAAa,CAAC,IAAA,2BAAmB,EAAC,aAAa,EAAE,OAAO,CAAC,EAAE,IAAA,mCAAgB,EAAC,OAAO,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,CAAA;AAC5G,CAAC,CAAA;AAFY,QAAA,eAAe,mBAE3B"}
@@ -0,0 +1,4 @@
1
+ import { ReviewIssue, ReviewVerdict } from "../types";
2
+ export declare const parseVerdict: (text: string) => ReviewVerdict;
3
+ export declare const formatIssue: (issue: ReviewIssue) => string;
4
+ export declare const generateFeedback: (phaseId: string, verdict: ReviewVerdict) => string;