@niujiajie/freespec 0.0.0-stage → 1.15.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 (308) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +58 -2
  3. package/bin/freespec.js +5 -0
  4. package/dist/cli/index.d.ts +25 -0
  5. package/dist/cli/index.js +359 -0
  6. package/dist/commands/shared-output.d.ts +18 -0
  7. package/dist/commands/shared-output.js +61 -0
  8. package/dist/commands/workflow/default-schema.d.ts +2 -0
  9. package/dist/commands/workflow/default-schema.js +4 -0
  10. package/dist/commands/workflow/index.d.ts +13 -0
  11. package/dist/commands/workflow/index.js +10 -0
  12. package/dist/commands/workflow/instructions.d.ts +39 -0
  13. package/dist/commands/workflow/instructions.js +565 -0
  14. package/dist/commands/workflow/new-change.d.ts +19 -0
  15. package/dist/commands/workflow/new-change.js +135 -0
  16. package/dist/commands/workflow/shared.d.ts +94 -0
  17. package/dist/commands/workflow/shared.js +169 -0
  18. package/dist/commands/workflow/status.d.ts +18 -0
  19. package/dist/commands/workflow/status.js +201 -0
  20. package/dist/core/artifact-graph/graph.d.ts +72 -0
  21. package/dist/core/artifact-graph/graph.js +165 -0
  22. package/dist/core/artifact-graph/index.d.ts +9 -0
  23. package/dist/core/artifact-graph/index.js +14 -0
  24. package/dist/core/artifact-graph/instruction-loader.d.ts +208 -0
  25. package/dist/core/artifact-graph/instruction-loader.js +268 -0
  26. package/dist/core/artifact-graph/outputs.d.ts +19 -0
  27. package/dist/core/artifact-graph/outputs.js +351 -0
  28. package/dist/core/artifact-graph/resolver.d.ts +89 -0
  29. package/dist/core/artifact-graph/resolver.js +342 -0
  30. package/dist/core/artifact-graph/schema.d.ts +27 -0
  31. package/dist/core/artifact-graph/schema.js +160 -0
  32. package/dist/core/artifact-graph/state.d.ts +12 -0
  33. package/dist/core/artifact-graph/state.js +31 -0
  34. package/dist/core/artifact-graph/types.d.ts +40 -0
  35. package/dist/core/artifact-graph/types.js +59 -0
  36. package/dist/core/available-tools.d.ts +18 -0
  37. package/dist/core/available-tools.js +49 -0
  38. package/dist/core/change-layout.d.ts +17 -0
  39. package/dist/core/change-layout.js +30 -0
  40. package/dist/core/change-metadata/index.d.ts +2 -0
  41. package/dist/core/change-metadata/index.js +2 -0
  42. package/dist/core/change-metadata/schema.d.ts +23 -0
  43. package/dist/core/change-metadata/schema.js +46 -0
  44. package/dist/core/change-status-policy.d.ts +49 -0
  45. package/dist/core/change-status-policy.js +50 -0
  46. package/dist/core/command-generation/adapters/amazon-q.d.ts +17 -0
  47. package/dist/core/command-generation/adapters/amazon-q.js +32 -0
  48. package/dist/core/command-generation/adapters/antigravity.d.ts +13 -0
  49. package/dist/core/command-generation/adapters/antigravity.js +27 -0
  50. package/dist/core/command-generation/adapters/atomcode.d.ts +24 -0
  51. package/dist/core/command-generation/adapters/atomcode.js +46 -0
  52. package/dist/core/command-generation/adapters/auggie.d.ts +13 -0
  53. package/dist/core/command-generation/adapters/auggie.js +28 -0
  54. package/dist/core/command-generation/adapters/bob.d.ts +18 -0
  55. package/dist/core/command-generation/adapters/bob.js +33 -0
  56. package/dist/core/command-generation/adapters/claude.d.ts +13 -0
  57. package/dist/core/command-generation/adapters/claude.js +32 -0
  58. package/dist/core/command-generation/adapters/cline.d.ts +14 -0
  59. package/dist/core/command-generation/adapters/cline.js +27 -0
  60. package/dist/core/command-generation/adapters/codeassistant.d.ts +15 -0
  61. package/dist/core/command-generation/adapters/codeassistant.js +29 -0
  62. package/dist/core/command-generation/adapters/codebuddy.d.ts +13 -0
  63. package/dist/core/command-generation/adapters/codebuddy.js +29 -0
  64. package/dist/core/command-generation/adapters/codestudio.d.ts +13 -0
  65. package/dist/core/command-generation/adapters/codestudio.js +27 -0
  66. package/dist/core/command-generation/adapters/command-code.d.ts +19 -0
  67. package/dist/core/command-generation/adapters/command-code.js +34 -0
  68. package/dist/core/command-generation/adapters/continue.d.ts +13 -0
  69. package/dist/core/command-generation/adapters/continue.js +33 -0
  70. package/dist/core/command-generation/adapters/costrict.d.ts +13 -0
  71. package/dist/core/command-generation/adapters/costrict.js +28 -0
  72. package/dist/core/command-generation/adapters/crush.d.ts +13 -0
  73. package/dist/core/command-generation/adapters/crush.js +30 -0
  74. package/dist/core/command-generation/adapters/cursor.d.ts +14 -0
  75. package/dist/core/command-generation/adapters/cursor.js +31 -0
  76. package/dist/core/command-generation/adapters/devin.d.ts +19 -0
  77. package/dist/core/command-generation/adapters/devin.js +36 -0
  78. package/dist/core/command-generation/adapters/easycode.d.ts +17 -0
  79. package/dist/core/command-generation/adapters/easycode.js +28 -0
  80. package/dist/core/command-generation/adapters/factory.d.ts +13 -0
  81. package/dist/core/command-generation/adapters/factory.js +28 -0
  82. package/dist/core/command-generation/adapters/gemini.d.ts +13 -0
  83. package/dist/core/command-generation/adapters/gemini.js +27 -0
  84. package/dist/core/command-generation/adapters/gigacode.d.ts +17 -0
  85. package/dist/core/command-generation/adapters/gigacode.js +31 -0
  86. package/dist/core/command-generation/adapters/github-copilot.d.ts +13 -0
  87. package/dist/core/command-generation/adapters/github-copilot.js +27 -0
  88. package/dist/core/command-generation/adapters/iflow.d.ts +13 -0
  89. package/dist/core/command-generation/adapters/iflow.js +30 -0
  90. package/dist/core/command-generation/adapters/index.d.ts +40 -0
  91. package/dist/core/command-generation/adapters/index.js +40 -0
  92. package/dist/core/command-generation/adapters/junie.d.ts +13 -0
  93. package/dist/core/command-generation/adapters/junie.js +27 -0
  94. package/dist/core/command-generation/adapters/kilocode.d.ts +14 -0
  95. package/dist/core/command-generation/adapters/kilocode.js +23 -0
  96. package/dist/core/command-generation/adapters/kiro.d.ts +13 -0
  97. package/dist/core/command-generation/adapters/kiro.js +27 -0
  98. package/dist/core/command-generation/adapters/lingma.d.ts +13 -0
  99. package/dist/core/command-generation/adapters/lingma.js +30 -0
  100. package/dist/core/command-generation/adapters/oh-my-pi.d.ts +21 -0
  101. package/dist/core/command-generation/adapters/oh-my-pi.js +42 -0
  102. package/dist/core/command-generation/adapters/opencode.d.ts +14 -0
  103. package/dist/core/command-generation/adapters/opencode.js +38 -0
  104. package/dist/core/command-generation/adapters/pi.d.ts +18 -0
  105. package/dist/core/command-generation/adapters/pi.js +39 -0
  106. package/dist/core/command-generation/adapters/qoder.d.ts +13 -0
  107. package/dist/core/command-generation/adapters/qoder.js +30 -0
  108. package/dist/core/command-generation/adapters/qwen.d.ts +17 -0
  109. package/dist/core/command-generation/adapters/qwen.js +31 -0
  110. package/dist/core/command-generation/adapters/roocode.d.ts +14 -0
  111. package/dist/core/command-generation/adapters/roocode.js +27 -0
  112. package/dist/core/command-generation/adapters/trae.d.ts +13 -0
  113. package/dist/core/command-generation/adapters/trae.js +28 -0
  114. package/dist/core/command-generation/adapters/zcode.d.ts +16 -0
  115. package/dist/core/command-generation/adapters/zcode.js +33 -0
  116. package/dist/core/command-generation/generator.d.ts +29 -0
  117. package/dist/core/command-generation/generator.js +43 -0
  118. package/dist/core/command-generation/index.d.ts +22 -0
  119. package/dist/core/command-generation/index.js +24 -0
  120. package/dist/core/command-generation/invocation.d.ts +73 -0
  121. package/dist/core/command-generation/invocation.js +77 -0
  122. package/dist/core/command-generation/registry.d.ts +36 -0
  123. package/dist/core/command-generation/registry.js +114 -0
  124. package/dist/core/command-generation/toml.d.ts +19 -0
  125. package/dist/core/command-generation/toml.js +39 -0
  126. package/dist/core/command-generation/types.d.ts +63 -0
  127. package/dist/core/command-generation/types.js +8 -0
  128. package/dist/core/command-generation/yaml.d.ts +36 -0
  129. package/dist/core/command-generation/yaml.js +48 -0
  130. package/dist/core/command-surface.d.ts +15 -0
  131. package/dist/core/command-surface.js +33 -0
  132. package/dist/core/config-prompts.d.ts +9 -0
  133. package/dist/core/config-prompts.js +56 -0
  134. package/dist/core/config-schema.d.ts +98 -0
  135. package/dist/core/config-schema.js +308 -0
  136. package/dist/core/config.d.ts +50 -0
  137. package/dist/core/config.js +122 -0
  138. package/dist/core/file-state.d.ts +36 -0
  139. package/dist/core/file-state.js +144 -0
  140. package/dist/core/file-view.d.ts +13 -0
  141. package/dist/core/file-view.js +14 -0
  142. package/dist/core/global-config.d.ts +101 -0
  143. package/dist/core/global-config.js +182 -0
  144. package/dist/core/id.d.ts +17 -0
  145. package/dist/core/id.js +30 -0
  146. package/dist/core/index.d.ts +6 -0
  147. package/dist/core/index.js +7 -0
  148. package/dist/core/init.d.ts +57 -0
  149. package/dist/core/init.js +836 -0
  150. package/dist/core/list.d.ts +11 -0
  151. package/dist/core/list.js +197 -0
  152. package/dist/core/migration.d.ts +121 -0
  153. package/dist/core/migration.js +540 -0
  154. package/dist/core/onboarding-commands.d.ts +30 -0
  155. package/dist/core/onboarding-commands.js +38 -0
  156. package/dist/core/openspec-root.d.ts +47 -0
  157. package/dist/core/openspec-root.js +196 -0
  158. package/dist/core/planning-home.d.ts +16 -0
  159. package/dist/core/planning-home.js +67 -0
  160. package/dist/core/profile-sync-drift.d.ts +31 -0
  161. package/dist/core/profile-sync-drift.js +201 -0
  162. package/dist/core/profiles.d.ts +19 -0
  163. package/dist/core/profiles.js +33 -0
  164. package/dist/core/project-config.d.ts +132 -0
  165. package/dist/core/project-config.js +519 -0
  166. package/dist/core/references.d.ts +10 -0
  167. package/dist/core/references.js +46 -0
  168. package/dist/core/root-selection.d.ts +59 -0
  169. package/dist/core/root-selection.js +132 -0
  170. package/dist/core/shared/allowed-tools.d.ts +12 -0
  171. package/dist/core/shared/allowed-tools.js +12 -0
  172. package/dist/core/shared/ide-restart.d.ts +26 -0
  173. package/dist/core/shared/ide-restart.js +42 -0
  174. package/dist/core/shared/index.d.ts +11 -0
  175. package/dist/core/shared/index.js +11 -0
  176. package/dist/core/shared/skill-content-equivalence.d.ts +7 -0
  177. package/dist/core/shared/skill-content-equivalence.js +45 -0
  178. package/dist/core/shared/skill-files.d.ts +7 -0
  179. package/dist/core/shared/skill-files.js +43 -0
  180. package/dist/core/shared/skill-generation.d.ts +49 -0
  181. package/dist/core/shared/skill-generation.js +125 -0
  182. package/dist/core/shared/skill-paths.d.ts +13 -0
  183. package/dist/core/shared/skill-paths.js +23 -0
  184. package/dist/core/shared/tool-detection.d.ts +99 -0
  185. package/dist/core/shared/tool-detection.js +318 -0
  186. package/dist/core/shared-skill-target.d.ts +51 -0
  187. package/dist/core/shared-skill-target.js +239 -0
  188. package/dist/core/store/errors.d.ts +20 -0
  189. package/dist/core/store/errors.js +22 -0
  190. package/dist/core/store/index.d.ts +2 -0
  191. package/dist/core/store/index.js +2 -0
  192. package/dist/core/styles/palette.d.ts +7 -0
  193. package/dist/core/styles/palette.js +8 -0
  194. package/dist/core/templates/optional-workflow.d.ts +69 -0
  195. package/dist/core/templates/optional-workflow.js +140 -0
  196. package/dist/core/templates/types.d.ts +19 -0
  197. package/dist/core/templates/types.js +5 -0
  198. package/dist/core/templates/workflows/personal.d.ts +22 -0
  199. package/dist/core/templates/workflows/personal.js +225 -0
  200. package/dist/core/update-plan.d.ts +127 -0
  201. package/dist/core/update-plan.js +390 -0
  202. package/dist/core/update.d.ts +154 -0
  203. package/dist/core/update.js +723 -0
  204. package/dist/core/version-check.d.ts +188 -0
  205. package/dist/core/version-check.js +906 -0
  206. package/dist/core/zod-issues.d.ts +4 -0
  207. package/dist/core/zod-issues.js +10 -0
  208. package/dist/index.d.ts +3 -0
  209. package/dist/index.js +3 -0
  210. package/dist/prompts/searchable-multi-select.d.ts +35 -0
  211. package/dist/prompts/searchable-multi-select.js +188 -0
  212. package/dist/telemetry/config.d.ts +37 -0
  213. package/dist/telemetry/config.js +148 -0
  214. package/dist/telemetry/index.d.ts +39 -0
  215. package/dist/telemetry/index.js +217 -0
  216. package/dist/telemetry/opt-out.d.ts +17 -0
  217. package/dist/telemetry/opt-out.js +27 -0
  218. package/dist/ui/ascii-patterns.d.ts +16 -0
  219. package/dist/ui/ascii-patterns.js +133 -0
  220. package/dist/ui/welcome-screen.d.ts +18 -0
  221. package/dist/ui/welcome-screen.js +199 -0
  222. package/dist/utils/change-metadata.d.ts +116 -0
  223. package/dist/utils/change-metadata.js +324 -0
  224. package/dist/utils/change-utils.d.ts +79 -0
  225. package/dist/utils/change-utils.js +121 -0
  226. package/dist/utils/ci.d.ts +12 -0
  227. package/dist/utils/ci.js +16 -0
  228. package/dist/utils/command-references.d.ts +104 -0
  229. package/dist/utils/command-references.js +190 -0
  230. package/dist/utils/date.d.ts +8 -0
  231. package/dist/utils/date.js +13 -0
  232. package/dist/utils/executable-path.d.ts +5 -0
  233. package/dist/utils/executable-path.js +44 -0
  234. package/dist/utils/file-system.d.ts +58 -0
  235. package/dist/utils/file-system.js +432 -0
  236. package/dist/utils/index.d.ts +6 -0
  237. package/dist/utils/index.js +9 -0
  238. package/dist/utils/interactive.d.ts +85 -0
  239. package/dist/utils/interactive.js +174 -0
  240. package/dist/utils/item-discovery.d.ts +15 -0
  241. package/dist/utils/item-discovery.js +33 -0
  242. package/dist/utils/line-endings.d.ts +34 -0
  243. package/dist/utils/line-endings.js +46 -0
  244. package/dist/utils/match.d.ts +3 -0
  245. package/dist/utils/match.js +22 -0
  246. package/dist/utils/nested-change.d.ts +35 -0
  247. package/dist/utils/nested-change.js +185 -0
  248. package/dist/utils/shell-detection.d.ts +20 -0
  249. package/dist/utils/shell-detection.js +94 -0
  250. package/dist/utils/task-progress.d.ts +67 -0
  251. package/dist/utils/task-progress.js +184 -0
  252. package/package.json +74 -4
  253. package/schemas//351/273/230/350/256/244/schema.yaml +68 -0
  254. package/schemas//351/273/230/350/256/244/templates//344/273/273/345/212/241/346/270/205/345/215/225.md +25 -0
  255. package/schemas//351/273/230/350/256/244/templates//346/265/213/350/257/225/347/224/250/344/276/213.md +34 -0
  256. package/schemas//351/273/230/350/256/244/templates//350/256/276/350/256/241/346/226/207/346/241/243.md +172 -0
  257. package/schemas//351/273/230/350/256/244/templates//351/234/200/346/261/202/346/226/207/346/241/243.md +19 -0
  258. package/skill-files//344/273/273/345/212/241/references//346/212/244/346/240/217.md +43 -0
  259. package/skill-files//344/273/273/345/212/241/references//347/262/222/345/272/246.md +23 -0
  260. package/skill-files//344/273/273/345/212/241/references//347/272/246/346/235/237.md +8 -0
  261. package/skill-files//344/273/273/345/212/241/scripts/check-tasks.mjs +83 -0
  262. package/skill-files//345/206/231Java/references/Java/350/247/204/350/214/203.md +25 -0
  263. package/skill-files//345/206/231Java/references//345/215/261/351/231/251/345/206/231/346/263/225.md +27 -0
  264. package/skill-files//345/206/231Java/references//345/256/214/346/210/220/345/257/271/347/205/247.md +15 -0
  265. package/skill-files//345/206/231Java/references//346/212/244/346/240/217.md +35 -0
  266. package/skill-files//345/206/231Java/references//347/272/246/346/235/237.md +8 -0
  267. package/skill-files//345/206/231Java/references//350/270/251/345/235/221.md +17 -0
  268. package/skill-files//345/256/241Java/references//346/212/244/346/240/217.md +19 -0
  269. package/skill-files//345/256/241Java/references//347/244/272/344/276/213.md +23 -0
  270. package/skill-files//345/256/241Java/references//347/272/246/346/235/237.md +7 -0
  271. package/skill-files//345/256/241Java/references//350/247/204/345/210/231.md +23 -0
  272. package/skill-files//345/256/241Java/references//351/242/206/345/237/237/346/243/200/351/241/271.md +58 -0
  273. package/skill-files//345/256/241/346/226/207/346/241/243/references//346/212/244/346/240/217.md +18 -0
  274. package/skill-files//345/256/241/346/226/207/346/241/243/references//347/272/246/346/235/237.md +8 -0
  275. package/skill-files//345/256/241/346/226/207/346/241/243/references//347/273/264/345/272/246.md +17 -0
  276. package/skill-files//345/256/241/346/226/207/346/241/243/references//350/270/251/345/235/221.md +11 -0
  277. package/skill-files//346/226/260/345/273/272/references//344/272/244/346/216/245.md +11 -0
  278. package/skill-files//346/226/260/345/273/272/references//346/212/244/346/240/217.md +14 -0
  279. package/skill-files//346/226/260/345/273/272/references//347/272/246/346/235/237.md +7 -0
  280. package/skill-files//346/267/261/346/200/235/config/prompts.yaml +114 -0
  281. package/skill-files//346/267/261/346/200/235/references//344/270/211/346/226/271/346/240/270/345/257/271.md +72 -0
  282. package/skill-files//346/267/261/346/200/235/references//344/276/213/345/255/220.md +39 -0
  283. package/skill-files//346/267/261/346/200/235/references//346/200/216/344/271/210/346/203/263.md +61 -0
  284. package/skill-files//346/267/261/346/200/235/references//346/212/244/346/240/217.md +26 -0
  285. package/skill-files//346/267/261/346/200/235/references//347/202/271/351/200/211/346/217/220/351/227/256.md +66 -0
  286. package/skill-files//346/267/261/346/200/235/references//347/231/273/350/256/260.md +45 -0
  287. package/skill-files//346/267/261/346/200/235/references//347/272/246/346/235/237.md +9 -0
  288. package/skill-files//347/224/250/344/276/213/references//346/200/216/344/271/210/345/206/231.md +13 -0
  289. package/skill-files//347/224/250/344/276/213/references//346/212/244/346/240/217.md +42 -0
  290. package/skill-files//347/224/250/344/276/213/references//347/272/246/346/235/237.md +5 -0
  291. package/skill-files//347/224/250/344/276/213/scripts/check-cases.mjs +70 -0
  292. package/skill-files//350/256/276/350/256/241/references//345/207/206/345/244/207.md +25 -0
  293. package/skill-files//350/256/276/350/256/241/references//346/212/244/346/240/217.md +134 -0
  294. package/skill-files//350/256/276/350/256/241/references//346/226/207/351/243/216.md +17 -0
  295. package/skill-files//350/256/276/350/256/241/references//347/225/214/351/235/242.md +18 -0
  296. package/skill-files//350/256/276/350/256/241/references//347/261/273/345/236/213.md +19 -0
  297. package/skill-files//350/256/276/350/256/241/references//347/272/246/346/235/237.md +25 -0
  298. package/skill-files//350/256/276/350/256/241/scripts/_smoke.mjs +72 -0
  299. package/skill-files//350/256/276/350/256/241/scripts/check-design.mjs +331 -0
  300. package/skill-files//351/234/200/346/261/202/references//346/212/244/346/240/217.md +26 -0
  301. package/skill-files//351/234/200/346/261/202/references//346/226/207/351/243/216.md +23 -0
  302. package/skill-files//351/234/200/346/261/202/references//346/267/261/346/200/235/346/221/204/345/205/245.md +21 -0
  303. package/skill-files//351/234/200/346/261/202/references//347/272/246/346/235/237.md +8 -0
  304. package/skill-files//351/234/200/346/261/202/references//351/234/200/346/261/202/345/276/205/345/256/232.md +13 -0
  305. package/skill-files//351/234/200/346/261/202/scripts/check-requirements.mjs +60 -0
  306. package/skill-files//351/252/214/346/224/266/references//346/212/244/346/240/217.md +27 -0
  307. package/skill-files//351/252/214/346/224/266/references//346/240/270/345/257/271.md +17 -0
  308. package/skill-files//351/252/214/346/224/266/references//347/272/246/346/235/237.md +7 -0
