wingfoil 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (339) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +334 -0
  3. package/dist/cli/error.d.ts +11 -0
  4. package/dist/cli/error.d.ts.map +1 -0
  5. package/dist/cli/error.js +27 -0
  6. package/dist/cli/error.js.map +1 -0
  7. package/dist/cli/exit.d.ts +19 -0
  8. package/dist/cli/exit.d.ts.map +1 -0
  9. package/dist/cli/exit.js +14 -0
  10. package/dist/cli/exit.js.map +1 -0
  11. package/dist/cli/index.d.ts +28 -0
  12. package/dist/cli/index.d.ts.map +1 -0
  13. package/dist/cli/index.js +36 -0
  14. package/dist/cli/index.js.map +1 -0
  15. package/dist/cli/init-command.d.ts +34 -0
  16. package/dist/cli/init-command.d.ts.map +1 -0
  17. package/dist/cli/init-command.js +100 -0
  18. package/dist/cli/init-command.js.map +1 -0
  19. package/dist/cli/mcp-command.d.ts +24 -0
  20. package/dist/cli/mcp-command.d.ts.map +1 -0
  21. package/dist/cli/mcp-command.js +42 -0
  22. package/dist/cli/mcp-command.js.map +1 -0
  23. package/dist/cli/output.d.ts +13 -0
  24. package/dist/cli/output.d.ts.map +1 -0
  25. package/dist/cli/output.js +28 -0
  26. package/dist/cli/output.js.map +1 -0
  27. package/dist/cli/program.d.ts +12 -0
  28. package/dist/cli/program.d.ts.map +1 -0
  29. package/dist/cli/program.js +279 -0
  30. package/dist/cli/program.js.map +1 -0
  31. package/dist/cli/registrar.d.ts +69 -0
  32. package/dist/cli/registrar.d.ts.map +1 -0
  33. package/dist/cli/registrar.js +82 -0
  34. package/dist/cli/registrar.js.map +1 -0
  35. package/dist/cli.d.ts +3 -0
  36. package/dist/cli.d.ts.map +1 -0
  37. package/dist/cli.js +45 -0
  38. package/dist/cli.js.map +1 -0
  39. package/dist/core/approval-authority.d.ts +83 -0
  40. package/dist/core/approval-authority.d.ts.map +1 -0
  41. package/dist/core/approval-authority.js +112 -0
  42. package/dist/core/approval-authority.js.map +1 -0
  43. package/dist/core/builtin-asset.d.ts +71 -0
  44. package/dist/core/builtin-asset.d.ts.map +1 -0
  45. package/dist/core/builtin-asset.js +137 -0
  46. package/dist/core/builtin-asset.js.map +1 -0
  47. package/dist/core/builtin-integrity.d.ts +32 -0
  48. package/dist/core/builtin-integrity.d.ts.map +1 -0
  49. package/dist/core/builtin-integrity.js +148 -0
  50. package/dist/core/builtin-integrity.js.map +1 -0
  51. package/dist/core/confinement.d.ts +57 -0
  52. package/dist/core/confinement.d.ts.map +1 -0
  53. package/dist/core/confinement.js +108 -0
  54. package/dist/core/confinement.js.map +1 -0
  55. package/dist/core/context.d.ts +187 -0
  56. package/dist/core/context.d.ts.map +1 -0
  57. package/dist/core/context.js +192 -0
  58. package/dist/core/context.js.map +1 -0
  59. package/dist/core/directive-assign.d.ts +131 -0
  60. package/dist/core/directive-assign.d.ts.map +1 -0
  61. package/dist/core/directive-assign.js +352 -0
  62. package/dist/core/directive-assign.js.map +1 -0
  63. package/dist/core/directives-list.d.ts +80 -0
  64. package/dist/core/directives-list.d.ts.map +1 -0
  65. package/dist/core/directives-list.js +148 -0
  66. package/dist/core/directives-list.js.map +1 -0
  67. package/dist/core/exit-code.d.ts +85 -0
  68. package/dist/core/exit-code.d.ts.map +1 -0
  69. package/dist/core/exit-code.js +163 -0
  70. package/dist/core/exit-code.js.map +1 -0
  71. package/dist/core/git-identity.d.ts +32 -0
  72. package/dist/core/git-identity.d.ts.map +1 -0
  73. package/dist/core/git-identity.js +72 -0
  74. package/dist/core/git-identity.js.map +1 -0
  75. package/dist/core/index.d.ts +388 -0
  76. package/dist/core/index.d.ts.map +1 -0
  77. package/dist/core/index.js +1331 -0
  78. package/dist/core/index.js.map +1 -0
  79. package/dist/core/init.d.ts +78 -0
  80. package/dist/core/init.d.ts.map +1 -0
  81. package/dist/core/init.js +167 -0
  82. package/dist/core/init.js.map +1 -0
  83. package/dist/core/loaders.d.ts +174 -0
  84. package/dist/core/loaders.d.ts.map +1 -0
  85. package/dist/core/loaders.js +364 -0
  86. package/dist/core/loaders.js.map +1 -0
  87. package/dist/core/memory-add-type.d.ts +43 -0
  88. package/dist/core/memory-add-type.d.ts.map +1 -0
  89. package/dist/core/memory-add-type.js +151 -0
  90. package/dist/core/memory-add-type.js.map +1 -0
  91. package/dist/core/memory-transition.d.ts +111 -0
  92. package/dist/core/memory-transition.d.ts.map +1 -0
  93. package/dist/core/memory-transition.js +269 -0
  94. package/dist/core/memory-transition.js.map +1 -0
  95. package/dist/core/registry.d.ts +189 -0
  96. package/dist/core/registry.d.ts.map +1 -0
  97. package/dist/core/registry.js +66 -0
  98. package/dist/core/registry.js.map +1 -0
  99. package/dist/core/relevance.d.ts +86 -0
  100. package/dist/core/relevance.d.ts.map +1 -0
  101. package/dist/core/relevance.js +258 -0
  102. package/dist/core/relevance.js.map +1 -0
  103. package/dist/core/require-reason.d.ts +27 -0
  104. package/dist/core/require-reason.d.ts.map +1 -0
  105. package/dist/core/require-reason.js +95 -0
  106. package/dist/core/require-reason.js.map +1 -0
  107. package/dist/core/types.d.ts +45 -0
  108. package/dist/core/types.d.ts.map +1 -0
  109. package/dist/core/types.js +22 -0
  110. package/dist/core/types.js.map +1 -0
  111. package/dist/core/usage-error.d.ts +20 -0
  112. package/dist/core/usage-error.d.ts.map +1 -0
  113. package/dist/core/usage-error.js +29 -0
  114. package/dist/core/usage-error.js.map +1 -0
  115. package/dist/core/write-guard.d.ts +99 -0
  116. package/dist/core/write-guard.d.ts.map +1 -0
  117. package/dist/core/write-guard.js +247 -0
  118. package/dist/core/write-guard.js.map +1 -0
  119. package/dist/directives/create.d.ts +47 -0
  120. package/dist/directives/create.d.ts.map +1 -0
  121. package/dist/directives/create.js +82 -0
  122. package/dist/directives/create.js.map +1 -0
  123. package/dist/directives/index.d.ts +20 -0
  124. package/dist/directives/index.d.ts.map +1 -0
  125. package/dist/directives/index.js +32 -0
  126. package/dist/directives/index.js.map +1 -0
  127. package/dist/directives/roles-edit.d.ts +53 -0
  128. package/dist/directives/roles-edit.d.ts.map +1 -0
  129. package/dist/directives/roles-edit.js +286 -0
  130. package/dist/directives/roles-edit.js.map +1 -0
  131. package/dist/directives/schema.d.ts +65 -0
  132. package/dist/directives/schema.d.ts.map +1 -0
  133. package/dist/directives/schema.js +68 -0
  134. package/dist/directives/schema.js.map +1 -0
  135. package/dist/dna/edit.d.ts +61 -0
  136. package/dist/dna/edit.d.ts.map +1 -0
  137. package/dist/dna/edit.js +429 -0
  138. package/dist/dna/edit.js.map +1 -0
  139. package/dist/dna/index.d.ts +24 -0
  140. package/dist/dna/index.d.ts.map +1 -0
  141. package/dist/dna/index.js +59 -0
  142. package/dist/dna/index.js.map +1 -0
  143. package/dist/dna/mutate.d.ts +74 -0
  144. package/dist/dna/mutate.d.ts.map +1 -0
  145. package/dist/dna/mutate.js +318 -0
  146. package/dist/dna/mutate.js.map +1 -0
  147. package/dist/dna/path.d.ts +175 -0
  148. package/dist/dna/path.d.ts.map +1 -0
  149. package/dist/dna/path.js +289 -0
  150. package/dist/dna/path.js.map +1 -0
  151. package/dist/dna/roles.d.ts +57 -0
  152. package/dist/dna/roles.d.ts.map +1 -0
  153. package/dist/dna/roles.js +50 -0
  154. package/dist/dna/roles.js.map +1 -0
  155. package/dist/dna/schema.d.ts +172 -0
  156. package/dist/dna/schema.d.ts.map +1 -0
  157. package/dist/dna/schema.js +182 -0
  158. package/dist/dna/schema.js.map +1 -0
  159. package/dist/dna/set.d.ts +145 -0
  160. package/dist/dna/set.d.ts.map +1 -0
  161. package/dist/dna/set.js +428 -0
  162. package/dist/dna/set.js.map +1 -0
  163. package/dist/mcp/dna-resource.d.ts +16 -0
  164. package/dist/mcp/dna-resource.d.ts.map +1 -0
  165. package/dist/mcp/dna-resource.js +56 -0
  166. package/dist/mcp/dna-resource.js.map +1 -0
  167. package/dist/mcp/index.d.ts +49 -0
  168. package/dist/mcp/index.d.ts.map +1 -0
  169. package/dist/mcp/index.js +60 -0
  170. package/dist/mcp/index.js.map +1 -0
  171. package/dist/mcp/memory-resource.d.ts +17 -0
  172. package/dist/mcp/memory-resource.d.ts.map +1 -0
  173. package/dist/mcp/memory-resource.js +133 -0
  174. package/dist/mcp/memory-resource.js.map +1 -0
  175. package/dist/mcp/prompt.d.ts +48 -0
  176. package/dist/mcp/prompt.d.ts.map +1 -0
  177. package/dist/mcp/prompt.js +176 -0
  178. package/dist/mcp/prompt.js.map +1 -0
  179. package/dist/mcp/read-only.d.ts +42 -0
  180. package/dist/mcp/read-only.d.ts.map +1 -0
  181. package/dist/mcp/read-only.js +93 -0
  182. package/dist/mcp/read-only.js.map +1 -0
  183. package/dist/mcp/registrar.d.ts +54 -0
  184. package/dist/mcp/registrar.d.ts.map +1 -0
  185. package/dist/mcp/registrar.js +72 -0
  186. package/dist/mcp/registrar.js.map +1 -0
  187. package/dist/mcp/server.d.ts +58 -0
  188. package/dist/mcp/server.d.ts.map +1 -0
  189. package/dist/mcp/server.js +64 -0
  190. package/dist/mcp/server.js.map +1 -0
  191. package/dist/mcp/workflow-resource.d.ts +17 -0
  192. package/dist/mcp/workflow-resource.d.ts.map +1 -0
  193. package/dist/mcp/workflow-resource.js +63 -0
  194. package/dist/mcp/workflow-resource.js.map +1 -0
  195. package/dist/memory/add.d.ts +50 -0
  196. package/dist/memory/add.d.ts.map +1 -0
  197. package/dist/memory/add.js +131 -0
  198. package/dist/memory/add.js.map +1 -0
  199. package/dist/memory/audit.d.ts +177 -0
  200. package/dist/memory/audit.d.ts.map +1 -0
  201. package/dist/memory/audit.js +287 -0
  202. package/dist/memory/audit.js.map +1 -0
  203. package/dist/memory/commit-message.d.ts +146 -0
  204. package/dist/memory/commit-message.d.ts.map +1 -0
  205. package/dist/memory/commit-message.js +203 -0
  206. package/dist/memory/commit-message.js.map +1 -0
  207. package/dist/memory/entry.d.ts +56 -0
  208. package/dist/memory/entry.d.ts.map +1 -0
  209. package/dist/memory/entry.js +28 -0
  210. package/dist/memory/entry.js.map +1 -0
  211. package/dist/memory/frontmatter-edit.d.ts +68 -0
  212. package/dist/memory/frontmatter-edit.d.ts.map +1 -0
  213. package/dist/memory/frontmatter-edit.js +333 -0
  214. package/dist/memory/frontmatter-edit.js.map +1 -0
  215. package/dist/memory/git-log.d.ts +32 -0
  216. package/dist/memory/git-log.d.ts.map +1 -0
  217. package/dist/memory/git-log.js +100 -0
  218. package/dist/memory/git-log.js.map +1 -0
  219. package/dist/memory/history.d.ts +142 -0
  220. package/dist/memory/history.d.ts.map +1 -0
  221. package/dist/memory/history.js +250 -0
  222. package/dist/memory/history.js.map +1 -0
  223. package/dist/memory/index.d.ts +58 -0
  224. package/dist/memory/index.d.ts.map +1 -0
  225. package/dist/memory/index.js +107 -0
  226. package/dist/memory/index.js.map +1 -0
  227. package/dist/memory/query.d.ts +150 -0
  228. package/dist/memory/query.d.ts.map +1 -0
  229. package/dist/memory/query.js +307 -0
  230. package/dist/memory/query.js.map +1 -0
  231. package/dist/memory/reject.d.ts +11 -0
  232. package/dist/memory/reject.d.ts.map +1 -0
  233. package/dist/memory/reject.js +32 -0
  234. package/dist/memory/reject.js.map +1 -0
  235. package/dist/memory/schema.d.ts +104 -0
  236. package/dist/memory/schema.d.ts.map +1 -0
  237. package/dist/memory/schema.js +161 -0
  238. package/dist/memory/schema.js.map +1 -0
  239. package/dist/memory/state-machine.d.ts +166 -0
  240. package/dist/memory/state-machine.d.ts.map +1 -0
  241. package/dist/memory/state-machine.js +431 -0
  242. package/dist/memory/state-machine.js.map +1 -0
  243. package/dist/memory/submit.d.ts +11 -0
  244. package/dist/memory/submit.d.ts.map +1 -0
  245. package/dist/memory/submit.js +44 -0
  246. package/dist/memory/submit.js.map +1 -0
  247. package/dist/storage/builtin-directives.d.ts +54 -0
  248. package/dist/storage/builtin-directives.d.ts.map +1 -0
  249. package/dist/storage/builtin-directives.js +152 -0
  250. package/dist/storage/builtin-directives.js.map +1 -0
  251. package/dist/storage/commit.d.ts +92 -0
  252. package/dist/storage/commit.d.ts.map +1 -0
  253. package/dist/storage/commit.js +201 -0
  254. package/dist/storage/commit.js.map +1 -0
  255. package/dist/storage/confinement.d.ts +93 -0
  256. package/dist/storage/confinement.d.ts.map +1 -0
  257. package/dist/storage/confinement.js +164 -0
  258. package/dist/storage/confinement.js.map +1 -0
  259. package/dist/storage/document.d.ts +27 -0
  260. package/dist/storage/document.d.ts.map +1 -0
  261. package/dist/storage/document.js +52 -0
  262. package/dist/storage/document.js.map +1 -0
  263. package/dist/storage/errors.d.ts +36 -0
  264. package/dist/storage/errors.d.ts.map +1 -0
  265. package/dist/storage/errors.js +46 -0
  266. package/dist/storage/errors.js.map +1 -0
  267. package/dist/storage/frontmatter.d.ts +27 -0
  268. package/dist/storage/frontmatter.d.ts.map +1 -0
  269. package/dist/storage/frontmatter.js +37 -0
  270. package/dist/storage/frontmatter.js.map +1 -0
  271. package/dist/storage/git-root.d.ts +17 -0
  272. package/dist/storage/git-root.d.ts.map +1 -0
  273. package/dist/storage/git-root.js +49 -0
  274. package/dist/storage/git-root.js.map +1 -0
  275. package/dist/storage/index.d.ts +29 -0
  276. package/dist/storage/index.d.ts.map +1 -0
  277. package/dist/storage/index.js +66 -0
  278. package/dist/storage/index.js.map +1 -0
  279. package/dist/storage/init-state.d.ts +9 -0
  280. package/dist/storage/init-state.d.ts.map +1 -0
  281. package/dist/storage/init-state.js +24 -0
  282. package/dist/storage/init-state.js.map +1 -0
  283. package/dist/storage/layout.d.ts +51 -0
  284. package/dist/storage/layout.d.ts.map +1 -0
  285. package/dist/storage/layout.js +88 -0
  286. package/dist/storage/layout.js.map +1 -0
  287. package/dist/storage/memory-path.d.ts +72 -0
  288. package/dist/storage/memory-path.d.ts.map +1 -0
  289. package/dist/storage/memory-path.js +127 -0
  290. package/dist/storage/memory-path.js.map +1 -0
  291. package/dist/storage/snapshot.d.ts +16 -0
  292. package/dist/storage/snapshot.d.ts.map +1 -0
  293. package/dist/storage/snapshot.js +72 -0
  294. package/dist/storage/snapshot.js.map +1 -0
  295. package/dist/storage/templates.d.ts +88 -0
  296. package/dist/storage/templates.d.ts.map +1 -0
  297. package/dist/storage/templates.js +422 -0
  298. package/dist/storage/templates.js.map +1 -0
  299. package/dist/validation/error-mapper.d.ts +16 -0
  300. package/dist/validation/error-mapper.d.ts.map +1 -0
  301. package/dist/validation/error-mapper.js +18 -0
  302. package/dist/validation/error-mapper.js.map +1 -0
  303. package/dist/validation/errors.d.ts +69 -0
  304. package/dist/validation/errors.d.ts.map +1 -0
  305. package/dist/validation/errors.js +69 -0
  306. package/dist/validation/errors.js.map +1 -0
  307. package/dist/validation/id.d.ts +16 -0
  308. package/dist/validation/id.d.ts.map +1 -0
  309. package/dist/validation/id.js +177 -0
  310. package/dist/validation/id.js.map +1 -0
  311. package/dist/validation/index.d.ts +18 -0
  312. package/dist/validation/index.d.ts.map +1 -0
  313. package/dist/validation/index.js +37 -0
  314. package/dist/validation/index.js.map +1 -0
  315. package/dist/validation/secret-scan.d.ts +129 -0
  316. package/dist/validation/secret-scan.d.ts.map +1 -0
  317. package/dist/validation/secret-scan.js +367 -0
  318. package/dist/validation/secret-scan.js.map +1 -0
  319. package/dist/validation/two-pass.d.ts +24 -0
  320. package/dist/validation/two-pass.d.ts.map +1 -0
  321. package/dist/validation/two-pass.js +24 -0
  322. package/dist/validation/two-pass.js.map +1 -0
  323. package/dist/validation/warning.d.ts +31 -0
  324. package/dist/validation/warning.d.ts.map +1 -0
  325. package/dist/validation/warning.js +81 -0
  326. package/dist/validation/warning.js.map +1 -0
  327. package/dist/validation/yaml.d.ts +9 -0
  328. package/dist/validation/yaml.d.ts.map +1 -0
  329. package/dist/validation/yaml.js +30 -0
  330. package/dist/validation/yaml.js.map +1 -0
  331. package/dist/workflow/index.d.ts +10 -0
  332. package/dist/workflow/index.d.ts.map +1 -0
  333. package/dist/workflow/index.js +16 -0
  334. package/dist/workflow/index.js.map +1 -0
  335. package/dist/workflow/schema.d.ts +89 -0
  336. package/dist/workflow/schema.d.ts.map +1 -0
  337. package/dist/workflow/schema.js +73 -0
  338. package/dist/workflow/schema.js.map +1 -0
  339. package/package.json +78 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Roberto Pompermaier
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,334 @@
1
+ # WingFoil
2
+
3
+ **A structured harness for deterministic AI-assisted software development.**
4
+
5
+ WingFoil solves a critical problem: as your software project grows, AI agents lose consistency and control. Context gets
6
+ scattered, conventions drift, and decisions made in one session don't carry forward to the next.
7
+
8
+ WingFoil centralizes your project's **memory, DNA, and directives** in a structured, git-backed format — giving both
9
+ humans and AI agents a shared source of truth.
10
+
11
+ ---
12
+
13
+ ## The Problem
14
+
15
+ When using AI agents to write software, you face growing friction:
16
+
17
+ - **Context collapse:** Large context windows and full codebase scans become expensive and noisy
18
+ - **Convention drift:** Agents don't respect established patterns unless you re-explain them every session
19
+ - **Decision scatter:** Architectural decisions, patterns, and constraints live in Slack, old docs, or nowhere
20
+ - **Governance gaps:** No way to enforce rules consistently across human developers and AI agents
21
+
22
+ The larger the project, the worse the signal-to-noise ratio.
23
+
24
+ ---
25
+
26
+ ## The Solution
27
+
28
+ WingFoil provides a **structured, authoritative interface** to your project:
29
+
30
+ - **Project Memory** — Git-backed storage for decisions, artifacts, and domain knowledge
31
+ - **Project DNA** — Structural map of modules, tech stack, and conventions
32
+ - **Project Directives** — Role-based rules that both humans and agents respect
33
+ - **Workflow State Management** — Unified tracking and communication of project flow, progress, and blockers
34
+ - **Interaction Layer** — CLI for humans, MCP for agents
35
+
36
+ This keeps everything synchronized and deterministic.
37
+
38
+ ---
39
+
40
+ ## Who It's For
41
+
42
+ **Alex, the Solo Developer**
43
+ Every new AI session forces you to re-explain context. WingFoil loads relevant info in seconds — no more context loss
44
+ between sessions.
45
+
46
+ **Sam, the Code Reviewer**
47
+ You're starting with AI for code review but aren't confident enough for full development yet. WingFoil lets you enforce
48
+ quality standards and gradually expand AI usage as you gain confidence.
49
+
50
+ **Jordan, the Team Developer**
51
+ You don't know what conventions your tech lead has defined, and agents ignore team rules. WingFoil keeps everyone
52
+ aligned on directives, decisions, and project state without constant manual updates.
53
+
54
+ **Morgan, the Tech Lead**
55
+ You need agents to follow the team's rules automatically, not invent new ones. WingFoil encodes governance once; it
56
+ auto-loads for every agent. It also keeps the whole team synchronized on progress and blockers.
57
+
58
+ **Casey, the Manager**
59
+ You need visibility into decisions and methodology. WingFoil provides an audit trail, queryable knowledge base, and
60
+ real-time tracking of project state.
61
+
62
+ ---
63
+
64
+ ## Key Features
65
+
66
+ ### Five Pillars — status in 0.2.1
67
+
68
+ - ✓ **Project Memory** — Git-backed documents (tasks, ADRs, decision-logs, bugs, specs…) with per-type
69
+ state machines, approval gates and an audit trail (**shipped**: create, search, submit, approve,
70
+ reject, deprecate, history)
71
+ - ✓ **Project DNA** — Structured config: modules, tech stack, team & roles, resource paths
72
+ (**shipped**: show, set, add, update, remove)
73
+ - ✓ **Project Directives** — Role-scoped rules: six built-in templates installed by `init`, your own
74
+ custom directives, role assignments (**shipped in 0.2.1**)
75
+ - ✓ **Interaction Layer** — CLI for humans and agents; MCP server for agents with read-only Resources
76
+ and one Prompt per role (**shipped**)
77
+ - **Workflow State Management** — workflows are declared and listable today; the engine that starts
78
+ and tracks them is planned for 0.3
79
+
80
+ ### CLI at a glance
81
+
82
+ | Area | Commands |
83
+ |---|---|
84
+ | Setup | `wingfoil init [--template Scrum\|Kanban]` · `wingfoil mcp` |
85
+ | DNA | `wingfoil dna show [section]` · `dna set <path> --value <v>` · `dna add` · `dna update` · `dna remove` · `wingfoil paths [category]` |
86
+ | Memory | `wingfoil memory add --type <t> --title <t>` · `submit <id>` · `approve <id> --reason <r>` · `reject <id> --reason <r>` · `deprecate <id>` · `history <id>` · `search [keyword]` |
87
+ | Directives | `wingfoil directive create --name <n>` · `directive assign --directive <n> --role <r>` · `directive remove <n>` · `wingfoil directives list [--role <r>]` |
88
+ | Workflow | `wingfoil workflow list` |
89
+
90
+ Every command accepts `--format console|json|yaml` and ends with exit code `0` (success), `1` (refused)
91
+ or `2` (bad command line). Full details: **[CLI reference](docs/cli-reference.md)**.
92
+
93
+ ### For AI Agents
94
+
95
+ - ✓ **MCP server** (`wingfoil mcp`, stdio) — DNA, Memory and workflows as read-only Resources, plus a
96
+ `<role>-session` Prompt per role that embeds the role's directives
97
+ - ✓ **Read-only by construction** — the MCP surface has no Tools; changes go through the CLI, and
98
+ approvals belong to a human holding the `approver` role
99
+ - ✓ **[`docs/agents.md`](docs/agents.md)** — the same knowledge as a document an agent can read from a
100
+ link: what WingFoil is, the rules to follow, the CLI equivalent of every MCP Resource and Prompt
101
+
102
+ ---
103
+
104
+ ## Getting Started
105
+
106
+ ### Installation
107
+
108
+ ```bash
109
+ npm install -g wingfoil
110
+ ```
111
+
112
+ This installs the `wingfoil` binary (**Node.js 22.12+** required). Verify it:
113
+
114
+ ```bash
115
+ wingfoil --version
116
+ ```
117
+
118
+ ### Quick Start
119
+
120
+ Run this from the root of a **git repository** with a git identity configured
121
+ (`git config user.name` / `user.email`).
122
+
123
+ **1. Initialize WingFoil** — scaffolds `.wingfoil/` (DNA, Memory schema and templates, directives,
124
+ workflows) and commits it:
125
+
126
+ ```bash
127
+ $ wingfoil init --template Scrum
128
+ ```
129
+
130
+ **2. Name the project and register yourself as the approver** — approvals need a team member holding
131
+ the `approver` role, with your git email:
132
+
133
+ ```console
134
+ $ wingfoil dna set project.name --value "My Project"
135
+ {
136
+ "key": "project.name",
137
+ "value": "My Project"
138
+ }
139
+ $ wingfoil dna add team.members --value "Ada Lovelace" --entry-email ada@example.com --entry-roles approver,developer
140
+ {
141
+ "key": "team.members",
142
+ "value": "Ada Lovelace"
143
+ }
144
+ ```
145
+
146
+ **3. Create a task, write it, submit it:**
147
+
148
+ ```console
149
+ $ wingfoil memory add --type task --title "My first task"
150
+ {
151
+ "id": "task-001-my-first-task",
152
+ "path": "docs/memory/task/task-001-my-first-task.md"
153
+ }
154
+ $ wingfoil memory submit task-001-my-first-task
155
+ {
156
+ "id": "task-001-my-first-task",
157
+ "path": "docs/memory/task/task-001-my-first-task.md",
158
+ "from": "draft",
159
+ "to": "pending"
160
+ }
161
+ ```
162
+
163
+ (Write the task's body in the file before submitting — the submit commit records it.)
164
+
165
+ **4. Approve it** — the commit records who approved and why:
166
+
167
+ ```console
168
+ $ wingfoil memory approve task-001-my-first-task --reason "Scope is clear."
169
+ {
170
+ "id": "task-001-my-first-task",
171
+ "path": "docs/memory/task/task-001-my-first-task.md",
172
+ "from": "pending",
173
+ "to": "approved"
174
+ }
175
+ $ git log -1 --format=%B
176
+ wf(task): approve task-001-my-first-task [pending → approved]
177
+
178
+ Approver: Ada Lovelace <ada@example.com> (approver)
179
+ Reason: Scope is clear.
180
+ ```
181
+
182
+ **5. Connect your AI agent** — for Claude Code, add `.mcp.json` at the repository root:
183
+
184
+ ```json
185
+ { "mcpServers": { "wingfoil": { "command": "wingfoil", "args": ["mcp"] } } }
186
+ ```
187
+
188
+ ### Documentation
189
+
190
+ | Document | For |
191
+ |---|---|
192
+ | **[User guide](docs/user-guide.md)** | Step by step: install, configure DNA / Memory / Directives, daily use, agents, CI |
193
+ | **[CLI reference](docs/cli-reference.md)** | Every command: arguments, output, exit codes, the commit it writes |
194
+ | **[Examples](docs/examples/)** | Runnable, self-checking scripts for the main scenarios |
195
+ | **[Guide for AI agents](docs/agents.md)** | What an agent needs to operate in a WingFoil project |
196
+ | **[Changelog](CHANGELOG.md)** | What changed in each release |
197
+
198
+ ---
199
+
200
+ ## Value Proposition
201
+
202
+ **For** developers and teams already using AI agents
203
+ **WingFoil** makes the development process **deterministic**
204
+ **By** centralizing memory, conventions, and directives — keeping them synchronized across all actors
205
+
206
+ ### Success Metric: Determinism Index
207
+
208
+ Two independent development runs from the same specs + WingFoil config using different AI agents should produce
209
+ substantially equivalent software, with all team members and agents maintaining shared understanding of project workflow
210
+ state, progress, and alignment.
211
+
212
+ ---
213
+
214
+ ## What Comes Later
215
+
216
+ **0.3 — Project Workflow:** the workflow engine (`workflow start|next|status|show|end`…), approval
217
+ routing by role, agent execution with directives and Memory context auto-loaded, reference workflow
218
+ templates, notifications when an approval is required.
219
+
220
+ **0.4 — Interaction Layer + Polish** · **1.0 — MVP complete**, all five pillars integrated.
221
+
222
+ Later, based on early adopter feedback: semantic search, IDE integrations beyond MCP, notification
223
+ routing (email, Slack), multi-project management.
224
+
225
+ ---
226
+
227
+ ## Release Roadmap
228
+
229
+ WingFoil is built one pillar per release until all five are integrated in 1.0.
230
+
231
+ | Release | Focus | Status |
232
+ |---|---|---|
233
+ | Lean Inception · Requirements | Product vision, USM · BDD · SARD · backlog | ✓ Complete |
234
+ | **0.1** | Project Memory + DNA | ✓ Released (not published to npm) |
235
+ | **0.2** | + Project Directives, Memory approvals, DNA editing, MCP role Prompts | 🔄 Being released |
236
+ | **0.3** | + Project Workflow | Planned |
237
+ | **0.4** | + Interaction Layer polish | Planned |
238
+ | **1.0** | MVP complete | Planned |
239
+
240
+ **Dogfooding:** WingFoil's own development is managed with WingFoil — its configuration lives under
241
+ `docs/self/`.
242
+
243
+ ---
244
+
245
+ ## Architecture Overview
246
+
247
+ ```
248
+ ┌─────────────────────────────────────────────────┐
249
+ │ Humans (CLI) Agents (MCP Client) │
250
+ ├─────────────────────────────────────────────────┤
251
+ │ WingFoil Harness │
252
+ │ ┌─────────────────────────────────────────┐ │
253
+ │ │ Memory | DNA | Directives | Workflow │ │
254
+ │ └─────────────────────────────────────────┘ │
255
+ ├─────────────────────────────────────────────────┤
256
+ │ Git Repository │
257
+ │ (versioning, audit trail, state history) │
258
+ └─────────────────────────────────────────────────┘
259
+ ```
260
+
261
+ - **CLI**: Humans (and agents) use `wingfoil` commands to manage Memory, DNA and Directives, and to read Workflows
262
+ - **MCP Server**: Agents connect via Model Context Protocol to query Memory/DNA, receive Directives, and view Workflow
263
+ definitions
264
+ - **Git Backend**: All changes (memory, decisions, workflow state) are versioned and auditable
265
+ - **Read-Only MCP**: The MCP surface is read-only; state changes go through the CLI, and approvals belong to a
266
+ human holding the `approver` role
267
+ - **Workflow Synchronization** *(0.3)*: All team members and agents stay aligned on current progress and blockers
268
+
269
+ ---
270
+
271
+ ## Project Documentation
272
+
273
+ Before implementation, the product is fully specified through a **traceable documentation pipeline** under `docs/`,
274
+ taking the Lean Inception vision down to an implementation-ready backlog (the *specification downcast*):
275
+
276
+ ```
277
+ docs/
278
+ ├── 01_vision/ Lean Inception — product brief, vision, personas, 8 journeys, features, sequencer, MVP canvas
279
+ ├── 02_requirements/ Specification downcast:
280
+ │ ├── 01_user_story_map/ User Story Map (Jeff Patton) — journey backbone + prioritized stories, incl. edge cases
281
+ │ ├── 02_bdd/ BDD suite (Gojko Adzic) — Gherkin scenarios per feature (happy + error/edge paths)
282
+ │ └── 03_sard/ System & Architecture Requirements (Volere) — NFRs with measurable Fit Criteria
283
+ └── 03_backlog/ Operational backlog — schema-validated JSON work items, partitioned by release wave
284
+ ```
285
+
286
+ **Traceability chain.** Every item links back through the layers:
287
+ `Backlog task → SARD requirement / BDD scenario → User Story → Journey → Vision feature`.
288
+
289
+ **MVP scope at a glance:**
290
+
291
+ | Layer | Artifact | Count |
292
+ |----------------|-------------------------------------------------------------|----------|
293
+ | Vision | User journeys | 8 |
294
+ | Vision | MVP features (5 pillars + notifications) | 63 |
295
+ | User Story Map | Journey files · edge-case / interruption stories | 7 · 14 |
296
+ | BDD | Gherkin feature files / scenarios | 63 / 190 |
297
+ | SARD | Architecture & NFR requirements (measurable Fit Criteria) | 43 |
298
+ | Backlog | Implementation-ready tasks (63 user stories + 43 technical) | 106 |
299
+
300
+ All artifacts are scheduled across 5 release waves (v0.1 → v1.0), sequenced by risk in
301
+ `docs/01_vision/07_sequencer.md`.
302
+
303
+ ---
304
+
305
+ ## License
306
+
307
+ MIT — open source and free to use.
308
+
309
+ ---
310
+
311
+ ## Contributing
312
+
313
+ Early feedback is welcome. Please open issues on GitHub to share:
314
+
315
+ - Use cases and pain points
316
+ - Feature requests
317
+ - Bug reports
318
+
319
+ See **[`COLLABORATION.md`](COLLABORATION.md)** — how to contribute through Memory artifacts
320
+ (Bug / Decision-Log / ADR / Tech-Spec) instead of code, with credit for the AI-generated work
321
+ derived from your contribution.
322
+
323
+ ---
324
+
325
+ ## Questions?
326
+
327
+ - **GitHub Issues:** Bug reports, feature requests
328
+ - **Documentation:** Start from the [user guide](docs/user-guide.md); WingFoil's own specifications (vision, USM · BDD ·
329
+ SARD, backlog) are under [`docs/`](docs/)
330
+ - **Community:** Join discussions (links coming soon)
331
+
332
+ ---
333
+
334
+ **WingFoil: Making AI-assisted development deterministic, not chaotic.**
@@ -0,0 +1,11 @@
1
+ import type { OutputFormat } from './output';
2
+ /**
3
+ * Write an error to stderr in the consistent spec-005 §3 format for the active `--format`: a
4
+ * `{error, hint?}` object for `json`/`yaml`, or `error: <reason>` (+ optional `hint:` line) for
5
+ * `console`. Writes only; the caller terminates via {@link exitWith}.
6
+ */
7
+ export declare function emitError(reason: string, opts: {
8
+ format: OutputFormat;
9
+ hint?: string;
10
+ }): void;
11
+ //# sourceMappingURL=error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../src/cli/error.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE;IAAE,MAAM,EAAE,YAAY,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAS7F"}
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.emitError = emitError;
4
+ /**
5
+ * The consistent error format (spec-005-cli-command-contract §3, REQ-INT-08). Written verbatim
6
+ * from the spec's own code listing so `src/cli` and the spec cannot drift.
7
+ */
8
+ const js_yaml_1 = require("js-yaml");
9
+ /**
10
+ * Write an error to stderr in the consistent spec-005 §3 format for the active `--format`: a
11
+ * `{error, hint?}` object for `json`/`yaml`, or `error: <reason>` (+ optional `hint:` line) for
12
+ * `console`. Writes only; the caller terminates via {@link exitWith}.
13
+ */
14
+ function emitError(reason, opts) {
15
+ if (opts.format === 'json') {
16
+ process.stderr.write(JSON.stringify({ error: reason, ...(opts.hint ? { hint: opts.hint } : {}) }) + '\n');
17
+ }
18
+ else if (opts.format === 'yaml') {
19
+ process.stderr.write((0, js_yaml_1.dump)({ error: reason, ...(opts.hint ? { hint: opts.hint } : {}) }));
20
+ }
21
+ else {
22
+ process.stderr.write(`error: ${reason}\n`);
23
+ if (opts.hint)
24
+ process.stderr.write(`hint: ${opts.hint}\n`);
25
+ }
26
+ }
27
+ //# sourceMappingURL=error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error.js","sourceRoot":"","sources":["../../src/cli/error.ts"],"names":[],"mappings":";;AAaA,8BASC;AAtBD;;;GAGG;AACH,qCAA2C;AAI3C;;;;GAIG;AACH,SAAgB,SAAS,CAAC,MAAc,EAAE,IAA6C;IACrF,IAAI,IAAI,CAAC,MAAM,KAAK,MAAM,EAAE,CAAC;QAC3B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC;IAC5G,CAAC;SAAM,IAAI,IAAI,CAAC,MAAM,KAAK,MAAM,EAAE,CAAC;QAClC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAA,cAAQ,EAAC,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAC/F,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,MAAM,IAAI,CAAC,CAAC;QAC3C,IAAI,IAAI,CAAC,IAAI;YAAE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC;IAC9D,CAAC;AACH,CAAC"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * The exit-code contract (spec-005-cli-command-contract §1, REQ-INT-04). Every `wingfoil`
3
+ * invocation terminates through this single function, so the `0`/`1`/`2` mapping can never be
4
+ * bypassed by an uncaught code path elsewhere in `src/cli`.
5
+ *
6
+ * This module owns only the *mechanism* (the single `process.exit`). The exit-code *selection* —
7
+ * which outcome maps to which code — lives in `src/core` (`exitCodeForError`/`exitCodeForResult`),
8
+ * shared with the MCP surface per REQ-SYS-05 (task-012); `ExitCode` is re-exported from there so the
9
+ * CLI never redeclares the contract's shape.
10
+ */
11
+ import type { ExitCode } from '../core';
12
+ export type { ExitCode };
13
+ /**
14
+ * The single process-exit mechanism for the CLI (spec-005 §1, REQ-INT-04): optionally write
15
+ * `message` to stderr, then `process.exit(code)`. Every invocation terminates through here so the
16
+ * `0`/`1`/`2` contract cannot be bypassed. Returns `never`.
17
+ */
18
+ export declare function exitWith(code: ExitCode, message?: string): never;
19
+ //# sourceMappingURL=exit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"exit.d.ts","sourceRoot":"","sources":["../../src/cli/exit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,YAAY,EAAE,QAAQ,EAAE,CAAC;AAEzB;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,KAAK,CAGhE"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.exitWith = exitWith;
4
+ /**
5
+ * The single process-exit mechanism for the CLI (spec-005 §1, REQ-INT-04): optionally write
6
+ * `message` to stderr, then `process.exit(code)`. Every invocation terminates through here so the
7
+ * `0`/`1`/`2` contract cannot be bypassed. Returns `never`.
8
+ */
9
+ function exitWith(code, message) {
10
+ if (message)
11
+ process.stderr.write(message + '\n');
12
+ process.exit(code);
13
+ }
14
+ //# sourceMappingURL=exit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"exit.js","sourceRoot":"","sources":["../../src/cli/exit.ts"],"names":[],"mappings":";;AAmBA,4BAGC;AARD;;;;GAIG;AACH,SAAgB,QAAQ,CAAC,IAAc,EAAE,OAAgB;IACvD,IAAI,OAAO;QAAE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;IAClD,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACrB,CAAC"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * `cli` module — human interface (Commander.js + chalk); the `wingfoil` command surface.
3
+ *
4
+ * task-006-dual-interface-shared-core adds the thin adapter (spec-006 §2): `buildCliCommands`
5
+ * (`./registrar.ts`) derives one `wingfoil <noun> <verb>` command descriptor per operation from a
6
+ * `CoreModule[]` registry (`src/core/index.ts`'s `CORE_MODULES`), with no business logic beyond
7
+ * parse-format / call-core / render-result / exit. `buildProgram` (`./program.ts`) wires that model
8
+ * onto a real `commander` `Command` tree — see that file's module doc for why `commander` (ESM-only
9
+ * as of v15) is imported dynamically rather than statically, and why that wiring is not itself
10
+ * exercised by an automated test in this task. A runnable `bin` entry point (calling
11
+ * `buildProgram(CORE_MODULES, ...)` against `process.argv` and installing it as the `wingfoil`
12
+ * executable) is left to a later task — this task's scope is the registrar mechanism and its test
13
+ * coverage, not a shippable CLI binary (see task-006 Execution Notes).
14
+ */
15
+ export declare const MODULE_NAME: "cli";
16
+ export { buildCliCommands, listRegisteredCliCommands } from './registrar';
17
+ export type { BuildCommandsOptions, CliCommand } from './registrar';
18
+ export { buildProgram } from './program';
19
+ export { exitWith } from './exit';
20
+ export type { ExitCode } from './exit';
21
+ export { isValidFormat, renderSuccess } from './output';
22
+ export type { OutputFormat } from './output';
23
+ export { emitError } from './error';
24
+ export { runInit, createReadlinePrompt } from './init-command';
25
+ export type { InitCliOptions, InitCliDeps } from './init-command';
26
+ export { runMcp } from './mcp-command';
27
+ export type { McpCliDeps } from './mcp-command';
28
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,WAAW,EAAG,KAAc,CAAC;AAE1C,OAAO,EAAE,gBAAgB,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAC1E,YAAY,EAAE,oBAAoB,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAClC,YAAY,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACxD,YAAY,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAC/D,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,YAAY,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.runMcp = exports.createReadlinePrompt = exports.runInit = exports.emitError = exports.renderSuccess = exports.isValidFormat = exports.exitWith = exports.buildProgram = exports.listRegisteredCliCommands = exports.buildCliCommands = exports.MODULE_NAME = void 0;
4
+ /**
5
+ * `cli` module — human interface (Commander.js + chalk); the `wingfoil` command surface.
6
+ *
7
+ * task-006-dual-interface-shared-core adds the thin adapter (spec-006 §2): `buildCliCommands`
8
+ * (`./registrar.ts`) derives one `wingfoil <noun> <verb>` command descriptor per operation from a
9
+ * `CoreModule[]` registry (`src/core/index.ts`'s `CORE_MODULES`), with no business logic beyond
10
+ * parse-format / call-core / render-result / exit. `buildProgram` (`./program.ts`) wires that model
11
+ * onto a real `commander` `Command` tree — see that file's module doc for why `commander` (ESM-only
12
+ * as of v15) is imported dynamically rather than statically, and why that wiring is not itself
13
+ * exercised by an automated test in this task. A runnable `bin` entry point (calling
14
+ * `buildProgram(CORE_MODULES, ...)` against `process.argv` and installing it as the `wingfoil`
15
+ * executable) is left to a later task — this task's scope is the registrar mechanism and its test
16
+ * coverage, not a shippable CLI binary (see task-006 Execution Notes).
17
+ */
18
+ exports.MODULE_NAME = 'cli';
19
+ var registrar_1 = require("./registrar");
20
+ Object.defineProperty(exports, "buildCliCommands", { enumerable: true, get: function () { return registrar_1.buildCliCommands; } });
21
+ Object.defineProperty(exports, "listRegisteredCliCommands", { enumerable: true, get: function () { return registrar_1.listRegisteredCliCommands; } });
22
+ var program_1 = require("./program");
23
+ Object.defineProperty(exports, "buildProgram", { enumerable: true, get: function () { return program_1.buildProgram; } });
24
+ var exit_1 = require("./exit");
25
+ Object.defineProperty(exports, "exitWith", { enumerable: true, get: function () { return exit_1.exitWith; } });
26
+ var output_1 = require("./output");
27
+ Object.defineProperty(exports, "isValidFormat", { enumerable: true, get: function () { return output_1.isValidFormat; } });
28
+ Object.defineProperty(exports, "renderSuccess", { enumerable: true, get: function () { return output_1.renderSuccess; } });
29
+ var error_1 = require("./error");
30
+ Object.defineProperty(exports, "emitError", { enumerable: true, get: function () { return error_1.emitError; } });
31
+ var init_command_1 = require("./init-command");
32
+ Object.defineProperty(exports, "runInit", { enumerable: true, get: function () { return init_command_1.runInit; } });
33
+ Object.defineProperty(exports, "createReadlinePrompt", { enumerable: true, get: function () { return init_command_1.createReadlinePrompt; } });
34
+ var mcp_command_1 = require("./mcp-command");
35
+ Object.defineProperty(exports, "runMcp", { enumerable: true, get: function () { return mcp_command_1.runMcp; } });
36
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;GAaG;AACU,QAAA,WAAW,GAAG,KAAc,CAAC;AAE1C,yCAA0E;AAAjE,6GAAA,gBAAgB,OAAA;AAAE,sHAAA,yBAAyB,OAAA;AAEpD,qCAAyC;AAAhC,uGAAA,YAAY,OAAA;AACrB,+BAAkC;AAAzB,gGAAA,QAAQ,OAAA;AAEjB,mCAAwD;AAA/C,uGAAA,aAAa,OAAA;AAAE,uGAAA,aAAa,OAAA;AAErC,iCAAoC;AAA3B,kGAAA,SAAS,OAAA;AAClB,+CAA+D;AAAtD,uGAAA,OAAO,OAAA;AAAE,oHAAA,oBAAoB,OAAA;AAEtC,6CAAuC;AAA9B,qGAAA,MAAM,OAAA"}
@@ -0,0 +1,34 @@
1
+ import { type InitProjectValue } from '../core';
2
+ import type { CoreResult } from '../core/types';
3
+ /** The parsed flag surface `runInit` acts on (global `--format`/`--interactive` + local `--template`). */
4
+ export interface InitCliOptions {
5
+ /** `--template <name>` value, or `undefined` when the flag was omitted. */
6
+ readonly template?: string;
7
+ /** The negatable global `--interactive` (default `true`; `false` when `--no-interactive` was passed). */
8
+ readonly interactive: boolean;
9
+ /** The global `--format` value, still unvalidated (validated here, per registrar's contract). */
10
+ readonly format: string;
11
+ }
12
+ /** Injected, side-effecting dependencies — the seam that keeps `runInit` fully unit-testable. */
13
+ export interface InitCliDeps {
14
+ /** The resolved project (git) root the layout is written under. */
15
+ readonly root: string;
16
+ /** Whether stdout is a TTY (drives the spec-008 §4 prompt-vs-fail decision). */
17
+ readonly isTTY: boolean;
18
+ /** Ask the user one question and resolve their (raw) answer — injected so no real TTY is needed. */
19
+ readonly prompt: (question: string) => Promise<string>;
20
+ /** The core init flow; defaults to {@link initWingfoilProject} (overridden in tests). */
21
+ readonly init?: (root: string, template: string) => CoreResult<InitProjectValue>;
22
+ }
23
+ /**
24
+ * Execute `wingfoil init`. Terminates through the single spec-005 §1 exit path (`exitWith`) exactly
25
+ * once: `2` on any usage error (invalid `--format`, unknown/omitted-required `--template`), otherwise
26
+ * the code the core `CoreResult` maps to (`0` success / `1` already-initialized or other logic error).
27
+ */
28
+ export declare function runInit(options: InitCliOptions, deps: InitCliDeps): Promise<void>;
29
+ /**
30
+ * A real readline-backed wizard prompt (used by ./program.ts's `init` command; not unit-tested — the
31
+ * same seam as `commander` wiring). Reads one line from stdin, resolves it, and closes the interface.
32
+ */
33
+ export declare function createReadlinePrompt(): (question: string) => Promise<string>;
34
+ //# sourceMappingURL=init-command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init-command.d.ts","sourceRoot":"","sources":["../../src/cli/init-command.ts"],"names":[],"mappings":"AAeA,OAAO,EAA0C,KAAK,gBAAgB,EAAE,MAAM,SAAS,CAAC;AACxF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAWhD,0GAA0G;AAC1G,MAAM,WAAW,cAAc;IAC7B,2EAA2E;IAC3E,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,yGAAyG;IACzG,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,iGAAiG;IACjG,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,iGAAiG;AACjG,MAAM,WAAW,WAAW;IAC1B,mEAAmE;IACnE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,gFAAgF;IAChF,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,oGAAoG;IACpG,QAAQ,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACvD,yFAAyF;IACzF,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,UAAU,CAAC,gBAAgB,CAAC,CAAC;CAClF;AA2CD;;;;GAIG;AACH,wBAAsB,OAAO,CAAC,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAmBvF;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAS5E"}