@aidemd-mcp/aidemd 0.0.0-stage → 0.21.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 (977) hide show
  1. package/.aide/bin/aide-tree.mjs +8 -0
  2. package/.aide/config/brain.aide +1449 -0
  3. package/.aide/docs/.aide +130 -0
  4. package/.aide/docs/agent-readable-code.md +74 -0
  5. package/.aide/docs/aide-spec.md +290 -0
  6. package/.aide/docs/aide-template.md +141 -0
  7. package/.aide/docs/automated-qa.md +111 -0
  8. package/.aide/docs/brain-aide.md +242 -0
  9. package/.aide/docs/brief-aide.md +124 -0
  10. package/.aide/docs/cascading-alignment.md +107 -0
  11. package/.aide/docs/index.md +52 -0
  12. package/.aide/docs/plan-aide.md +132 -0
  13. package/.aide/docs/progressive-disclosure.md +74 -0
  14. package/.aide/docs/session-aide.md +210 -0
  15. package/.aide/docs/todo-aide.md +82 -0
  16. package/.aide/intent.aide +71 -0
  17. package/.aide/readme.aide +343 -0
  18. package/.aide/reference/hooks/PostToolUse.md +24 -0
  19. package/.aide/reference/hooks/SessionEnd.md +22 -0
  20. package/.aide/reference/hooks/SessionStart.md +18 -0
  21. package/.aide/reference/hooks/Stop.md +18 -0
  22. package/.aide/reference/hooks/UserPromptSubmit.md +18 -0
  23. package/.aide/reference/hooks/index.md +36 -0
  24. package/.aide/reference/tools/aide_brain.md +34 -0
  25. package/.aide/reference/tools/aide_cleanup.md +31 -0
  26. package/.aide/reference/tools/aide_discover.md +40 -0
  27. package/.aide/reference/tools/aide_frontmatter.md +36 -0
  28. package/.aide/reference/tools/aide_info.md +33 -0
  29. package/.aide/reference/tools/aide_init.md +39 -0
  30. package/.aide/reference/tools/aide_inspect.md +27 -0
  31. package/.aide/reference/tools/aide_observer_end_session.md +36 -0
  32. package/.aide/reference/tools/aide_observer_event.md +52 -0
  33. package/.aide/reference/tools/aide_observer_start.md +45 -0
  34. package/.aide/reference/tools/aide_read.md +29 -0
  35. package/.aide/reference/tools/aide_scaffold.md +35 -0
  36. package/.aide/reference/tools/aide_upgrade.md +45 -0
  37. package/.aide/reference/tools/aide_validate.md +36 -0
  38. package/.aide/reference/tools/index.md +25 -0
  39. package/.aide/session.aide +774 -0
  40. package/.claude/.aide +316 -0
  41. package/.claude/agents/aide/aide-aligner.md +129 -0
  42. package/.claude/agents/aide/aide-architect.md +151 -0
  43. package/.claude/agents/aide/aide-auditor.md +100 -0
  44. package/.claude/agents/aide/aide-domain-expert.md +84 -0
  45. package/.claude/agents/aide/aide-explorer.md +63 -0
  46. package/.claude/agents/aide/aide-implementor.md +121 -0
  47. package/.claude/agents/aide/aide-maintainer.md +115 -0
  48. package/.claude/agents/aide/aide-qa.md +95 -0
  49. package/.claude/agents/aide/aide-spec-writer.md +220 -0
  50. package/.claude/agents/aide/aide-strategist.md +104 -0
  51. package/.claude/agents/aide/aide-upgrader.md +71 -0
  52. package/.claude/agents/kanban/kanban-maintainer.md +113 -0
  53. package/.claude/commands/aide/align.md +24 -0
  54. package/.claude/commands/aide/brain.md +169 -0
  55. package/.claude/commands/aide/build.md +22 -0
  56. package/.claude/commands/aide/fix.md +23 -0
  57. package/.claude/commands/aide/handoff.md +15 -0
  58. package/.claude/commands/aide/plan.md +32 -0
  59. package/.claude/commands/aide/qa.md +27 -0
  60. package/.claude/commands/aide/refactor.md +106 -0
  61. package/.claude/commands/aide/research.md +21 -0
  62. package/.claude/commands/aide/spec.md +35 -0
  63. package/.claude/commands/aide/synthesize.md +24 -0
  64. package/.claude/commands/aide/update-playbook.md +3 -0
  65. package/.claude/commands/aide/upgrade.md +158 -0
  66. package/.claude/commands/aide.md +13 -0
  67. package/.claude/skills/aide/SKILL.md +611 -0
  68. package/.claude/skills/aide-brain-author/SKILL.md +122 -0
  69. package/.claude/skills/aide-handoff/SKILL.md +56 -0
  70. package/.claude/skills/aide-observer/SKILL.md +94 -0
  71. package/.claude/skills/brain/SKILL.md +69 -0
  72. package/.claude/skills/kanban/SKILL.md +24 -0
  73. package/.claude/skills/study-playbook/SKILL.md +11 -0
  74. package/CHANGELOG.md +428 -0
  75. package/LICENSE +21 -0
  76. package/README.md +219 -2
  77. package/dist/cli/hook/findLinkedSession/index.d.ts +8 -0
  78. package/dist/cli/hook/findLinkedSession/index.js +18 -0
  79. package/dist/cli/hook/index.d.ts +21 -0
  80. package/dist/cli/hook/index.js +64 -0
  81. package/dist/cli/hook/mapHookEvent/index.d.ts +9 -0
  82. package/dist/cli/hook/mapHookEvent/index.js +25 -0
  83. package/dist/cli/hook/parseHookInput/index.d.ts +9 -0
  84. package/dist/cli/hook/parseHookInput/index.js +43 -0
  85. package/dist/cli/hook/readStdin/index.d.ts +10 -0
  86. package/dist/cli/hook/readStdin/index.js +25 -0
  87. package/dist/cli/hook/resolveHookRoot/index.d.ts +10 -0
  88. package/dist/cli/hook/resolveHookRoot/index.js +14 -0
  89. package/dist/cli/hook/types/index.d.ts +24 -0
  90. package/dist/cli/hook/types/index.js +1 -0
  91. package/dist/cli/index.d.ts +24 -0
  92. package/dist/cli/index.js +62 -0
  93. package/dist/cli/init/ensureGlobalAide/index.d.ts +19 -0
  94. package/dist/cli/init/ensureGlobalAide/index.js +36 -0
  95. package/dist/cli/init/ensureGlobalAide/installGlobalPackage/index.d.ts +8 -0
  96. package/dist/cli/init/ensureGlobalAide/installGlobalPackage/index.js +15 -0
  97. package/dist/cli/init/index.d.ts +82 -0
  98. package/dist/cli/init/index.js +465 -0
  99. package/dist/cli/init/renderWarning/index.d.ts +41 -0
  100. package/dist/cli/init/renderWarning/index.js +66 -0
  101. package/dist/cli/init/reportHooks/index.d.ts +31 -0
  102. package/dist/cli/init/reportHooks/index.js +75 -0
  103. package/dist/cli/init/types/index.d.ts +46 -0
  104. package/dist/cli/init/types/index.js +1 -0
  105. package/dist/cli/init/writeMcpEntry/index.d.ts +30 -0
  106. package/dist/cli/init/writeMcpEntry/index.js +81 -0
  107. package/dist/cli/isMainModule/index.d.ts +11 -0
  108. package/dist/cli/isMainModule/index.js +27 -0
  109. package/dist/cli/launchSync/index.d.ts +9 -0
  110. package/dist/cli/launchSync/index.js +40 -0
  111. package/dist/cli/shared/writeMcpEntry/index.d.ts +49 -0
  112. package/dist/cli/shared/writeMcpEntry/index.js +107 -0
  113. package/dist/cli/sync/index.d.ts +27 -0
  114. package/dist/cli/sync/index.js +125 -0
  115. package/dist/cli/tree/App/index.d.ts +14 -0
  116. package/dist/cli/tree/App/index.js +291 -0
  117. package/dist/cli/tree/DetailPanel/index.d.ts +28 -0
  118. package/dist/cli/tree/DetailPanel/index.js +77 -0
  119. package/dist/cli/tree/DetailPanel/renderPlanDetail/index.d.ts +20 -0
  120. package/dist/cli/tree/DetailPanel/renderPlanDetail/index.js +30 -0
  121. package/dist/cli/tree/DetailPanel/renderPlanDetail/parsePlanItems/index.d.ts +32 -0
  122. package/dist/cli/tree/DetailPanel/renderPlanDetail/parsePlanItems/index.js +80 -0
  123. package/dist/cli/tree/DetailPanel/renderTodoDetail/index.d.ts +17 -0
  124. package/dist/cli/tree/DetailPanel/renderTodoDetail/index.js +19 -0
  125. package/dist/cli/tree/DetailPanel/renderTodoDetail/parseTodoItems/index.d.ts +26 -0
  126. package/dist/cli/tree/DetailPanel/renderTodoDetail/parseTodoItems/index.js +48 -0
  127. package/dist/cli/tree/TreePanel/index.d.ts +24 -0
  128. package/dist/cli/tree/TreePanel/index.js +96 -0
  129. package/dist/cli/tree/findPrimaryIntent/index.d.ts +12 -0
  130. package/dist/cli/tree/findPrimaryIntent/index.js +20 -0
  131. package/dist/cli/tree/flattenTree/index.d.ts +16 -0
  132. package/dist/cli/tree/flattenTree/index.js +20 -0
  133. package/dist/cli/tree/index.d.ts +2 -0
  134. package/dist/cli/tree/index.js +15 -0
  135. package/dist/cli/view/awaitShutdown/index.d.ts +12 -0
  136. package/dist/cli/view/awaitShutdown/index.js +32 -0
  137. package/dist/cli/view/buildLink/index.d.ts +13 -0
  138. package/dist/cli/view/buildLink/index.js +18 -0
  139. package/dist/cli/view/formatPortNote/index.d.ts +10 -0
  140. package/dist/cli/view/formatPortNote/index.js +11 -0
  141. package/dist/cli/view/formatUsage/index.d.ts +6 -0
  142. package/dist/cli/view/formatUsage/index.js +24 -0
  143. package/dist/cli/view/index.d.ts +21 -0
  144. package/dist/cli/view/index.js +102 -0
  145. package/dist/cli/view/parseViewArgs/index.d.ts +14 -0
  146. package/dist/cli/view/parseViewArgs/index.js +59 -0
  147. package/dist/cli/view/types/index.d.ts +20 -0
  148. package/dist/cli/view/types/index.js +1 -0
  149. package/dist/index.d.ts +10 -0
  150. package/dist/index.js +17 -0
  151. package/dist/observer/assets/Inter-OFL.txt +93 -0
  152. package/dist/observer/assets/JetBrainsMono-OFL.txt +93 -0
  153. package/dist/observer/assets/page.css +1 -0
  154. package/dist/observer/assets/page.js +158 -0
  155. package/dist/observer/assets/page.js.LEGAL.txt +56 -0
  156. package/dist/observer/bindServer/index.d.ts +17 -0
  157. package/dist/observer/bindServer/index.js +29 -0
  158. package/dist/observer/buildPageShell/index.d.ts +8 -0
  159. package/dist/observer/buildPageShell/index.js +30 -0
  160. package/dist/observer/buildProjectView/index.d.ts +12 -0
  161. package/dist/observer/buildProjectView/index.js +25 -0
  162. package/dist/observer/buildViewLink/index.d.ts +16 -0
  163. package/dist/observer/buildViewLink/index.js +15 -0
  164. package/dist/observer/createEventStore/index.d.ts +14 -0
  165. package/dist/observer/createEventStore/index.js +98 -0
  166. package/dist/observer/createStatusPusher/index.d.ts +16 -0
  167. package/dist/observer/createStatusPusher/index.js +40 -0
  168. package/dist/observer/createStop/index.d.ts +23 -0
  169. package/dist/observer/createStop/index.js +40 -0
  170. package/dist/observer/createStreamHub/frame/index.d.ts +6 -0
  171. package/dist/observer/createStreamHub/frame/index.js +4 -0
  172. package/dist/observer/createStreamHub/index.d.ts +13 -0
  173. package/dist/observer/createStreamHub/index.js +76 -0
  174. package/dist/observer/findRunningObserver/index.d.ts +12 -0
  175. package/dist/observer/findRunningObserver/index.js +33 -0
  176. package/dist/observer/findRunningObserver/probeIndex/index.d.ts +13 -0
  177. package/dist/observer/findRunningObserver/probeIndex/index.js +28 -0
  178. package/dist/observer/guardRequest/index.d.ts +20 -0
  179. package/dist/observer/guardRequest/index.js +38 -0
  180. package/dist/observer/guardRequest/matchesToken/index.d.ts +5 -0
  181. package/dist/observer/guardRequest/matchesToken/index.js +9 -0
  182. package/dist/observer/guardRequest/types/index.d.ts +8 -0
  183. package/dist/observer/guardRequest/types/index.js +1 -0
  184. package/dist/observer/handleRequest/index.d.ts +13 -0
  185. package/dist/observer/handleRequest/index.js +76 -0
  186. package/dist/observer/handleRequest/isTokenFree/index.d.ts +11 -0
  187. package/dist/observer/handleRequest/isTokenFree/index.js +12 -0
  188. package/dist/observer/handleRequest/matchRoute/index.d.ts +26 -0
  189. package/dist/observer/handleRequest/matchRoute/index.js +89 -0
  190. package/dist/observer/index.d.ts +23 -0
  191. package/dist/observer/index.js +112 -0
  192. package/dist/observer/listPorts/index.d.ts +9 -0
  193. package/dist/observer/listPorts/index.js +10 -0
  194. package/dist/observer/loadToken/index.d.ts +12 -0
  195. package/dist/observer/loadToken/index.js +46 -0
  196. package/dist/observer/loadToken/readStored/index.d.ts +4 -0
  197. package/dist/observer/loadToken/readStored/index.js +16 -0
  198. package/dist/observer/loadToken/writeTemp/index.d.ts +5 -0
  199. package/dist/observer/loadToken/writeTemp/index.js +8 -0
  200. package/dist/observer/locatePageAssets/index.d.ts +6 -0
  201. package/dist/observer/locatePageAssets/index.js +17 -0
  202. package/dist/observer/mintToken/index.d.ts +2 -0
  203. package/dist/observer/mintToken/index.js +6 -0
  204. package/dist/observer/rebuildStatus/index.d.ts +17 -0
  205. package/dist/observer/rebuildStatus/index.js +49 -0
  206. package/dist/observer/removeRecord/index.d.ts +10 -0
  207. package/dist/observer/removeRecord/index.js +22 -0
  208. package/dist/observer/replaySessions/index.d.ts +7 -0
  209. package/dist/observer/replaySessions/index.js +17 -0
  210. package/dist/observer/resolvePort/index.d.ts +12 -0
  211. package/dist/observer/resolvePort/index.js +21 -0
  212. package/dist/observer/routes/archiveSession/index.d.ts +11 -0
  213. package/dist/observer/routes/archiveSession/index.js +57 -0
  214. package/dist/observer/routes/deleteSession/index.d.ts +10 -0
  215. package/dist/observer/routes/deleteSession/index.js +33 -0
  216. package/dist/observer/routes/getAsset/index.d.ts +7 -0
  217. package/dist/observer/routes/getAsset/index.js +30 -0
  218. package/dist/observer/routes/getEvents/index.d.ts +3 -0
  219. package/dist/observer/routes/getEvents/index.js +13 -0
  220. package/dist/observer/routes/getFile/index.d.ts +7 -0
  221. package/dist/observer/routes/getFile/index.js +54 -0
  222. package/dist/observer/routes/getFile/resolveConfinedPath/index.d.ts +24 -0
  223. package/dist/observer/routes/getFile/resolveConfinedPath/index.js +65 -0
  224. package/dist/observer/routes/getIndex/index.d.ts +7 -0
  225. package/dist/observer/routes/getIndex/index.js +23 -0
  226. package/dist/observer/routes/getSessionPage/index.d.ts +8 -0
  227. package/dist/observer/routes/getSessionPage/index.js +10 -0
  228. package/dist/observer/routes/getStatus/index.d.ts +7 -0
  229. package/dist/observer/routes/getStatus/index.js +15 -0
  230. package/dist/observer/routes/getTask/index.d.ts +7 -0
  231. package/dist/observer/routes/getTask/index.js +47 -0
  232. package/dist/observer/routes/listArchived/index.d.ts +8 -0
  233. package/dist/observer/routes/listArchived/index.js +22 -0
  234. package/dist/observer/routes/listProjects/index.d.ts +3 -0
  235. package/dist/observer/routes/listProjects/index.js +9 -0
  236. package/dist/observer/routes/listSessions/index.d.ts +3 -0
  237. package/dist/observer/routes/listSessions/index.js +18 -0
  238. package/dist/observer/routes/postEvent/index.d.ts +12 -0
  239. package/dist/observer/routes/postEvent/index.js +76 -0
  240. package/dist/observer/routes/postEvent/readJsonBody/index.d.ts +18 -0
  241. package/dist/observer/routes/postEvent/readJsonBody/index.js +37 -0
  242. package/dist/observer/routes/postPresence/index.d.ts +12 -0
  243. package/dist/observer/routes/postPresence/index.js +63 -0
  244. package/dist/observer/routes/postShutdown/index.d.ts +13 -0
  245. package/dist/observer/routes/postShutdown/index.js +64 -0
  246. package/dist/observer/routes/restoreSession/index.d.ts +11 -0
  247. package/dist/observer/routes/restoreSession/index.js +46 -0
  248. package/dist/observer/routes/streamUpdates/index.d.ts +10 -0
  249. package/dist/observer/routes/streamUpdates/index.js +20 -0
  250. package/dist/observer/shared/announceSessions/index.d.ts +12 -0
  251. package/dist/observer/shared/announceSessions/index.js +20 -0
  252. package/dist/observer/shared/broadcastProjects/index.d.ts +10 -0
  253. package/dist/observer/shared/broadcastProjects/index.js +13 -0
  254. package/dist/observer/shared/buildObserverMessage/index.d.ts +8 -0
  255. package/dist/observer/shared/buildObserverMessage/index.js +20 -0
  256. package/dist/observer/shared/findProject/index.d.ts +12 -0
  257. package/dist/observer/shared/findProject/index.js +22 -0
  258. package/dist/observer/shared/pageAssets/index.d.ts +13 -0
  259. package/dist/observer/shared/pageAssets/index.js +16 -0
  260. package/dist/observer/shared/pageTitle/index.d.ts +7 -0
  261. package/dist/observer/shared/pageTitle/index.js +7 -0
  262. package/dist/observer/shared/parsePort/index.d.ts +12 -0
  263. package/dist/observer/shared/parsePort/index.js +15 -0
  264. package/dist/observer/shared/pickKanbanOverride/index.d.ts +10 -0
  265. package/dist/observer/shared/pickKanbanOverride/index.js +10 -0
  266. package/dist/observer/shared/pickReportedLocation/index.d.ts +13 -0
  267. package/dist/observer/shared/pickReportedLocation/index.js +18 -0
  268. package/dist/observer/shared/readHeldLiveness/index.d.ts +13 -0
  269. package/dist/observer/shared/readHeldLiveness/index.js +23 -0
  270. package/dist/observer/shared/routeTable/index.d.ts +131 -0
  271. package/dist/observer/shared/routeTable/index.js +31 -0
  272. package/dist/observer/shared/sendBody/index.d.ts +14 -0
  273. package/dist/observer/shared/sendBody/index.js +17 -0
  274. package/dist/observer/shared/sendJson/index.d.ts +12 -0
  275. package/dist/observer/shared/sendJson/index.js +15 -0
  276. package/dist/observer/shared/sendPage/index.d.ts +10 -0
  277. package/dist/observer/shared/sendPage/index.js +18 -0
  278. package/dist/observer/shared/shutdownRequest/index.d.ts +14 -0
  279. package/dist/observer/shared/shutdownRequest/index.js +7 -0
  280. package/dist/observer/shared/summarizeProjects/index.d.ts +14 -0
  281. package/dist/observer/shared/summarizeProjects/index.js +38 -0
  282. package/dist/observer/shared/summarizeSessions/index.d.ts +12 -0
  283. package/dist/observer/shared/summarizeSessions/index.js +30 -0
  284. package/dist/observer/shared/tokenFormat/index.d.ts +4 -0
  285. package/dist/observer/shared/tokenFormat/index.js +4 -0
  286. package/dist/observer/shared/wantsHtml/index.d.ts +8 -0
  287. package/dist/observer/shared/wantsHtml/index.js +10 -0
  288. package/dist/observer/takeOver/awaitExit/index.d.ts +10 -0
  289. package/dist/observer/takeOver/awaitExit/index.js +26 -0
  290. package/dist/observer/takeOver/index.d.ts +11 -0
  291. package/dist/observer/takeOver/index.js +27 -0
  292. package/dist/observer/takeOver/requestShutdown/index.d.ts +10 -0
  293. package/dist/observer/takeOver/requestShutdown/index.js +28 -0
  294. package/dist/observer/types/index.d.ts +214 -0
  295. package/dist/observer/types/index.js +1 -0
  296. package/dist/observer/writeRecord/index.d.ts +10 -0
  297. package/dist/observer/writeRecord/index.js +11 -0
  298. package/dist/service/brainContract/index.d.ts +113 -0
  299. package/dist/service/brainContract/index.js +107 -0
  300. package/dist/service/brainContract/launcherPurpose/index.d.ts +8 -0
  301. package/dist/service/brainContract/launcherPurpose/index.js +8 -0
  302. package/dist/service/brainContract/toMarkerPair/index.d.ts +11 -0
  303. package/dist/service/brainContract/toMarkerPair/index.js +12 -0
  304. package/dist/service/buildBrainState/classifyParseFailure/index.d.ts +17 -0
  305. package/dist/service/buildBrainState/classifyParseFailure/index.js +29 -0
  306. package/dist/service/buildBrainState/index.d.ts +84 -0
  307. package/dist/service/buildBrainState/index.js +177 -0
  308. package/dist/service/install/applySteps/index.d.ts +38 -0
  309. package/dist/service/install/applySteps/index.js +86 -0
  310. package/dist/service/install/configureIde/index.d.ts +25 -0
  311. package/dist/service/install/configureIde/index.js +143 -0
  312. package/dist/service/install/detectFramework/index.d.ts +11 -0
  313. package/dist/service/install/detectFramework/index.js +53 -0
  314. package/dist/service/install/index.d.ts +63 -0
  315. package/dist/service/install/index.js +138 -0
  316. package/dist/service/install/initContent/index.d.ts +158 -0
  317. package/dist/service/install/initContent/index.js +260 -0
  318. package/dist/service/install/installAgents/index.d.ts +16 -0
  319. package/dist/service/install/installAgents/index.js +55 -0
  320. package/dist/service/install/installAideTree/index.d.ts +15 -0
  321. package/dist/service/install/installAideTree/index.js +54 -0
  322. package/dist/service/install/installHooks/index.d.ts +24 -0
  323. package/dist/service/install/installHooks/index.js +68 -0
  324. package/dist/service/install/installMethodologyDocs/index.d.ts +16 -0
  325. package/dist/service/install/installMethodologyDocs/index.js +55 -0
  326. package/dist/service/install/installSkills/index.d.ts +16 -0
  327. package/dist/service/install/installSkills/index.js +55 -0
  328. package/dist/service/install/planSessionRecord/index.d.ts +16 -0
  329. package/dist/service/install/planSessionRecord/index.js +30 -0
  330. package/dist/service/install/provisionBrain/buildBrainAideStep/index.d.ts +25 -0
  331. package/dist/service/install/provisionBrain/buildBrainAideStep/index.js +60 -0
  332. package/dist/service/install/provisionBrain/buildBrainAideStep/summarizeBrainConfig/index.d.ts +14 -0
  333. package/dist/service/install/provisionBrain/buildBrainAideStep/summarizeBrainConfig/index.js +33 -0
  334. package/dist/service/install/provisionBrain/buildBrainAideStep/summarizeBrainConfig/listBrainSections/index.d.ts +10 -0
  335. package/dist/service/install/provisionBrain/buildBrainAideStep/summarizeBrainConfig/listBrainSections/index.js +19 -0
  336. package/dist/service/install/provisionBrain/detectBrainMigration/findLegacyLauncher/index.d.ts +17 -0
  337. package/dist/service/install/provisionBrain/detectBrainMigration/findLegacyLauncher/index.js +39 -0
  338. package/dist/service/install/provisionBrain/detectBrainMigration/findStaleSections/fingerprintSection/index.d.ts +11 -0
  339. package/dist/service/install/provisionBrain/detectBrainMigration/findStaleSections/fingerprintSection/index.js +20 -0
  340. package/dist/service/install/provisionBrain/detectBrainMigration/findStaleSections/index.d.ts +16 -0
  341. package/dist/service/install/provisionBrain/detectBrainMigration/findStaleSections/index.js +30 -0
  342. package/dist/service/install/provisionBrain/detectBrainMigration/index.d.ts +13 -0
  343. package/dist/service/install/provisionBrain/detectBrainMigration/index.js +32 -0
  344. package/dist/service/install/provisionBrain/index.d.ts +37 -0
  345. package/dist/service/install/provisionBrain/index.js +182 -0
  346. package/dist/service/install/provisionBrain/isTemplateIntegration/index.d.ts +14 -0
  347. package/dist/service/install/provisionBrain/isTemplateIntegration/index.js +24 -0
  348. package/dist/service/install/provisionBrain/obsidianBrainAideTemplate/index.d.ts +73 -0
  349. package/dist/service/install/provisionBrain/obsidianBrainAideTemplate/index.js +557 -0
  350. package/dist/service/install/provisionBrain/obsidianBrainAideTemplate/kanbanSeeds/guide/complete/index.d.ts +13 -0
  351. package/dist/service/install/provisionBrain/obsidianBrainAideTemplate/kanbanSeeds/guide/complete/index.js +51 -0
  352. package/dist/service/install/provisionBrain/obsidianBrainAideTemplate/kanbanSeeds/guide/create/index.d.ts +13 -0
  353. package/dist/service/install/provisionBrain/obsidianBrainAideTemplate/kanbanSeeds/guide/create/index.js +82 -0
  354. package/dist/service/install/provisionBrain/obsidianBrainAideTemplate/kanbanSeeds/guide/manage/index.d.ts +13 -0
  355. package/dist/service/install/provisionBrain/obsidianBrainAideTemplate/kanbanSeeds/guide/manage/index.js +86 -0
  356. package/dist/service/install/provisionBrain/obsidianBrainAideTemplate/kanbanSeeds/guide/move/index.d.ts +12 -0
  357. package/dist/service/install/provisionBrain/obsidianBrainAideTemplate/kanbanSeeds/guide/move/index.js +59 -0
  358. package/dist/service/install/provisionBrain/obsidianBrainAideTemplate/kanbanSeeds/guide/review/index.d.ts +15 -0
  359. package/dist/service/install/provisionBrain/obsidianBrainAideTemplate/kanbanSeeds/guide/review/index.js +274 -0
  360. package/dist/service/install/provisionBrain/obsidianBrainAideTemplate/kanbanSeeds/guide/stash/index.d.ts +14 -0
  361. package/dist/service/install/provisionBrain/obsidianBrainAideTemplate/kanbanSeeds/guide/stash/index.js +103 -0
  362. package/dist/service/install/provisionBrain/obsidianBrainAideTemplate/kanbanSeeds/guide/work/index.d.ts +14 -0
  363. package/dist/service/install/provisionBrain/obsidianBrainAideTemplate/kanbanSeeds/guide/work/index.js +332 -0
  364. package/dist/service/install/provisionBrain/obsidianBrainAideTemplate/kanbanSeeds/hub/index.d.ts +16 -0
  365. package/dist/service/install/provisionBrain/obsidianBrainAideTemplate/kanbanSeeds/hub/index.js +94 -0
  366. package/dist/service/install/provisionBrain/outdatedTemplateSections/index.d.ts +18 -0
  367. package/dist/service/install/provisionBrain/outdatedTemplateSections/index.js +164 -0
  368. package/dist/service/install/provisionBrain/parseBundledTemplate/index.d.ts +14 -0
  369. package/dist/service/install/provisionBrain/parseBundledTemplate/index.js +21 -0
  370. package/dist/service/install/provisionBrain/planBrainRepair/index.d.ts +26 -0
  371. package/dist/service/install/provisionBrain/planBrainRepair/index.js +47 -0
  372. package/dist/service/install/provisionBrain/readBrainMigrationNotice/index.d.ts +15 -0
  373. package/dist/service/install/provisionBrain/readBrainMigrationNotice/index.js +26 -0
  374. package/dist/service/install/reference/index.d.ts +24 -0
  375. package/dist/service/install/reference/index.js +51 -0
  376. package/dist/service/install/resolveBrainHints/index.d.ts +17 -0
  377. package/dist/service/install/resolveBrainHints/index.js +44 -0
  378. package/dist/service/install/scaffoldCommands/index.d.ts +42 -0
  379. package/dist/service/install/scaffoldCommands/index.js +90 -0
  380. package/dist/service/install/scaffoldReadme/deriveProjectName/index.d.ts +18 -0
  381. package/dist/service/install/scaffoldReadme/deriveProjectName/index.js +37 -0
  382. package/dist/service/install/scaffoldReadme/index.d.ts +20 -0
  383. package/dist/service/install/scaffoldReadme/index.js +57 -0
  384. package/dist/service/install/scaffoldReadme/insertBadge/index.d.ts +17 -0
  385. package/dist/service/install/scaffoldReadme/insertBadge/index.js +51 -0
  386. package/dist/service/install/shared/aidePackage/index.d.ts +18 -0
  387. package/dist/service/install/shared/aidePackage/index.js +17 -0
  388. package/dist/service/install/shared/checkGlobalPackage/index.d.ts +11 -0
  389. package/dist/service/install/shared/checkGlobalPackage/index.js +28 -0
  390. package/dist/service/install/shared/compareBytes/index.d.ts +12 -0
  391. package/dist/service/install/shared/compareBytes/index.js +24 -0
  392. package/dist/service/install/shared/describeAideCommand/index.d.ts +10 -0
  393. package/dist/service/install/shared/describeAideCommand/index.js +13 -0
  394. package/dist/service/install/shared/detectLaunchMode/index.d.ts +11 -0
  395. package/dist/service/install/shared/detectLaunchMode/index.js +10 -0
  396. package/dist/service/install/shared/isOlderVersion/index.d.ts +7 -0
  397. package/dist/service/install/shared/isOlderVersion/index.js +19 -0
  398. package/dist/service/install/shared/normalizeLaunchedCommand/index.d.ts +16 -0
  399. package/dist/service/install/shared/normalizeLaunchedCommand/index.js +36 -0
  400. package/dist/service/install/shared/planHooks/ignoreLocal/appendLine/index.d.ts +10 -0
  401. package/dist/service/install/shared/planHooks/ignoreLocal/appendLine/index.js +14 -0
  402. package/dist/service/install/shared/planHooks/ignoreLocal/index.d.ts +13 -0
  403. package/dist/service/install/shared/planHooks/ignoreLocal/index.js +30 -0
  404. package/dist/service/install/shared/planHooks/ignoreLocal/inspectGit/index.d.ts +17 -0
  405. package/dist/service/install/shared/planHooks/ignoreLocal/inspectGit/index.js +42 -0
  406. package/dist/service/install/shared/planHooks/index.d.ts +19 -0
  407. package/dist/service/install/shared/planHooks/index.js +65 -0
  408. package/dist/service/install/shared/planHooks/locateEntry/index.d.ts +15 -0
  409. package/dist/service/install/shared/planHooks/locateEntry/index.js +40 -0
  410. package/dist/service/install/shared/planHooks/mergeLocal/aideHookEntries/index.d.ts +11 -0
  411. package/dist/service/install/shared/planHooks/mergeLocal/aideHookEntries/index.js +21 -0
  412. package/dist/service/install/shared/planHooks/mergeLocal/buildCommand/index.d.ts +7 -0
  413. package/dist/service/install/shared/planHooks/mergeLocal/buildCommand/index.js +9 -0
  414. package/dist/service/install/shared/planHooks/mergeLocal/findWiredEvents/index.d.ts +16 -0
  415. package/dist/service/install/shared/planHooks/mergeLocal/findWiredEvents/index.js +35 -0
  416. package/dist/service/install/shared/planHooks/mergeLocal/index.d.ts +17 -0
  417. package/dist/service/install/shared/planHooks/mergeLocal/index.js +57 -0
  418. package/dist/service/install/shared/planHooks/shared/isAideHookCommand/index.d.ts +10 -0
  419. package/dist/service/install/shared/planHooks/shared/isAideHookCommand/index.js +86 -0
  420. package/dist/service/install/shared/planHooks/shared/parseSettings/index.d.ts +10 -0
  421. package/dist/service/install/shared/planHooks/shared/parseSettings/index.js +24 -0
  422. package/dist/service/install/shared/planHooks/shared/readOptional/index.d.ts +7 -0
  423. package/dist/service/install/shared/planHooks/shared/readOptional/index.js +17 -0
  424. package/dist/service/install/shared/planHooks/shared/removeAideHooks/index.d.ts +17 -0
  425. package/dist/service/install/shared/planHooks/shared/removeAideHooks/index.js +84 -0
  426. package/dist/service/install/shared/planHooks/stripProject/index.d.ts +14 -0
  427. package/dist/service/install/shared/planHooks/stripProject/index.js +26 -0
  428. package/dist/service/install/shared/planInstallInstruction/index.d.ts +3 -0
  429. package/dist/service/install/shared/planInstallInstruction/index.js +6 -0
  430. package/dist/service/install/shared/readNpxPackageSpec/index.d.ts +11 -0
  431. package/dist/service/install/shared/readNpxPackageSpec/index.js +35 -0
  432. package/dist/service/install/wireMcp/index.d.ts +28 -0
  433. package/dist/service/install/wireMcp/index.js +89 -0
  434. package/dist/service/install/writeMethodology/index.d.ts +22 -0
  435. package/dist/service/install/writeMethodology/index.js +131 -0
  436. package/dist/service/observer/event/archive/index.d.ts +14 -0
  437. package/dist/service/observer/event/archive/index.js +52 -0
  438. package/dist/service/observer/event/delete/index.d.ts +20 -0
  439. package/dist/service/observer/event/delete/index.js +60 -0
  440. package/dist/service/observer/event/endSession/index.d.ts +19 -0
  441. package/dist/service/observer/event/endSession/index.js +85 -0
  442. package/dist/service/observer/event/findConversation/index.d.ts +16 -0
  443. package/dist/service/observer/event/findConversation/index.js +46 -0
  444. package/dist/service/observer/event/markClosed/index.d.ts +15 -0
  445. package/dist/service/observer/event/markClosed/index.js +39 -0
  446. package/dist/service/observer/event/read/index.d.ts +11 -0
  447. package/dist/service/observer/event/read/index.js +18 -0
  448. package/dist/service/observer/event/read/readProject/index.d.ts +14 -0
  449. package/dist/service/observer/event/read/readProject/index.js +52 -0
  450. package/dist/service/observer/event/readArchive/index.d.ts +9 -0
  451. package/dist/service/observer/event/readArchive/index.js +46 -0
  452. package/dist/service/observer/event/readConversations/index.d.ts +10 -0
  453. package/dist/service/observer/event/readConversations/index.js +12 -0
  454. package/dist/service/observer/event/readLiveness/index.d.ts +24 -0
  455. package/dist/service/observer/event/readLiveness/index.js +40 -0
  456. package/dist/service/observer/event/record/appendLine/index.d.ts +17 -0
  457. package/dist/service/observer/event/record/appendLine/index.js +25 -0
  458. package/dist/service/observer/event/record/index.d.ts +19 -0
  459. package/dist/service/observer/event/record/index.js +62 -0
  460. package/dist/service/observer/event/record/postToObserver/index.d.ts +15 -0
  461. package/dist/service/observer/event/record/postToObserver/index.js +39 -0
  462. package/dist/service/observer/event/record/readPreviouslyEnded/index.d.ts +11 -0
  463. package/dist/service/observer/event/record/readPreviouslyEnded/index.js +25 -0
  464. package/dist/service/observer/event/record/session/createSession/index.d.ts +3 -0
  465. package/dist/service/observer/event/record/session/createSession/index.js +18 -0
  466. package/dist/service/observer/event/record/session/createSessionId/index.d.ts +9 -0
  467. package/dist/service/observer/event/record/session/createSessionId/index.js +11 -0
  468. package/dist/service/observer/event/record/session/index.d.ts +8 -0
  469. package/dist/service/observer/event/record/session/index.js +14 -0
  470. package/dist/service/observer/event/reopen/index.d.ts +13 -0
  471. package/dist/service/observer/event/reopen/index.js +34 -0
  472. package/dist/service/observer/event/restore/index.d.ts +12 -0
  473. package/dist/service/observer/event/restore/index.js +48 -0
  474. package/dist/service/observer/event/shared/attachLiveness/index.d.ts +14 -0
  475. package/dist/service/observer/event/shared/attachLiveness/index.js +18 -0
  476. package/dist/service/observer/event/shared/buildSessionPath/index.d.ts +11 -0
  477. package/dist/service/observer/event/shared/buildSessionPath/index.js +13 -0
  478. package/dist/service/observer/event/shared/endedMark/index.d.ts +30 -0
  479. package/dist/service/observer/event/shared/endedMark/index.js +48 -0
  480. package/dist/service/observer/event/shared/findNewestStart/index.d.ts +13 -0
  481. package/dist/service/observer/event/shared/findNewestStart/index.js +19 -0
  482. package/dist/service/observer/event/shared/formatSessionTag/index.d.ts +8 -0
  483. package/dist/service/observer/event/shared/formatSessionTag/index.js +11 -0
  484. package/dist/service/observer/event/shared/groupConversations/index.d.ts +14 -0
  485. package/dist/service/observer/event/shared/groupConversations/index.js +44 -0
  486. package/dist/service/observer/event/shared/isClosedRecord/index.d.ts +8 -0
  487. package/dist/service/observer/event/shared/isClosedRecord/index.js +13 -0
  488. package/dist/service/observer/event/shared/isIsoDateTime/index.d.ts +7 -0
  489. package/dist/service/observer/event/shared/isIsoDateTime/index.js +18 -0
  490. package/dist/service/observer/event/shared/judgeConversation/index.d.ts +18 -0
  491. package/dist/service/observer/event/shared/judgeConversation/index.js +26 -0
  492. package/dist/service/observer/event/shared/judgeConversation/pickNewestPresence/index.d.ts +10 -0
  493. package/dist/service/observer/event/shared/judgeConversation/pickNewestPresence/index.js +9 -0
  494. package/dist/service/observer/event/shared/judgeLiveness/index.d.ts +24 -0
  495. package/dist/service/observer/event/shared/judgeLiveness/index.js +41 -0
  496. package/dist/service/observer/event/shared/limits/index.d.ts +15 -0
  497. package/dist/service/observer/event/shared/limits/index.js +15 -0
  498. package/dist/service/observer/event/shared/listSessionIds/index.d.ts +9 -0
  499. package/dist/service/observer/event/shared/listSessionIds/index.js +33 -0
  500. package/dist/service/observer/event/shared/observerRecord/index.d.ts +23 -0
  501. package/dist/service/observer/event/shared/observerRecord/index.js +29 -0
  502. package/dist/service/observer/event/shared/parseSessionTag/index.d.ts +8 -0
  503. package/dist/service/observer/event/shared/parseSessionTag/index.js +18 -0
  504. package/dist/service/observer/event/shared/presencePing/index.d.ts +15 -0
  505. package/dist/service/observer/event/shared/presencePing/index.js +13 -0
  506. package/dist/service/observer/event/shared/presenceRecord/index.d.ts +36 -0
  507. package/dist/service/observer/event/shared/presenceRecord/index.js +70 -0
  508. package/dist/service/observer/event/shared/protocol/index.d.ts +31 -0
  509. package/dist/service/observer/event/shared/protocol/index.js +30 -0
  510. package/dist/service/observer/event/shared/readClosingRecord/index.d.ts +15 -0
  511. package/dist/service/observer/event/shared/readClosingRecord/index.js +50 -0
  512. package/dist/service/observer/event/shared/readConversationMark/index.d.ts +13 -0
  513. package/dist/service/observer/event/shared/readConversationMark/index.js +14 -0
  514. package/dist/service/observer/event/shared/readConversationMark/pickDecidingMark/index.d.ts +10 -0
  515. package/dist/service/observer/event/shared/readConversationMark/pickDecidingMark/index.js +10 -0
  516. package/dist/service/observer/event/shared/readEndedMark/index.d.ts +9 -0
  517. package/dist/service/observer/event/shared/readEndedMark/index.js +24 -0
  518. package/dist/service/observer/event/shared/readObserverRecord/index.d.ts +11 -0
  519. package/dist/service/observer/event/shared/readObserverRecord/index.js +26 -0
  520. package/dist/service/observer/event/shared/readObserverRecord/parseJson/index.d.ts +2 -0
  521. package/dist/service/observer/event/shared/readObserverRecord/parseJson/index.js +9 -0
  522. package/dist/service/observer/event/shared/readPresence/index.d.ts +11 -0
  523. package/dist/service/observer/event/shared/readPresence/index.js +46 -0
  524. package/dist/service/observer/event/shared/readSessionLog/index.d.ts +13 -0
  525. package/dist/service/observer/event/shared/readSessionLog/index.js +29 -0
  526. package/dist/service/observer/event/shared/readSessionLog/parseLines/index.d.ts +14 -0
  527. package/dist/service/observer/event/shared/readSessionLog/parseLines/index.js +32 -0
  528. package/dist/service/observer/event/shared/readSessionStart/index.d.ts +8 -0
  529. package/dist/service/observer/event/shared/readSessionStart/index.js +20 -0
  530. package/dist/service/observer/event/shared/readTranscriptActivity/index.d.ts +9 -0
  531. package/dist/service/observer/event/shared/readTranscriptActivity/index.js +18 -0
  532. package/dist/service/observer/event/shared/schema/index.d.ts +1398 -0
  533. package/dist/service/observer/event/shared/schema/index.js +218 -0
  534. package/dist/service/observer/event/shared/writeEndedMark/index.d.ts +12 -0
  535. package/dist/service/observer/event/shared/writeEndedMark/index.js +26 -0
  536. package/dist/service/observer/event/touchPresence/index.d.ts +15 -0
  537. package/dist/service/observer/event/touchPresence/index.js +77 -0
  538. package/dist/service/observer/event/touchPresence/mergePresence/index.d.ts +19 -0
  539. package/dist/service/observer/event/touchPresence/mergePresence/index.js +50 -0
  540. package/dist/service/observer/event/touchPresence/pingObserver/index.d.ts +15 -0
  541. package/dist/service/observer/event/touchPresence/pingObserver/index.js +63 -0
  542. package/dist/service/observer/event/touchPresence/shouldRefresh/index.d.ts +17 -0
  543. package/dist/service/observer/event/touchPresence/shouldRefresh/index.js +25 -0
  544. package/dist/service/observer/event/touchPresence/writePresence/index.d.ts +12 -0
  545. package/dist/service/observer/event/touchPresence/writePresence/index.js +20 -0
  546. package/dist/service/observer/event/types/index.d.ts +217 -0
  547. package/dist/service/observer/event/types/index.js +1 -0
  548. package/dist/service/observer/kanban/board/read/index.d.ts +13 -0
  549. package/dist/service/observer/kanban/board/read/index.js +27 -0
  550. package/dist/service/observer/kanban/board/read/readColumn/index.d.ts +11 -0
  551. package/dist/service/observer/kanban/board/read/readColumn/index.js +67 -0
  552. package/dist/service/observer/kanban/shared/boardHints/index.d.ts +17 -0
  553. package/dist/service/observer/kanban/shared/boardHints/index.js +17 -0
  554. package/dist/service/observer/kanban/shared/boardUnavailable/index.d.ts +6 -0
  555. package/dist/service/observer/kanban/shared/boardUnavailable/index.js +8 -0
  556. package/dist/service/observer/kanban/shared/columns/index.d.ts +18 -0
  557. package/dist/service/observer/kanban/shared/columns/index.js +9 -0
  558. package/dist/service/observer/kanban/shared/isInsideFolder/index.d.ts +8 -0
  559. package/dist/service/observer/kanban/shared/isInsideFolder/index.js +25 -0
  560. package/dist/service/observer/kanban/shared/locateBoard/index.d.ts +25 -0
  561. package/dist/service/observer/kanban/shared/locateBoard/index.js +76 -0
  562. package/dist/service/observer/kanban/shared/locateBoard/readKanbanFolder/index.d.ts +13 -0
  563. package/dist/service/observer/kanban/shared/locateBoard/readKanbanFolder/index.js +39 -0
  564. package/dist/service/observer/kanban/shared/namesSlug/index.d.ts +8 -0
  565. package/dist/service/observer/kanban/shared/namesSlug/index.js +13 -0
  566. package/dist/service/observer/kanban/shared/parseTaskNote/index.d.ts +11 -0
  567. package/dist/service/observer/kanban/shared/parseTaskNote/index.js +63 -0
  568. package/dist/service/observer/kanban/shared/readSessionKanban/index.d.ts +7 -0
  569. package/dist/service/observer/kanban/shared/readSessionKanban/index.js +22 -0
  570. package/dist/service/observer/kanban/task/read/findTaskFile/index.d.ts +22 -0
  571. package/dist/service/observer/kanban/task/read/findTaskFile/index.js +34 -0
  572. package/dist/service/observer/kanban/task/read/index.d.ts +13 -0
  573. package/dist/service/observer/kanban/task/read/index.js +42 -0
  574. package/dist/service/observer/kanban/types/index.d.ts +95 -0
  575. package/dist/service/observer/kanban/types/index.js +1 -0
  576. package/dist/service/observer/status/buildHistory/formatDuration/index.d.ts +6 -0
  577. package/dist/service/observer/status/buildHistory/formatDuration/index.js +15 -0
  578. package/dist/service/observer/status/buildHistory/index.d.ts +10 -0
  579. package/dist/service/observer/status/buildHistory/index.js +68 -0
  580. package/dist/service/observer/status/buildHistory/labelEvent/index.d.ts +12 -0
  581. package/dist/service/observer/status/buildHistory/labelEvent/index.js +78 -0
  582. package/dist/service/observer/status/buildModuleNodes/classifyTreeFile/index.d.ts +8 -0
  583. package/dist/service/observer/status/buildModuleNodes/classifyTreeFile/index.js +25 -0
  584. package/dist/service/observer/status/buildModuleNodes/findParentFolder/index.d.ts +9 -0
  585. package/dist/service/observer/status/buildModuleNodes/findParentFolder/index.js +20 -0
  586. package/dist/service/observer/status/buildModuleNodes/index.d.ts +9 -0
  587. package/dist/service/observer/status/buildModuleNodes/index.js +49 -0
  588. package/dist/service/observer/status/buildModuleNodes/readTreeFile/countPlanSteps/index.d.ts +10 -0
  589. package/dist/service/observer/status/buildModuleNodes/readTreeFile/countPlanSteps/index.js +38 -0
  590. package/dist/service/observer/status/buildModuleNodes/readTreeFile/index.d.ts +12 -0
  591. package/dist/service/observer/status/buildModuleNodes/readTreeFile/index.js +73 -0
  592. package/dist/service/observer/status/buildModuleNodes/readTreeFile/workStatuses/index.d.ts +11 -0
  593. package/dist/service/observer/status/buildModuleNodes/readTreeFile/workStatuses/index.js +7 -0
  594. package/dist/service/observer/status/buildRails/collectPipelineEvents/index.d.ts +15 -0
  595. package/dist/service/observer/status/buildRails/collectPipelineEvents/index.js +44 -0
  596. package/dist/service/observer/status/buildRails/index.d.ts +18 -0
  597. package/dist/service/observer/status/buildRails/index.js +62 -0
  598. package/dist/service/observer/status/buildRails/isOutside/index.d.ts +11 -0
  599. package/dist/service/observer/status/buildRails/isOutside/index.js +13 -0
  600. package/dist/service/observer/status/buildRails/judgeStage/index.d.ts +18 -0
  601. package/dist/service/observer/status/buildRails/judgeStage/index.js +40 -0
  602. package/dist/service/observer/status/findRunningWork/index.d.ts +18 -0
  603. package/dist/service/observer/status/findRunningWork/index.js +73 -0
  604. package/dist/service/observer/status/findWaitingFiles/index.d.ts +15 -0
  605. package/dist/service/observer/status/findWaitingFiles/index.js +80 -0
  606. package/dist/service/observer/status/foldSessions/index.d.ts +12 -0
  607. package/dist/service/observer/status/foldSessions/index.js +54 -0
  608. package/dist/service/observer/status/index.d.ts +14 -0
  609. package/dist/service/observer/status/index.js +84 -0
  610. package/dist/service/observer/status/listWorkFiles/index.d.ts +8 -0
  611. package/dist/service/observer/status/listWorkFiles/index.js +18 -0
  612. package/dist/service/observer/status/readSessionRecord/index.d.ts +9 -0
  613. package/dist/service/observer/status/readSessionRecord/index.js +58 -0
  614. package/dist/service/observer/status/shared/findCurrentPipeline/index.d.ts +18 -0
  615. package/dist/service/observer/status/shared/findCurrentPipeline/index.js +29 -0
  616. package/dist/service/observer/status/shared/findOpenPhase/index.d.ts +24 -0
  617. package/dist/service/observer/status/shared/findOpenPhase/index.js +47 -0
  618. package/dist/service/observer/status/shared/normalizeProjectPath/index.d.ts +10 -0
  619. package/dist/service/observer/status/shared/normalizeProjectPath/index.js +17 -0
  620. package/dist/service/observer/status/shared/phaseLabels/index.d.ts +19 -0
  621. package/dist/service/observer/status/shared/phaseLabels/index.js +19 -0
  622. package/dist/service/observer/status/shared/toNodeFolder/index.d.ts +6 -0
  623. package/dist/service/observer/status/shared/toNodeFolder/index.js +13 -0
  624. package/dist/service/observer/status/types/index.d.ts +240 -0
  625. package/dist/service/observer/status/types/index.js +1 -0
  626. package/dist/service/parseBrainAide/extractMarkerSections/findStructuralFault/index.d.ts +15 -0
  627. package/dist/service/parseBrainAide/extractMarkerSections/findStructuralFault/index.js +58 -0
  628. package/dist/service/parseBrainAide/extractMarkerSections/findUnknownMarker/index.d.ts +17 -0
  629. package/dist/service/parseBrainAide/extractMarkerSections/findUnknownMarker/index.js +52 -0
  630. package/dist/service/parseBrainAide/extractMarkerSections/index.d.ts +18 -0
  631. package/dist/service/parseBrainAide/extractMarkerSections/index.js +35 -0
  632. package/dist/service/parseBrainAide/extractMarkerSections/locateMarkers/index.d.ts +9 -0
  633. package/dist/service/parseBrainAide/extractMarkerSections/locateMarkers/index.js +30 -0
  634. package/dist/service/parseBrainAide/extractMarkerSections/slicePresentSections/index.d.ts +18 -0
  635. package/dist/service/parseBrainAide/extractMarkerSections/slicePresentSections/index.js +24 -0
  636. package/dist/service/parseBrainAide/extractMarkerSections/sliceSections/index.d.ts +12 -0
  637. package/dist/service/parseBrainAide/extractMarkerSections/sliceSections/index.js +19 -0
  638. package/dist/service/parseBrainAide/index.d.ts +113 -0
  639. package/dist/service/parseBrainAide/index.js +248 -0
  640. package/dist/service/parseBrainAide/parseKanbanField/index.d.ts +21 -0
  641. package/dist/service/parseBrainAide/parseKanbanField/index.js +56 -0
  642. package/dist/startServer/index.d.ts +7 -0
  643. package/dist/startServer/index.js +459 -0
  644. package/dist/tools/brain/composeOutdatedRemediation/index.d.ts +12 -0
  645. package/dist/tools/brain/composeOutdatedRemediation/index.js +24 -0
  646. package/dist/tools/brain/index.d.ts +94 -0
  647. package/dist/tools/brain/index.js +113 -0
  648. package/dist/tools/brain/listContract/index.d.ts +10 -0
  649. package/dist/tools/brain/listContract/index.js +14 -0
  650. package/dist/tools/brain/readTemplateSection/index.d.ts +17 -0
  651. package/dist/tools/brain/readTemplateSection/index.js +26 -0
  652. package/dist/tools/brain/readTemplateSection/readTemplateLauncher/index.d.ts +11 -0
  653. package/dist/tools/brain/readTemplateSection/readTemplateLauncher/index.js +22 -0
  654. package/dist/tools/brain/sectionPurpose/index.d.ts +10 -0
  655. package/dist/tools/brain/sectionPurpose/index.js +15 -0
  656. package/dist/tools/brain/selectSection/index.d.ts +14 -0
  657. package/dist/tools/brain/selectSection/index.js +19 -0
  658. package/dist/tools/brain/validateDraft/composeDraftVerdict/index.d.ts +11 -0
  659. package/dist/tools/brain/validateDraft/composeDraftVerdict/index.js +22 -0
  660. package/dist/tools/brain/validateDraft/index.d.ts +13 -0
  661. package/dist/tools/brain/validateDraft/index.js +43 -0
  662. package/dist/tools/brain/validateDraft/readDraft/index.d.ts +19 -0
  663. package/dist/tools/brain/validateDraft/readDraft/index.js +19 -0
  664. package/dist/tools/brain/validateDraft/resolveDraftPath/index.d.ts +21 -0
  665. package/dist/tools/brain/validateDraft/resolveDraftPath/index.js +34 -0
  666. package/dist/tools/cleanup/checkPreconditions/index.d.ts +20 -0
  667. package/dist/tools/cleanup/checkPreconditions/index.js +94 -0
  668. package/dist/tools/cleanup/formatReport/index.d.ts +12 -0
  669. package/dist/tools/cleanup/formatReport/index.js +94 -0
  670. package/dist/tools/cleanup/index.d.ts +25 -0
  671. package/dist/tools/cleanup/index.js +53 -0
  672. package/dist/tools/cleanup/judgeEphemeral/index.d.ts +37 -0
  673. package/dist/tools/cleanup/judgeEphemeral/index.js +47 -0
  674. package/dist/tools/cleanup/locateEphemerals/index.d.ts +16 -0
  675. package/dist/tools/cleanup/locateEphemerals/index.js +27 -0
  676. package/dist/tools/cleanup/removeEphemerals/index.d.ts +19 -0
  677. package/dist/tools/cleanup/removeEphemerals/index.js +27 -0
  678. package/dist/tools/cleanup/resolveModule/index.d.ts +20 -0
  679. package/dist/tools/cleanup/resolveModule/index.js +35 -0
  680. package/dist/tools/discover/buildAncestorChain/index.d.ts +22 -0
  681. package/dist/tools/discover/buildAncestorChain/index.js +108 -0
  682. package/dist/tools/discover/buildTree/index.d.ts +10 -0
  683. package/dist/tools/discover/buildTree/index.js +64 -0
  684. package/dist/tools/discover/index.d.ts +21 -0
  685. package/dist/tools/discover/index.js +50 -0
  686. package/dist/tools/frontmatter/checkCompletion/index.d.ts +13 -0
  687. package/dist/tools/frontmatter/checkCompletion/index.js +51 -0
  688. package/dist/tools/frontmatter/checkTransition/index.d.ts +21 -0
  689. package/dist/tools/frontmatter/checkTransition/index.js +34 -0
  690. package/dist/tools/frontmatter/classifyAideFile/index.d.ts +8 -0
  691. package/dist/tools/frontmatter/classifyAideFile/index.js +25 -0
  692. package/dist/tools/frontmatter/formatResult/index.d.ts +11 -0
  693. package/dist/tools/frontmatter/formatResult/index.js +104 -0
  694. package/dist/tools/frontmatter/governedFields/index.d.ts +31 -0
  695. package/dist/tools/frontmatter/governedFields/index.js +31 -0
  696. package/dist/tools/frontmatter/index.d.ts +27 -0
  697. package/dist/tools/frontmatter/index.js +163 -0
  698. package/dist/tools/frontmatter/readGovernedValue/index.d.ts +16 -0
  699. package/dist/tools/frontmatter/readGovernedValue/index.js +159 -0
  700. package/dist/tools/frontmatter/resolveTarget/index.d.ts +23 -0
  701. package/dist/tools/frontmatter/resolveTarget/index.js +30 -0
  702. package/dist/tools/frontmatter/rewriteFieldLine/index.d.ts +18 -0
  703. package/dist/tools/frontmatter/rewriteFieldLine/index.js +16 -0
  704. package/dist/tools/frontmatter/types/index.d.ts +134 -0
  705. package/dist/tools/frontmatter/types/index.js +1 -0
  706. package/dist/tools/info/index.d.ts +40 -0
  707. package/dist/tools/info/index.js +60 -0
  708. package/dist/tools/info/resolveBehind/fetchPublishedVersions/index.d.ts +10 -0
  709. package/dist/tools/info/resolveBehind/fetchPublishedVersions/index.js +34 -0
  710. package/dist/tools/info/resolveBehind/index.d.ts +12 -0
  711. package/dist/tools/info/resolveBehind/index.js +44 -0
  712. package/dist/tools/info/resolveBehind/listSkippedVersions/index.d.ts +7 -0
  713. package/dist/tools/info/resolveBehind/listSkippedVersions/index.js +21 -0
  714. package/dist/tools/info/resolveBehind/readAideLaunchMode/index.d.ts +8 -0
  715. package/dist/tools/info/resolveBehind/readAideLaunchMode/index.js +24 -0
  716. package/dist/tools/info/resolveBehind/resolveHighlights/fetchChangelog/index.d.ts +9 -0
  717. package/dist/tools/info/resolveBehind/resolveHighlights/fetchChangelog/index.js +23 -0
  718. package/dist/tools/info/resolveBehind/resolveHighlights/index.d.ts +7 -0
  719. package/dist/tools/info/resolveBehind/resolveHighlights/index.js +16 -0
  720. package/dist/tools/info/resolveBehind/resolveHighlights/pickHighlights/index.d.ts +7 -0
  721. package/dist/tools/info/resolveBehind/resolveHighlights/pickHighlights/index.js +21 -0
  722. package/dist/tools/info/resolveBehind/resolveHighlights/pickHighlights/readReleaseBullets/index.d.ts +9 -0
  723. package/dist/tools/info/resolveBehind/resolveHighlights/pickHighlights/readReleaseBullets/index.js +50 -0
  724. package/dist/tools/info/resolveBehind/resolveHighlights/pickHighlights/toOneLine/index.d.ts +6 -0
  725. package/dist/tools/info/resolveBehind/resolveHighlights/pickHighlights/toOneLine/index.js +24 -0
  726. package/dist/tools/info/resolveOutdated/detectStaleHooks/index.d.ts +17 -0
  727. package/dist/tools/info/resolveOutdated/detectStaleHooks/index.js +28 -0
  728. package/dist/tools/info/resolveOutdated/index.d.ts +13 -0
  729. package/dist/tools/info/resolveOutdated/index.js +18 -0
  730. package/dist/tools/info/resolveOutdated/listStaleFiles/index.d.ts +7 -0
  731. package/dist/tools/info/resolveOutdated/listStaleFiles/index.js +30 -0
  732. package/dist/tools/inspect/index.d.ts +24 -0
  733. package/dist/tools/inspect/index.js +47 -0
  734. package/dist/tools/inspect/parseSymbols/index.d.ts +21 -0
  735. package/dist/tools/inspect/parseSymbols/index.js +213 -0
  736. package/dist/tools/inspect/walk/index.d.ts +8 -0
  737. package/dist/tools/inspect/walk/index.js +31 -0
  738. package/dist/tools/observer/endSession/formatReply/index.d.ts +9 -0
  739. package/dist/tools/observer/endSession/formatReply/index.js +23 -0
  740. package/dist/tools/observer/endSession/index.d.ts +21 -0
  741. package/dist/tools/observer/endSession/index.js +31 -0
  742. package/dist/tools/observer/endSession/types/index.d.ts +10 -0
  743. package/dist/tools/observer/endSession/types/index.js +1 -0
  744. package/dist/tools/observer/event/formatReply/index.d.ts +10 -0
  745. package/dist/tools/observer/event/formatReply/index.js +28 -0
  746. package/dist/tools/observer/event/index.d.ts +9 -0
  747. package/dist/tools/observer/event/index.js +11 -0
  748. package/dist/tools/observer/shared/tryBind/index.d.ts +13 -0
  749. package/dist/tools/observer/shared/tryBind/index.js +31 -0
  750. package/dist/tools/observer/start/awaitObserver/index.d.ts +16 -0
  751. package/dist/tools/observer/start/awaitObserver/index.js +75 -0
  752. package/dist/tools/observer/start/awaitOwnLink/index.d.ts +12 -0
  753. package/dist/tools/observer/start/awaitOwnLink/index.js +24 -0
  754. package/dist/tools/observer/start/checkProject/index.d.ts +18 -0
  755. package/dist/tools/observer/start/checkProject/index.js +45 -0
  756. package/dist/tools/observer/start/findOpenSessions/index.d.ts +18 -0
  757. package/dist/tools/observer/start/findOpenSessions/index.js +53 -0
  758. package/dist/tools/observer/start/formatReply/describeOpenSession/index.d.ts +7 -0
  759. package/dist/tools/observer/start/formatReply/describeOpenSession/index.js +13 -0
  760. package/dist/tools/observer/start/formatReply/index.d.ts +6 -0
  761. package/dist/tools/observer/start/formatReply/index.js +43 -0
  762. package/dist/tools/observer/start/index.d.ts +27 -0
  763. package/dist/tools/observer/start/index.js +87 -0
  764. package/dist/tools/observer/start/launchObserver/index.d.ts +17 -0
  765. package/dist/tools/observer/start/launchObserver/index.js +23 -0
  766. package/dist/tools/observer/start/markClosedSessions/index.d.ts +16 -0
  767. package/dist/tools/observer/start/markClosedSessions/index.js +49 -0
  768. package/dist/tools/observer/start/moveLegacyHistory/index.d.ts +10 -0
  769. package/dist/tools/observer/start/moveLegacyHistory/index.js +26 -0
  770. package/dist/tools/observer/start/types/index.d.ts +82 -0
  771. package/dist/tools/observer/start/types/index.js +1 -0
  772. package/dist/tools/observer/start/walkPorts/index.d.ts +15 -0
  773. package/dist/tools/observer/start/walkPorts/index.js +17 -0
  774. package/dist/tools/read/index.d.ts +15 -0
  775. package/dist/tools/read/index.js +79 -0
  776. package/dist/tools/scaffold/hasIntentSpec/index.d.ts +7 -0
  777. package/dist/tools/scaffold/hasIntentSpec/index.js +9 -0
  778. package/dist/tools/scaffold/index.d.ts +33 -0
  779. package/dist/tools/scaffold/index.js +216 -0
  780. package/dist/tools/scaffold/placeRootIntent/index.d.ts +17 -0
  781. package/dist/tools/scaffold/placeRootIntent/index.js +24 -0
  782. package/dist/tools/scaffold/resolveSpecFolder/index.d.ts +17 -0
  783. package/dist/tools/scaffold/resolveSpecFolder/index.js +21 -0
  784. package/dist/tools/scaffold/sessionTemplate/index.d.ts +9 -0
  785. package/dist/tools/scaffold/sessionTemplate/index.js +40 -0
  786. package/dist/tools/scaffold/writeIfAbsent/index.d.ts +10 -0
  787. package/dist/tools/scaffold/writeIfAbsent/index.js +21 -0
  788. package/dist/tools/upgrade/applyFiles/index.d.ts +49 -0
  789. package/dist/tools/upgrade/applyFiles/index.js +91 -0
  790. package/dist/tools/upgrade/applyFiles/movePin/changesOnlyThePin/index.d.ts +11 -0
  791. package/dist/tools/upgrade/applyFiles/movePin/changesOnlyThePin/index.js +23 -0
  792. package/dist/tools/upgrade/applyFiles/movePin/index.d.ts +14 -0
  793. package/dist/tools/upgrade/applyFiles/movePin/index.js +56 -0
  794. package/dist/tools/upgrade/applyFiles/movePin/locatePinToken/index.d.ts +16 -0
  795. package/dist/tools/upgrade/applyFiles/movePin/locatePinToken/index.js +30 -0
  796. package/dist/tools/upgrade/applyFiles/switchToGlobal/changesOnlyTheLaunch/index.d.ts +12 -0
  797. package/dist/tools/upgrade/applyFiles/switchToGlobal/changesOnlyTheLaunch/index.js +27 -0
  798. package/dist/tools/upgrade/applyFiles/switchToGlobal/index.d.ts +16 -0
  799. package/dist/tools/upgrade/applyFiles/switchToGlobal/index.js +78 -0
  800. package/dist/tools/upgrade/applyFiles/switchToGlobal/locateLaunchTokens/index.d.ts +21 -0
  801. package/dist/tools/upgrade/applyFiles/switchToGlobal/locateLaunchTokens/index.js +36 -0
  802. package/dist/tools/upgrade/brainCategory/applyChange/index.d.ts +21 -0
  803. package/dist/tools/upgrade/brainCategory/applyChange/index.js +64 -0
  804. package/dist/tools/upgrade/brainCategory/applyChange/yieldsExpectedConfig/index.d.ts +12 -0
  805. package/dist/tools/upgrade/brainCategory/applyChange/yieldsExpectedConfig/index.js +25 -0
  806. package/dist/tools/upgrade/brainCategory/index.d.ts +19 -0
  807. package/dist/tools/upgrade/brainCategory/index.js +28 -0
  808. package/dist/tools/upgrade/brainCategory/insertMissingSections/index.d.ts +15 -0
  809. package/dist/tools/upgrade/brainCategory/insertMissingSections/index.js +62 -0
  810. package/dist/tools/upgrade/brainCategory/insertMissingSections/spliceRepairs/index.d.ts +25 -0
  811. package/dist/tools/upgrade/brainCategory/insertMissingSections/spliceRepairs/index.js +36 -0
  812. package/dist/tools/upgrade/brainCategory/previewChange/index.d.ts +16 -0
  813. package/dist/tools/upgrade/brainCategory/previewChange/index.js +61 -0
  814. package/dist/tools/upgrade/brainCategory/shared/buildChangeOffer/buildLauncherOffer/index.d.ts +20 -0
  815. package/dist/tools/upgrade/brainCategory/shared/buildChangeOffer/buildLauncherOffer/index.js +54 -0
  816. package/dist/tools/upgrade/brainCategory/shared/buildChangeOffer/buildLauncherOffer/rewriteLauncherArgs/index.d.ts +19 -0
  817. package/dist/tools/upgrade/brainCategory/shared/buildChangeOffer/buildLauncherOffer/rewriteLauncherArgs/index.js +61 -0
  818. package/dist/tools/upgrade/brainCategory/shared/buildChangeOffer/buildLauncherOffer/rewriteLauncherArgs/locateArgLines/index.d.ts +11 -0
  819. package/dist/tools/upgrade/brainCategory/shared/buildChangeOffer/buildLauncherOffer/rewriteLauncherArgs/locateArgLines/index.js +49 -0
  820. package/dist/tools/upgrade/brainCategory/shared/buildChangeOffer/buildLauncherOffer/rewriteLauncherArgs/renderArgLine/index.d.ts +6 -0
  821. package/dist/tools/upgrade/brainCategory/shared/buildChangeOffer/buildLauncherOffer/rewriteLauncherArgs/renderArgLine/index.js +8 -0
  822. package/dist/tools/upgrade/brainCategory/shared/buildChangeOffer/buildLauncherOffer/rewriteLauncherCommand/index.d.ts +13 -0
  823. package/dist/tools/upgrade/brainCategory/shared/buildChangeOffer/buildLauncherOffer/rewriteLauncherCommand/index.js +27 -0
  824. package/dist/tools/upgrade/brainCategory/shared/buildChangeOffer/buildSectionOffer/index.d.ts +19 -0
  825. package/dist/tools/upgrade/brainCategory/shared/buildChangeOffer/buildSectionOffer/index.js +58 -0
  826. package/dist/tools/upgrade/brainCategory/shared/buildChangeOffer/index.d.ts +13 -0
  827. package/dist/tools/upgrade/brainCategory/shared/buildChangeOffer/index.js +19 -0
  828. package/dist/tools/upgrade/brainCategory/shared/changedSinceDiff/index.d.ts +3 -0
  829. package/dist/tools/upgrade/brainCategory/shared/changedSinceDiff/index.js +4 -0
  830. package/dist/tools/upgrade/brainCategory/shared/detectLineEnding/index.d.ts +6 -0
  831. package/dist/tools/upgrade/brainCategory/shared/detectLineEnding/index.js +9 -0
  832. package/dist/tools/upgrade/brainCategory/shared/hashBytes/index.d.ts +7 -0
  833. package/dist/tools/upgrade/brainCategory/shared/hashBytes/index.js +10 -0
  834. package/dist/tools/upgrade/brainCategory/shared/invalidResultInstructions/index.d.ts +5 -0
  835. package/dist/tools/upgrade/brainCategory/shared/invalidResultInstructions/index.js +7 -0
  836. package/dist/tools/upgrade/brainCategory/shared/locateFrontmatter/index.d.ts +19 -0
  837. package/dist/tools/upgrade/brainCategory/shared/locateFrontmatter/index.js +27 -0
  838. package/dist/tools/upgrade/brainCategory/shared/locateSection/index.d.ts +16 -0
  839. package/dist/tools/upgrade/brainCategory/shared/locateSection/index.js +19 -0
  840. package/dist/tools/upgrade/brainCategory/shared/readBrainConfig/index.d.ts +12 -0
  841. package/dist/tools/upgrade/brainCategory/shared/readBrainConfig/index.js +22 -0
  842. package/dist/tools/upgrade/brainCategory/shared/readChangeBefore/index.d.ts +13 -0
  843. package/dist/tools/upgrade/brainCategory/shared/readChangeBefore/index.js +17 -0
  844. package/dist/tools/upgrade/brainCategory/shared/refuseUnusableConfig/index.d.ts +13 -0
  845. package/dist/tools/upgrade/brainCategory/shared/refuseUnusableConfig/index.js +30 -0
  846. package/dist/tools/upgrade/brainCategory/shared/toLineEnding/index.d.ts +9 -0
  847. package/dist/tools/upgrade/brainCategory/shared/toLineEnding/index.js +8 -0
  848. package/dist/tools/upgrade/buildVersionsMeta/assertFullClone/index.d.ts +14 -0
  849. package/dist/tools/upgrade/buildVersionsMeta/assertFullClone/index.js +27 -0
  850. package/dist/tools/upgrade/buildVersionsMeta/enumerateArtifacts/index.d.ts +23 -0
  851. package/dist/tools/upgrade/buildVersionsMeta/enumerateArtifacts/index.js +62 -0
  852. package/dist/tools/upgrade/buildVersionsMeta/index.d.ts +17 -0
  853. package/dist/tools/upgrade/buildVersionsMeta/index.js +26 -0
  854. package/dist/tools/upgrade/checkBrainConfig/index.d.ts +29 -0
  855. package/dist/tools/upgrade/checkBrainConfig/index.js +67 -0
  856. package/dist/tools/upgrade/checkHooksConfig/index.d.ts +30 -0
  857. package/dist/tools/upgrade/checkHooksConfig/index.js +72 -0
  858. package/dist/tools/upgrade/checkIdeConfig/index.d.ts +24 -0
  859. package/dist/tools/upgrade/checkIdeConfig/index.js +134 -0
  860. package/dist/tools/upgrade/checkMcpConfig/index.d.ts +37 -0
  861. package/dist/tools/upgrade/checkMcpConfig/index.js +172 -0
  862. package/dist/tools/upgrade/checkMcpConfig/isCanonicalGlobalAideEntry/index.d.ts +10 -0
  863. package/dist/tools/upgrade/checkMcpConfig/isCanonicalGlobalAideEntry/index.js +17 -0
  864. package/dist/tools/upgrade/checkMcpConfig/isPinBehind/index.d.ts +9 -0
  865. package/dist/tools/upgrade/checkMcpConfig/isPinBehind/index.js +18 -0
  866. package/dist/tools/upgrade/checkReference/index.d.ts +12 -0
  867. package/dist/tools/upgrade/checkReference/index.js +28 -0
  868. package/dist/tools/upgrade/compareFile/index.d.ts +12 -0
  869. package/dist/tools/upgrade/compareFile/index.js +24 -0
  870. package/dist/tools/upgrade/index.d.ts +51 -0
  871. package/dist/tools/upgrade/index.js +216 -0
  872. package/dist/tools/upgrade/resolveProjectRoot/index.d.ts +7 -0
  873. package/dist/tools/upgrade/resolveProjectRoot/index.js +12 -0
  874. package/dist/tools/upgrade/shared/readAidePin/index.d.ts +9 -0
  875. package/dist/tools/upgrade/shared/readAidePin/index.js +24 -0
  876. package/dist/tools/upgrade/spliceStub/index.d.ts +13 -0
  877. package/dist/tools/upgrade/spliceStub/index.js +91 -0
  878. package/dist/tools/validate/checkAlignment/index.d.ts +15 -0
  879. package/dist/tools/validate/checkAlignment/index.js +42 -0
  880. package/dist/tools/validate/checkPlanSpec/index.d.ts +9 -0
  881. package/dist/tools/validate/checkPlanSpec/index.js +27 -0
  882. package/dist/tools/validate/index.d.ts +20 -0
  883. package/dist/tools/validate/index.js +91 -0
  884. package/dist/types/index.d.ts +1366 -0
  885. package/dist/types/index.js +1 -0
  886. package/dist/util/baseName/index.d.ts +6 -0
  887. package/dist/util/baseName/index.js +9 -0
  888. package/dist/util/buildTreeData/index.d.ts +7 -0
  889. package/dist/util/buildTreeData/index.js +51 -0
  890. package/dist/util/checkboxPattern/index.d.ts +9 -0
  891. package/dist/util/checkboxPattern/index.js +9 -0
  892. package/dist/util/classify/holdsCode/index.d.ts +6 -0
  893. package/dist/util/classify/holdsCode/index.js +31 -0
  894. package/dist/util/classify/holdsCode/isCodeFile/index.d.ts +2 -0
  895. package/dist/util/classify/holdsCode/isCodeFile/index.js +11 -0
  896. package/dist/util/classify/index.d.ts +17 -0
  897. package/dist/util/classify/index.js +163 -0
  898. package/dist/util/countCheckboxes/index.d.ts +16 -0
  899. package/dist/util/countCheckboxes/index.js +29 -0
  900. package/dist/util/describeError/index.d.ts +7 -0
  901. package/dist/util/describeError/index.js +7 -0
  902. package/dist/util/firstLine/index.d.ts +10 -0
  903. package/dist/util/firstLine/index.js +17 -0
  904. package/dist/util/isProcessRunning/index.d.ts +10 -0
  905. package/dist/util/isProcessRunning/index.js +22 -0
  906. package/dist/util/isVersionBehind/index.d.ts +6 -0
  907. package/dist/util/isVersionBehind/index.js +23 -0
  908. package/dist/util/parseBody/index.d.ts +7 -0
  909. package/dist/util/parseBody/index.js +43 -0
  910. package/dist/util/parseFrontmatter/index.d.ts +14 -0
  911. package/dist/util/parseFrontmatter/index.js +66 -0
  912. package/dist/util/readPackageVersion/index.d.ts +6 -0
  913. package/dist/util/readPackageVersion/index.js +24 -0
  914. package/dist/util/runtimePaths/create/index.d.ts +11 -0
  915. package/dist/util/runtimePaths/create/index.js +17 -0
  916. package/dist/util/runtimePaths/createRoot/index.d.ts +7 -0
  917. package/dist/util/runtimePaths/createRoot/index.js +13 -0
  918. package/dist/util/runtimePaths/isProjectKey/index.d.ts +7 -0
  919. package/dist/util/runtimePaths/isProjectKey/index.js +18 -0
  920. package/dist/util/runtimePaths/listProjectFolders/index.d.ts +10 -0
  921. package/dist/util/runtimePaths/listProjectFolders/index.js +28 -0
  922. package/dist/util/runtimePaths/moveLegacyRoot/compareFiles/index.d.ts +11 -0
  923. package/dist/util/runtimePaths/moveLegacyRoot/compareFiles/index.js +27 -0
  924. package/dist/util/runtimePaths/moveLegacyRoot/index.d.ts +13 -0
  925. package/dist/util/runtimePaths/moveLegacyRoot/index.js +85 -0
  926. package/dist/util/runtimePaths/moveLegacyRoot/moveLog/index.d.ts +15 -0
  927. package/dist/util/runtimePaths/moveLegacyRoot/moveLog/index.js +47 -0
  928. package/dist/util/runtimePaths/moveLegacyRoot/moveRecord/index.d.ts +13 -0
  929. package/dist/util/runtimePaths/moveLegacyRoot/moveRecord/index.js +29 -0
  930. package/dist/util/runtimePaths/moveLegacyRoot/publishCopy/index.d.ts +13 -0
  931. package/dist/util/runtimePaths/moveLegacyRoot/publishCopy/index.js +38 -0
  932. package/dist/util/runtimePaths/moveLegacyRoot/removeEmptyFolders/index.d.ts +8 -0
  933. package/dist/util/runtimePaths/moveLegacyRoot/removeEmptyFolders/index.js +11 -0
  934. package/dist/util/runtimePaths/moveLegacyRoot/resolveLegacyRoot/index.d.ts +9 -0
  935. package/dist/util/runtimePaths/moveLegacyRoot/resolveLegacyRoot/index.js +23 -0
  936. package/dist/util/runtimePaths/moveLegacyRoot/shared/isGone/index.d.ts +4 -0
  937. package/dist/util/runtimePaths/moveLegacyRoot/shared/isGone/index.js +9 -0
  938. package/dist/util/runtimePaths/moveLegacyRoot/shared/unlinkIfPresent/index.d.ts +4 -0
  939. package/dist/util/runtimePaths/moveLegacyRoot/shared/unlinkIfPresent/index.js +8 -0
  940. package/dist/util/runtimePaths/resolve/index.d.ts +9 -0
  941. package/dist/util/runtimePaths/resolve/index.js +31 -0
  942. package/dist/util/runtimePaths/resolve/nameProjectFolder/index.d.ts +10 -0
  943. package/dist/util/runtimePaths/resolve/nameProjectFolder/index.js +23 -0
  944. package/dist/util/runtimePaths/resolveArchivedLog/index.d.ts +9 -0
  945. package/dist/util/runtimePaths/resolveArchivedLog/index.js +19 -0
  946. package/dist/util/runtimePaths/resolveEndedMark/index.d.ts +11 -0
  947. package/dist/util/runtimePaths/resolveEndedMark/index.js +21 -0
  948. package/dist/util/runtimePaths/resolveEventLog/index.d.ts +10 -0
  949. package/dist/util/runtimePaths/resolveEventLog/index.js +20 -0
  950. package/dist/util/runtimePaths/resolvePresenceFile/index.d.ts +11 -0
  951. package/dist/util/runtimePaths/resolvePresenceFile/index.js +21 -0
  952. package/dist/util/runtimePaths/resolveRoot/index.d.ts +8 -0
  953. package/dist/util/runtimePaths/resolveRoot/index.js +13 -0
  954. package/dist/util/runtimePaths/resolveSessionLog/index.d.ts +11 -0
  955. package/dist/util/runtimePaths/resolveSessionLog/index.js +21 -0
  956. package/dist/util/runtimePaths/shared/isSessionId/index.d.ts +8 -0
  957. package/dist/util/runtimePaths/shared/isSessionId/index.js +10 -0
  958. package/dist/util/runtimePaths/shared/pickPathModule/index.d.ts +8 -0
  959. package/dist/util/runtimePaths/shared/pickPathModule/index.js +11 -0
  960. package/dist/util/runtimePaths/shared/projectKeyHash/index.d.ts +7 -0
  961. package/dist/util/runtimePaths/shared/projectKeyHash/index.js +7 -0
  962. package/dist/util/runtimePaths/shared/resolveAppDataRoot/index.d.ts +12 -0
  963. package/dist/util/runtimePaths/shared/resolveAppDataRoot/index.js +32 -0
  964. package/dist/util/runtimePaths/shared/runtimeNames/index.d.ts +20 -0
  965. package/dist/util/runtimePaths/shared/runtimeNames/index.js +20 -0
  966. package/dist/util/runtimePaths/types/index.d.ts +55 -0
  967. package/dist/util/runtimePaths/types/index.js +1 -0
  968. package/dist/util/scan/index.d.ts +12 -0
  969. package/dist/util/scan/index.js +228 -0
  970. package/dist/util/sessionQuietLimit/index.d.ts +9 -0
  971. package/dist/util/sessionQuietLimit/index.js +9 -0
  972. package/dist/util/skipDirs/index.d.ts +7 -0
  973. package/dist/util/skipDirs/index.js +15 -0
  974. package/dist/util/timeUnits/index.d.ts +15 -0
  975. package/dist/util/timeUnits/index.js +15 -0
  976. package/dist/versions.json +330 -0
  977. package/package.json +83 -5
