@dedesfr/prompter 0.6.14 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (379) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/cli/index.js +144 -12
  3. package/dist/cli/index.js.map +1 -1
  4. package/dist/commands/archive.d.ts +11 -0
  5. package/dist/commands/archive.d.ts.map +1 -0
  6. package/dist/commands/archive.js +280 -0
  7. package/dist/commands/archive.js.map +1 -0
  8. package/dist/commands/change.d.ts +35 -0
  9. package/dist/commands/change.d.ts.map +1 -0
  10. package/dist/commands/change.js +277 -0
  11. package/dist/commands/change.js.map +1 -0
  12. package/dist/commands/config.d.ts +8 -0
  13. package/dist/commands/config.d.ts.map +1 -0
  14. package/dist/commands/config.js +198 -0
  15. package/dist/commands/config.js.map +1 -0
  16. package/dist/commands/guide.d.ts.map +1 -1
  17. package/dist/commands/guide.js +4 -0
  18. package/dist/commands/guide.js.map +1 -1
  19. package/dist/commands/list.d.ts +2 -2
  20. package/dist/commands/list.d.ts.map +1 -1
  21. package/dist/commands/list.js +153 -47
  22. package/dist/commands/list.js.map +1 -1
  23. package/dist/commands/show.d.ts +14 -0
  24. package/dist/commands/show.d.ts.map +1 -0
  25. package/dist/commands/show.js +132 -0
  26. package/dist/commands/show.js.map +1 -0
  27. package/dist/commands/spec.d.ts +15 -0
  28. package/dist/commands/spec.d.ts.map +1 -0
  29. package/dist/commands/spec.js +225 -0
  30. package/dist/commands/spec.js.map +1 -0
  31. package/dist/commands/validate.d.ts +24 -0
  32. package/dist/commands/validate.d.ts.map +1 -0
  33. package/dist/commands/validate.js +294 -0
  34. package/dist/commands/validate.js.map +1 -0
  35. package/dist/core/artifact-graph/graph.d.ts +56 -0
  36. package/dist/core/artifact-graph/graph.d.ts.map +1 -0
  37. package/dist/core/artifact-graph/graph.js +141 -0
  38. package/dist/core/artifact-graph/graph.js.map +1 -0
  39. package/dist/core/artifact-graph/index.d.ts +7 -0
  40. package/dist/core/artifact-graph/index.d.ts.map +1 -0
  41. package/dist/core/artifact-graph/index.js +13 -0
  42. package/dist/core/artifact-graph/index.js.map +1 -0
  43. package/dist/core/artifact-graph/instruction-loader.d.ts +130 -0
  44. package/dist/core/artifact-graph/instruction-loader.d.ts.map +1 -0
  45. package/dist/core/artifact-graph/instruction-loader.js +173 -0
  46. package/dist/core/artifact-graph/instruction-loader.js.map +1 -0
  47. package/dist/core/artifact-graph/resolver.d.ts +61 -0
  48. package/dist/core/artifact-graph/resolver.d.ts.map +1 -0
  49. package/dist/core/artifact-graph/resolver.js +187 -0
  50. package/dist/core/artifact-graph/resolver.js.map +1 -0
  51. package/dist/core/artifact-graph/schema.d.ts +13 -0
  52. package/dist/core/artifact-graph/schema.d.ts.map +1 -0
  53. package/dist/core/artifact-graph/schema.js +108 -0
  54. package/dist/core/artifact-graph/schema.js.map +1 -0
  55. package/dist/core/artifact-graph/state.d.ts +12 -0
  56. package/dist/core/artifact-graph/state.d.ts.map +1 -0
  57. package/dist/core/artifact-graph/state.js +54 -0
  58. package/dist/core/artifact-graph/state.js.map +1 -0
  59. package/dist/core/artifact-graph/types.d.ts +45 -0
  60. package/dist/core/artifact-graph/types.d.ts.map +1 -0
  61. package/dist/core/artifact-graph/types.js +43 -0
  62. package/dist/core/artifact-graph/types.js.map +1 -0
  63. package/dist/core/completions/command-registry.d.ts +7 -0
  64. package/dist/core/completions/command-registry.d.ts.map +1 -0
  65. package/dist/core/completions/command-registry.js +380 -0
  66. package/dist/core/completions/command-registry.js.map +1 -0
  67. package/dist/core/completions/completion-provider.d.ts +60 -0
  68. package/dist/core/completions/completion-provider.d.ts.map +1 -0
  69. package/dist/core/completions/completion-provider.js +102 -0
  70. package/dist/core/completions/completion-provider.js.map +1 -0
  71. package/dist/core/completions/generators/bash-generator.d.ts +32 -0
  72. package/dist/core/completions/generators/bash-generator.d.ts.map +1 -0
  73. package/dist/core/completions/generators/bash-generator.js +174 -0
  74. package/dist/core/completions/generators/bash-generator.js.map +1 -0
  75. package/dist/core/completions/generators/fish-generator.d.ts +32 -0
  76. package/dist/core/completions/generators/fish-generator.d.ts.map +1 -0
  77. package/dist/core/completions/generators/fish-generator.js +157 -0
  78. package/dist/core/completions/generators/fish-generator.js.map +1 -0
  79. package/dist/core/completions/generators/powershell-generator.d.ts +33 -0
  80. package/dist/core/completions/generators/powershell-generator.d.ts.map +1 -0
  81. package/dist/core/completions/generators/powershell-generator.js +207 -0
  82. package/dist/core/completions/generators/powershell-generator.js.map +1 -0
  83. package/dist/core/completions/generators/zsh-generator.d.ts +44 -0
  84. package/dist/core/completions/generators/zsh-generator.d.ts.map +1 -0
  85. package/dist/core/completions/generators/zsh-generator.js +250 -0
  86. package/dist/core/completions/generators/zsh-generator.js.map +1 -0
  87. package/dist/core/completions/templates/bash-templates.d.ts +6 -0
  88. package/dist/core/completions/templates/bash-templates.d.ts.map +1 -0
  89. package/dist/core/completions/templates/bash-templates.js +24 -0
  90. package/dist/core/completions/templates/bash-templates.js.map +1 -0
  91. package/dist/core/completions/templates/fish-templates.d.ts +7 -0
  92. package/dist/core/completions/templates/fish-templates.d.ts.map +1 -0
  93. package/dist/core/completions/templates/fish-templates.js +39 -0
  94. package/dist/core/completions/templates/fish-templates.js.map +1 -0
  95. package/dist/core/completions/templates/powershell-templates.d.ts +6 -0
  96. package/dist/core/completions/templates/powershell-templates.d.ts.map +1 -0
  97. package/dist/core/completions/templates/powershell-templates.js +25 -0
  98. package/dist/core/completions/templates/powershell-templates.js.map +1 -0
  99. package/dist/core/completions/templates/zsh-templates.d.ts +6 -0
  100. package/dist/core/completions/templates/zsh-templates.d.ts.map +1 -0
  101. package/dist/core/completions/templates/zsh-templates.js +36 -0
  102. package/dist/core/completions/templates/zsh-templates.js.map +1 -0
  103. package/dist/core/completions/types.d.ts +78 -0
  104. package/dist/core/completions/types.d.ts.map +1 -0
  105. package/dist/core/completions/types.js +2 -0
  106. package/dist/core/completions/types.js.map +1 -0
  107. package/dist/core/config-schema.d.ts +76 -0
  108. package/dist/core/config-schema.d.ts.map +1 -0
  109. package/dist/core/config-schema.js +200 -0
  110. package/dist/core/config-schema.js.map +1 -0
  111. package/dist/core/config.d.ts.map +1 -1
  112. package/dist/core/config.js +18 -0
  113. package/dist/core/config.js.map +1 -1
  114. package/dist/core/configurators/slash/antigravity.d.ts.map +1 -1
  115. package/dist/core/configurators/slash/antigravity.js +6 -0
  116. package/dist/core/configurators/slash/antigravity.js.map +1 -1
  117. package/dist/core/configurators/slash/base.js +1 -1
  118. package/dist/core/configurators/slash/base.js.map +1 -1
  119. package/dist/core/configurators/slash/claude.d.ts.map +1 -1
  120. package/dist/core/configurators/slash/claude.js +6 -0
  121. package/dist/core/configurators/slash/claude.js.map +1 -1
  122. package/dist/core/configurators/slash/codex.d.ts.map +1 -1
  123. package/dist/core/configurators/slash/codex.js +6 -0
  124. package/dist/core/configurators/slash/codex.js.map +1 -1
  125. package/dist/core/configurators/slash/github-copilot.d.ts.map +1 -1
  126. package/dist/core/configurators/slash/github-copilot.js +6 -0
  127. package/dist/core/configurators/slash/github-copilot.js.map +1 -1
  128. package/dist/core/configurators/slash/kilocode.d.ts.map +1 -1
  129. package/dist/core/configurators/slash/kilocode.js +6 -0
  130. package/dist/core/configurators/slash/kilocode.js.map +1 -1
  131. package/dist/core/configurators/slash/opencode.d.ts.map +1 -1
  132. package/dist/core/configurators/slash/opencode.js +6 -0
  133. package/dist/core/configurators/slash/opencode.js.map +1 -1
  134. package/dist/core/converters/json-converter.d.ts +6 -0
  135. package/dist/core/converters/json-converter.d.ts.map +1 -0
  136. package/dist/core/converters/json-converter.js +51 -0
  137. package/dist/core/converters/json-converter.js.map +1 -0
  138. package/dist/core/global-config.d.ts +39 -0
  139. package/dist/core/global-config.d.ts.map +1 -0
  140. package/dist/core/global-config.js +115 -0
  141. package/dist/core/global-config.js.map +1 -0
  142. package/dist/core/parsers/change-parser.d.ts +13 -0
  143. package/dist/core/parsers/change-parser.d.ts.map +1 -0
  144. package/dist/core/parsers/change-parser.js +193 -0
  145. package/dist/core/parsers/change-parser.js.map +1 -0
  146. package/dist/core/parsers/markdown-parser.d.ts +22 -0
  147. package/dist/core/parsers/markdown-parser.d.ts.map +1 -0
  148. package/dist/core/parsers/markdown-parser.js +187 -0
  149. package/dist/core/parsers/markdown-parser.js.map +1 -0
  150. package/dist/core/parsers/requirement-blocks.d.ts +37 -0
  151. package/dist/core/parsers/requirement-blocks.d.ts.map +1 -0
  152. package/dist/core/parsers/requirement-blocks.js +201 -0
  153. package/dist/core/parsers/requirement-blocks.js.map +1 -0
  154. package/dist/core/prompt-templates.d.ts +3 -0
  155. package/dist/core/prompt-templates.d.ts.map +1 -1
  156. package/dist/core/prompt-templates.js +66 -0
  157. package/dist/core/prompt-templates.js.map +1 -1
  158. package/dist/core/schemas/base.schema.d.ts +13 -0
  159. package/dist/core/schemas/base.schema.d.ts.map +1 -0
  160. package/dist/core/schemas/base.schema.js +13 -0
  161. package/dist/core/schemas/base.schema.js.map +1 -0
  162. package/dist/core/schemas/change.schema.d.ts +73 -0
  163. package/dist/core/schemas/change.schema.d.ts.map +1 -0
  164. package/dist/core/schemas/change.schema.js +31 -0
  165. package/dist/core/schemas/change.schema.js.map +1 -0
  166. package/dist/core/schemas/index.d.ts +4 -0
  167. package/dist/core/schemas/index.d.ts.map +1 -0
  168. package/dist/core/schemas/index.js +4 -0
  169. package/dist/core/schemas/index.js.map +1 -0
  170. package/dist/core/schemas/spec.schema.d.ts +18 -0
  171. package/dist/core/schemas/spec.schema.d.ts.map +1 -0
  172. package/dist/core/schemas/spec.schema.js +15 -0
  173. package/dist/core/schemas/spec.schema.js.map +1 -0
  174. package/dist/core/specs-apply.d.ts +73 -0
  175. package/dist/core/specs-apply.d.ts.map +1 -0
  176. package/dist/core/specs-apply.js +384 -0
  177. package/dist/core/specs-apply.js.map +1 -0
  178. package/dist/core/styles/palette.d.ts +7 -0
  179. package/dist/core/styles/palette.d.ts.map +1 -0
  180. package/dist/core/styles/palette.js +8 -0
  181. package/dist/core/styles/palette.js.map +1 -0
  182. package/dist/core/templates/slash-command-templates.d.ts +1 -1
  183. package/dist/core/templates/slash-command-templates.d.ts.map +1 -1
  184. package/dist/core/templates/slash-command-templates.js +4 -1
  185. package/dist/core/templates/slash-command-templates.js.map +1 -1
  186. package/dist/core/validation/constants.d.ts +34 -0
  187. package/dist/core/validation/constants.d.ts.map +1 -0
  188. package/dist/core/validation/constants.js +40 -0
  189. package/dist/core/validation/constants.js.map +1 -0
  190. package/dist/core/validation/types.d.ts +18 -0
  191. package/dist/core/validation/types.d.ts.map +1 -0
  192. package/dist/core/validation/types.js +2 -0
  193. package/dist/core/validation/types.js.map +1 -0
  194. package/dist/core/validation/validator.d.ts +33 -0
  195. package/dist/core/validation/validator.d.ts.map +1 -0
  196. package/dist/core/validation/validator.js +409 -0
  197. package/dist/core/validation/validator.js.map +1 -0
  198. package/dist/core/view.d.ts +8 -0
  199. package/dist/core/view.d.ts.map +1 -0
  200. package/dist/core/view.js +168 -0
  201. package/dist/core/view.js.map +1 -0
  202. package/dist/utils/change-metadata.d.ts +47 -0
  203. package/dist/utils/change-metadata.d.ts.map +1 -0
  204. package/dist/utils/change-metadata.js +130 -0
  205. package/dist/utils/change-metadata.js.map +1 -0
  206. package/dist/utils/change-utils.d.ts +51 -0
  207. package/dist/utils/change-utils.d.ts.map +1 -0
  208. package/dist/utils/change-utils.js +100 -0
  209. package/dist/utils/change-utils.js.map +1 -0
  210. package/dist/utils/file-system.d.ts +25 -0
  211. package/dist/utils/file-system.d.ts.map +1 -0
  212. package/dist/utils/file-system.js +218 -0
  213. package/dist/utils/file-system.js.map +1 -0
  214. package/dist/utils/index.d.ts +4 -0
  215. package/dist/utils/index.d.ts.map +1 -0
  216. package/dist/utils/index.js +5 -0
  217. package/dist/utils/index.js.map +1 -0
  218. package/dist/utils/interactive.d.ts +18 -0
  219. package/dist/utils/interactive.d.ts.map +1 -0
  220. package/dist/utils/interactive.js +21 -0
  221. package/dist/utils/interactive.js.map +1 -0
  222. package/dist/utils/item-discovery.d.ts +4 -0
  223. package/dist/utils/item-discovery.d.ts.map +1 -0
  224. package/dist/utils/item-discovery.js +72 -0
  225. package/dist/utils/item-discovery.js.map +1 -0
  226. package/dist/utils/match.d.ts +3 -0
  227. package/dist/utils/match.d.ts.map +1 -0
  228. package/dist/utils/match.js +22 -0
  229. package/dist/utils/match.js.map +1 -0
  230. package/dist/utils/shell-detection.d.ts +20 -0
  231. package/dist/utils/shell-detection.d.ts.map +1 -0
  232. package/dist/utils/shell-detection.js +41 -0
  233. package/dist/utils/shell-detection.js.map +1 -0
  234. package/dist/utils/task-progress.d.ts +8 -0
  235. package/dist/utils/task-progress.d.ts.map +1 -0
  236. package/dist/utils/task-progress.js +36 -0
  237. package/dist/utils/task-progress.js.map +1 -0
  238. package/docs/tasks.md +1 -1
  239. package/package.json +6 -2
  240. package/prompt/apply.md +17 -0
  241. package/prompt/archive.md +21 -0
  242. package/prompt/proposal.md +22 -0
  243. package/src/cli/index.ts +151 -16
  244. package/src/commands/archive.ts +302 -0
  245. package/src/commands/change.ts +292 -0
  246. package/src/commands/config.ts +233 -0
  247. package/src/commands/guide.ts +5 -0
  248. package/src/commands/list.ts +176 -66
  249. package/src/commands/show.ts +138 -0
  250. package/src/commands/spec.ts +251 -0
  251. package/src/commands/validate.ts +326 -0
  252. package/src/core/artifact-graph/graph.ts +167 -0
  253. package/src/core/artifact-graph/index.ts +44 -0
  254. package/src/core/artifact-graph/instruction-loader.ts +302 -0
  255. package/src/core/artifact-graph/resolver.ts +226 -0
  256. package/src/core/artifact-graph/schema.ts +124 -0
  257. package/src/core/artifact-graph/state.ts +64 -0
  258. package/src/core/artifact-graph/types.ts +65 -0
  259. package/src/core/completions/command-registry.ts +382 -0
  260. package/src/core/completions/completion-provider.ts +128 -0
  261. package/src/core/completions/generators/bash-generator.ts +191 -0
  262. package/src/core/completions/generators/fish-generator.ts +188 -0
  263. package/src/core/completions/generators/powershell-generator.ts +223 -0
  264. package/src/core/completions/generators/zsh-generator.ts +281 -0
  265. package/src/core/completions/templates/bash-templates.ts +24 -0
  266. package/src/core/completions/templates/fish-templates.ts +40 -0
  267. package/src/core/completions/templates/powershell-templates.ts +25 -0
  268. package/src/core/completions/templates/zsh-templates.ts +36 -0
  269. package/src/core/completions/types.ts +90 -0
  270. package/src/core/config-schema.ts +230 -0
  271. package/src/core/config.ts +18 -0
  272. package/src/core/configurators/slash/antigravity.ts +6 -0
  273. package/src/core/configurators/slash/base.ts +1 -1
  274. package/src/core/configurators/slash/claude.ts +6 -0
  275. package/src/core/configurators/slash/codex.ts +6 -0
  276. package/src/core/configurators/slash/github-copilot.ts +6 -0
  277. package/src/core/configurators/slash/kilocode.ts +6 -0
  278. package/src/core/configurators/slash/opencode.ts +6 -0
  279. package/src/core/converters/json-converter.ts +62 -0
  280. package/src/core/global-config.ts +136 -0
  281. package/src/core/parsers/change-parser.ts +234 -0
  282. package/src/core/parsers/markdown-parser.ts +237 -0
  283. package/src/core/parsers/requirement-blocks.ts +234 -0
  284. package/src/core/prompt-templates.ts +69 -0
  285. package/src/core/schemas/base.schema.ts +20 -0
  286. package/src/core/schemas/change.schema.ts +42 -0
  287. package/src/core/schemas/index.ts +20 -0
  288. package/src/core/schemas/spec.schema.ts +17 -0
  289. package/src/core/specs-apply.ts +483 -0
  290. package/src/core/styles/palette.ts +8 -0
  291. package/src/core/templates/slash-command-templates.ts +7 -1
  292. package/src/core/validation/constants.ts +48 -0
  293. package/src/core/validation/types.ts +19 -0
  294. package/src/core/validation/validator.ts +449 -0
  295. package/src/core/view.ts +219 -0
  296. package/src/utils/change-metadata.ts +171 -0
  297. package/src/utils/change-utils.ts +131 -0
  298. package/src/utils/file-system.ts +252 -0
  299. package/src/utils/index.ts +12 -0
  300. package/src/utils/interactive.ts +29 -0
  301. package/src/utils/item-discovery.ts +66 -0
  302. package/src/utils/match.ts +26 -0
  303. package/src/utils/shell-detection.ts +62 -0
  304. package/src/utils/task-progress.ts +43 -0
  305. package/dist/commands/ai-humanizer.d.ts +0 -11
  306. package/dist/commands/ai-humanizer.d.ts.map +0 -1
  307. package/dist/commands/ai-humanizer.js +0 -97
  308. package/dist/commands/ai-humanizer.js.map +0 -1
  309. package/dist/commands/api-contract-generator.d.ts +0 -11
  310. package/dist/commands/api-contract-generator.d.ts.map +0 -1
  311. package/dist/commands/api-contract-generator.js +0 -97
  312. package/dist/commands/api-contract-generator.js.map +0 -1
  313. package/dist/commands/design-system.d.ts +0 -11
  314. package/dist/commands/design-system.d.ts.map +0 -1
  315. package/dist/commands/design-system.js +0 -97
  316. package/dist/commands/design-system.js.map +0 -1
  317. package/dist/commands/document-explainer.d.ts +0 -11
  318. package/dist/commands/document-explainer.d.ts.map +0 -1
  319. package/dist/commands/document-explainer.js +0 -97
  320. package/dist/commands/document-explainer.js.map +0 -1
  321. package/dist/commands/epic-generator.d.ts +0 -11
  322. package/dist/commands/epic-generator.d.ts.map +0 -1
  323. package/dist/commands/epic-generator.js +0 -97
  324. package/dist/commands/epic-generator.js.map +0 -1
  325. package/dist/commands/erd-generator.d.ts +0 -11
  326. package/dist/commands/erd-generator.d.ts.map +0 -1
  327. package/dist/commands/erd-generator.js +0 -97
  328. package/dist/commands/erd-generator.js.map +0 -1
  329. package/dist/commands/fsd-generator.d.ts +0 -11
  330. package/dist/commands/fsd-generator.d.ts.map +0 -1
  331. package/dist/commands/fsd-generator.js +0 -97
  332. package/dist/commands/fsd-generator.js.map +0 -1
  333. package/dist/commands/prd-agent-generator.d.ts +0 -11
  334. package/dist/commands/prd-agent-generator.d.ts.map +0 -1
  335. package/dist/commands/prd-agent-generator.js +0 -95
  336. package/dist/commands/prd-agent-generator.js.map +0 -1
  337. package/dist/commands/prd-generator.d.ts +0 -11
  338. package/dist/commands/prd-generator.d.ts.map +0 -1
  339. package/dist/commands/prd-generator.js +0 -97
  340. package/dist/commands/prd-generator.js.map +0 -1
  341. package/dist/commands/product-brief.d.ts +0 -11
  342. package/dist/commands/product-brief.d.ts.map +0 -1
  343. package/dist/commands/product-brief.js +0 -97
  344. package/dist/commands/product-brief.js.map +0 -1
  345. package/dist/commands/skill-creator.d.ts +0 -11
  346. package/dist/commands/skill-creator.d.ts.map +0 -1
  347. package/dist/commands/skill-creator.js +0 -101
  348. package/dist/commands/skill-creator.js.map +0 -1
  349. package/dist/commands/story-generator.d.ts +0 -11
  350. package/dist/commands/story-generator.d.ts.map +0 -1
  351. package/dist/commands/story-generator.js +0 -97
  352. package/dist/commands/story-generator.js.map +0 -1
  353. package/dist/commands/tdd-generator.d.ts +0 -11
  354. package/dist/commands/tdd-generator.d.ts.map +0 -1
  355. package/dist/commands/tdd-generator.js +0 -97
  356. package/dist/commands/tdd-generator.js.map +0 -1
  357. package/dist/commands/tdd-lite-generator.d.ts +0 -11
  358. package/dist/commands/tdd-lite-generator.d.ts.map +0 -1
  359. package/dist/commands/tdd-lite-generator.js +0 -97
  360. package/dist/commands/tdd-lite-generator.js.map +0 -1
  361. package/dist/commands/wireframe-generator.d.ts +0 -11
  362. package/dist/commands/wireframe-generator.d.ts.map +0 -1
  363. package/dist/commands/wireframe-generator.js +0 -97
  364. package/dist/commands/wireframe-generator.js.map +0 -1
  365. package/src/commands/ai-humanizer.ts +0 -118
  366. package/src/commands/api-contract-generator.ts +0 -118
  367. package/src/commands/design-system.ts +0 -118
  368. package/src/commands/document-explainer.ts +0 -118
  369. package/src/commands/epic-generator.ts +0 -118
  370. package/src/commands/erd-generator.ts +0 -118
  371. package/src/commands/fsd-generator.ts +0 -118
  372. package/src/commands/prd-agent-generator.ts +0 -115
  373. package/src/commands/prd-generator.ts +0 -118
  374. package/src/commands/product-brief.ts +0 -118
  375. package/src/commands/skill-creator.ts +0 -123
  376. package/src/commands/story-generator.ts +0 -118
  377. package/src/commands/tdd-generator.ts +0 -118
  378. package/src/commands/tdd-lite-generator.ts +0 -118
  379. package/src/commands/wireframe-generator.ts +0 -118