@@ -0,0 +1,40 @@
1
+ import { z } from 'zod';
2
+ export declare const ArtifactSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ generates: z.ZodString;
5
+ description: z.ZodString;
6
+ template: z.ZodString;
7
+ instruction: z.ZodOptional<z.ZodString>;
8
+ requires: z.ZodDefault<z.ZodArray<z.ZodString>>;
9
+ }, z.core.$strip>;
10
+ export declare const ApplyPhaseSchema: z.ZodObject<{
11
+ requires: z.ZodArray<z.ZodString>;
12
+ tracks: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13
+ instruction: z.ZodOptional<z.ZodString>;
14
+ }, z.core.$strip>;
15
+ export declare const SchemaYamlSchema: z.ZodObject<{
16
+ name: z.ZodString;
17
+ version: z.ZodNumber;
18
+ description: z.ZodOptional<z.ZodString>;
19
+ artifacts: z.ZodArray<z.ZodObject<{
20
+ id: z.ZodString;
21
+ generates: z.ZodString;
22
+ description: z.ZodString;
23
+ template: z.ZodString;
24
+ instruction: z.ZodOptional<z.ZodString>;
25
+ requires: z.ZodDefault<z.ZodArray<z.ZodString>>;
26
+ }, z.core.$strip>>;
27
+ apply: z.ZodOptional<z.ZodObject<{
28
+ requires: z.ZodArray<z.ZodString>;
29
+ tracks: z.ZodOptional<z.ZodNullable<z.ZodString>>;
30
+ instruction: z.ZodOptional<z.ZodString>;
31
+ }, z.core.$strip>>;
32
+ }, z.core.$strip>;
33
+ export type Artifact = z.infer<typeof ArtifactSchema>;
34
+ export type ApplyPhase = z.infer<typeof ApplyPhaseSchema>;
35
+ export type SchemaYaml = z.infer<typeof SchemaYamlSchema>;
36
+ export type CompletedSet = Set<string>;
37
+ export interface BlockedArtifacts {
38
+ [artifactId: string]: string[];
39
+ }
40
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1,59 @@
1
+ import * as path from 'node:path';
2
+ import { z } from 'zod';
3
+ function relativePathSchema(fieldName) {
4
+ return z
5
+ .string()
6
+ .min(1, { error: `${fieldName} is required` })
7
+ .superRefine((value, ctx) => {
8
+ const segments = value.split(/[\\/]+/u);
9
+ const isDrivePath = /^[A-Za-z]:/u.test(value);
10
+ const isAbsolute = path.posix.isAbsolute(value) || path.win32.isAbsolute(value) || isDrivePath;
11
+ const escapes = segments.includes('..');
12
+ if (isAbsolute || escapes || value.includes('\0')) {
13
+ ctx.addIssue({
14
+ code: 'custom',
15
+ message: `${fieldName} must be a relative path inside its allowed directory`,
16
+ });
17
+ }
18
+ });
19
+ }
20
+ // Artifact definition schema
21
+ // Upper bound on artifacts in one schema. Keeps `validateNoCycles`' recursive
22
+ // DFS well inside the stack limit for any accepted input.
23
+ const MAX_ARTIFACTS = 1000;
24
+ export const ArtifactSchema = z.object({
25
+ id: z.string().min(1, { error: 'Artifact ID is required' }),
26
+ generates: relativePathSchema('generates field'),
27
+ description: z.string(),
28
+ template: relativePathSchema('template field'),
29
+ instruction: z.string().optional(),
30
+ requires: z.array(z.string()).default([]),
31
+ });
32
+ // Apply phase configuration for schema-aware apply instructions
33
+ export const ApplyPhaseSchema = z.object({
34
+ // Artifact IDs that must exist before apply is available
35
+ // Empty means implementation is not blocked on any artifact file.
36
+ requires: z.array(z.string()),
37
+ // Path to file with checkboxes for progress (relative to change dir), or null if no tracking
38
+ tracks: relativePathSchema('apply.tracks').nullable().optional(),
39
+ // Custom guidance for the apply phase
40
+ instruction: z.string().optional(),
41
+ });
42
+ // Full schema YAML structure
43
+ export const SchemaYamlSchema = z.object({
44
+ name: z.string().min(1, { error: 'Schema name is required' }),
45
+ version: z.number().int().positive({ error: 'Version must be a positive integer' }),
46
+ description: z.string().optional(),
47
+ artifacts: z
48
+ .array(ArtifactSchema)
49
+ .min(1, { error: 'At least one artifact required' })
50
+ // Bounded so a hostile schema cannot drive the cycle-detection DFS past the
51
+ // V8 stack limit and crash with an uncaught RangeError instead of a
52
+ // validation error.
53
+ .max(MAX_ARTIFACTS, {
54
+ error: `A schema may declare at most ${MAX_ARTIFACTS} artifacts`,
55
+ }),
56
+ // Optional apply phase configuration (for schema-aware apply instructions)
57
+ apply: ApplyPhaseSchema.optional(),
58
+ });
59
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Available Tools Detection
3
+ *
4
+ * Detects which AI tools are available in a project by scanning
5
+ * for their configuration directories.
6
+ */
7
+ import { type AIToolOption } from './config.js';
8
+ import { type FileView } from './file-view.js';
9
+ /**
10
+ * Scans the project path for AI tool configuration directories and returns
11
+ * the tools that are present.
12
+ *
13
+ * For tools with `detectionPaths`, checks those specific paths (files or
14
+ * directories). Otherwise checks the project's `skillsDir`, or managed skill
15
+ * files in the user's home directory for a global skill target.
16
+ */
17
+ export declare function getAvailableTools(projectPath: string, view?: FileView): AIToolOption[];
18
+ //# sourceMappingURL=available-tools.d.ts.map
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Available Tools Detection
3
+ *
4
+ * Detects which AI tools are available in a project by scanning
5
+ * for their configuration directories.
6
+ */
7
+ import path from 'path';
8
+ import { AI_TOOLS } from './config.js';
9
+ import { reconcileSharedSkillTargets } from './shared-skill-target.js';
10
+ import { SKILL_NAMES } from './shared/tool-detection.js';
11
+ import { resolveToolSkillsDir, toolSupportsSkills } from './shared/skill-paths.js';
12
+ import { DISK_VIEW } from './file-view.js';
13
+ /**
14
+ * Scans the project path for AI tool configuration directories and returns
15
+ * the tools that are present.
16
+ *
17
+ * For tools with `detectionPaths`, checks those specific paths (files or
18
+ * directories). Otherwise checks the project's `skillsDir`, or managed skill
19
+ * files in the user's home directory for a global skill target.
20
+ */
21
+ export function getAvailableTools(projectPath, view = DISK_VIEW) {
22
+ const available = AI_TOOLS.filter((tool) => {
23
+ if (!toolSupportsSkills(tool))
24
+ return false;
25
+ if (tool.globalSkillsDir) {
26
+ const skillsDir = resolveToolSkillsDir(projectPath, tool);
27
+ return SKILL_NAMES.some((skillName) => view.exists(path.join(skillsDir, skillName, 'SKILL.md')));
28
+ }
29
+ if (!tool.skillsDir)
30
+ return false;
31
+ if (tool.detectionPaths && tool.detectionPaths.length > 0) {
32
+ // Presence, not type — detection paths can be files or directories
33
+ return tool.detectionPaths.some((p) => view.exists(path.join(projectPath, p)));
34
+ }
35
+ return view.isDirectory(path.join(projectPath, tool.skillsDir));
36
+ });
37
+ const activeProjectTools = new Set(reconcileSharedSkillTargets(projectPath, available.filter((tool) => tool.skillsDir), view).map((tool) => tool.value));
38
+ const hasIndependentDetectionPath = (tool) => (tool.detectionPaths ?? []).some((detectionPath) => {
39
+ // Skill roots still go through managed-content reconciliation below;
40
+ // their mere existence is not an independent tool signal.
41
+ if (detectionPath.endsWith('/skills'))
42
+ return false;
43
+ return view.exists(path.join(projectPath, detectionPath));
44
+ });
45
+ return available.filter((tool) => tool.globalSkillsDir ||
46
+ hasIndependentDetectionPath(tool) ||
47
+ activeProjectTools.has(tool.value));
48
+ }
49
+ //# sourceMappingURL=available-tools.js.map
@@ -0,0 +1,17 @@
1
+ /** Default workflow schema. Artifacts are optional Chinese markdown files. */
2
+ export declare const DEFAULT_SCHEMA = "\u9ED8\u8BA4";
3
+ /** Every change folder is `freespec/<名称>变更/`. */
4
+ export declare const CHANGE_FOLDER_SUFFIX = "\u53D8\u66F4";
5
+ /**
6
+ * Parent of change folders. A change is a directory directly under `freespec/`
7
+ * whose name ends with `变更`.
8
+ */
9
+ export declare function changeParentDir(projectRoot: string): string;
10
+ /**
11
+ * Appends `变更` when the caller gave only the topic. `登录改造` and
12
+ * `登录改造变更` both become `登录改造变更`.
13
+ */
14
+ export declare function normalizeChangeName(name: string): string;
15
+ /** True for a directory name that is a change folder. */
16
+ export declare function isChangeDirectoryName(name: string): boolean;
17
+ //# sourceMappingURL=change-layout.d.ts.map
@@ -0,0 +1,30 @@
1
+ import path from 'node:path';
2
+ /** Default workflow schema. Artifacts are optional Chinese markdown files. */
3
+ export const DEFAULT_SCHEMA = '默认';
4
+ /** Every change folder is `freespec/<名称>变更/`. */
5
+ export const CHANGE_FOLDER_SUFFIX = '变更';
6
+ const CHANGE_NAME_BODY = '[\\u4e00-\\u9fff0-9]+';
7
+ const CHANGE_NAME_PATTERN = new RegExp(`^${CHANGE_NAME_BODY}(?:-${CHANGE_NAME_BODY})*${CHANGE_FOLDER_SUFFIX}$`, 'u');
8
+ /**
9
+ * Parent of change folders. A change is a directory directly under `freespec/`
10
+ * whose name ends with `变更`.
11
+ */
12
+ export function changeParentDir(projectRoot) {
13
+ return path.join(projectRoot, 'freespec');
14
+ }
15
+ /**
16
+ * Appends `变更` when the caller gave only the topic. `登录改造` and
17
+ * `登录改造变更` both become `登录改造变更`.
18
+ */
19
+ export function normalizeChangeName(name) {
20
+ const trimmed = name.trim();
21
+ if (!trimmed || trimmed.endsWith(CHANGE_FOLDER_SUFFIX)) {
22
+ return trimmed;
23
+ }
24
+ return `${trimmed}${CHANGE_FOLDER_SUFFIX}`;
25
+ }
26
+ /** True for a directory name that is a change folder. */
27
+ export function isChangeDirectoryName(name) {
28
+ return CHANGE_NAME_PATTERN.test(name);
29
+ }
30
+ //# sourceMappingURL=change-layout.js.map
@@ -0,0 +1,2 @@
1
+ export * from './schema.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,2 @@
1
+ export * from './schema.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,23 @@
1
+ import { z } from 'zod';
2
+ export { isKebabId } from '../id.js';
3
+ export declare const InitiativeLinkSchema: z.ZodObject<{
4
+ store: z.ZodString;
5
+ id: z.ZodString;
6
+ }, z.core.$strict>;
7
+ export type InitiativeLink = z.infer<typeof InitiativeLinkSchema>;
8
+ /** Top-level keys ChangeMetadataSchema recognizes. Anything else is ignored. */
9
+ export declare const CHANGE_METADATA_KNOWN_KEYS: readonly ["schema", "created", "goal", "affected_areas", "initiative", "retire_capabilities"];
10
+ export type ChangeMetadataKnownKey = (typeof CHANGE_METADATA_KNOWN_KEYS)[number];
11
+ export declare const ChangeMetadataSchema: z.ZodObject<{
12
+ schema: z.ZodString;
13
+ created: z.ZodOptional<z.ZodString>;
14
+ goal: z.ZodOptional<z.ZodString>;
15
+ affected_areas: z.ZodOptional<z.ZodArray<z.ZodString>>;
16
+ initiative: z.ZodOptional<z.ZodObject<{
17
+ store: z.ZodString;
18
+ id: z.ZodString;
19
+ }, z.core.$strict>>;
20
+ retire_capabilities: z.ZodOptional<z.ZodBoolean>;
21
+ }, z.core.$strip>;
22
+ export type ChangeMetadata = z.infer<typeof ChangeMetadataSchema>;
23
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1,46 @@
1
+ import { z } from 'zod';
2
+ import { isKebabId } from '../id.js';
3
+ export { isKebabId } from '../id.js';
4
+ const KebabIdentifierSchema = (label) => z.string().superRefine((value, ctx) => {
5
+ if (!isKebabId(value)) {
6
+ ctx.addIssue({
7
+ code: 'custom',
8
+ message: `${label} must be kebab-case with lowercase letters, numbers, and single hyphen separators`,
9
+ });
10
+ }
11
+ });
12
+ export const InitiativeLinkSchema = z.object({
13
+ store: KebabIdentifierSchema('Store id'),
14
+ id: KebabIdentifierSchema('Initiative id'),
15
+ }).strict();
16
+ /** Top-level keys ChangeMetadataSchema recognizes. Anything else is ignored. */
17
+ export const CHANGE_METADATA_KNOWN_KEYS = [
18
+ 'schema',
19
+ 'created',
20
+ 'goal',
21
+ 'affected_areas',
22
+ 'initiative',
23
+ 'retire_capabilities',
24
+ ];
25
+ // Per-change metadata schema. The schema field is validated against available
26
+ // workflow schemas when metadata is read or written.
27
+ export const ChangeMetadataSchema = z.object({
28
+ schema: z.string().min(1, { message: 'schema is required' }),
29
+ created: z
30
+ .string()
31
+ .regex(/^\d{4}-\d{2}-\d{2}$/, {
32
+ message: 'created must be YYYY-MM-DD format',
33
+ })
34
+ .optional(),
35
+ goal: z.string().min(1).optional(),
36
+ affected_areas: z.array(z.string().min(1)).optional(),
37
+ initiative: InitiativeLinkSchema.optional(),
38
+ // Declares that this change may retire a capability: when its REMOVED entries
39
+ // take the last requirement a capability has, archive deletes that
40
+ // capability's main spec instead of aborting on a spec it could not write
41
+ // (#1302). Required because the deletion is not recoverable from the working
42
+ // tree - only from git - so it is the author's call, not an inference from the
43
+ // shape of a delta.
44
+ retire_capabilities: z.boolean().optional(),
45
+ });
46
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1,49 @@
1
+ import type { PlanningHome } from './planning-home.js';
2
+ export interface PlanningHomeSummary {
3
+ kind: 'repo';
4
+ root: string;
5
+ changesDir: string;
6
+ defaultSchema: string;
7
+ }
8
+ export interface ActionContext {
9
+ mode: 'repo-local';
10
+ sourceOfTruth: 'repo';
11
+ planningArtifacts: string[];
12
+ linkedContext: Array<{
13
+ name: string;
14
+ }>;
15
+ allowedEditRoots: string[];
16
+ requiresAffectedAreaSelection: boolean;
17
+ constraints: string[];
18
+ }
19
+ export interface ChangeStatusPolicyArtifact {
20
+ id: string;
21
+ status: 'done' | 'skipped' | 'ready' | 'blocked';
22
+ }
23
+ export interface ChangeNextStepsInput {
24
+ changeName: string;
25
+ artifactStatuses: ChangeStatusPolicyArtifact[];
26
+ allArtifactsComplete: boolean;
27
+ }
28
+ export interface ActionContextInput {
29
+ projectRoot: string;
30
+ artifactIds: string[];
31
+ }
32
+ export declare function summarizePlanningHome(planningHome: PlanningHome | undefined): PlanningHomeSummary | undefined;
33
+ export declare function buildActionContext(input: ActionContextInput): ActionContext;
34
+ /**
35
+ * The one next action for a change, in both the forms the CLI needs.
36
+ *
37
+ * `sentence` is what the JSON `nextSteps` contract publishes; `command` is the
38
+ * bare command the text surface prints. Both are built here so the two
39
+ * surfaces can never name a different next step.
40
+ */
41
+ export interface ChangeNextStep {
42
+ /** Ready-to-run command. */
43
+ command: string;
44
+ /** Sentence form carried by the JSON `nextSteps` array. */
45
+ sentence: string;
46
+ }
47
+ export declare function resolveNextStep(input: ChangeNextStepsInput): ChangeNextStep | undefined;
48
+ export declare function buildNextSteps(input: ChangeNextStepsInput): string[];
49
+ //# sourceMappingURL=change-status-policy.d.ts.map
@@ -0,0 +1,50 @@
1
+ export function summarizePlanningHome(planningHome) {
2
+ if (!planningHome) {
3
+ return undefined;
4
+ }
5
+ return {
6
+ kind: planningHome.kind,
7
+ root: planningHome.root,
8
+ changesDir: planningHome.changesDir,
9
+ defaultSchema: planningHome.defaultSchema,
10
+ };
11
+ }
12
+ export function buildActionContext(input) {
13
+ const scope = editScope(input);
14
+ // Keys stay in the published contract order.
15
+ return {
16
+ mode: 'repo-local',
17
+ sourceOfTruth: 'repo',
18
+ planningArtifacts: input.artifactIds,
19
+ linkedContext: [],
20
+ allowedEditRoots: scope.allowedEditRoots,
21
+ requiresAffectedAreaSelection: false,
22
+ constraints: scope.constraints,
23
+ };
24
+ }
25
+ function editScope(input) {
26
+ return {
27
+ allowedEditRoots: [input.projectRoot],
28
+ constraints: ['Repo-local change artifacts and implementation edits are scoped to this project.'],
29
+ };
30
+ }
31
+ export function resolveNextStep(input) {
32
+ const readyArtifact = input.artifactStatuses.find((artifact) => artifact.status === 'ready');
33
+ if (readyArtifact) {
34
+ const command = `freespec instructions ${readyArtifact.id} --change "${input.changeName}" --json`;
35
+ return { command, sentence: `Run ${command} before writing that artifact.` };
36
+ }
37
+ if (input.allArtifactsComplete) {
38
+ const command = `freespec instructions apply --change "${input.changeName}" --json`;
39
+ return {
40
+ command,
41
+ sentence: `All planning artifacts are complete. Run ${command} to inspect implementation progress.`,
42
+ };
43
+ }
44
+ return undefined;
45
+ }
46
+ export function buildNextSteps(input) {
47
+ const step = resolveNextStep(input);
48
+ return step ? [step.sentence] : [];
49
+ }
50
+ //# sourceMappingURL=change-status-policy.js.map
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Amazon Q Developer Command Adapter
3
+ *
4
+ * Formats commands for Amazon Q Developer following its frontmatter specification.
5
+ */
6
+ import type { ToolCommandAdapter } from '../types.js';
7
+ /**
8
+ * Amazon Q adapter for command generation.
9
+ * File path: .amazonq/prompts/freespec-<id>.md
10
+ * Frontmatter: description
11
+ *
12
+ * Amazon Q surfaces these files as its prompt library rather than as slash
13
+ * commands: the user types `@freespec-propose`, not `/freespec-propose`.
14
+ * https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/command-line-prompts.html
15
+ */
16
+ export declare const amazonQAdapter: ToolCommandAdapter;
17
+ //# sourceMappingURL=amazon-q.d.ts.map
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Amazon Q Developer Command Adapter
3
+ *
4
+ * Formats commands for Amazon Q Developer following its frontmatter specification.
5
+ */
6
+ import path from 'path';
7
+ import { escapeYamlValue } from '../yaml.js';
8
+ /**
9
+ * Amazon Q adapter for command generation.
10
+ * File path: .amazonq/prompts/freespec-<id>.md
11
+ * Frontmatter: description
12
+ *
13
+ * Amazon Q surfaces these files as its prompt library rather than as slash
14
+ * commands: the user types `@freespec-propose`, not `/freespec-propose`.
15
+ * https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/command-line-prompts.html
16
+ */
17
+ export const amazonQAdapter = {
18
+ toolId: 'amazon-q',
19
+ getFilePath(commandId) {
20
+ return path.join('.amazonq', 'prompts', `freespec-${commandId}.md`);
21
+ },
22
+ invocationPrefix: '@',
23
+ formatFile(content) {
24
+ return `---
25
+ description: ${escapeYamlValue(content.description)}
26
+ ---
27
+
28
+ ${content.body}
29
+ `;
30
+ },
31
+ };
32
+ //# sourceMappingURL=amazon-q.js.map
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Antigravity Command Adapter
3
+ *
4
+ * Formats commands for Antigravity following its frontmatter specification.
5
+ */
6
+ import type { ToolCommandAdapter } from '../types.js';
7
+ /**
8
+ * Antigravity adapter for command generation.
9
+ * File path: .agents/workflows/freespec-<id>.md
10
+ * Frontmatter: description
11
+ */
12
+ export declare const antigravityAdapter: ToolCommandAdapter;
13
+ //# sourceMappingURL=antigravity.d.ts.map
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Antigravity Command Adapter
3
+ *
4
+ * Formats commands for Antigravity following its frontmatter specification.
5
+ */
6
+ import path from 'path';
7
+ import { escapeYamlValue } from '../yaml.js';
8
+ /**
9
+ * Antigravity adapter for command generation.
10
+ * File path: .agents/workflows/freespec-<id>.md
11
+ * Frontmatter: description
12
+ */
13
+ export const antigravityAdapter = {
14
+ toolId: 'antigravity',
15
+ getFilePath(commandId) {
16
+ return path.join('.agents', 'workflows', `freespec-${commandId}.md`);
17
+ },
18
+ formatFile(content) {
19
+ return `---
20
+ description: ${escapeYamlValue(content.description)}
21
+ ---
22
+
23
+ ${content.body}
24
+ `;
25
+ },
26
+ };
27
+ //# sourceMappingURL=antigravity.js.map
@@ -0,0 +1,24 @@
1
+ /**
2
+ * AtomCode Command Adapter
3
+ *
4
+ * Formats project commands for AtomCode.
5
+ * https://github.com/atomgit-atomcode/atomcode#custom-commands
6
+ */
7
+ import type { ToolCommandAdapter } from '../types.js';
8
+ /**
9
+ * AtomCode adapter for command generation.
10
+ * File path: .atomcode/commands/freespec-<id>.md
11
+ * Frontmatter: name, description, args
12
+ *
13
+ * AtomCode's custom-command parser reads name and args literally without YAML
14
+ * unquoting, so these controlled identifiers must stay unquoted.
15
+ * The command name matches the filename.
16
+ *
17
+ * `args` mirrors what the workflow actually accepts. AtomCode executes an
18
+ * `args: none` command straight from the slash menu, while `optional` completes
19
+ * to `/name ` and waits for a second Enter. Advertising arguments a workflow
20
+ * never reads would cost every user that extra keystroke, so only workflows
21
+ * carrying an `**Input**:` contract declare `optional` and receive $ARGUMENTS.
22
+ */
23
+ export declare const atomcodeAdapter: ToolCommandAdapter;
24
+ //# sourceMappingURL=atomcode.d.ts.map
@@ -0,0 +1,46 @@
1
+ /**
2
+ * AtomCode Command Adapter
3
+ *
4
+ * Formats project commands for AtomCode.
5
+ * https://github.com/atomgit-atomcode/atomcode#custom-commands
6
+ */
7
+ import path from 'path';
8
+ import { stringify } from 'yaml';
9
+ /** A workflow declares its invocation input with an `**Input**:` heading. */
10
+ const INPUT_HEADING = /^\*\*Input\*\*:/m;
11
+ /**
12
+ * AtomCode adapter for command generation.
13
+ * File path: .atomcode/commands/freespec-<id>.md
14
+ * Frontmatter: name, description, args
15
+ *
16
+ * AtomCode's custom-command parser reads name and args literally without YAML
17
+ * unquoting, so these controlled identifiers must stay unquoted.
18
+ * The command name matches the filename.
19
+ *
20
+ * `args` mirrors what the workflow actually accepts. AtomCode executes an
21
+ * `args: none` command straight from the slash menu, while `optional` completes
22
+ * to `/name ` and waits for a second Enter. Advertising arguments a workflow
23
+ * never reads would cost every user that extra keystroke, so only workflows
24
+ * carrying an `**Input**:` contract declare `optional` and receive $ARGUMENTS.
25
+ */
26
+ export const atomcodeAdapter = {
27
+ toolId: 'atomcode',
28
+ getFilePath(commandId) {
29
+ return path.join('.atomcode', 'commands', `freespec-${commandId}.md`);
30
+ },
31
+ formatFile(content) {
32
+ // Keep ordinary descriptions plain for the literal custom-command parser,
33
+ // while keeping special values valid YAML for frontmatter consumers.
34
+ const description = stringify({ description: content.description }, { lineWidth: 0, blockQuote: false });
35
+ const acceptsInput = INPUT_HEADING.test(content.body);
36
+ const argumentsBlock = acceptsInput ? '\n**Provided arguments**: $ARGUMENTS\n' : '';
37
+ return `---
38
+ name: freespec-${content.id}
39
+ ${description}args: ${acceptsInput ? 'optional' : 'none'}
40
+ ---
41
+ ${argumentsBlock}
42
+ ${content.body}
43
+ `;
44
+ },
45
+ };
46
+ //# sourceMappingURL=atomcode.js.map
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Auggie (Augment CLI) Command Adapter
3
+ *
4
+ * Formats commands for Auggie following its frontmatter specification.
5
+ */
6
+ import type { ToolCommandAdapter } from '../types.js';
7
+ /**
8
+ * Auggie adapter for command generation.
9
+ * File path: .augment/commands/freespec-<id>.md
10
+ * Frontmatter: description, argument-hint
11
+ */
12
+ export declare const auggieAdapter: ToolCommandAdapter;
13
+ //# sourceMappingURL=auggie.d.ts.map
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Auggie (Augment CLI) Command Adapter
3
+ *
4
+ * Formats commands for Auggie following its frontmatter specification.
5
+ */
6
+ import path from 'path';
7
+ import { escapeYamlValue } from '../yaml.js';
8
+ /**
9
+ * Auggie adapter for command generation.
10
+ * File path: .augment/commands/freespec-<id>.md
11
+ * Frontmatter: description, argument-hint
12
+ */
13
+ export const auggieAdapter = {
14
+ toolId: 'auggie',
15
+ getFilePath(commandId) {
16
+ return path.join('.augment', 'commands', `freespec-${commandId}.md`);
17
+ },
18
+ formatFile(content) {
19
+ return `---
20
+ description: ${escapeYamlValue(content.description)}
21
+ argument-hint: command arguments
22
+ ---
23
+
24
+ ${content.body}
25
+ `;
26
+ },
27
+ };
28
+ //# sourceMappingURL=auggie.js.map
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Bob Shell Command Adapter
3
+ *
4
+ * Formats commands for Bob Shell following its markdown specification.
5
+ * Commands are stored in .bob/commands/ directory.
6
+ */
7
+ import type { ToolCommandAdapter } from '../types.js';
8
+ /**
9
+ * Bob Shell adapter for command generation.
10
+ * File path: .bob/commands/freespec-<id>.md
11
+ * Frontmatter: description
12
+ *
13
+ * Bob uses the filename (minus .md) as the slash command name, so
14
+ * freespec-propose.md → /freespec-propose. generateCommand rewrites the body's
15
+ * command references to that form before this adapter formats it.
16
+ */
17
+ export declare const bobAdapter: ToolCommandAdapter;
18
+ //# sourceMappingURL=bob.d.ts.map
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Bob Shell Command Adapter
3
+ *
4
+ * Formats commands for Bob Shell following its markdown specification.
5
+ * Commands are stored in .bob/commands/ directory.
6
+ */
7
+ import path from 'path';
8
+ import { escapeYamlValue } from '../yaml.js';
9
+ /**
10
+ * Bob Shell adapter for command generation.
11
+ * File path: .bob/commands/freespec-<id>.md
12
+ * Frontmatter: description
13
+ *
14
+ * Bob uses the filename (minus .md) as the slash command name, so
15
+ * freespec-propose.md → /freespec-propose. generateCommand rewrites the body's
16
+ * command references to that form before this adapter formats it.
17
+ */
18
+ export const bobAdapter = {
19
+ toolId: 'bob',
20
+ getFilePath(commandId) {
21
+ return path.join('.bob', 'commands', `freespec-${commandId}.md`);
22
+ },
23
+ formatFile(content) {
24
+ return `---
25
+ description: ${escapeYamlValue(content.description)}
26
+ argument-hint: command arguments
27
+ ---
28
+
29
+ ${content.body}
30
+ `;
31
+ },
32
+ };
33
+ //# sourceMappingURL=bob.js.map