@@ -0,0 +1,130 @@
1
+ ---
2
+ scope: .aide/docs
3
+ description: >
4
+ Spec for the canonical AIDE methodology docs — governs adding the References section so synthesis agents leave auditable breadcrumb trails.
5
+ alignment: misaligned
6
+ intent: >
7
+ Add a References section to the AIDE spec template and methodology so the
8
+ synthesis agent leaves a human-readable breadcrumb trail of which brain notes
9
+ it read when writing the Strategy. A reviewer looking at any .aide spec should
10
+ be able to trace every strategy decision back to the research that informed it,
11
+ without chasing the agent or re-running the pipeline. The mechanism is zero
12
+ infrastructure — path plus description, no UUIDs, no frontmatter changes, no
13
+ machine-readable pointers.
14
+ outcomes:
15
+ desired:
16
+ - The AIDE template includes a `## References` section after `## Bad examples`
17
+ where the synthesis agent logs each brain note it read, as a path plus a
18
+ one-line description of what it drew from that note.
19
+ - The aide-spec doc describes the References section alongside the four
20
+ existing body sections, making clear it is populated by the synthesis agent
21
+ and serves human auditability, not tooling.
22
+ - The synthesis agent instructions explicitly require logging every brain note
23
+ read during strategy writing into the References section, so the breadcrumb
24
+ trail is a side effect of normal synthesis, not a separate step.
25
+ - A reviewer can read the References section and understand why each strategy
26
+ decision was made and what research backed it, even if the original brain
27
+ notes have moved — the description provides enough context to locate the
28
+ source again.
29
+ undesired:
30
+ - References that are machine-readable metadata (UUIDs, frontmatter fields,
31
+ structured pointers) rather than a simple human-readable list — this adds
32
+ infrastructure with no consumer.
33
+ - A References section that lists notes the agent opened but did not actually
34
+ use in the Strategy — padding the list destroys the signal that connects
35
+ each reference to a decision.
36
+ - References that duplicate the Strategy by restating the finding in full
37
+ instead of naming the source and what was drawn from it — the description
38
+ is a breadcrumb, not a summary.
39
+ - A requirement that references stay valid links — brain notes move, and the
40
+ description is the fallback by design, not an afterthought.
41
+ ---
42
+
43
+ ## Context
44
+
45
+ The AIDE synthesis agent reads brain notes, distills them into Strategy decisions, and moves on. The finished spec carries the decisions but not the trail -- a reviewer seeing "do X because Y" in the Strategy has no way to verify what research note "Y" came from, whether the agent read it correctly, or whether other notes in the brain contradicted it. The only person who can answer those questions is the agent that wrote the spec, and that agent's context is gone the moment the session ends.
46
+
47
+ This is an auditability gap. Every other link in the AIDE pipeline is traceable through files: the planner's intent is in the frontmatter, the architect's plan is in the plan.aide, the QA agent's findings are in the todo.aide. But the synthesis agent's reading list -- the bridge between raw research and the decisions in Strategy -- disappears. A reviewer who wants to challenge a strategy decision has to re-search the brain themselves, guess which notes the agent found, and hope nothing has moved since.
48
+
49
+ The aide-spec doc already permits additional sections beyond the four required body sections (line 137: "Additional sections are allowed when the module needs them"). A References section formalizes the one the synthesis agent should have been leaving all along, without changing the frontmatter contract or adding infrastructure. The description on each entry is the load-bearing part: brain notes move, paths go stale, but a one-line description of what was drawn from a note gives a reviewer enough to relocate the source or judge the decision without it.
50
+
51
+ ## Strategy
52
+
53
+ **References is a fifth body section, not a frontmatter field.** Adding it to frontmatter would mean every agent that reads the spec pays a token cost for metadata only the reviewer consumes. A body section after Bad examples keeps it out of the machine-readable contract and positions it as human-readable audit material -- the same relationship Bad examples has to outcomes.undesired. The aide-spec doc's existing allowance for additional sections already covers this; what changes is that the template includes it by default and the methodology doc names it alongside the four required sections.
54
+
55
+ **Each entry is a path plus a one-line description of what was drawn from the note.** The path says where the note lived at synthesis time. The description says what finding or data point the agent pulled into the Strategy. Together they let a reviewer trace a strategy decision back to its source without re-reading the note -- and if the note has moved, the description provides enough context to find it again or judge the decision independently. No UUIDs, no structured metadata, no frontmatter pointers. The format is a flat list, one bullet per note, human-scannable in under thirty seconds. This directly serves the outcome that a reviewer can trace decisions even when original notes have moved.
56
+
57
+ **Only notes that informed a strategy decision belong in References.** A note the agent opened, scanned, and discarded adds noise that breaks the signal between reference and decision. The test is simple: if removing a reference would leave no strategy decision ungrounded, the reference is padding and should be cut. This mirrors the writing standard already in the aide-spec doc -- "every section must drive a decision; cut anything that doesn't" -- applied to the audit trail itself. This guards against the undesired outcome of a padded list that destroys the connection between each reference and the decisions it supports.
58
+
59
+ **The synthesis agent logs references as a side effect of normal synthesis, not as a separate step.** The agent already reads brain notes during step 3 of its process and distills them into Strategy during step 5. Logging each note it actually uses into a References section at write time costs one bullet per note and zero additional brain searches. Making it a separate post-hoc step would tempt the agent to reconstruct the list from memory rather than record it live, which defeats the purpose. The agent instructions should add reference-logging to the existing synthesis flow rather than appending a new phase.
60
+
61
+ **Descriptions are breadcrumbs, not summaries.** A description that restates the full finding duplicates the Strategy and doubles the spec's length for no new information. The description names the source and identifies which data point or pattern was drawn from it -- enough to trace, not enough to replace reading the original. This guards against the undesired outcome where References becomes a shadow copy of Strategy.
62
+
63
+ **References paths are not required to be valid links.** Brain notes move, vaults restructure, research gets archived. The spec's own intent says descriptions are the fallback by design, not an afterthought. No tooling should validate reference paths, and no agent should treat a stale path as an error. The path is a hint; the description is the contract.
64
+
65
+ ## Good examples
66
+
67
+ A References section from a spec whose Strategy cites three brain notes:
68
+
69
+ > ## References
70
+ >
71
+ > - research/cold-email/subject-line-data -- Open-rate benchmarks by subject line length and personalization type; sourced the "under 45 characters, company-name personalization" threshold used in Strategy.
72
+ > - research/cold-email/spam-trigger-patterns -- List of phrases and formatting patterns that trigger spam filters in major providers; informed the "avoid all-caps, exclamation marks, and filler adjectives" constraint.
73
+ > - research/cold-email/reply-rate-studies -- Comparison of CTA styles by reply rate across three SaaS outreach studies; grounded the "single question CTA" decision over multi-option closings.
74
+
75
+ Each entry names a path, names the specific finding drawn from it, and maps to a visible decision in the Strategy. A reviewer can read the three bullets and know exactly which research backs which decision without opening a single note.
76
+
77
+ A References section where one note contributed to multiple strategy decisions:
78
+
79
+ > ## References
80
+ >
81
+ > - research/scoring/digital-presence-signals -- Coverage of which local-business signals (GMB completeness, review velocity, website mobile score) correlate with outreach receptivity; informed both the signal-weighting tiers and the "skip businesses with no web presence" filtering rule.
82
+ > - research/scoring/false-positive-patterns -- Catalogue of signals that look positive but indicate businesses unlikely to convert (e.g., recent rebrand activity inflating web presence scores); grounded the "suppress scores during active rebrand" guard.
83
+
84
+ The second entry supports a single guard-rail decision. The first supports two. Neither entry restates the full finding -- each names just enough to trace.
85
+
86
+ ## Bad examples
87
+
88
+ A References section that lists every note the agent opened:
89
+
90
+ > ## References
91
+ >
92
+ > - research/cold-email/subject-line-data -- Open-rate benchmarks.
93
+ > - research/cold-email/industry-overview -- General overview of cold email as a channel.
94
+ > - research/cold-email/competitor-tools -- List of competing products in the outreach space.
95
+ > - research/cold-email/spam-trigger-patterns -- Spam filter trigger phrases.
96
+ > - research/cold-email/reply-rate-studies -- Reply rate data.
97
+ > - research/cold-email/legal-compliance -- CAN-SPAM and GDPR summary.
98
+
99
+ The agent opened six notes but only three informed Strategy decisions. "industry-overview" and "competitor-tools" contributed nothing to any decision. "legal-compliance" was read but no compliance decision appears in the Strategy. The list is padded, and a reviewer cannot tell which references are load-bearing. The descriptions are also too terse -- "Open-rate benchmarks" does not say which benchmark or which decision it informed.
100
+
101
+ A References section that duplicates Strategy:
102
+
103
+ > ## References
104
+ >
105
+ > - research/cold-email/subject-line-data -- Subject lines under 45 characters with company-name personalization achieve 23% higher open rates than generic lines over 60 characters. Lines using first-name personalization show diminishing returns after the first touchpoint. The optimal range is 38-44 characters for B2B outreach to local service businesses, with the company name placed in the first five words.
106
+
107
+ This is not a breadcrumb -- it is the full finding restated. The Strategy already contains the decision this data supports. The description should name the source and the data point ("open-rate benchmarks by subject line length; sourced the under-45-character threshold"), not reproduce the analysis.
108
+
109
+ A References section with machine-readable metadata:
110
+
111
+ > ## References
112
+ >
113
+ > ```yaml
114
+ > - id: ref-001
115
+ > path: research/cold-email/subject-line-data
116
+ > hash: a3f2c1d
117
+ > accessed: 2025-01-15T14:32:00Z
118
+ > relevance: 0.92
119
+ > tags: [open-rate, subject-line, personalization]
120
+ > ```
121
+
122
+ No consumer exists for this structure. No tool parses it. The hash will be stale by the next vault sync. The relevance score is a number the agent invented. Every field beyond path and description is infrastructure without a consumer -- exactly the kind of overhead the intent says to avoid.
123
+
124
+ A References section where paths are treated as contracts:
125
+
126
+ > ## References
127
+ >
128
+ > - ~~research/cold-email/subject-line-data~~ -- **BROKEN LINK: note not found at expected path. Requires investigation before this spec can be trusted.**
129
+
130
+ The path was never a contract. Brain notes move. The description ("open-rate benchmarks by subject line length; sourced the under-45-character threshold") gives a reviewer everything needed to relocate the source or evaluate the decision on its own merits. Flagging a stale path as a trust-breaking error misunderstands what the reference is for.
@@ -0,0 +1,74 @@
1
+ # Agent-Readable Code
2
+
3
+ The outcome of [progressive disclosure](./progressive-disclosure.md). Progressive disclosure is the *contract* — what the writer does (folder-named-after-export, JSDoc on every function, inline narration on orchestrators). Agent-readable code is the *experience* an agent has when that contract is honored: the codebase answers questions at the shallowest tier possible, and agents spend their context window on the task, not on re-learning the repo.
4
+
5
+ A codebase can follow the tiers mechanically and still be unreadable if the names lie, the files sprawl, or the operational surface is a pile of loose scripts. This note covers the complementary rules that make the contract actually pay off.
6
+
7
+ ## Naming for Agents
8
+
9
+ Agents read English. Names that are clear to you are clear to the agent — but abbreviations, acronyms, and clever names are not.
10
+
11
+ ```typescript
12
+ // ❌ Agent reads 4 files to figure out what these do
13
+ processData()
14
+ handleStuff()
15
+ doWork()
16
+ utils.ts
17
+
18
+ // ✅ Agent knows immediately
19
+ validateOrderPayload()
20
+ persistAuditLog()
21
+ formatReceiptEmail()
22
+ createOrder/checkInventory/index.ts
23
+ ```
24
+
25
+ **The folder name is the function name.** `createOrder/checkInventory/index.ts` exports `checkInventory`. No mental mapping required — Tier 1 of progressive disclosure only works if this rule is absolute.
26
+
27
+ ## Cascading Domain Structure
28
+
29
+ Structure cascades downward through domain layers — never flat. Each level narrows scope, and the folder path reads as a sentence describing what you're looking at.
30
+
31
+ ```
32
+ # ✅ Cascading — each layer narrows scope
33
+ cli/
34
+ ├── deploy/
35
+ │ ├── worker/
36
+ │ │ └── index.ts ← cli > deploy > worker
37
+ │ └── app/
38
+ │ └── index.ts ← cli > deploy > app
39
+ ├── migrate/
40
+ │ └── index.ts
41
+ └── index.ts ← CLI entry point
42
+
43
+ # ❌ Flat — everything at one level, names carry all the context
44
+ cli/
45
+ ├── deployWorker.ts
46
+ ├── deployWorkerNoCache.ts
47
+ ├── deployApp.ts
48
+ ├── migrateDb.ts
49
+ └── index.ts
50
+ ```
51
+
52
+ Flat structures force redundant prefixes (`deployWorker`, `deployWorkerNoCache`, `deployApp`) because there's no hierarchy to carry context. Cascading structures let each folder carry one word of meaning, and options become siblings or flags at the right depth — not name-encoded duplicates.
53
+
54
+ This applies everywhere: service modules, CLI commands, API routes, component trees. Think in layers. If you're working on something and notice a flat structure that would read better as a cascade, flag it.
55
+
56
+ ## Eliminate Context Burn
57
+
58
+ Context burn is any token the agent spends that doesn't help it complete the task. Common sources:
59
+
60
+ **God files** — A 400-line file with mixed concerns forces the agent to read everything to find the 20 lines it needs. Split by responsibility.
61
+
62
+ **Dead code** — Commented-out functions, unused imports, deprecated helpers. Delete them. They cost tokens and confuse the agent about what's current.
63
+
64
+ **Magic strings** — `if (status === "QWFA")` requires the agent to search for what QWFA means. Use enums or named constants.
65
+
66
+ **Scattered scripts** — 30 scripts in a flat folder with no entry point. The agent can't remember which one solved the same problem yesterday. Consolidate into a CLI.
67
+
68
+ **Monolith handlers** — A single worker file handling 8 queue types. Split into per-queue subfolders with typed handlers.
69
+
70
+ ## The Test: Would a New Hire Understand?
71
+
72
+ If a competent developer who has never seen your codebase could navigate to the right file, read the orchestrator, and understand the data flow in under 2 minutes — your code is agent-readable.
73
+
74
+ If they'd need to grep across 5 files, decode abbreviations, and mentally reconstruct the call chain — your agent will too, except it'll do it every session.
@@ -0,0 +1,290 @@
1
+ # AIDE Spec
2
+
3
+ **Autonomous Intent-Driven Engineering (AIDE)** puts intent at the center of everything. Not code, not tests, not prompts — intent. A short `.aide` doc lives next to the code it governs, and that doc is the contract. Architects plan from it. Implementors build from it. QA validates against it. When the intent changes, the code changes. When the code drifts from the intent, the code is wrong — full stop. Across a project, these docs form a **cascading intent tree**: a hierarchy of `.aide` specs rooted at the project level, each child narrowing the intent of its parent. Agents navigate the tree from root to leaf to understand the full context behind any module.
4
+
5
+ The name is a double entendre. AIDE is also an **AI Domain Expert** — the pipeline includes a domain expert agent that fills the brain with domain knowledge and a strategist agent that distills that knowledge into the spec's body sections. A human domain expert can fill the brain the same way the agent would — the strategist reads the brain regardless of who wrote to it. But domain expertise is a perk, not the point. Intent is the first-class citizen; research is just one way to inform it.
6
+
7
+ The brain can be filled by the domain expert agent, by a human domain expert, or by both. The pipeline downstream — strategist, architect, implementor, QA — treats the brain's content as authoritative regardless of the source. The developer decides what source is appropriate for the domain. The methodology applies to any domain; only the source of the brain's knowledge changes.
8
+
9
+ The research layer is optional. It runs only when the module needs domain knowledge that isn't already available — either from the user's interview context or from a prior session that already filled the brain. If the brain already has coverage, or the user holds the knowledge directly, the research phase is skipped and the strategist fills the body sections from what's available. Once the intent doc exists, the rest of the methodology treats it as authoritative regardless of how it got there.
10
+
11
+ AIDE is a three-layer model:
12
+
13
+ - **The brain holds durable knowledge.** External to the project — a personal knowledge base, an MCP memory server, a team wiki. Two kinds of content live here: domain research (what the module is supposed to do in the real world) and engineering conventions (how this team writes code — the coding playbook). Different agents pull different slices: the strategist draws on domain research when filling the spec body; the architect draws on the coding playbook when translating intent into a plan. Neither bloats the repo with reference material every session has to re-read.
14
+ - **The `.aide` file holds the intent.** A short, structured brief living in the folder of the module it governs. Strategy, outcomes, anti-patterns, domain examples. No code. This is the contract.
15
+ - **The code holds itself.** The implementation is ephemeral — if the intent changes, the code changes. The spec persists; the code is its current expression.
16
+
17
+ ## File Types
18
+
19
+ | File | Purpose |
20
+ | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
21
+ | `.aide` | The intent spec. Default and sufficient for most modules. |
22
+ | `intent.aide` | Same as `.aide`, renamed for disambiguation when a `research.aide` exists in the same folder. |
23
+ | `research.aide` | Optional. Co-located research fallback when no external brain is available. Prefer external memory (brain, MCP) over this — every file in the repo fills context whether the agent reads it or not, and agents don't always honor "skip this" instructions. |
24
+ | `brief.aide` | Per-module ephemeral pre-read for the architect. Carries the architectural commitments, type-level contracts, exact strings, schema details, cross-module contracts, open questions, and any mid-flight rework state the architect, implementor, and QA need but that are NOT durable intent. Created by the strategist during synthesize, lives through plan/build/QA/fix, deleted by the maintainer agent after QA passes. Not bound by the Brevity Contract. See [brief.aide spec](./brief-aide.md). |
25
+ | `plan.aide` | The architect's implementation plan. Checkboxed steps the implementor executes top-to-bottom. Lives next to the `.aide` it implements. Ephemeral — deleted by the maintainer agent after QA passes. See [plan.aide spec](./plan-aide.md). |
26
+ | `todo.aide` | QA re-alignment document. Captures where implementation drifted from intent, with per-issue misalignment tags and a retro section. One `todo.aide` per QA loop. Ephemeral — deleted by the maintainer agent after QA passes; the retro is promoted to brain at `process/retro/` before deletion. See [todo.aide spec](./todo-aide.md). |
27
+ | `session.aide` | Project-root pipeline-position log. One file at `.aide/session.aide`, replaces the legacy `handoff.aide` pattern. Tracks the current feature's pipeline state, settled architectural decisions, anti-regression invariants, where the cycle paused. Long-lived and never deleted — rewritten for the next task when a feature closes. See [session.aide spec](./session-aide.md). |
28
+
29
+ **Default to `.aide` alone.** Push research out to the brain or an MCP memory store. Only split into `research.aide` + `intent.aide` when the research genuinely can't live elsewhere. Never have both `.aide` and `intent.aide` in the same folder.
30
+
31
+ ## Where `.aide` Files Live
32
+
33
+ `.aide` files live on **modules** — the folders that are units of planned work. An orchestrator `index.ts` that coordinates helpers is the usual module, and its spec provides the domain context for that pipeline. Helpers inside a module are small, focused functions; their folder name and code are self-explanatory, and the module's spec already covers them.
34
+
35
+ **No code without a plan, no plan without a spec.** Every `plan.aide` sits beside the intent spec it implements, so every folder that gets its own plan gets a spec first. That includes modules with no orchestrator: a shared types folder (the domain vocabulary, derived from the schema rather than hand-copied), a shared-helpers folder (pieces used by several modules, with no module-specific logic), a single-file module. A frontmatter-only spec is enough for these, and it is what QA verifies their code against. `aide_scaffold` refuses to create a plan in a folder with no intent spec.
36
+
37
+ **Placement rule:** a folder that is its own unit of planned work — an orchestrator, or any module that gets its own plan — has a `.aide`. A helper folder inside a module doesn't; it is planned and verified as part of its module. The one exception is the project root intent spec at `.aide/intent.aide` — the top of the cascading intent tree. It lives inside the `.aide/` folder because the project root has no orchestrator, and naming it `intent.aide` avoids ambiguity with the `.aide/` directory itself. All other specs inherit from it, directly or transitively.
38
+
39
+ ### Inheritance
40
+
41
+ `.aide` files at deeper levels inherit the context of their parent. A deeply nested spec doesn't re-explain the parent's strategy — that's in the parent spec. It only describes what makes *this* submodule succeed or fail. Each nested spec stays lean because the parent already carries the shared intent context.
42
+
43
+ A submodule is any meaningful subdivision of the parent module — a pipeline stage, a strategy variant, a resource type, a rendering target, a channel, a subdomain of the problem. The tree reflects the composition of the module.
44
+
45
+ ### Bootstrapping a project
46
+
47
+ Every intent tree needs a root. The project root intent spec lives at `.aide/intent.aide` — inside the `.aide/` folder alongside the methodology docs, not as a bare file at the repo root. Its `scope` is `.` (the project root) or the project name. Its `intent` describes the project's purpose at the highest level. Its `outcomes` define the project-wide success criteria and failure modes that every deeper spec inherits.
48
+
49
+ `aide_init` does not create this file — it installs the methodology, not the project's intent. On the first `/aide` run against a new project, the orchestrator interviews the user and the spec writer creates it as Stage 1, before any module-level spec exists, with `aide_scaffold({ directory: ".aide", type: "intent" })`. Scaffold always names the root spec `intent.aide`: that folder holds the session record, the config and other AIDE files, so the bare `.aide` name would say nothing there. Module specs keep the bare `.aide` name unless research sits beside them.
50
+
51
+ **The folder tree comes next, before any spec below the root.** A spec's folder is its scope, and its parent folder's spec is the intent it narrows, so a module spec written before the folder structure exists has to guess both — and a wrong guess means moving and narrowing the spec later. In a project with no code yet, or for a module whose folder does not exist and that no approved tree places, the architect first proposes the project folder tree from the root intent: the layers, the orchestrators that get a `.aide`, the entity model, and the playbook entries each layer follows. It writes no plan for this. The user approves the tree, the orchestrator records it in `session.aide`, and only then are module specs written, at the folders the tree gives them, parents before children. Moving, splitting or re-parenting a module later goes back through the same proposal and approval.
52
+
53
+ Without a root intent spec, child specs have nothing to inherit from. They are forced to restate project-level context that belongs at the root — or worse, they omit it entirely, leaving gaps the architect and QA agents can't fill. The root spec establishes the project-wide contract; everything below narrows it.
54
+
55
+ ### Example: full project intent tree
56
+
57
+ ```
58
+ project-root/
59
+ ├── .aide/
60
+ │ ├── intent.aide ← project root intent (top of the intent tree)
61
+ │ └── docs/ ← methodology docs (not specs)
62
+ │ └── ...
63
+ ├── src/
64
+ │ ├── .aide ← src-level intent (narrows project root)
65
+ │ └── service/<feature>/
66
+ │ ├── .aide ← feature strategy (narrows src-level)
67
+ │ ├── index.ts
68
+ │ ├── <submodule-a>/
69
+ │ │ ├── .aide ← submodule-a strategy (inherits feature)
70
+ │ │ ├── index.ts
71
+ │ │ ├── <submodule-a1>/
72
+ │ │ │ ├── .aide ← submodule-a1 intent (inherits submodule-a)
73
+ │ │ │ ├── index.ts
74
+ │ │ │ └── <helper>/
75
+ │ │ │ └── index.ts ← helper (no .aide)
76
+ │ │ ├── <submodule-a2>/
77
+ │ │ │ ├── .aide
78
+ │ │ │ └── index.ts
79
+ │ │ └── <submodule-a3>/
80
+ │ │ ├── .aide
81
+ │ │ └── index.ts
82
+ │ └── shared/
83
+ │ └── <helper>/
84
+ │ └── index.ts ← helper (no .aide)
85
+ ```
86
+
87
+ The intent tree runs from `.aide/intent.aide` at the top down to the deepest feature submodule. Orchestrators have specs. Helpers don't. Deeper specs inherit from shallower ones. The shape of the tree matches the shape of the module — whatever best expresses its composition.
88
+
89
+ ## Code Alongside the Spec
90
+
91
+ A `.aide` spec is one layer of context. The code sitting next to it is another. The spec carries the *intent and strategy*; the code carries the *shape and flow*, self-documented through progressively deeper tiers so an agent can stop at the shallowest one that answers its question.
92
+
93
+ See [Progressive Disclosure](./progressive-disclosure.md) for the full pattern: folder structure at Tier 1, JSDoc on every function at Tier 2, inline step-by-step comments on orchestrators at Tier 3. Together, the spec and the progressively-disclosed code give an agent everything it needs without reading helper bodies.
94
+
95
+ ## Spec Structure
96
+
97
+ Every `.aide` file follows the same structure. **Frontmatter is always required. Body sections are conditional** — they exist only when the orchestrator routes through synthesize. When body sections are present, the same five always appear together (no partial bodies). Without structure, agents generate freeform specs that don't scale — repeatability comes from the template.
98
+
99
+ The canonical template lives at [AIDE Template](./aide-template.md). Agents should read the template before writing a new spec.
100
+
101
+ ### Frontmatter (required)
102
+
103
+ | Field | Required | Purpose |
104
+ |-------|----------|---------|
105
+ | `scope` | Yes | The module path this spec governs. One spec, one scope. |
106
+ | `description` | Yes | **One sentence, ≤ 200 characters.** What the module does in domain terms. Makes ancestor chains in `aide_discover` self-contained — agents reading the chain understand what each spec governs without opening it. Domain vocabulary (entity names, status enums, field names) is welcome; type signatures, file paths, and argument indexes are not — see [Brevity Contract](#brevity-contract). |
107
+ | `intent` | Yes | **One paragraph, ≤ 100 words.** Plain language: what this module is *for*. The ten-second north star every other field serves. Everything in `outcomes` must be traceable back to it. |
108
+ | `outcomes.desired` | Yes | **3-6 items, ≤ 2 sentences each.** Falsifiable domain success criteria. The QA agent measures actual output against this list. Outcomes name the *what*, not the *how* — implementation contracts belong in code, plan, or brain. |
109
+ | `outcomes.undesired` | Yes | **3-6 items, ≤ 2 sentences each.** Domain failure modes — especially the almost-right-but-wrong outputs that pass tests. The QA agent checks these explicitly even when tests pass. |
110
+ | `alignment` | Yes | Whether the spec has been checked against its ancestors and the code: `unreviewed`, `aligned` or `misaligned`. Every new spec starts `unreviewed` (scaffold writes it). The aligner agent sets `aligned` after verification; the QA agent sets `misaligned` when drift is detected — both through `aide_frontmatter`, never by hand. Surfaced inline in `aide_discover` output so agents reading the ancestor chain see alignment without opening each spec. |
111
+
112
+ **Scope, description, intent, outcomes. That's the whole contract.** `alignment` is the one lifecycle field that exists, added alongside the tooling that reads it — the `aide_discover` ancestor chain surfaces it inline, and `aide_validate` warns when it is absent. It is always present, and it only says whether the spec has been reviewed; it never records whether work is in flight. A spec is being worked on exactly when a `plan.aide` or `todo.aide` sits beside it. Older specs may still carry the same values under the earlier `status` name; tooling reads that as the spec's alignment and moves it to `alignment` on the next write. The field is never written by hand; `aide_frontmatter` makes the change. No other lifecycle fields exist — `revision` and similar state encodings are deliberately omitted. Git history tracks change; the rule "if the intent changes, it's a new spec" is the forcing function.
113
+
114
+ `intent` states the purpose; `outcomes` is the intent-engineering contract that operationalizes it — desired is the target, undesired is the tripwire. Both outcome lists are two sides of the same declaration, and both must serve the intent above them.
115
+
116
+ **YAML safety rule for outcomes:** Any `outcomes.desired` or `outcomes.undesired` list item whose text contains a colon followed by a space (`: `) must be wrapped in double quotes. YAML treats `: ` as a mapping key delimiter even inside plain scalars — backtick code spans like `` `scope: path` `` or prose like `sets alignment: aligned` will silently break frontmatter parsing, causing all fields to appear missing to tooling. When in doubt, quote the item.
117
+
118
+ ### Brevity Contract
119
+
120
+ The caps below are hard limits. The aligner enforces them; violations land in `todo.aide` as `spec-bloat`.
121
+
122
+ | Field | Hard cap |
123
+ |---|---|
124
+ | `description` | ≤ 200 characters, single sentence |
125
+ | `intent` | ≤ 100 words, single paragraph |
126
+ | `outcomes.desired` | 3-6 items, ≤ 2 sentences per item |
127
+ | `outcomes.undesired` | 3-6 items, ≤ 2 sentences per item |
128
+ | `## Context` | ≤ ~250 words. Only domain background not inherited from the parent. |
129
+ | `## Strategy` | One paragraph per decision, ≤ ~80 words each. ~7 decisions max — beyond that, the scope is too wide; split it. |
130
+ | `## Good examples` / `## Bad examples` | 2-3 examples each, brief. Pattern material, not enumeration. |
131
+ | `## References` | One bullet per brain entry actually used: path + one-line description of what was drawn. |
132
+ | **Whole-file size** | **~150 lines is the target. ~175 lines is a refactor signal — beyond that, the scope is too wide and splitting is overdue.** Section caps catch field-level bloat; the whole-file signal catches the case where every section is technically under cap but the spec has still ballooned. |
133
+
134
+ #### Forbidden content (anywhere in the file)
135
+
136
+ These belong in code, in `plan.aide`, in `brief.aide`, or in the brain — never in `.aide`:
137
+
138
+ - **Type signatures** (e.g. `(string | null)[]`, `Record<K, V>`)
139
+ - **File paths and folder layouts**
140
+ - **Argument-index or position-based contracts** (e.g. `args[3]`, "the third element"), and **schema cardinality assertions** (e.g. "exactly six sections", "at most three fields")
141
+ - **Migration history, deprecation notes, "retired" prior designs** — git tracks change; the spec describes the current contract
142
+ - **Long justifications, asides, or commentary** annotating the contract — if a sentence exists to defend or footnote another sentence, cut both
143
+ - **Function-name enumerations standing in for outcomes** — a spec describes what the module accomplishes in the domain, not which exported symbols exist
144
+
145
+ #### Domain vocabulary IS allowed and expected
146
+
147
+ Specs are written in the language of the domain, not the codebase. The following are welcome whenever they describe the system the way a non-engineer who knows the business would describe it:
148
+
149
+ - **Entity names** (e.g. `OutreachThread`, `Sequence`, `Attempt`)
150
+ - **Status enum values** (e.g. `ACTIVE`, `COMPLETED`, `CANCELLED`, `BLACKLISTED`)
151
+ - **Field names that name a domain concept** (e.g. `generationContext`, `nextFollowUpAt`)
152
+ - **Domain enum values** (e.g. `INDEXABILITY`, `TRAFFIC`, `SECURITY`)
153
+ - **Specific numbers tied to domain decisions** (e.g. "3-email cap", "7-day interval")
154
+
155
+ **The test:** if the term would land for a non-engineer who understands the business, it's domain vocabulary and belongs. If only a developer reading the code would recognize it, it's an implementation contract — keep it out. If the implementation were rewritten from scratch in a different language and the term still made sense, the spec should survive untouched.
156
+
157
+ #### When the scope is too wide — suggest child specs
158
+
159
+ If you cannot fit the intent into a single ≤ 100-word paragraph with 3-6 outcomes per list, the scope is too wide. **Do not relax the caps. Split into child specs.** Trigger conditions:
160
+
161
+ - A single outcome covers a sub-pipeline with its own success criteria
162
+ - The Strategy has more than ~7 distinct decisions
163
+ - The Good/Bad examples cluster around two or more distinct domain concerns
164
+ - The Context paragraph keeps wanting to grow because the module has multiple sub-domains
165
+ - The whole file is creeping past ~175 lines
166
+
167
+ ### Cascading intent tree
168
+
169
+ The **cascading intent tree** (or **intent tree**) is the hierarchy of `.aide` specs from `.aide/intent.aide` at the project root down to the deepest module-level spec. Intent flows downward: each child spec inherits everything above it and narrows it to the slice of the problem it owns. An agent navigating the intent tree reads from root to leaf — the full chain gives the complete context for any module.
170
+
171
+ `intent` inherits down the tree just like the rest of the spec. A nested `.aide` doesn't restate the parent's purpose — it narrows it to the slice of the problem *this* module owns. The agent reads the parent spec first, then the child, and the child's intent is understood as a specialization of the parent.
172
+
173
+ A child spec should:
174
+
175
+ - **Narrow the purpose** to the specific submodule it owns, not restate the parent-level mission.
176
+ - **Add outcomes** that only make sense at this level (submodule-specific formats, thresholds, shapes).
177
+ - **Add tripwires** tied to the unique failure modes of this submodule — not duplicate parent-level tripwires that apply to the whole tree.
178
+
179
+ A child spec should **not**:
180
+
181
+ - Restate the parent's purpose, invariants, or universally-applicable tripwires.
182
+ - Re-cite research that supports parent-level decisions.
183
+ - Describe behavior that any sibling submodule shares.
184
+
185
+ **Rule of thumb:** if a child `.aide` could be copy-pasted into a sibling folder and still make sense, it's too generic — push that content up to the parent. A child spec should only contain what's *specific to this submodule*.
186
+
187
+ **Outcomes cascade strictly.** A child's outcomes don't replace the parent's — they narrow them. Every ancestor's `outcomes.desired` and `outcomes.undesired` still apply to the child's output. A submodule whose local output satisfies its own outcomes but violates a parent's intent is wrong in the context of the whole application. Agents must walk the full intent tree from root to leaf (via `aide_discover`) before judging whether a module's output is valid — local validity is necessary but not sufficient.
188
+
189
+ ### Body sections (conditional)
190
+
191
+ Body sections are **optional**. A `.aide` file with only frontmatter is a valid, complete spec — a navigation stub that names the module's intent and outcomes for the cascading tree, with no further elaboration. Most modules don't need more than that.
192
+
193
+ Body sections are filled by the strategist during synthesize when — and only when — the module needs context that isn't already obvious from intent + outcomes + parent specs. The orchestrator decides whether synthesize runs (see [orchestrator routing](../../.claude/commands/aide.md)), using the pipeline test below. If the strategist is invoked, **all five body sections must be filled** — partial bodies are not permitted. If the strategist is skipped, the body section headings should not appear in the file at all.
194
+
195
+ When present, body sections persist — they are the durable domain contract, just like frontmatter. Unlike `plan.aide` / `todo.aide` / `brief.aide` (ephemeral pipeline state), filled body sections are not deleted post-QA.
196
+
197
+ ### When to fill body sections — the pipeline test
198
+
199
+ A Strategy records how the system solves a real-world problem — the order its steps happen in, what each step hands the next, and why that design solves the problem. The trigger for synthesize is one question: **does this feature have an order the names don't reveal?** Several steps that must happen in a specific order — moved along by calls, events, a clock, or state changes — where each step hands something to the next. Event-driven pipelines and timed lifecycles both qualify. This doc calls them all pipelines. Research is not the trigger — a module can need research and still be self-contained, or need none and still be a step in a pipeline.
200
+
201
+ - **Pipeline → synthesize runs.** The end-to-end strategy goes in the parent spec's body: the real-world problem the flow solves, what starts it, the order of the steps, the hand-offs between them, why each step sits where it does, and what happens when a step is late, repeated or missing. Each module's own slice of that strategy goes in that module's spec body.
202
+ - **Not a pipeline → frontmatter only.** A self-contained module that does one thing — its name says it all — has no Strategy body.
203
+
204
+ The reason is that module names and outcomes describe each step alone. Nothing in them says that storage notifies a queue, that the queue reader treats each notice only as a cue and re-checks the real files, or that a sweep settles whatever a lost notice missed. That order, and why it holds, is the design — and it lives nowhere else durable.
205
+
206
+ **Decisions parked in pipeline-state files never stand in for a Strategy body.** `brief.aide`, `plan.aide` and `todo.aide` are deleted after QA, and `session.aide` is rewritten as features close. A pipeline whose hand-offs are settled only there has no durable strategy.
207
+
208
+ **Example — needs a Strategy (an event-driven pipeline: post-upload processing).** The upload request reserves space and returns size-locked links; the agent sends the files and stops; storage announces each file to the queue; the queue reader treats each notice only as a cue, re-checks the real stored files, and once every file of that upload has arrived and passed its checks publishes in one step or refuses and frees the space; duplicate or late notices find the upload already settled; a periodic sweep settles anything a lost notice missed and discards uploads that never complete.
209
+
210
+ **Example — needs a Strategy (a timed lifecycle: a cold-outreach drip sequence).** The problem: past the third cold email, replies barely rise while complaints and sender-reputation damage do. So a sequence is capped at three emails, each a draft the user approves. The conversation thread is created before the sequence, so the inbox stays coherent even if a later step fails. Each email records which audit gap it raised, and that record is the hand-off — the next email reads it to raise a different gap without re-fetching the audit. The seven-day wait starts when an email is sent, not drafted. Two triggers own two exits: a daily sweep advances the sequence, or closes it once three emails go unanswered or a reply arrives; delivery events (bounce, complaint) are the only thing that cancels it, deleting unsent drafts. None of that order is visible in module names like follow-up, final email or reply sweep.
211
+
212
+ **Example — needs a Strategy (an event-driven pipeline: inbound reply handling).** The problem: a prospect's reply must stop the outreach and route to a person, exactly once. The mail provider's event arrives; it is matched to its conversation thread; the reply is classified as interested, not now, or unsubscribe; the sequence is closed, paused, or the contact is blocked; a task is created for follow-up. A duplicate event finds the thread already handled, and a reply that arrives before its send was recorded is held and retried rather than dropped.
213
+
214
+ **Example — skip it (an upload module).** "Uploads a file to storage under the item's folder." Anyone calls it and it uploads; nothing follows it and nothing depends on its order.
215
+
216
+ **Example — skip it, even though it is complex (a pricing calculator).** Many tiers, discounts and regional rules, but one call in and one price out — no steps, no order, no hand-offs. Its complexity belongs in outcomes, or in brain research if the rules are unknown territory; that is the Research signal, not Strategy.
217
+
218
+ The five sections, when filled:
219
+
220
+ - **`## Context`** — Why this module exists and the domain-level background an agent needs to make good decisions. No code.
221
+ - **`## Strategy`** — How the system solves the real-world problem: how the modules interact, and why. What starts the flow, who calls or notifies whom, in what order, what each hand-off carries, and what happens when one is late, repeated or missing — each decision naming the outcome it serves. Research pulled from the brain, when there is any, gets distilled here into decisions. Write in decision form ("do X because Y"), not description form. Cite data inline. No code. A Strategy never restates the intent or outcomes above it in the same file, never recounts history, and never cites `session.aide`, `brief.aide`, `plan.aide` or `todo.aide`.
222
+ - *Bad — a table of contents:* "The request module creates the upload. The queue module reads messages. The publish module publishes." It lists what each module does, never how they interact.
223
+ - *Bad — duplication:* a decision that restates an outcome ("go live all at once, keeping the prior version") instead of explaining the hand-off that guarantees it, or a Context that walks the pipeline and a Strategy that walks it again.
224
+ - **`## Good examples`** — Concrete domain output that illustrates success. Real output, not code. Pattern material for QA agents verifying the system's output.
225
+ - **`## Bad examples`** — Concrete domain output that illustrates failure, especially the almost-right-but-wrong cases. Expands on `outcomes.undesired` with recognizable failure material.
226
+ - **`## References`** — A flat list of brain entries the synthesis agent read during strategy writing, each as a path plus a one-line description of what was drawn from it. Its purpose is human auditability: a reviewer can trace every strategy decision back to the research that informed it without re-running the pipeline. Populated by the synthesis agent as a side effect of normal synthesis — not filled manually after the fact. Paths are not required to be valid links; the description is the fallback by design.
227
+
228
+ Additional sections (constraints, state machine, etc.) are allowed when the module needs them — but only as part of a full body, not as standalone additions to a frontmatter-only spec.
229
+
230
+ ### Frontmatter vs Strategy — what each layer owns
231
+
232
+ - **Frontmatter (`intent` + `outcomes`)** declares *what* the module is for and *what* counts as success or failure. It is a contract — short, falsifiable, machine-readable. **Always present.**
233
+ - **`## Strategy` body** (when filled) answers *how* — how the modules hand off to each other, combined with any research from the brain, compressed into actionable decisions the architect can turn into a plan and the implementor can execute without re-reading the sources. **Optional — present only when the orchestrator routed through synthesize.**
234
+
235
+ If the strategy contradicts the intent, the intent wins and the strategy is wrong. If a new research finding changes the strategy but not the intent, rewrite the strategy in place. If the intent itself changes, the scope and identity of the spec have changed — consider whether it should be a new spec entirely.
236
+
237
+ **When body sections aren't filled, where does "how" live?** In the user's implementation context to the orchestrator (which the orchestrator hands directly to the architect), the brain's coding playbook (which the architect consults), and the architect's `plan.aide` itself. The body sections earn their place when the feature is a pipeline — the order and hand-offs between modules are a design no module's name or outcomes reveal (see [the pipeline test](#when-to-fill-body-sections--the-pipeline-test)).
238
+
239
+ ## Writing Standards
240
+
241
+ - **Specs are contracts, not essays.** Every section must drive a decision. Cut anything that doesn't.
242
+ - **Include data.** "Short subject lines work better" is useless. Concrete numbers with source attribution are actionable.
243
+ - **No code.** No filenames, no type signatures, no function bodies, no worked code examples. The code documents itself when it's written. The spec describes intent; the implementer figures out the code. Including code in a spec wastes tokens documenting something ephemeral.
244
+ - **Domain examples only.** When you show an example, show what the *output* should look like in the domain (a real email, a real report section, a real API response), not what the code that produces it looks like.
245
+ - **Each spec stands alone** except for inheritance from parent `.aide` files. Don't cross-reference sibling specs.
246
+ - **Decisions, not descriptions.** Each paragraph in `## Strategy` should state a concrete choice and the reasoning that justifies it. An architect reading the strategy should know what to do *and* why that approach beats the alternatives, so the plan it produces can handle unanticipated edge cases without re-opening the spec.
247
+ - **Citations ride alongside decisions.** When a decision is grounded in external data or research, name the source and the finding in-line. Don't footnote; don't link out to sources a downstream agent would have to chase.
248
+
249
+ ## When to Write a `.aide`
250
+
251
+ | Scenario | `.aide` needed? |
252
+ |----------|-----------------|
253
+ | New feature with unknown domain | Yes — at the feature root, and in submodules that implement domain logic |
254
+ | New feature with clear requirements | Yes — at the feature root; submodule specs only if domain context is needed |
255
+ | Adding a submodule to an existing feature | Yes if it gets its own plan; otherwise it is planned inside its parent module |
256
+ | A shared types or shared-helpers folder, or a single-file module, that gets its own plan | Yes — frontmatter only is enough |
257
+ | Simple helper inside a module | No — the module's spec and plan cover it |
258
+ | Bug fix or simple change | No new spec — the fix is planned in the module whose spec it serves |
259
+
260
+ The test: a folder that gets its own plan gets a `.aide`, because a plan never exists without the spec it implements. Beyond that, write a body only when the feature is a pipeline (see [the pipeline test](#when-to-fill-body-sections--the-pipeline-test)).
261
+
262
+ ## Intent Engineering
263
+
264
+ A `.aide` file captures more than what to build — it captures **intent**. Without intent, an agent runs the tests, sees green, and calls it done. But green tests don't mean the feature works. Hidden failures only surface when someone understands what the code is *supposed* to accomplish.
265
+
266
+ The `outcomes` block gives the QA agent that understanding. `desired` tells it what to aim for; `undesired` tells it what to watch for even when everything looks fine. An output that is technically valid but violates the spec's intent — that's a hidden failure. The `undesired` list catches it. Without the spec, the agent would never flag it.
267
+
268
+ ## The Agent Pipeline
269
+
270
+ AIDE isn't one agent doing everything. It's a pipeline of specialized agents, each with one job and a narrow set of inputs. Every stage runs in a fresh context — no agent carries conversation from a prior stage. Handoff is via files only: `.aide`, `plan.aide`, `todo.aide`, and entries persisted to the brain. Splitting the roles is how each agent keeps its context small enough to stay accurate.
271
+
272
+ The pipeline is driven by an **orchestrator** (`/aide`) that interviews the user, detects pipeline state from existing files, and spins up each agent in sequence. The orchestrator can resume mid-pipeline — if a user starts a new session and runs `/aide`, it picks up where the last session left off by checking which files exist.
273
+
274
+ 1. **Spec Writer** (`/aide:spec`). Takes the orchestrator's delegation context — gathered from its interview with the user — and distills it into `.aide` frontmatter: `scope`, `intent`, `outcomes.desired`, `outcomes.undesired`. No body sections, no research, no code. The spec writer structures intent into a falsifiable contract; the orchestrator owns the user conversation. The frontmatter is presented to the user for confirmation before proceeding.
275
+
276
+ 2. **Domain Expert** (`/aide:research`). *Optional.* Fills the brain with domain knowledge — the same role a human domain expert would play, automated. Runs only when the module requires domain knowledge that isn't already available. Ingests sources (existing brain entries, web search, MCP memory), synthesizes patterns, resolves conflicts, and persists the result to the brain filed by **domain** (e.g., `research/email-marketing/`), not by project — domain knowledge is reusable. If no external brain is available, falls back to a co-located `research.aide`. The domain expert never writes `.aide` files; its sole output is reusable knowledge.
277
+
278
+ 3. **Strategist** (`/aide:synthesize`). *Runs when the feature is a pipeline.* Reads the orchestrator's description of how the modules hand off, plus any domain knowledge in the brain, and distills them into the `.aide` body sections: `## Context`, `## Strategy`, `## Good examples`, `## Bad examples`, `## References`. Uses `aide_discover` to walk the intent tree. Every strategy decision must trace to an outcome; anything that doesn't serve the intent gets cut.
279
+
280
+ 4. **Architect agent** (`/aide:plan`). Translates the complete `.aide` spec into a `plan.aide` — a checkboxed implementation plan the implementor executes top-to-bottom. Reads the `.aide` for what the module must produce, pulls the coding playbook from the brain for how this team writes code, and reads the current codebase for what already exists. Output: file placement, naming, sequencing, contracts, reuse decisions, test steps. No code. The plan is presented to the user for approval before build begins. See [plan.aide spec](./plan-aide.md).
281
+
282
+ 5. **Implementor agent** (`/aide:build`). Executes `plan.aide`. Reads the plan and the `.aide` spec, writes the code, writes the tests, checks each plan step off as it completes, runs tests until green. The same agent type also runs the fix loop (`/aide:fix`) — one session per `todo.aide` item, clean context each time. If the plan is ambiguous, escalates back to the architect rather than inventing an answer.
283
+
284
+ 6. **QA agent** (`/aide:qa`). Uses `aide_discover` to walk the full intent tree, compares actual output against `outcomes.desired`, checks for anything in `outcomes.undesired`, and writes a `todo.aide` re-alignment document next to the spec. Each issue traces to a specific outcome and is tagged with the pipeline stage where intent was lost (`misalignment`). Includes a `## Retro` section capturing what would have caught the issues earlier. Does not propose solutions. See [todo.aide spec](./todo-aide.md).
285
+
286
+ The fix loop cycles between QA and Implementor: QA produces `todo.aide`, the implementor fixes one item per session in clean context, QA re-validates. When all items are resolved, the orchestrator promotes the retro findings to the brain at `process/retro/` as durable process learning.
287
+
288
+ Every agent reads the same `.aide` spec. No agent needs a human to explain what to build or how to build it — the context is already in the files.
289
+
290
+ See [Automated QA](./automated-qa.md) for the full QA verification loop.