@@ -0,0 +1 @@
1
+ {"version":3,"file":"change-parser.js","sourceRoot":"","sources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AC;QAED,OAAO,YAAY,CAAC;IACtB,CAAC;CACF"}
@@ -0,0 +1,22 @@
1
+ import { Spec, Change, Requirement, Scenario, Delta } from '../schemas/index.js';
2
+ export interface Section {
3
+ level: number;
4
+ title: string;
5
+ content: string;
6
+ children: Section[];
7
+ }
8
+ export declare class MarkdownParser {
9
+ private lines;
10
+ private currentLine;
11
+ constructor(content: string);
12
+ protected static normalizeContent(content: string): string;
13
+ parseSpec(name: string): Spec;
14
+ parseChange(name: string): Change;
15
+ protected parseSections(): Section[];
16
+ protected getContentUntilNextHeader(startLine: number, currentLevel: number): string;
17
+ protected findSection(sections: Section[], title: string): Section | undefined;
18
+ protected parseRequirements(section: Section): Requirement[];
19
+ protected parseScenarios(requirementSection: Section): Scenario[];
20
+ protected parseDeltas(content: string): Delta[];
21
+ }
22
+ //# sourceMappingURL=markdown-parser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markdown-parser.d.ts","sourceRoot":"","sources":["../../../src/core/parsers/markdown-parser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,KAAK,EAAkB,MAAM,qBAAqB,CAAC;AAEjG,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,OAAO,EAAE,CAAC;CACrB;AAED,qBAAa,cAAc;IACzB,OAAO,CAAC,KAAK,CAAW;IACxB,OAAO,CAAC,WAAW,CAAS;gBAEhB,OAAO,EAAE,MAAM;IAM3B,SAAS,CAAC,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;IAI1D,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IA2B7B,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IA2BjC,SAAS,CAAC,aAAa,IAAI,OAAO,EAAE;IAqCpC,SAAS,CAAC,yBAAyB,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM;IAiBpF,SAAS,CAAC,WAAW,CAAC,QAAQ,EAAE,OAAO,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS;IAa9E,SAAS,CAAC,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,WAAW,EAAE;IA0C5D,SAAS,CAAC,cAAc,CAAC,kBAAkB,EAAE,OAAO,GAAG,QAAQ,EAAE;IAgBjE,SAAS,CAAC,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK,EAAE;CAkChD"}
@@ -0,0 +1,187 @@
1
+ export class MarkdownParser {
2
+ lines;
3
+ currentLine;
4
+ constructor(content) {
5
+ const normalized = MarkdownParser.normalizeContent(content);
6
+ this.lines = normalized.split('\n');
7
+ this.currentLine = 0;
8
+ }
9
+ static normalizeContent(content) {
10
+ return content.replace(/\r\n?/g, '\n');
11
+ }
12
+ parseSpec(name) {
13
+ const sections = this.parseSections();
14
+ const purpose = this.findSection(sections, 'Purpose')?.content || '';
15
+ const requirementsSection = this.findSection(sections, 'Requirements');
16
+ if (!purpose) {
17
+ throw new Error('Spec must have a Purpose section');
18
+ }
19
+ if (!requirementsSection) {
20
+ throw new Error('Spec must have a Requirements section');
21
+ }
22
+ const requirements = this.parseRequirements(requirementsSection);
23
+ return {
24
+ name,
25
+ overview: purpose.trim(),
26
+ requirements,
27
+ metadata: {
28
+ version: '1.0.0',
29
+ format: 'prompter',
30
+ },
31
+ };
32
+ }
33
+ parseChange(name) {
34
+ const sections = this.parseSections();
35
+ const why = this.findSection(sections, 'Why')?.content || '';
36
+ const whatChanges = this.findSection(sections, 'What Changes')?.content || '';
37
+ if (!why) {
38
+ throw new Error('Change must have a Why section');
39
+ }
40
+ if (!whatChanges) {
41
+ throw new Error('Change must have a What Changes section');
42
+ }
43
+ const deltas = this.parseDeltas(whatChanges);
44
+ return {
45
+ name,
46
+ why: why.trim(),
47
+ whatChanges: whatChanges.trim(),
48
+ deltas,
49
+ metadata: {
50
+ version: '1.0.0',
51
+ format: 'prompter-change',
52
+ },
53
+ };
54
+ }
55
+ parseSections() {
56
+ const sections = [];
57
+ const stack = [];
58
+ for (let i = 0; i < this.lines.length; i++) {
59
+ const line = this.lines[i];
60
+ const headerMatch = line.match(/^(#{1,6})\s+(.+)$/);
61
+ if (headerMatch) {
62
+ const level = headerMatch[1].length;
63
+ const title = headerMatch[2].trim();
64
+ const content = this.getContentUntilNextHeader(i + 1, level);
65
+ const section = {
66
+ level,
67
+ title,
68
+ content,
69
+ children: [],
70
+ };
71
+ while (stack.length > 0 && stack[stack.length - 1].level >= level) {
72
+ stack.pop();
73
+ }
74
+ if (stack.length === 0) {
75
+ sections.push(section);
76
+ }
77
+ else {
78
+ stack[stack.length - 1].children.push(section);
79
+ }
80
+ stack.push(section);
81
+ }
82
+ }
83
+ return sections;
84
+ }
85
+ getContentUntilNextHeader(startLine, currentLevel) {
86
+ const contentLines = [];
87
+ for (let i = startLine; i < this.lines.length; i++) {
88
+ const line = this.lines[i];
89
+ const headerMatch = line.match(/^(#{1,6})\s+/);
90
+ if (headerMatch && headerMatch[1].length <= currentLevel) {
91
+ break;
92
+ }
93
+ contentLines.push(line);
94
+ }
95
+ return contentLines.join('\n').trim();
96
+ }
97
+ findSection(sections, title) {
98
+ for (const section of sections) {
99
+ if (section.title.toLowerCase() === title.toLowerCase()) {
100
+ return section;
101
+ }
102
+ const child = this.findSection(section.children, title);
103
+ if (child) {
104
+ return child;
105
+ }
106
+ }
107
+ return undefined;
108
+ }
109
+ parseRequirements(section) {
110
+ const requirements = [];
111
+ for (const child of section.children) {
112
+ // Extract requirement text from first non-empty content line, fall back to heading
113
+ let text = child.title;
114
+ // Get content before any child sections (scenarios)
115
+ if (child.content.trim()) {
116
+ // Split content into lines and find content before any child headers
117
+ const lines = child.content.split('\n');
118
+ const contentBeforeChildren = [];
119
+ for (const line of lines) {
120
+ // Stop at child headers (scenarios start with ####)
121
+ if (line.trim().startsWith('#')) {
122
+ break;
123
+ }
124
+ contentBeforeChildren.push(line);
125
+ }
126
+ // Find first non-empty line
127
+ const directContent = contentBeforeChildren.join('\n').trim();
128
+ if (directContent) {
129
+ const firstLine = directContent.split('\n').find(l => l.trim());
130
+ if (firstLine) {
131
+ text = firstLine.trim();
132
+ }
133
+ }
134
+ }
135
+ const scenarios = this.parseScenarios(child);
136
+ requirements.push({
137
+ text,
138
+ scenarios,
139
+ });
140
+ }
141
+ return requirements;
142
+ }
143
+ parseScenarios(requirementSection) {
144
+ const scenarios = [];
145
+ for (const scenarioSection of requirementSection.children) {
146
+ // Store the raw text content of the scenario section
147
+ if (scenarioSection.content.trim()) {
148
+ scenarios.push({
149
+ rawText: scenarioSection.content
150
+ });
151
+ }
152
+ }
153
+ return scenarios;
154
+ }
155
+ parseDeltas(content) {
156
+ const deltas = [];
157
+ const lines = content.split('\n');
158
+ for (const line of lines) {
159
+ // Match both formats: **spec:** and **spec**:
160
+ const deltaMatch = line.match(/^\s*-\s*\*\*([^*:]+)(?::\*\*|\*\*:)\s*(.+)$/);
161
+ if (deltaMatch) {
162
+ const specName = deltaMatch[1].trim();
163
+ const description = deltaMatch[2].trim();
164
+ let operation = 'MODIFIED';
165
+ const lowerDesc = description.toLowerCase();
166
+ // Use word boundaries to avoid false matches (e.g., "address" matching "add")
167
+ // Check RENAMED first since it's more specific than patterns containing "new"
168
+ if (/\brename(s|d|ing)?\b/.test(lowerDesc) || /\brenamed\s+(to|from)\b/.test(lowerDesc)) {
169
+ operation = 'RENAMED';
170
+ }
171
+ else if (/\badd(s|ed|ing)?\b/.test(lowerDesc) || /\bcreate(s|d|ing)?\b/.test(lowerDesc) || /\bnew\b/.test(lowerDesc)) {
172
+ operation = 'ADDED';
173
+ }
174
+ else if (/\bremove(s|d|ing)?\b/.test(lowerDesc) || /\bdelete(s|d|ing)?\b/.test(lowerDesc)) {
175
+ operation = 'REMOVED';
176
+ }
177
+ deltas.push({
178
+ spec: specName,
179
+ operation,
180
+ description,
181
+ });
182
+ }
183
+ }
184
+ return deltas;
185
+ }
186
+ }
187
+ //# sourceMappingURL=markdown-parser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markdown-parser.js","sourceRoot":"","sources":["../../../src/core/parsers/markdown-parser.ts"],"names":[],"mappings":"AASA,MAAM,OAAO,cAAc;IACjB,KAAK,CAAW;IAChB,WAAW,CAAS;IAE5B,YAAY,OAAe;QACzB,MAAM,UAAU,GAAG,cAAc,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;QAC5D,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACpC,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC;IACvB,CAAC;IAES,MAAM,CAAC,gBAAgB,CAAC,OAAe;QAC/C,OAAO,OAAO,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IACzC,CAAC;IAED,SAAS,CAAC,IAAY;QACpB,MAAM,QAAQ,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC;QACtC,MAAM,OAAO,GAAG,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,SAAS,CAAC,EAAE,OAAO,IAAI,EAAE,CAAC;QAErE,MAAM,mBAAmB,GAAG,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;QAEvE,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;QACtD,CAAC;QAED,IAAI,CAAC,mBAAmB,EAAE,CAAC;YACzB,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;QAC3D,CAAC;QAED,MAAM,YAAY,GAAG,IAAI,CAAC,iBAAiB,CAAC,mBAAmB,CAAC,CAAC;QAEjE,OAAO;YACL,IAAI;YACJ,QAAQ,EAAE,OAAO,CAAC,IAAI,EAAE;YACxB,YAAY;YACZ,Q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U,EAAE,CAAC;gBACf,MAAM,QAAQ,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;gBACtC,MAAM,WAAW,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;gBAEzC,IAAI,SAAS,GAAmB,UAAU,CAAC;gBAC3C,MAAM,SAAS,GAAG,WAAW,CAAC,WAAW,EAAE,CAAC;gBAE5C,8EAA8E;gBAC9E,8EAA8E;gBAC9E,IAAI,sBAAsB,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,yBAAyB,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;oBACxF,SAAS,GAAG,SAAS,CAAC;gBACxB,CAAC;qBAAM,IAAI,oBAAoB,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,sBAAsB,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;oBACvH,SAAS,GAAG,OAAO,CAAC;gBACtB,CAAC;qBAAM,IAAI,sBAAsB,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,sBAAsB,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;oBAC5F,SAAS,GAAG,SAAS,CAAC;gBACxB,CAAC;gBAED,MAAM,CAAC,IAAI,CAAC;oBACV,IAAI,EAAE,QAAQ;oBACd,SAAS;oBACT,WAAW;iBACZ,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;CACF"}
@@ -0,0 +1,37 @@
1
+ export interface RequirementBlock {
2
+ headerLine: string;
3
+ name: string;
4
+ raw: string;
5
+ }
6
+ export interface RequirementsSectionParts {
7
+ before: string;
8
+ headerLine: string;
9
+ preamble: string;
10
+ bodyBlocks: RequirementBlock[];
11
+ after: string;
12
+ }
13
+ export declare function normalizeRequirementName(name: string): string;
14
+ /**
15
+ * Extracts the Requirements section from a spec file and parses requirement blocks.
16
+ */
17
+ export declare function extractRequirementsSection(content: string): RequirementsSectionParts;
18
+ export interface DeltaPlan {
19
+ added: RequirementBlock[];
20
+ modified: RequirementBlock[];
21
+ removed: string[];
22
+ renamed: Array<{
23
+ from: string;
24
+ to: string;
25
+ }>;
26
+ sectionPresence: {
27
+ added: boolean;
28
+ modified: boolean;
29
+ removed: boolean;
30
+ renamed: boolean;
31
+ };
32
+ }
33
+ /**
34
+ * Parse a delta-formatted spec change file content into a DeltaPlan with raw blocks.
35
+ */
36
+ export declare function parseDeltaSpec(content: string): DeltaPlan;
37
+ //# sourceMappingURL=requirement-blocks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"requirement-blocks.d.ts","sourceRoot":"","sources":["../../../src/core/parsers/requirement-blocks.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,gBAAgB,EAAE,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE7D;AAID;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,MAAM,GAAG,wBAAwB,CAyEpF;AAED,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,QAAQ,EAAE,gBAAgB,EAAE,CAAC;IAC7B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC7C,eAAe,EAAE;QACf,KAAK,EAAE,OAAO,CAAC;QACf,QAAQ,EAAE,OAAO,CAAC;QAClB,OAAO,EAAE,OAAO,CAAC;QACjB,OAAO,EAAE,OAAO,CAAC;KAClB,CAAC;CACH;AAMD;;GAEG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,CAuBzD"}
@@ -0,0 +1,201 @@
1
+ export function normalizeRequirementName(name) {
2
+ return name.trim();
3
+ }
4
+ const REQUIREMENT_HEADER_REGEX = /^###\s*Requirement:\s*(.+)\s*$/;
5
+ /**
6
+ * Extracts the Requirements section from a spec file and parses requirement blocks.
7
+ */
8
+ export function extractRequirementsSection(content) {
9
+ const normalized = normalizeLineEndings(content);
10
+ const lines = normalized.split('\n');
11
+ const reqHeaderIndex = lines.findIndex(l => /^##\s+Requirements\s*$/i.test(l));
12
+ if (reqHeaderIndex === -1) {
13
+ // No requirements section; create an empty one at the end
14
+ const before = content.trimEnd();
15
+ const headerLine = '## Requirements';
16
+ return {
17
+ before: before ? before + '\n\n' : '',
18
+ headerLine,
19
+ preamble: '',
20
+ bodyBlocks: [],
21
+ after: '\n',
22
+ };
23
+ }
24
+ // Find end of this section: next line that starts with '## ' at same or higher level
25
+ let endIndex = lines.length;
26
+ for (let i = reqHeaderIndex + 1; i < lines.length; i++) {
27
+ if (/^##\s+/.test(lines[i])) {
28
+ endIndex = i;
29
+ break;
30
+ }
31
+ }
32
+ const before = lines.slice(0, reqHeaderIndex).join('\n');
33
+ const headerLine = lines[reqHeaderIndex];
34
+ const sectionBodyLines = lines.slice(reqHeaderIndex + 1, endIndex);
35
+ // Parse requirement blocks within section body
36
+ const blocks = [];
37
+ let cursor = 0;
38
+ let preambleLines = [];
39
+ // Collect preamble lines until first requirement header
40
+ while (cursor < sectionBodyLines.length && !/^###\s+Requirement:/.test(sectionBodyLines[cursor])) {
41
+ preambleLines.push(sectionBodyLines[cursor]);
42
+ cursor++;
43
+ }
44
+ while (cursor < sectionBodyLines.length) {
45
+ const headerStart = cursor;
46
+ const headerLineCandidate = sectionBodyLines[cursor];
47
+ const headerMatch = headerLineCandidate.match(REQUIREMENT_HEADER_REGEX);
48
+ if (!headerMatch) {
49
+ // Not a requirement header; skip line defensively
50
+ cursor++;
51
+ continue;
52
+ }
53
+ const name = normalizeRequirementName(headerMatch[1]);
54
+ cursor++;
55
+ // Gather lines until next requirement header or end of section
56
+ const bodyLines = [headerLineCandidate];
57
+ while (cursor < sectionBodyLines.length && !/^###\s+Requirement:/.test(sectionBodyLines[cursor]) && !/^##\s+/.test(sectionBodyLines[cursor])) {
58
+ bodyLines.push(sectionBodyLines[cursor]);
59
+ cursor++;
60
+ }
61
+ const raw = bodyLines.join('\n').trimEnd();
62
+ blocks.push({ headerLine: headerLineCandidate, name, raw });
63
+ }
64
+ const after = lines.slice(endIndex).join('\n');
65
+ const preamble = preambleLines.join('\n').trimEnd();
66
+ return {
67
+ before: before.trimEnd() ? before + '\n' : before,
68
+ headerLine,
69
+ preamble,
70
+ bodyBlocks: blocks,
71
+ after: after.startsWith('\n') ? after : '\n' + after,
72
+ };
73
+ }
74
+ function normalizeLineEndings(content) {
75
+ return content.replace(/\r\n?/g, '\n');
76
+ }
77
+ /**
78
+ * Parse a delta-formatted spec change file content into a DeltaPlan with raw blocks.
79
+ */
80
+ export function parseDeltaSpec(content) {
81
+ const normalized = normalizeLineEndings(content);
82
+ const sections = splitTopLevelSections(normalized);
83
+ const addedLookup = getSectionCaseInsensitive(sections, 'ADDED Requirements');
84
+ const modifiedLookup = getSectionCaseInsensitive(sections, 'MODIFIED Requirements');
85
+ const removedLookup = getSectionCaseInsensitive(sections, 'REMOVED Requirements');
86
+ const renamedLookup = getSectionCaseInsensitive(sections, 'RENAMED Requirements');
87
+ const added = parseRequirementBlocksFromSection(addedLookup.body);
88
+ const modified = parseRequirementBlocksFromSection(modifiedLookup.body);
89
+ const removedNames = parseRemovedNames(removedLookup.body);
90
+ const renamedPairs = parseRenamedPairs(renamedLookup.body);
91
+ return {
92
+ added,
93
+ modified,
94
+ removed: removedNames,
95
+ renamed: renamedPairs,
96
+ sectionPresence: {
97
+ added: addedLookup.found,
98
+ modified: modifiedLookup.found,
99
+ removed: removedLookup.found,
100
+ renamed: renamedLookup.found,
101
+ },
102
+ };
103
+ }
104
+ function splitTopLevelSections(content) {
105
+ const lines = content.split('\n');
106
+ const result = {};
107
+ const indices = [];
108
+ for (let i = 0; i < lines.length; i++) {
109
+ const m = lines[i].match(/^(##)\s+(.+)$/);
110
+ if (m) {
111
+ const level = m[1].length; // only care for '##'
112
+ indices.push({ title: m[2].trim(), index: i, level });
113
+ }
114
+ }
115
+ for (let i = 0; i < indices.length; i++) {
116
+ const current = indices[i];
117
+ const next = indices[i + 1];
118
+ const body = lines.slice(current.index + 1, next ? next.index : lines.length).join('\n');
119
+ result[current.title] = body;
120
+ }
121
+ return result;
122
+ }
123
+ function getSectionCaseInsensitive(sections, desired) {
124
+ const target = desired.toLowerCase();
125
+ for (const [title, body] of Object.entries(sections)) {
126
+ if (title.toLowerCase() === target)
127
+ return { body, found: true };
128
+ }
129
+ return { body: '', found: false };
130
+ }
131
+ function parseRequirementBlocksFromSection(sectionBody) {
132
+ if (!sectionBody)
133
+ return [];
134
+ const lines = normalizeLineEndings(sectionBody).split('\n');
135
+ const blocks = [];
136
+ let i = 0;
137
+ while (i < lines.length) {
138
+ // Seek next requirement header
139
+ while (i < lines.length && !/^###\s+Requirement:/.test(lines[i]))
140
+ i++;
141
+ if (i >= lines.length)
142
+ break;
143
+ const headerLine = lines[i];
144
+ const m = headerLine.match(REQUIREMENT_HEADER_REGEX);
145
+ if (!m) {
146
+ i++;
147
+ continue;
148
+ }
149
+ const name = normalizeRequirementName(m[1]);
150
+ const buf = [headerLine];
151
+ i++;
152
+ while (i < lines.length && !/^###\s+Requirement:/.test(lines[i]) && !/^##\s+/.test(lines[i])) {
153
+ buf.push(lines[i]);
154
+ i++;
155
+ }
156
+ blocks.push({ headerLine, name, raw: buf.join('\n').trimEnd() });
157
+ }
158
+ return blocks;
159
+ }
160
+ function parseRemovedNames(sectionBody) {
161
+ if (!sectionBody)
162
+ return [];
163
+ const names = [];
164
+ const lines = normalizeLineEndings(sectionBody).split('\n');
165
+ for (const line of lines) {
166
+ const m = line.match(REQUIREMENT_HEADER_REGEX);
167
+ if (m) {
168
+ names.push(normalizeRequirementName(m[1]));
169
+ continue;
170
+ }
171
+ // Also support bullet list of headers
172
+ const bullet = line.match(/^\s*-\s*`?###\s*Requirement:\s*(.+?)`?\s*$/);
173
+ if (bullet) {
174
+ names.push(normalizeRequirementName(bullet[1]));
175
+ }
176
+ }
177
+ return names;
178
+ }
179
+ function parseRenamedPairs(sectionBody) {
180
+ if (!sectionBody)
181
+ return [];
182
+ const pairs = [];
183
+ const lines = normalizeLineEndings(sectionBody).split('\n');
184
+ let current = {};
185
+ for (const line of lines) {
186
+ const fromMatch = line.match(/^\s*-?\s*FROM:\s*`?###\s*Requirement:\s*(.+?)`?\s*$/);
187
+ const toMatch = line.match(/^\s*-?\s*TO:\s*`?###\s*Requirement:\s*(.+?)`?\s*$/);
188
+ if (fromMatch) {
189
+ current.from = normalizeRequirementName(fromMatch[1]);
190
+ }
191
+ else if (toMatch) {
192
+ current.to = normalizeRequirementName(toMatch[1]);
193
+ if (current.from && current.to) {
194
+ pairs.push({ from: current.from, to: current.to });
195
+ current = {};
196
+ }
197
+ }
198
+ }
199
+ return pairs;
200
+ }
201
+ //# sourceMappingURL=requirement-blocks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"requirement-blocks.js","sourceRoot":"","sources":["../../../src/core/parsers/requirement-blocks.ts"],"names":[],"mappings":"AAcA,MAAM,UAAU,wBAAwB,CAAC,IAAY;IACnD,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;AACrB,CAAC;AAED,MAAM,wBAAwB,GAAG,gCAAgC,CAAC;AAElE;;GAEG;AACH,MAAM,UAAU,0BAA0B,CAAC,OAAe;IACxD,MAAM,UAAU,GAAG,oBAAoB,CAAC,OAAO,CAAC,CAAC;IACjD,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;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -16,5 +16,8 @@ export declare const FSD_GENERATOR_TEMPLATE = "# Functional Specification Docume
16
16
  export declare const TDD_GENERATOR_TEMPLATE = "# Technical Design Document (TDD) Generator Prompt\n\n# Role & Expertise\nYou are a Senior Solutions Architect with 15+ years of experience in enterprise software design, system architecture, and technical documentation. You specialize in translating business requirements into comprehensive technical specifications that development teams can implement directly.\n\n# Context\nYou will receive a Functional Specification Document (FSD) as the primary input, along with supporting artifacts including Entity Relationship Diagrams (ERD), API Contracts, and UI/UX Wireframes. Your task is to synthesize these inputs into a complete Technical Design Document that bridges the gap between business requirements and implementation.\n\n# Primary Objective\nGenerate a comprehensive Technical Design Document (TDD) that provides development teams with all technical specifications, architectural decisions, component designs, and implementation guidance needed to build the system described in the FSD.\n\n# Input Artifacts\n1. **Functional Specification Document (FSD)** - Primary reference for business requirements, user stories, and functional flows\n2. **Entity Relationship Diagram (ERD)** - Database schema, relationships, and data model\n3. **API Contract** - Endpoint specifications, request/response schemas, authentication requirements\n4. **UI/UX Wireframes** - Interface designs, user flows, and interaction patterns\n\n# Processing Approach\n\n## Phase 1: Analysis & Extraction\n1. Parse the FSD to identify:\n - Core functional requirements\n - Business rules and constraints\n - User roles and permissions\n - Integration points\n - Non-functional requirements (performance, security, scalability)\n\n2. Analyze the ERD to understand:\n - Entity definitions and attributes\n - Relationship cardinalities\n - Data integrity constraints\n - Indexing requirements\n\n3. Review API Contract for:\n - Endpoint inventory\n - Data transformation requirements\n - Authentication/authorization flows\n - Error handling patterns\n\n4. Examine Wireframes to determine:\n - Component hierarchy\n - State management needs\n - Client-side validation rules\n - User interaction patterns\n\n## Phase 2: Architecture Design\n1. Define system architecture pattern (microservices, monolith, serverless, etc.)\n2. Identify component boundaries and responsibilities\n3. Design data flow and integration patterns\n4. Establish security architecture\n5. Plan scalability and performance strategies\n\n## Phase 3: Document Generation\nSynthesize all analysis into structured TDD sections\n\n# Output Format\n\nGenerate the TDD with the following exact structure:\n\n---\n\n# Technical Design Document\n**Project:** [Extracted from FSD] \n**Version:** 1.0 \n**Date:** [Current Date] \n**Author:** [Solutions Architect] \n**Status:** Draft\n\n---\n\n## 1. Executive Summary\n- Brief overview of the system (2-3 paragraphs)\n- Key technical decisions summary\n- Technology stack overview\n\n## 2. System Architecture\n\n### 2.1 Architecture Overview\n- High-level architecture diagram description\n- Architecture pattern justification\n- Key architectural principles applied\n\n### 2.2 Component Architecture\n| Component | Responsibility | Technology | Dependencies |\n|-----------|---------------|------------|--------------|\n| [Name] | [Description] | [Tech] | [Dependencies] |\n\n### 2.3 Deployment Architecture\n- Environment specifications (Dev, Staging, Production)\n- Infrastructure requirements\n- Containerization/orchestration approach\n\n## 3. Data Architecture\n\n### 3.1 Data Model\n- Entity descriptions with business context\n- Attribute specifications table:\n\n| Entity | Attribute | Type | Constraints | Description |\n|--------|-----------|------|-------------|-------------|\n| [Entity] | [Attr] | [Type] | [Constraints] | [Desc] |\n\n### 3.2 Database Design\n- Database technology selection and justification\n- Schema design decisions\n- Indexing strategy\n- Partitioning/sharding approach (if applicable)\n\n### 3.3 Data Flow\n- Data lifecycle management\n- ETL/data pipeline requirements\n- Caching strategy\n\n## 4. API Design\n\n### 4.1 API Architecture\n- API style (REST, GraphQL, gRPC)\n- Versioning strategy\n- Rate limiting approach\n\n### 4.2 Endpoint Specifications\nFor each endpoint:\n\n**[HTTP Method] [Endpoint Path]**\n- **Purpose:** [Description]\n- **Authentication:** [Required/Optional, Type]\n- **Request:**\n ```json\n [Request schema]\n ```\n- **Response:**\n ```json\n [Response schema]\n ```\n- **Error Codes:** [List with descriptions]\n- **Business Rules:** [Validation and processing rules]\n\n### 4.3 Authentication & Authorization\n- Authentication mechanism\n- Token management\n- Permission model mapping\n\n## 5. Component Design\n\n### 5.1 Backend Services\nFor each service/module:\n\n**[Service Name]**\n- **Responsibility:** [Description]\n- **Interfaces:** [Input/Output]\n- **Dependencies:** [Internal/External]\n- **Key Classes/Functions:**\n - [Class/Function]: [Purpose]\n- **Design Patterns Applied:** [Patterns]\n\n### 5.2 Frontend Architecture\n- Framework and state management approach\n- Component hierarchy\n- Routing structure\n- Key components mapping to wireframes\n\n| Wireframe Screen | Component(s) | State Requirements | API Calls |\n|------------------|--------------|-------------------|-----------|\n| [Screen] | [Components] | [State] | [APIs] |\n\n### 5.3 Integration Layer\n- External system integrations\n- Message queue design (if applicable)\n- Event-driven components\n\n## 6. Security Design\n\n### 6.1 Security Architecture\n- Security layers overview\n- Threat model summary\n\n### 6.2 Security Controls\n| Control Area | Implementation | Standard/Compliance |\n|--------------|----------------|---------------------|\n| [Area] | [How] | [Standard] |\n\n### 6.3 Data Protection\n- Encryption at rest\n- Encryption in transit\n- PII handling\n- Data masking requirements\n\n## 7. Performance & Scalability\n\n### 7.1 Performance Requirements\n| Metric | Target | Measurement Method |\n|--------|--------|-------------------|\n| [Metric] | [Value] | [How] |\n\n### 7.2 Scalability Design\n- Horizontal scaling approach\n- Load balancing strategy\n- Database scaling plan\n\n### 7.3 Caching Strategy\n- Cache layers\n- Cache invalidation approach\n- Cache key design\n\n## 8. Error Handling & Logging\n\n### 8.1 Error Handling Strategy\n- Error classification\n- Error response format\n- Retry mechanisms\n\n### 8.2 Logging & Monitoring\n- Log levels and standards\n- Structured logging format\n- Monitoring and alerting requirements\n\n## 9. Development Guidelines\n\n### 9.1 Coding Standards\n- Language-specific guidelines\n- Code review requirements\n- Documentation standards\n\n### 9.2 Testing Strategy\n| Test Type | Scope | Coverage Target | Tools |\n|-----------|-------|-----------------|-------|\n| [Type] | [Scope] | [%] | [Tools] |\n\n### 9.3 CI/CD Pipeline\n- Build process\n- Deployment stages\n- Quality gates\n\n## 10. Technical Risks & Mitigations\n\n| Risk | Impact | Probability | Mitigation |\n|------|--------|-------------|------------|\n| [Risk] | High/Med/Low | High/Med/Low | [Strategy] |\n\n## 11. Dependencies & Assumptions\n\n### 11.1 Technical Dependencies\n- Third-party services\n- Libraries and frameworks\n- Infrastructure requirements\n\n### 11.2 Assumptions\n- [List of technical assumptions made]\n\n## 12. Appendices\n\n### Appendix A: Technology Stack\n| Layer | Technology | Version | Justification |\n|-------|------------|---------|---------------|\n| [Layer] | [Tech] | [Ver] | [Why] |\n\n### Appendix B: Glossary\n| Term | Definition |\n|------|------------|\n| [Term] | [Definition] |\n\n### Appendix C: Reference Documents\n- FSD Document Reference\n- ERD Diagram Reference\n- API Contract Reference\n- Wireframe Reference\n\n---\n\n# Quality Standards\n\n1. **Traceability:** Every technical decision must trace back to a functional requirement in the FSD\n2. **Completeness:** All entities from ERD must be addressed; all API endpoints must be detailed\n3. **Consistency:** Naming conventions and patterns must be uniform throughout\n4. **Implementability:** Specifications must be detailed enough for developers to implement without ambiguity\n5. **Maintainability:** Design must consider future extensibility and modification\n\n# Special Instructions\n\n1. **Gap Identification:** If input artifacts have inconsistencies or gaps, document them in a \"Clarification Required\" section\n2. **Technology Inference:** If technology stack isn't specified, recommend appropriate technologies with justification\n3. **Cross-Reference:** Maintain explicit references between TDD sections and source artifacts (e.g., \"Per FSD Section 3.2...\", \"As defined in ERD Entity: User...\")\n4. **Diagrams:** Where visual representation would aid understanding, describe diagrams in detail using text-based formats (ASCII, Mermaid notation)\n5. **Assumptions:** Clearly state all technical assumptions when source documents are ambiguous\n\n# Verification Checklist\nBefore finalizing, verify:\n- [ ] All FSD functional requirements have corresponding technical specifications\n- [ ] All ERD entities are reflected in the data architecture\n- [ ] All API endpoints are fully specified with request/response schemas\n- [ ] All wireframe screens have frontend component mappings\n- [ ] Security considerations address authentication, authorization, and data protection\n- [ ] Non-functional requirements (performance, scalability) are addressed\n- [ ] Technical risks are identified with mitigation strategies\n";
17
17
  export declare const TDD_LITE_GENERATOR_TEMPLATE = "# Role & Expertise\nYou are a Senior Technical Architect with 15+ years of experience in enterprise software design, system architecture, and technical documentation. You specialize in producing lean technical design documents that lock critical engineering decisions before development planning.\n\n# Context\nYou will receive a Functional Specification Document (FSD) as the primary input, potentially supplemented by an Entity Relationship Diagram (ERD), API Contract (draft), and UI/UX Wireframes.\n\nYour task is to synthesize these inputs into a **TDD-Lite** that captures only the technical decisions that affect more than one epic or workflow.\n\n# Primary Objective\nGenerate a **TDD-Lite (Lean Technical Design Document)** that locks:\n\n- High-level architecture\n- Module boundaries\n- Workflow implementation strategy\n- Data mutation and consistency rules\n- Background jobs and async rules\n- Caching rules\n- Security and RBAC enforcement points\n- Integration points\n- Technical constraints and invariants\n\nDo NOT generate a full technical specification.\n\n---\n\n# Input Documents (Source of Truth)\n\n1) Functional Specification Document (FSD) \u2014 PRIMARY \n2) Entity Relationship Diagram (ERD) \u2014 if provided \n3) API Contract (draft) \u2014 if provided \n4) UI/UX Wireframes \u2014 optional \n5) Tech stack assumptions \u2014 optional \n\n---\n\n# HARD CONSTRAINTS (MUST FOLLOW)\n\n- Do NOT restate PRD, FSD, ERD, API Contract, or Wireframes.\n- Do NOT design UI or list screens.\n- Do NOT list all endpoints or payload schemas.\n- Do NOT define SLAs, performance targets, or observability stacks.\n- Do NOT include implementation phases, timelines, or sprint plans.\n- Do NOT include migration strategies or data retention policies.\n- Do NOT include non-functional requirement tables.\n- Do NOT invent features or workflows not present in FSD.\n\nOnly include decisions that affect **more than one epic or workflow**.\n\n---\n\n# Processing Approach\n\n## Phase 1: Extraction\n- Identify all major workflows from the FSD.\n- Identify all cross-cutting technical concerns (auth, approvals, ledgering, async, caching, integrations).\n- Identify all shared data mutation patterns.\n\n## Phase 2: Synthesis\n- Derive module boundaries.\n- Derive service responsibilities.\n- Derive transaction and consistency rules.\n- Derive async and event usage.\n- Derive caching and security rules.\n\n## Phase 3: Decision Locking\n- Convert the above into explicit technical rules and constraints.\n- Mark assumptions where inputs are missing.\n\n---\n\n# Output Format (STRICT \u2014 FOLLOW EXACTLY)\n\n# Technical Design Document (TDD-Lite)\nProject: {{project_name}} \nVersion: 0.1 \nDate: {{current_date}}\n\n---\n\n## 1. Architecture Overview\n\n- Frontend: {{framework or N/A}}\n- Backend: {{framework}}\n- Database: {{db}}\n- Cache / Queue: {{redis_or_none}}\n- Storage: {{s3_or_none}}\n- External services: {{if any}}\n\nHigh-level architecture:\n- Bullet list describing component interactions\n- Include a simple Mermaid flowchart\n\n---\n\n## 2. Core Modules & Boundaries\n\nFor each module derived from FSD:\n\n- Module name \n- Responsibility \n- What it owns (tables, workflows, jobs) \n- What it must NOT touch \n\n---\n\n## 3. Workflow Implementation Notes\n\nFor each major workflow from FSD:\n\n- Workflow name \n- Service/class responsible \n- Public methods (create, submit, approve, reject, etc.) \n- State transitions \n- Side effects (ledger writes, balance updates, events) \n- Transaction boundaries \n\n---\n\n## 4. Data Access Rules (from ERD or inferred)\n\nDefine:\n\n- Which tables are append-only \n- Which tables are snapshots \n- Locking rules (SELECT FOR UPDATE, optimistic lock, etc.) \n- Soft delete rules \n- Referential integrity rules \n\nIf ERD is missing, infer and mark as **Inferred**.\n\n---\n\n## 5. Background Jobs & Async Processing\n\nIf any:\n\n- Job name \n- When it runs \n- What it does \n- Idempotency rules \n- Retry rules \n\n---\n\n## 6. Caching Rules\n\nDefine:\n\n- What is cached \n- What must NEVER be cached \n- TTL rules \n- Cache busting rules \n\n---\n\n## 7. Security & RBAC Notes\n\nDefine:\n\n- Role model \n- Permission enforcement point (backend source of truth) \n- Workflow-specific role rules (e.g., approval requires Manager)\n\n---\n\n## 8. Integration Points\n\nIf any:\n\n- External system name \n- Direction (inbound/outbound) \n- Failure handling rule \n\n---\n\n## 9. Technical Constraints & Invariants\n\nList rules that must never be violated, e.g.:\n\n- Ledger tables are append-only \n- Approval actions are idempotent \n- Stock balance must always equal sum of ledger \n- Status transitions are one-way \n\n---\n\n## 10. Open Questions & Assumptions\n\nList:\n\n- Gaps in FSD / ERD / API \n- Conflicts between documents \n- Assumptions made to complete this TDD-Lite \n\n---\n\n# Style & Quality Rules\n\n- Use concise, technical language.\n- Use bullet points, not paragraphs.\n- No fluff, no marketing tone.\n- No repetition of PRD/FSD text.\n- Every section must contain concrete decisions.\n- If information is missing, state an explicit assumption.\n- Never invent new features or workflows.\n\n---\n\n# Self-Verification Checklist\n\nBefore finalizing, verify:\n\n- [ ] Every major workflow from FSD appears in Section 3 \n- [ ] Cross-module decisions appear in Sections 2\u20139 \n- [ ] Async or integrations appear in Sections 5 or 8 \n- [ ] Security rules appear in Section 7 \n- [ ] Data consistency rules appear in Section 4 \n- [ ] Constraints appear in Section 9 \n- [ ] Open questions capture real ambiguities \n- [ ] No UI, API, or SLA specs are included \n\n---\n\nNow generate the TDD-Lite using the provided input documents.\n";
18
18
  export declare const WIREFRAME_GENERATOR_TEMPLATE = "# UI/UX Wireframe Generation Prompt\n\n# Role & Expertise\nYou are a Senior UI/UX Designer and Product Designer with 15+ years of experience creating wireframes for enterprise applications, SaaS platforms, and complex data-driven systems. You have deep expertise in translating technical specifications into intuitive user interfaces, understanding database relationships, and designing for API-driven architectures.\n\n# Context\nYou will be provided with technical documentation that defines a product's requirements, data structure, and system capabilities. Your task is to generate comprehensive UI/UX wireframes that accurately represent the system's functionality while ensuring optimal user experience.\n\n# Input Documents You Will Receive\n1. **Functional Specification Document (FSD)** - Defines features, user stories, business logic\n2. **Entity Relationship Diagram (ERD)** - Shows data models, relationships, cardinality\n3. **Product Requirements Document (PRD)** - Outlines product goals, user personas, success metrics\n4. **API Contract** - Specifies endpoints, request/response structures, available data\n\n# Primary Objective\nGenerate detailed, annotated wireframes that:\n- Accurately represent all specified functionality\n- Reflect the underlying data model and relationships\n- Support all API operations (CRUD, filters, pagination, etc.)\n- Align with user personas and product goals\n- Follow UX best practices and accessibility standards\n\n# Systematic Process\n\n## Phase 1: Document Analysis\n1. **FSD Analysis**\n - Extract all user stories and acceptance criteria\n - Identify primary user flows and edge cases\n - Map business rules that affect UI behavior\n - Note validation requirements and error states\n\n2. **ERD Analysis**\n - Identify all entities that require UI representation\n - Map relationships (1:1, 1:N, M:N) to UI patterns\n - Determine required form fields from entity attributes\n - Identify lookup/reference data for dropdowns/selectors\n\n3. **PRD Analysis**\n - Extract user personas and their primary goals\n - Identify key user journeys and success metrics\n - Note priority features vs. nice-to-haves\n - Understand product positioning and tone\n\n4. **API Contract Analysis**\n - Map endpoints to screens/components needed\n - Identify filterable/sortable fields for list views\n - Determine pagination approach from API structure\n - Note response data available for display\n - Identify required vs. optional fields from request schemas\n\n## Phase 2: Information Architecture\n1. Create sitemap/navigation structure\n2. Define screen inventory\n3. Map user flows between screens\n4. Identify shared components\n\n## Phase 3: Wireframe Generation\nFor each screen, produce:\n- Low-fidelity wireframe layout\n- Component specifications\n- Interaction annotations\n- State variations (empty, loading, error, success)\n- Responsive behavior notes\n\n# Output Format\n\n## For Each Screen/View, Provide:\n\n### [Screen Name]\n\n**Purpose:** [What this screen accomplishes]\n\n**User Story Reference:** [Link to relevant FSD user story]\n\n**API Dependencies:**\n- `GET /endpoint` - [What it provides]\n- `POST /endpoint` - [What it submits]\n\n**Wireframe Description:**\n\n```\n\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 [Header/Navigation] \u2502\n\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 \u2502\n\u2502 [Main Content Area - describe layout] \u2502\n\u2502 \u2502\n\u2502 \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u2502\n\u2502 \u2502 Component \u2502 \u2502 Component \u2502 \u2502 Component \u2502 \u2502\n\u2502 \u2502 Description\u2502 \u2502 Description\u2502 \u2502 Description\u2502 \u2502\n\u2502 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2502\n\u2502 \u2502\n\u2502 [Secondary Content / Sidebar if applicable] \u2502\n\u2502 \u2502\n\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 [Footer/Actions] \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n**Component Specifications:**\n\n| Component | Type | Data Source (ERD/API) | Behavior |\n|-----------|------|----------------------|----------|\n| [Name] | [Type] | [Field/Endpoint] | [Interaction] |\n\n**Form Fields (if applicable):**\n\n| Field | Type | Validation | ERD Attribute | API Field |\n|-------|------|------------|---------------|-----------|\n| [Name] | [Input type] | [Rules] | [Entity.attribute] | [request.field] |\n\n**States:**\n- **Empty State:** [Description + messaging]\n- **Loading State:** [Skeleton/spinner approach]\n- **Error State:** [Error display pattern]\n- **Success State:** [Confirmation pattern]\n\n**Annotations:**\n1. [Interaction note with numbered reference]\n2. [Accessibility consideration]\n3. [Edge case handling]\n\n**Responsive Behavior:**\n- Desktop (1200px+): [Layout]\n- Tablet (768-1199px): [Adjustments]\n- Mobile (<768px): [Mobile-specific layout]\n\n---\n\n## Complete Deliverables Structure\n\n### 1. Executive Summary\n- Product overview\n- Key user personas summary\n- Primary user journeys identified\n- Screen count and complexity assessment\n\n### 2. Information Architecture\n- Sitemap diagram (ASCII or described)\n- Navigation structure\n- User flow diagrams\n\n### 3. Screen Inventory\n| Screen | Priority | Complexity | Related Entities | Key APIs |\n|--------|----------|------------|------------------|----------|\n\n### 4. Wireframes (per screen using format above)\n\n### 5. Component Library\n- Reusable components identified\n- Pattern specifications\n- Usage guidelines\n\n### 6. Interaction Patterns\n- Navigation patterns\n- Form submission flows\n- Error handling patterns\n- Loading state patterns\n\n### 7. Data Display Patterns\n- List/table views (based on ERD collections)\n- Detail views (based on ERD entities)\n- Relationship displays (based on ERD cardinality)\n\n### 8. Traceability Matrix\n| User Story (FSD) | Screen | ERD Entities | API Endpoints |\n|------------------|--------|--------------|---------------|\n\n# Quality Standards\n\n- [ ] Every FSD user story has corresponding UI representation\n- [ ] All ERD entities with user-facing data have display screens\n- [ ] All API endpoints are utilized in appropriate screens\n- [ ] PRD user personas can complete their primary journeys\n- [ ] Forms include all required fields from API contracts\n- [ ] Validation rules from FSD/API are reflected in form specs\n- [ ] Relationships from ERD are navigable in the UI\n- [ ] Empty, loading, and error states defined for all data-dependent views\n- [ ] Responsive behavior specified for all screens\n- [ ] Accessibility considerations noted\n\n# Special Instructions\n\n1. **Data Relationship Handling:**\n - 1:1 relationships \u2192 Inline display or expandable sections\n - 1:N relationships \u2192 List/table with detail view\n - M:N relationships \u2192 Multi-select interfaces or tagging\n\n2. **API-Driven Patterns:**\n - Pagination \u2192 Match API pagination style (offset/cursor)\n - Filtering \u2192 Create filter UI for all filterable API params\n - Sorting \u2192 Enable sort for all sortable API fields\n - Search \u2192 Include if API supports search endpoints\n\n3. **Form Generation Logic:**\n - Required API fields \u2192 Required form fields with validation\n - Optional API fields \u2192 Optional with clear labeling\n - Enum fields \u2192 Dropdown/radio based on option count\n - Reference fields (FK) \u2192 Searchable dropdown with API lookup\n\n4. **Error Handling:**\n - Map API error responses to user-friendly messages\n - Include inline validation before submission\n - Provide recovery paths for all error states\n\n5. **Maintain Traceability:**\n - Reference specific FSD section numbers\n - Note ERD entity names in component specs\n - Include API endpoint paths in screen documentation\n\n---\n\n# Begin Analysis\n\nFirst, I will analyze each provided document systematically, then generate the complete wireframe documentation following this structure.\n\n**Please provide:**\n1. Functional Specification Document (FSD)\n2. Entity Relationship Diagram (ERD)\n3. Product Requirements Document (PRD)\n4. API Contract/Specification\n";
19
+ export declare const APPLY_TEMPLATE = "<!-- PROMPTER:START -->\n**Guardrails**\n- Favor straightforward, minimal implementations first and add complexity only when it is requested or clearly required.\n- Keep changes tightly scoped to the requested outcome.\n- Refer to `prompter/AGENTS.md` (located inside the `prompter/` directory\u2014run `ls prompter` if you don't see it) if you need additional Prompter conventions or clarifications.\n\n**Steps**\nTrack these steps as TODOs and complete them one by one.\n1. Read `changes/<id>/proposal.md`, `design.md` (if present), and `tasks.md` to confirm scope and acceptance criteria.\n2. Work through tasks sequentially, keeping edits minimal and focused on the requested change.\n3. Confirm completion before updating statuses\u2014make sure every item in `tasks.md` is finished.\n4. Update the checklist after all work is done so each task is marked `- [x]` and reflects reality.\n5. Reference `prompter list` or `prompter show <item>` when additional context is required.\n\n**Reference**\n- Use `prompter show <id> --json --deltas-only` if you need additional context from the proposal while implementing.\n<!-- PROMPTER:END -->\n";
20
+ export declare const PROPOSAL_TEMPLATE = "<!-- PROMPTER:START -->\n**Guardrails**\n- Favor straightforward, minimal implementations first and add complexity only when it is requested or clearly required.\n- Keep changes tightly scoped to the requested outcome.\n- Refer to `prompter/AGENTS.md` (located inside the `prompter/` directory\u2014run `ls prompter` if you don't see it) if you need additional Prompter conventions or clarifications.\n- Identify any vague or ambiguous details and ask the necessary follow-up questions before editing files.\n- Do not write any code during the proposal stage. Only create design documents (proposal.md, tasks.md, design.md, and spec deltas). Implementation happens in the apply stage after approval.\n\n**Steps**\n1. Review `prompter/project.md`, run `prompter list` and `prompter list --specs`, and inspect related code or docs (e.g., via `rg`/`ls`) to ground the proposal in current behaviour; note any gaps that require clarification.\n2. Choose a unique verb-led `change-id` and scaffold `proposal.md`, `tasks.md`, and `design.md` (when needed) under `prompter/changes/<id>/`.\n3. Map the change into concrete capabilities or requirements, breaking multi-scope efforts into distinct spec deltas with clear relationships and sequencing.\n4. Capture architectural reasoning in `design.md` when the solution spans multiple systems, introduces new patterns, or demands trade-off discussion before committing to specs.\n5. Draft spec deltas in `changes/<id>/specs/<capability>/spec.md` (one folder per capability) using `## ADDED|MODIFIED|REMOVED Requirements` with at least one `#### Scenario:` per requirement and cross-reference related capabilities when relevant.\n6. Draft `tasks.md` as an ordered list of small, verifiable work items that deliver user-visible progress, include validation (tests, tooling), and highlight dependencies or parallelizable work.\n7. Validate with `prompter validate <id> --strict` and resolve every issue before sharing the proposal.\n\n**Reference**\n- Use `prompter show <id> --json --deltas-only` or `prompter show <spec> --type spec` to inspect details when validation fails.\n- Search existing requirements with `rg -n \"Requirement:|Scenario:\" prompter/specs` before writing new ones.\n- Explore the codebase with `rg <keyword>`, `ls`, or direct file reads so proposals align with current implementation realities.\n<!-- PROMPTER:END -->\n";
21
+ export declare const ARCHIVE_TEMPLATE = "<!-- PROMPTER:START -->\n**Guardrails**\n- Favor straightforward, minimal implementations first and add complexity only when it is requested or clearly required.\n- Keep changes tightly scoped to the requested outcome.\n- Refer to `prompter/AGENTS.md` (located inside the `prompter/` directory\u2014run `ls prompter` if you don't see it) if you need additional Prompter conventions or clarifications.\n\n**Steps**\n1. Determine the change ID to archive:\n - If this prompt already includes a specific change ID (for example inside a `<ChangeId>` block populated by slash-command arguments), use that value after trimming whitespace.\n - If the conversation references a change loosely (for example by title or summary), run `prompter list` to surface likely IDs, share the relevant candidates, and confirm which one the user intends.\n - Otherwise, review the conversation, run `prompter list`, and ask the user which change to archive; wait for a confirmed change ID before proceeding.\n - If you still cannot identify a single change ID, stop and tell the user you cannot archive anything yet.\n2. Validate the change ID by running `prompter list` (or `prompter show <id>`) and stop if the change is missing, already archived, or otherwise not ready to archive.\n3. Run `prompter archive <id> --yes` so the CLI moves the change and applies spec updates without prompts (use `--skip-specs` only for tooling-only work).\n4. Review the command output to confirm the target specs were updated and the change landed in `changes/archive/`.\n5. Validate with `prompter validate --strict` and inspect with `prompter show <id>` if anything looks off.\n\n**Reference**\n- Use `prompter list` to confirm change IDs before archiving.\n- Inspect refreshed specs with `prompter list --specs` and address any validation issues before handing off.\n<!-- PROMPTER:END -->\n";
19
22
  export declare const PROMPT_TEMPLATES: Record<string, string>;
20
23
  //# sourceMappingURL=prompt-templates.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"prompt-templates.d.ts","sourceRoot":"","sources":["../../src/core/prompt-templates.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,qBAAqB,29FA6CjC,CAAC;AACF,eAAO,MAAM,sBAAsB,gpLAkNlC,CAAC;AACF,eAAO,MAAM,2BAA2B,gpIAqJvC,CAAC;AAEF,eAAO,MAAM,oBAAoB,kjCA+ChC,CAAC;AAEF,eAAO,MAAM,4BAA4B,ioJAoJxC,CAAC;AAEF,eAAO,MAAM,sBAAsB,s4OAmMlC,CAAC;AAEF,eAAO,MAAM,sBAAsB,y0VAiS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