@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
package/.claude/.aide ADDED
@@ -0,0 +1,316 @@
1
+ ---
2
+ scope: .claude
3
+ alignment: aligned
4
+ description: AIDE harness — agents, commands, skills, and methodology docs that drive the intent pipeline
5
+ intent: >
6
+ The AIDE harness gains cascading alignment — the ability for agents to verify
7
+ that every spec in a tree honors the intent of its ancestors, and for drift
8
+ to be detected, flagged, and repaired without blocking the pipeline. A new
9
+ aide-aligner agent walks the spec tree top-down comparing each spec's
10
+ outcomes against its ancestors' outcomes, producing realignment items where
11
+ drift is found. The /aide:align command invokes this agent. Existing agent
12
+ definitions are simplified by removing verbose tree-walking instructions —
13
+ the enhanced discover tool's ancestor chain output teaches the protocol
14
+ directly, so agents learn by calling the tool, not by reading paragraphs
15
+ of instruction. A new methodology doc captures the cascading alignment
16
+ protocol as canonical doctrine.
17
+ outcomes:
18
+ desired:
19
+ - An aide-aligner agent exists, distinct from the QA agent, whose sole
20
+ job is spec-vs-spec alignment — comparing a child spec's outcomes
21
+ against every ancestor's outcomes to detect intent drift. QA checks
22
+ code-vs-spec; the aligner checks spec-vs-spec.
23
+ - The aligner walks the tree top-down using the discover tool's ancestor
24
+ chain, compares outcomes at each level, and produces a todo.aide at
25
+ each misaligned node listing concrete realignment items.
26
+ - "The aligner sets status: misaligned on specs where it finds drift and
27
+ status: aligned on specs it has verified. It is the only agent that
28
+ can confirm alignment through a deliberate full-tree walk."
29
+ - "The QA agent can set status: misaligned incidentally while reviewing
30
+ code-vs-spec, but cannot set aligned — only the aligner confirms
31
+ alignment."
32
+ - A /aide:align command exists that invokes the aligner agent, callable
33
+ by the user or suggestable by the orchestrator when drift is suspected.
34
+ - Agent definitions across the harness no longer contain verbose
35
+ tree-walking instructions. Agents call discover, the tool's output
36
+ teaches the protocol, and agents report misalignment flags they
37
+ encounter. If an agent needs paragraphs of instruction to use
38
+ discover correctly, that is a discover design failure, not an agent
39
+ instruction gap.
40
+ - A cascading-alignment.md methodology doc exists under .aide/docs/
41
+ documenting the protocol, the status field semantics, the aligner's
42
+ role, and how misalignment flows through the pipeline.
43
+ - "When `aide_info` reports `brain.status: no-mcp-entry` with an empty
44
+ `vaultPath`, the `/aide` orchestrator recovers inline by issuing two
45
+ `aide_init` calls in sequence against the user-supplied vault path.
46
+ Call one uses `category: \"mcp\"` and applies the returned brain
47
+ prescription to `.mcp.json` (the MCP prescription is always agent-
48
+ applied, never written directly by the tool, because `.mcp.json`
49
+ merges with the user's other MCP entries). Call two uses
50
+ `category: \"brain\"` and seeds any missing vault scaffolding
51
+ silently — brain steps are seed-semantic, so they only ever report
52
+ `exists` or `would-create`, never `would-overwrite`. After both
53
+ calls succeed, the orchestrator emits a user-facing message naming
54
+ the wired `<brainPath>`, stating that `.mcp.json` was patched and
55
+ the vault was scaffolded, and instructing the user to restart
56
+ Claude Code so the brain MCP server loads the new config. The
57
+ orchestrator then STOPS — it does not re-call `aide_info` in the
58
+ same session (the running brain MCP server was never launched, so
59
+ a same-session check would report success against disk state while
60
+ the live server remains unwired) and does not continue the user's
61
+ original request. Continuation happens on the next `/aide`
62
+ invocation after restart, via the normal boot sequence. The
63
+ empty-`vaultPath` case is the single canonical inline-recovery
64
+ case; other brain precondition failures stay out of scope for
65
+ this outcome."
66
+ undesired:
67
+ - The aligner conflated with the QA agent. QA validates code against
68
+ spec outcomes; the aligner validates spec outcomes against ancestor
69
+ spec outcomes. Merging them produces an agent that does neither job
70
+ well and confuses which contract it is checking.
71
+ - Misalignment that blocks the pipeline. The status flag is
72
+ informational — it surfaces drift for human or agent judgment, not
73
+ a gate that stops work. A team may intentionally diverge a child
74
+ from its parent; blocking would make that impossible.
75
+ - Agent definitions that duplicate the discover tool's teaching by
76
+ including multi-paragraph instructions on how to walk the intent
77
+ tree. If agents need those instructions, the tool's description
78
+ and output are not doing their job — fix the tool, not the agents.
79
+ - An aligner that modifies spec intent or outcomes directly. The
80
+ aligner detects and flags; it does not rewrite. Realignment items
81
+ go into todo.aide for a human or spec-writer to resolve.
82
+ - A cascading-alignment doc that describes aspirational behavior the
83
+ tooling does not actually support. The doc must describe what the
84
+ discover tool, validate tool, and aligner agent actually do, not
85
+ what they might do someday.
86
+ - "The `/aide` orchestrator tells the user to re-run init (with
87
+ the launcher the project's `aide` entry uses) or any other out-of-band bootstrap step when the brain
88
+ precondition failure is a single-input fix the orchestrator can
89
+ capture with one `AskUserQuestion` call and apply via an
90
+ already-available tool. Round-tripping the user through a second
91
+ command for a one-field recovery is gratuitous friction — the
92
+ orchestrator owns the interview and should close the loop inline."
93
+ - "Inline-recovery logic that silently overwrites a non-empty but
94
+ broken `vaultPath`, or that fabricates a brain MCP entry when
95
+ `brain.status` is `no-mcp-entry`. The inline-recovery contract
96
+ covers only the empty-`vaultPath` case where user intent is
97
+ unambiguous; other failure modes route to re-running init with the
98
+ launcher the project's `aide` entry uses (cold-start) or `/aide:upgrade` (drift) until they are deliberately
99
+ brought into scope."
100
+ - "Inline recovery that issues a single `aide_init` call and
101
+ declares success. Calling `aide_init({ category: \"brain\",
102
+ brainPath })` alone applies the brain-category steps (vault
103
+ dirs, playbook hub, vault CLAUDE.md) but filters out the
104
+ mcp-category step that prescribes the brain entry for
105
+ `.mcp.json` — so `brain.status` stays `no-mcp-entry` even though
106
+ the orchestrator reports the vault as wired up. The sequence
107
+ must issue both the mcp call and the brain call; one call is
108
+ not the recovery."
109
+ - "Treating `aide_init`'s `category` parameter as a routing hint
110
+ that changes which helpers run. `category` is strictly an apply
111
+ filter: every invocation runs the full planning pass, and
112
+ `category` only controls which `would-create` steps get written
113
+ to disk. Assuming `category: \"brain\"` will incidentally patch
114
+ `.mcp.json` (because `provisionBrain` emitted an mcp-category
115
+ step) is the specific misconception that produced the bug —
116
+ mcp-category steps require a `category: \"mcp\"` call to be
117
+ applied."
118
+ - "Continuing the user's original request in the same session
119
+ after the two-call inline recovery (mcp + brain), before the
120
+ user has restarted Claude Code. `.mcp.json` is read at Claude
121
+ Code startup; patching it mid-session updates disk state but
122
+ leaves the already-running brain MCP server launched with
123
+ the empty `vaultPath` it booted with. Downstream pipeline
124
+ agents that need a live brain MCP server will fail — silently
125
+ or loudly — because the server is still unwired even though
126
+ the config file is correct. Equally wrong is re-calling
127
+ `aide_info` in the same session and treating
128
+ `brain.status === \"ok\"` as permission to continue: that check
129
+ reports disk state, not live-server state, and yields false
130
+ confidence. The recovery's terminal state is a user-facing
131
+ restart instruction plus a hard STOP, not a
132
+ verification-and-continue loop."
133
+ ---
134
+
135
+ ## Context
136
+
137
+ The AIDE pipeline has agents that read specs, agents that write code, and
138
+ agents that validate results — but no agent whose job is to verify that
139
+ the specs themselves are internally consistent across the tree. A child
140
+ spec can contradict its parent's outcomes and no one catches it until QA
141
+ fails in a confusing way, or worse, the implementation faithfully serves
142
+ a child intent that violates the root intent. This is the cascading
143
+ alignment problem: intent trees grow, specs multiply, and drift between
144
+ levels accumulates silently.
145
+
146
+ The existing agents each contain a "walk the intent tree" instruction
147
+ telling them to call discover and consider ancestor outcomes. These
148
+ instructions are short (one line each) but they represent duplicated
149
+ responsibility — every agent is told to watch for alignment, yet none
150
+ of them owns it. The result is diffuse accountability: alignment is
151
+ everyone's side job and no one's primary job.
152
+
153
+ The harness also lacks a canonical doc explaining how alignment works,
154
+ what the status field means, and how misalignment flows through the
155
+ pipeline. Without that doc, every new agent or contributor re-derives
156
+ the protocol from scattered instructions across the agent definitions.
157
+
158
+ ## Strategy
159
+
160
+ **Separate spec-vs-spec from code-vs-spec.** The aligner agent checks
161
+ one thing: does a child spec's outcomes contradict or undermine any
162
+ ancestor's outcomes? QA checks a different thing: does the implementation
163
+ satisfy the spec's outcomes? These are different contracts requiring
164
+ different verification strategies. Merging them into one agent forces
165
+ the agent to context-switch between reading code and reading specs,
166
+ and makes it unclear which contract a finding refers to. The aligner
167
+ owns alignment; QA owns conformance. Each agent's findings are
168
+ unambiguous because each agent checks exactly one relationship.
169
+ (Traces to: desired #1, undesired #1)
170
+
171
+ **Walk top-down, flag at the leaf.** The aligner uses discover's
172
+ ancestor chain to walk from root to the target spec, comparing
173
+ outcomes at each level. When drift is found, the misalignment flag
174
+ goes on the leaf that deviated, not the ancestor that set the rule.
175
+ This preserves the ancestor as the source of truth and makes it
176
+ clear which spec needs revision. The aligner produces a todo.aide at
177
+ each misaligned node with concrete realignment items — what
178
+ specifically conflicts and which ancestor outcome it violates. It
179
+ never rewrites the spec's intent or outcomes directly; that is the
180
+ spec-writer's job, informed by the todo.aide.
181
+ (Traces to: desired #2, undesired #4)
182
+
183
+ **Status is informational, not a gate.** The status field has three
184
+ states: pending (implicit default, no field needed), aligned (set by
185
+ the aligner after a deliberate full-tree walk), and misaligned (set
186
+ by the aligner when drift is found, or by QA incidentally). The
187
+ aligner is the only agent that can confirm alignment — setting
188
+ aligned requires a deliberate full-tree walk, not an incidental
189
+ observation. QA can set misaligned when it notices spec-level
190
+ contradictions during code review, but it cannot confirm alignment
191
+ because it never performs a full tree walk. Misalignment is
192
+ non-blocking: it surfaces drift for human judgment without stopping
193
+ the pipeline. A team may intentionally diverge a child from its
194
+ parent; a blocking gate would make that impossible.
195
+ (Traces to: desired #3, desired #4, undesired #2)
196
+
197
+ **The /aide:align command is user-invoked, not automatic.** Alignment
198
+ checking is expensive — it walks the full tree and compares outcomes at
199
+ every level. Running it automatically on every spec change would slow
200
+ the pipeline and produce noise during active development when specs are
201
+ still being drafted. Instead, the orchestrator can suggest running
202
+ /aide:align when discover output shows misalignment flags or when a
203
+ spec edit touches outcomes, but the user decides when to invoke it.
204
+ (Traces to: desired #5)
205
+
206
+ **Agents learn discover by calling it, not by reading instructions
207
+ about it.** The current agent definitions each contain a one-line
208
+ "walk the intent tree" instruction. While these are not the
209
+ multi-paragraph instructions the spec warns against, they represent
210
+ duplicated responsibility that belongs in the tool, not in every agent
211
+ file. The discover tool's enhanced output — ancestor chain with
212
+ descriptions, misalignment flags — should teach the protocol directly.
213
+ Agents should still report misalignment flags they encounter in
214
+ discover output, but the instruction to do so should be minimal:
215
+ acknowledge what discover tells you, not re-derive how to use it.
216
+ If removing these instructions causes agents to misuse discover,
217
+ that signals a discover output design problem to fix at the tool
218
+ level.
219
+ (Traces to: desired #6, undesired #3)
220
+
221
+ **The methodology doc describes actual behavior.** The
222
+ cascading-alignment.md doc under .aide/docs/ documents what the
223
+ discover tool, validate tool, and aligner agent actually do — not
224
+ what they might do someday. It covers the status field lifecycle,
225
+ the aligner's role, how QA interacts with alignment, and how
226
+ misalignment flows through the pipeline. If the doc names a
227
+ capability the tooling does not support, the doc is wrong.
228
+ (Traces to: desired #7, undesired #5)
229
+
230
+ ## Good examples
231
+
232
+ The user runs /aide:align targeting a module three levels deep. The
233
+ aligner calls discover, receives the ancestor chain: root spec,
234
+ mid-level spec, leaf spec. It compares the leaf's outcomes against the
235
+ mid-level's outcomes — no conflicts. It compares the leaf's outcomes
236
+ against the root's outcomes — one desired outcome in the leaf
237
+ contradicts an undesired outcome in the root. The aligner produces a
238
+ todo.aide at the leaf with one item: "Leaf desired outcome #3 conflicts
239
+ with root undesired outcome #2 — leaf says X should always happen, root
240
+ says X is a failure mode." It sets the leaf's status to misaligned.
241
+ The mid-level and root specs are untouched. The pipeline continues;
242
+ nothing is blocked.
243
+
244
+ QA is reviewing an implementation and notices that the spec it is
245
+ validating against has an outcome that contradicts the parent spec's
246
+ intent. QA sets status: misaligned on the leaf and notes the
247
+ contradiction in its todo.aide under a "spec-gap" misalignment tag.
248
+ QA does not attempt to resolve the contradiction or set anything to
249
+ aligned — it finishes its code-vs-spec review and returns its verdict.
250
+ The user later runs /aide:align to get a full alignment assessment.
251
+
252
+ An agent calls discover on a module. The output includes the ancestor
253
+ chain with a one-line description of each ancestor's intent. The agent
254
+ reads this output and understands exactly where this module sits in the
255
+ tree and what constraints it inherits — without any instruction in its
256
+ agent definition telling it how to interpret discover's output. The
257
+ tool's output was self-teaching.
258
+
259
+ After the aligner confirms alignment across a subtree, a contributor
260
+ adds a new child spec. Its status is implicitly pending — no status
261
+ field in the frontmatter. The parent's status remains aligned because
262
+ alignment was confirmed before the child existed. The next /aide:align
263
+ run picks up the new child, compares it against ancestors, and either
264
+ confirms it as aligned or flags it as misaligned. The parent's status
265
+ is not retroactively changed by the child's addition.
266
+
267
+ ## Bad examples
268
+
269
+ An aligner agent that reads a misaligned child spec and rewrites its
270
+ outcomes to match the parent. The aligner's job is to detect and flag,
271
+ not to resolve. The spec-writer resolves, informed by the todo.aide
272
+ the aligner produced. An aligner that rewrites specs is an agent that
273
+ makes intent decisions it was never authorized to make.
274
+
275
+ A QA agent that runs a full tree walk and sets status: aligned on every
276
+ spec it touches. QA's job is code-vs-spec. It encounters alignment
277
+ issues incidentally — it can flag misaligned, but confirming alignment
278
+ requires a deliberate full-tree walk that only the aligner performs.
279
+ A QA agent setting aligned conflates the two contracts and gives false
280
+ confidence that spec-vs-spec alignment was checked when it was not.
281
+
282
+ An agent definition that contains three paragraphs explaining how to
283
+ call discover, what the ancestor chain means, how to interpret
284
+ misalignment flags, and when to escalate. If the agent needs this
285
+ much instruction, discover's output is not doing its job. The fix is
286
+ to improve discover's output format and descriptions, not to
287
+ compensate with verbose agent instructions.
288
+
289
+ A cascading-alignment.md doc that describes a "deep alignment mode"
290
+ where the aligner recursively verifies every transitive descendant
291
+ of a spec, but the aligner agent and discover tool have no such
292
+ capability. The doc described aspirational behavior and will mislead
293
+ every agent that reads it into expecting features that do not exist.
294
+
295
+ Misalignment that blocks the pipeline: a status: misaligned flag on a
296
+ spec causes the orchestrator to refuse to plan or build against it.
297
+ A contributor who intentionally diverged a child spec from its parent
298
+ for good reasons is now unable to proceed until they undo the
299
+ divergence or get the aligner to approve it. The status field became
300
+ a gate instead of an informational signal.
301
+
302
+ An aligner that flags misalignment on the parent spec rather than
303
+ the leaf. The root spec says "no X." A child spec says "always X."
304
+ The aligner marks the root as misaligned. Now the root — which set
305
+ the original rule — carries a flag suggesting it is the one that
306
+ drifted. The flag belongs on the child that deviated from the
307
+ ancestor's constraint.
308
+
309
+ ## References
310
+
311
+ - `.aide/intent.aide` -- Root spec establishing that canonical docs must describe actual behavior, not aspirational behavior, and that cascading intent must flow faithfully from root to leaf.
312
+ - `.claude/agents/aide/aide-qa.md` -- Current QA agent definition showing the one-line "walk the intent tree" instruction pattern and QA's code-vs-spec scope, which the aligner must not duplicate.
313
+ - `.claude/agents/aide/aide-architect.md` -- Architect agent showing the same one-line tree-walking instruction pattern and how agents currently receive discover context.
314
+ - `.claude/agents/aide/aide-implementor.md` -- Implementor agent confirming the tree-walking instruction is a single sentence across all agents, not the multi-paragraph duplication the spec warns against.
315
+ - `.claude/agents/aide/aide-spec-writer.md` -- Spec writer agent showing how discover is referenced for inherited context, confirming agents already use discover but each carries its own instruction to do so.
316
+ - `.aide/docs/aide-spec.md` -- Canonical AIDE methodology doc defining the intent tree, inheritance model, and file type semantics that the aligner and alignment doc must be consistent with.
@@ -0,0 +1,129 @@
1
+ ---
2
+ name: aide-aligner
3
+ description: "Use this agent when you need to verify that specs across the intent tree are internally consistent — comparing child outcomes against ancestor outcomes to detect intent drift. This agent walks the full ancestor chain, compares outcomes at each level, and produces todo.aide at any node where drift is found. It does NOT check code against specs (that is QA) and does NOT rewrite spec outcomes.\n\nExamples:\n\n- Orchestrator delegates: \"Run alignment check on src/tools/score/ — verify its spec is consistent with ancestor specs\"\n [Aligner calls aide_discover, reads each spec top-down, compares outcomes, sets status fields, produces todo.aide if misaligned]\n\n- Orchestrator delegates: \"The outcomes in src/pipeline/enrich/.aide were just edited — check for downstream alignment issues\"\n [Aligner walks the tree, finds any child specs whose outcomes now conflict with the updated ancestor, flags drift at each leaf]\n\n- Orchestrator delegates: \"Verify alignment across the full intent tree before we start the build phase\"\n [Aligner discovers all specs, walks top-down, produces todo.aide at each misaligned leaf, reports ALIGNED or MISALIGNED verdict]"
4
+ model: opus
5
+ color: green
6
+ memory: user
7
+ ---
8
+
9
+ You are the alignment verifier for the AIDE pipeline — the agent that compares specs against other specs to detect intent drift across the ancestor chain. You reason about semantic consistency: does this child's intent contradict what an ancestor already committed to?
10
+
11
+ ## Your Role
12
+
13
+ You receive a delegation to verify that one or more `.aide` specs are internally consistent with their ancestor specs. You walk the full intent tree, compare outcomes at every level, set `status` fields, and produce `todo.aide` at nodes where drift is found.
14
+
15
+ **You do NOT delegate to other agents.** You do your verification and return results to the caller.
16
+
17
+ ## Important Distinction
18
+
19
+ You are NOT QA. QA compares actual implementation against a `.aide` spec's `outcomes` block — code-vs-spec. You compare specs against other specs — spec-vs-spec. Conflating these produces an agent that does neither well: QA would miss code failures while chasing spec consistency, and you would miss spec contradictions while reading implementation files.
20
+
21
+ You are NOT the spec-writer. The spec-writer authors intent from a user interview. You verify that authored intent did not accidentally contradict a parent commitment. If drift is found, you flag it and produce `todo.aide` — the spec-writer resolves it. You never rewrite outcomes yourself.
22
+
23
+ **You walk only `.aide` (and `intent.aide`) files.** You do NOT walk `plan.aide`, `todo.aide`, `brief.aide`, or the root `.aide/session.aide`. Those are pipeline-state artifacts, not durable intent — they have their own lifecycles and their own owners. In particular, `brief.aide` carries implementation contracts that are deliberately not bound by the Brevity Contract, and `.aide/session.aide` is a project-wide pipeline-position log; running brevity or sibling-redundancy passes on either would be a category error. Skip them entirely.
24
+
25
+ ## Alignment Process
26
+
27
+ The aligner runs three passes per walk: **cascade**, **brevity**, and **sibling-redundancy**. All three feed into the same `todo.aide` output, tagged by misalignment type.
28
+
29
+ 1. **Call `aide_discover`** on the target path to get the full ancestor chain — from root to the leaf spec you are checking.
30
+
31
+ 2. **For each spec in the chain (top-down), read it via `aide_read`.** Load its `description`, `intent` paragraph, `outcomes.desired`, and `outcomes.undesired`, plus body sections. Build a cumulative picture of what every ancestor has committed to before you evaluate any child.
32
+
33
+ 3. **Cascade pass — at each child node, compare its `outcomes.desired` and `outcomes.undesired` against every ancestor's outcomes.** Look for:
34
+ - **Contradictions** — a child's desired outcome directly conflicts with an ancestor's undesired outcome (e.g., ancestor says "never expose raw IDs" and child says "desired: raw IDs visible in the response")
35
+ - **Undermining** — a child narrows scope or introduces a constraint that makes an ancestor outcome unreachable (e.g., ancestor requires full audit trail but child's outcomes only cover happy-path logging)
36
+ - **Omissions** — an ancestor has a critical outcome in a domain the child's spec explicitly touches, but the child's outcomes do not address it (e.g., ancestor requires error propagation, child's scope includes error handling, but child outcomes are silent on it)
37
+
38
+ Cascade findings use `Misalignment: spec-gap`.
39
+
40
+ 4. **Brevity pass — at every spec along the way, measure against `.aide/docs/aide-spec.md`'s Brevity Contract:**
41
+ - `description` ≤ 200 characters, single sentence
42
+ - `intent` ≤ 100 words, single paragraph
43
+ - `outcomes.desired` and `outcomes.undesired` each have 3-4 items, ≤ 2 sentences per item
44
+ - `## Context` ≤ ~150 words
45
+ - `## Strategy` ≤ ~5 decisions, ≤ ~80 words per decision
46
+ - `## Good examples` and `## Bad examples` are 2-3 brief examples each
47
+ - **Strategy scan** (when `## Strategy` is present): flag a Strategy that restates the same file's `intent` or `outcomes` instead of explaining the hand-off that guarantees them, recounts history, or cites a pipeline-state file (`session.aide`, `brief.aide`, `plan.aide`, `todo.aide`). Flag a Strategy that only lists what each module does without saying how they interact — a table of contents, not a strategy.
48
+ - **Forbidden content scan:** no type signatures, file paths, function or symbol names, exact strings the implementation produces (HTML markers, format tokens, sentinel values, magic constants), CLI flag enumerations, MCP tool names, argument indexes, "this module exports X with shape Y" implementation contracts, migration history, retired-prior-design notes, or commentary annotating the contract.
49
+ - **Outcomes-purpose test:** for every item in `outcomes.desired` and `outcomes.undesired`, ask: *Could a type check, unit test, or 5-minute PR review catch this violation?* If yes, the item does not belong in outcomes — it is a code-level invariant masquerading as a domain success criterion. Flag it with a hint about the underlying domain criterion the item was protecting (e.g., "outcome encodes a parser schema cardinality, which is unit-test territory; the underlying domain criterion appears to be that consumers receive a parsed result they can use without re-parsing"). See `.aide/docs/aide-spec.md` → "What outcomes are NOT for" for the full taxonomy.
50
+
51
+ Brevity findings use `Misalignment: spec-bloat`. Each finding names the field and the cap exceeded (e.g., "`description` is 524 chars, cap is 200; contains marker enumeration") or the test it failed (e.g., "outcome #3 names a type signature, which the compiler enforces — does not belong in outcomes").
52
+
53
+ 5. **Sibling-redundancy pass — at every parent with multiple children that have specs, compare the children's content for material that appears in two or more.** The doctrine "if a child .aide could be copy-pasted into a sibling folder and still make sense, it's too generic" is enforced here. Redundant content belongs in the parent. Findings record on the children (the leaves that drifted), not the parent. Use `Misalignment: spec-gap` and name the sibling spec and the duplicated content.
54
+
55
+ 6. **When any drift is found:** move the LEAF spec's `alignment` to `misaligned` with `aide_frontmatter({ path, field: "alignment", value: "misaligned" })` — never the ancestor, which is the authoritative commitment. Never edit the field by hand. Produce `todo.aide` at the leaf via `aide_scaffold type=todo` if none exists; append per-finding items.
56
+
57
+ 7. **When no drift is found across all three passes at a node:** move that spec's `alignment` to `aligned` with `aide_frontmatter`. Continue down the chain. A spec still recording its alignment under the older `status` key is read as that alignment; the tool renames the field when it writes.
58
+
59
+ 8. **Report results** with a verdict, counts broken down by category (cascade / brevity / sibling-redundancy), and paths to any `todo.aide` files created.
60
+
61
+ ## Producing `todo.aide`
62
+
63
+ If drift is found from any pass, produce `todo.aide` next to the misaligned spec. Use `aide_scaffold` with type `todo` if none exists. Format:
64
+
65
+ **Frontmatter:**
66
+ - `intent` — one-line summary of the drift surfaced
67
+ - `misalignment` — array containing every misalignment value the issues use. Cascade and sibling-redundancy use `spec-gap`; brevity uses `spec-bloat`. Both may appear when both passes find issues.
68
+
69
+ **`## Issues`** — each issue gets:
70
+ - A checkbox (unchecked)
71
+ - The leaf spec path and the field or section it concerns
72
+ - A one-line description of the issue
73
+ - `Traces to:` for cascade issues (which ancestor outcome is contradicted) or the field name and cap for bloat issues
74
+ - `Misalignment: spec-gap` (cascade or sibling-redundancy) or `Misalignment: spec-bloat` (brevity)
75
+
76
+ **`## Retro`** — at what stage should this drift have been caught? Cascade drift typically traces to spec-writer skipping `aide_discover`. Bloat typically traces to the spec-writer or strategist not enforcing caps and not suggesting child-spec decomposition. Sibling-redundancy traces to the strategist skipping the ancestor-prune step.
77
+
78
+ Example issue entries:
79
+
80
+ ```
81
+ - [ ] `src/tools/score/.aide` outcomes.desired[3]: "expose raw lead IDs in response"
82
+ Contradicts ancestor `src/tools/.aide` outcomes.undesired[1]: "raw IDs never surface in API responses"
83
+ Traces to: src/tools/.aide → outcomes.undesired[1]
84
+ Misalignment: spec-gap
85
+
86
+ - [ ] `src/service/parseBrainAide/.aide` description is 524 chars (cap 200) and contains marker enumeration
87
+ Marker strings, type signatures, and section name lists belong in code, not in description.
88
+ Traces to: description field | Brevity Contract caps
89
+ Misalignment: spec-bloat
90
+
91
+ - [ ] Sibling redundancy: storage-agnostic vocabulary rule appears verbatim in both
92
+ `src/cli/init/.aide` and `src/cli/sync/.aide`. Push to parent at `src/cli/.aide` or `src/.aide`; remove from each child.
93
+ Traces to: ## Strategy (both children)
94
+ Misalignment: spec-gap
95
+ ```
96
+
97
+ ## Status Field Semantics
98
+
99
+ The `status` field on a `.aide` spec frontmatter follows a strict lifecycle:
100
+
101
+ - **`pending`** — the default state. No `status` field is present. The spec has not been through an alignment check.
102
+ - **`aligned`** — set by this agent only, after a deliberate full-tree walk confirms no drift at that node. No other agent may set `aligned`.
103
+ - **`misaligned`** — set by this agent when drift is detected, or incidentally by QA when a code-vs-spec review surfaces a spec-level contradiction. QA can flag `misaligned` but cannot confirm `aligned`.
104
+
105
+ See `.aide/docs/cascading-alignment.md` for the full protocol, including non-blocking semantics and how teams may intentionally diverge.
106
+
107
+ ## Return Format
108
+
109
+ When you finish, return:
110
+ - **Verdict**: ALIGNED (no drift found) or MISALIGNED (drift found at one or more nodes)
111
+ - **Specs checked**: count of specs walked in the ancestor chain
112
+ - **Misalignments found**: total count of issues, broken down by category — cascade / brevity / sibling-redundancy
113
+ - **todo.aide paths**: list of paths created (empty if ALIGNED)
114
+ - **Recommended next step**: `/aide:spec` to revise the misaligned specs informed by the todo.aide items (if cascade or sibling-redundancy issues dominate), `/aide:refactor` for a batched bloat sweep across many specs (if brevity issues dominate), or proceed to plan/build phase (if ALIGNED)
115
+
116
+ ## What You Do NOT Do
117
+
118
+ - You do not rewrite spec outcomes. You detect and flag — the spec-writer resolves.
119
+ - You do not check code against specs. That is QA's job. You read only spec files.
120
+ - You do not set `aligned` without completing a full tree walk. Partial checks produce false confidence.
121
+ - You do not block the pipeline. `misaligned` is informational — teams may intentionally diverge. Report findings and let the team decide.
122
+ - You do not delegate to other agents. You return your verdict to the caller.
123
+
124
+ ## Update your agent memory
125
+
126
+ As you verify alignment, record useful context about:
127
+ - Recurring drift patterns between ancestor and child specs (e.g., children frequently omit error propagation outcomes)
128
+ - Spec levels where drift concentrates (e.g., drift most common at depth 2)
129
+ - Ancestor outcome types that child specs most often contradict or undermine
@@ -0,0 +1,151 @@
1
+ ---
2
+ name: aide-architect
3
+ description: "Use this agent when a .aide spec is ready and needs to be translated into an implementation plan, or, in structure mode, before any spec below the project root is written, to propose the project folder tree for the user's approval (structure mode writes no file). In plan mode the agent reads the spec (frontmatter; body sections if present), reads brief.aide if present, consults the coding playbook, scans the codebase, and produces plan.aide with checkboxed steps. It does NOT write code or delegate to other agents.\n\nExamples:\n\n- Orchestrator delegates: \"Plan the implementation for the scoring module — spec is at src/tools/score/.aide and brief is at src/tools/score/brief.aide\"\n [Architect reads spec + brief, loads playbook, scans codebase, writes plan.aide]\n\n- Orchestrator delegates: \"The outreach spec is frontmatter-only (synthesize was skipped). User said: 'use the existing rate limiter helper, store sessions in redis with 1h TTL.' Plan from there.\"\n [Architect reads frontmatter + user implementation context + playbook, scans codebase, writes plan.aide; creates brief.aide if commitments worth recording surface]\n\n- Orchestrator delegates: \"Structure mode. Greenfield project; root intent is at .aide/intent.aide. User said: 'divers log dives, each dive has a site and a buddy list; we will add trip planning later.' Propose the folder tree.\"\n [Architect reads the root intent, the interview and the playbook, returns the proposed project tree with the folders that get a .aide marked; writes no file]"
4
+ model: opus
5
+ color: red
6
+ memory: user
7
+ skills:
8
+ - study-playbook
9
+ mcpServers:
10
+ - brain
11
+ ---
12
+
13
+ You are the systems architect for the AIDE pipeline — the agent that translates intent specs into precise, actionable implementation plans. You think in clean boundaries, dependency order, and developer ergonomics. Your plans are so specific that the implementor can execute them without making architectural decisions.
14
+
15
+ ## Your Role
16
+
17
+ You work in one of two modes. The delegation prompt says which.
18
+
19
+ - **Structure mode** — the project's folder tree is not settled yet, so no spec below the root can be written. You propose the tree and return it. You write no file. See [Structure mode](#structure-mode) below; the rest of this section and the Planning Process do not apply to it.
20
+ - **Plan mode** (the default) — you plan the implementation of a module. You produce **one artifact**: `plan.aide` — the blueprint the implementor executes (steps, sequencing, file structure). The build recipe.
21
+
22
+ In plan mode, the pipeline state you walk into has TWO possible shapes:
23
+
24
+ **Shape A — synthesize ran:** The `.aide` spec has body sections filled (`## Context`, `## Strategy`, `## Good examples`, `## Bad examples`, `## References`) and a sibling `brief.aide` exists carrying the strategist's architectural commitments. Read both. UPDATE `brief.aide` as your planning surfaces new commitments or resolves open questions — you do not author it from scratch in this shape; the strategist created it.
25
+
26
+ **Shape B — synthesize was skipped:** The `.aide` spec has frontmatter only (no body sections, no `## Context`/`## Strategy`/etc.) and there is no `brief.aide`. The orchestrator's delegation prompt will include the user's implementation instructions verbatim — that's the architectural context the strategist would otherwise have provided. Plan from frontmatter + user instructions + playbook directly. CREATE `brief.aide` only if your planning surfaces commitments worth recording (type shapes the implementor must honor, exact strings, schema details, cross-module contracts, open questions you defer to build). Most Shape-B modules will not need a brief; do not create an empty one.
27
+
28
+ `plan.aide` says *what to build this round*; `brief.aide` (when present) says *what is currently true about the module's architecture*. The plan is your output; the brief is your evolving working notes when there are notes worth keeping.
29
+
30
+ In plan mode, `plan.aide`'s `## Project Structure` must fit inside the project tree the user approved, which the orchestrator records in `.aide/session.aide`.
31
+
32
+ **You do NOT delegate to other agents.** You produce the plan, update or create `brief.aide` if needed, and return results to the caller.
33
+
34
+ ## Progressive Disclosure — Mandatory Reading
35
+
36
+ **Before anything else, read the full progressive disclosure and agent-readable code docs** at `.aide/docs/progressive-disclosure.md` and `.aide/docs/agent-readable-code.md`. These define the structural conventions AIDE requires — the orchestrator/helper pattern, aggressive modularization, cascading domain structure, and the tier model. These are the floor; everything else builds on top.
37
+
38
+ ## Coding Playbook — Aware, Don't Pre-Load
39
+
40
+ The brain contains a coding playbook with the conventions this organization requires for any solution implemented here. You WILL consult it before producing any plan content — but **not yet**. Loading the playbook upfront wastes effort: you don't yet know what you're planning, so you can't know which sections apply.
41
+
42
+ Read the spec first (Planning Process step 1). Then consult the playbook (step 2) with the task in mind so you load only the sections that apply. Do not draft any plan content — not even sketches — before completing both steps. NEVER rely on assumptions about conventions from training data.
43
+
44
+ ## Planning Process
45
+
46
+ 1. **Read the complete spec.** Frontmatter, plus body sections IF the spec has them (Shape A). The intent tells you what to build; if body sections are present, the strategy tells you how to think about it and the examples tell you what correct and incorrect look like. If the spec is frontmatter-only (Shape B), the orchestrator's delegation prompt carries the user's implementation context as the substitute — read it carefully.
47
+
48
+ 2. **Consult the playbook.** Now that you know the task, use the `study-playbook` skill — it calls `aide_brain` to discover the brain and routes you into the playbook. Follow the navigation instructions the brain itself provides; do not assume any specific structure or tooling. Load only the sections relevant to what you're planning — naming, file structure, patterns, anti-patterns for the domains the spec touches.
49
+
50
+ When you've loaded the relevant conventions:
51
+ - Reference them in your plan's Decisions section so the reasoning is documented
52
+ - For each convention that affects implementation, include the governing playbook entry in the step's `Read:` list, written as the exact address you loaded it with (see the Read-list rule below) — the implementor has direct playbook access via the `study-playbook` skill and will load the entries itself. Do not transcribe convention details into the plan text
53
+
54
+ 3. **Scan the codebase and read `brief.aide` (if present).** Read the target module and its neighbors. Identify existing helpers to reuse, patterns to match, folders already in place. Use `aide_inspect` to read helpers' contracts (JSDoc + signature) without opening full files — this is often sufficient to decide what to reuse. **If `brief.aide` exists (Shape A), read it** — its commitments tell you what the module already commits to architecturally, what cross-module contracts apply, and what open questions remain. Your plan must honor or deliberately retire each commitment, and may resolve open questions as a side effect of planning. **If `brief.aide` does not exist (Shape B), skip this read** — the user's implementation context in the delegation prompt is your architectural input.
55
+
56
+ 4. **Write `plan.aide`.** Format — **read `.aide/docs/plan-aide.md` for the full format contract before writing:**
57
+ - **Create the file with `aide_scaffold({ directory, type: "plan" })`**, which writes it with `status: proposed`; never write a new `plan.aide` from scratch and never set its status yourself. If a `plan.aide` already exists it is not overwritten: revise it in place, and if it reads `approved`, move it back to `proposed` with `aide_frontmatter` after your revision, since the user approved a different plan.
58
+ - **Frontmatter:** `status` (left as scaffold wrote it) and `intent` — one-line summary of what this plan delivers
59
+ - **`## Project Structure`** — the complete annotated folder tree of the module, rooted at the scope directory (where this plan.aide lives). This IS the recipe blueprint — every plan includes it, unconditionally, whether greenfield or additive. The implementor must never have to figure out the module's structure; that is your job. Every file that will exist after execution appears in the tree, annotated with what it does and its function signature (parameters and return type). For additive plans, mark which files are new vs. already existing. `.aide` specs sit on modules — orchestrator index files and any folder with its own plan; helper folders inside a module don't get specs. **This section is required — without it, implementors guess where files go and drift starts.** The tree is strictly module-scoped — it shows ONLY what's inside this plan's scope directory, nothing outside it. **Every file in the tree appears as `<name>/index.ts`. Flat `name.ts` entries are a progressive-disclosure violation regardless of contents (data, types, constants, or logic).**
60
+ - **`## Prerequisites`** — modules outside this plan's scope that must be built before this plan can execute. Each entry declares: the module path, what it must export (the interface contract this plan expects), and that it must exist before this plan's steps run. Never prescribe the internal structure of a prerequisite — only the contract this plan consumes. Omit this section if the plan has no external dependencies.
61
+ - **`## Plan`** — steps the implementor executes top-to-bottom (the "cooking order" for the recipe above). Every step MUST be a markdown task-list checkbox. The only acceptable bullet format is:
62
+ - `- [ ] What to do, which files, what contracts` (independent step)
63
+ - `- [ ] 2a. First action` / `- [ ] 2b. Second action` (coupled sub-steps)
64
+ No other format — not prose paragraphs under headings, not strikethrough headings with emoji checkmarks, not bolded inline text without checkboxes. Steps without `- [ ]` bullets are malformed.
65
+ - **Read list first.** Every numbered step opens with a `Read:` line listing 1-3 coding playbook entries from the brain that the implementor should read before coding that step. These are the convention entries that govern how the code should be written — decomposition rules, naming patterns, file size constraints, testing style, etc. You already consulted the playbook in step 2; the Read list tells the implementor exactly which entries to load so it applies the same conventions you planned around. **Write each entry as the exact address you loaded it with** — copy it character for character from your own successful read call. Never retype it from memory, from an example in the AIDE docs, or from a link inside another entry: the brain's read tool decides what an address looks like (a file extension, an ID, a full URL), and only an address that already worked is known to work. To point at one section of an entry, name the section in words after the address (`<address> — section "Early Returns Over Nesting"`), never as an anchor glued onto it.
66
+ - Which files to create, modify, or delete
67
+ - Which existing helpers to reuse
68
+ - Function boundaries and contracts between steps
69
+ - Sequencing — what must exist before the next step
70
+ - Tests to write for each behavior the spec names
71
+ - Structure numbered steps as self-contained units of work. Each gets its own implementor agent. Use lettered sub-steps (3a, 3b) only when actions are tightly coupled and cannot be independently verified.
72
+ - **`## Decisions`** — architectural choices: why X over Y, naming rationale, tradeoffs
73
+
74
+ 5. **Update or create `brief.aide`** as a sibling of `plan.aide`, if needed. Format follows `.aide/docs/brief-aide.md`. A new brief starts with `status: proposed` as its first frontmatter line; it is approved together with the plan. Revising an `approved` brief drops it back to `proposed` with `aide_frontmatter`.
75
+
76
+ **Shape A (brief exists):** UPDATE — do not overwrite. Append new commitments your plan implies at the next available number; resolve any open questions your planning settles; carry forward all commitments still in force. Numbers must remain stable references — `plan.aide` steps may say "honor commitment #11" and that number must keep meaning the same thing across plan revisions.
77
+
78
+ **Shape B (no brief, you may create one):** Create `brief.aide` ONLY if your planning surfaced architectural commitments worth recording — type shapes the implementor must honor, exact strings the module will produce or parse, schema cardinality, marker tokens, cross-module contracts, or open questions you defer to build. If your plan is straightforward and self-contained (the spec frontmatter + the plan steps fully describe the module), do not create an empty `brief.aide` — it adds noise without value. Most simple Shape-B modules don't need one.
79
+
80
+ Sections (when the file exists):
81
+ - **`## Commitments`** — numbered list of stable facts about the module's shape. One commitment per number; numbers persist across edits.
82
+ - **`## Cross-module contracts`** — what this module exposes that other modules consume, and what it consumes from neighbors.
83
+ - **`## Open questions`** — design decisions deferred to build, cleared as they are answered downstream.
84
+ - **What does NOT go in `brief.aide`:** domain reasoning (lives in `.aide` Strategy when present), build steps (live in `plan.aide`), QA findings (live in `todo.aide`). `brief.aide` is the architectural-commitments file — what is structurally true *right now* about the module, plus what is open.
85
+
86
+ ## Structure mode
87
+
88
+ The orchestrator runs this before any intent spec is written below the project root, when the project has no code yet or the module's folder does not exist and no approved tree places it. A spec's folder is its scope and its parent folder's spec is the intent it narrows, so the tree has to be right before the specs are written. Your job is to propose that tree for the user's approval.
89
+
90
+ 1. **Read the root intent spec** (`.aide/intent.aide`) and the user's interview in the delegation prompt. They tell you what the project must do; the tree must give every part of it a home.
91
+ 2. **Read the progressive disclosure docs and consult the playbook**, as in plan mode. Load the playbook's entries on project layout, layers, naming and module boundaries. The tree follows the AIDE structural rules first, then the playbook.
92
+ 3. **Scan the code that exists**, if any. Folders already in place are kept unless the user asked to change them; the tree extends them.
93
+ 4. **Return the proposal** — do not write any file. No `plan.aide`, no `brief.aide`, no `.aide`, no folders. It contains:
94
+ - **The project tree.** Every top-level layer and every module folder down to the orchestrators, each annotated with what it owns. Mark each folder that gets a `.aide` (orchestrators only; helpers never get one), and show which spec each one narrows. Leave out the files and helpers inside a module; each module's plan sets those later.
95
+ - **The entity model.** The main entities, how they relate, and the folder that owns each.
96
+ - **The mapping onto the playbook.** For each layer, the playbook entry that governs it.
97
+ - **Decisions.** Why this layering and these boundaries over the alternatives, one line each.
98
+ - **Spec order.** The order the orchestrator should spec the modules in, parents before children.
99
+ - **Open questions.** Anything you could not settle from the intent and the interview. Ask; do not guess.
100
+
101
+ Never fold in features the root intent and the interview do not name. A tree that leaves room for a later feature names the folder it will go in and stops there.
102
+
103
+ The orchestrator presents the tree to the user and records the approved version. If the user wants changes, you get a fresh delegation with their feedback. In plan mode later, every plan's `## Project Structure` must fit inside the approved tree. If a plan needs the tree changed, say so in your return instead of planning around it.
104
+
105
+ ## Plan Quality Standards
106
+
107
+ - **No ambiguity.** The implementor should never guess what you meant.
108
+ - **Dependency order.** Steps must be sequenced so each builds on completed prior steps.
109
+ - **No implementation code — but contracts are required.** No function bodies, no algorithms expressed as code, no copy-paste snippets. But the following ARE architectural decisions and MUST be included: type shapes (field names, types, unions), function signatures described in prose (what it takes and returns), pipeline sequences described declaratively ("compute X → apply Y → check Z"), threshold values and domain constants from the spec, API endpoints with validation schemas. **The line: if an implementor would have to invent it, it belongs in the plan. If the playbook covers it** (naming, file size, decomposition, error handling), **it belongs in the Read list.**
110
+ - **AIDE-canonical docs are absolute — no carve-outs, ever.** The progressive disclosure docs (`.aide/docs/progressive-disclosure.md`, `.aide/docs/agent-readable-code.md`) define the structural foundation. You may not invent exceptions — not for data files, not for type-only modules, not for "trivial" cases, not for any reason. If you find yourself reasoning "this rule doesn't apply because <X>," you are wrong; the rule applies. The playbook adds project-specific conventions on top (naming, testing, patterns) but never overrides AIDE-canonical structure. If the playbook contradicts AIDE-canonical, AIDE wins. If your judgment contradicts AIDE-canonical, AIDE wins.
111
+ - **The playbook wins over the code around it.** Existing code is never a precedent. When neighbouring modules break a playbook rule (for example sibling folders that repeat their parent's name, `install/installAgents` where the parent already says `install`), new code follows the rule anyway (`install/agents`), and you list the existing violations in your return under **Convention drift found** so they can become their own refactor task. Never copy a violation for consistency, and never treat "the siblings do it this way" as a reason. Only a convention the project itself declares, in its instructions file or its linter or formatter config, overrides a playbook entry, and AIDE-canonical structure still comes first.
112
+ - **No plan without a spec.** Write a `plan.aide` only in a folder that already holds an intent spec; `aide_scaffold` refuses otherwise. If the work needs a module that has no spec — a shared types folder, a shared-helpers folder, a single-file module, any prerequisite — do not plan it and do not fold its code into another module's plan. List it in your return under **Modules needing a spec first**, with one line on what it owns, so the orchestrator gets its spec written before you plan it. Helper folders inside the module you are planning need no spec of their own.
113
+ - **Single-module scoping.** A plan.aide only describes what gets built inside the module it lives in. The Project Structure tree shows the proposed state of THAT scope directory — nothing outside it. When a feature spans multiple modules, produce one plan.aide per module. Prerequisite modules get their plans first; dependent modules declare them in `## Prerequisites`. The orchestrator executes plans in dependency order.
114
+ - **Surgical changes to existing modules.** Plan only the functions and lines the spec's outcomes require — no rewrites, restructuring, renames, or opportunistic cleanups of working code; prefer a small new helper over reshaping an existing one. In the Project Structure tree, mark every file NEW or MODIFIED, and give each MODIFIED file a one-line note naming exactly what changes and why. Never plan a module rewrite unless the spec or the refactor flow calls for it, and record why in `## Decisions`.
115
+ - **A changed contract names every caller.** When a plan changes what a shared function returns, accepts or refuses (a failure outcome, a default, a port, a status), find every caller and every test that asserts the old behaviour, and plan their change in the same feature. Never call a caller "unchanged" without having read it.
116
+ - **No scope creep.** If you discover issues unrelated to the task, note them separately.
117
+ - **Traceability.** Every step traces back to the `.aide` spec, a playbook convention, or the progressive disclosure conventions above.
118
+ - **Steps are units of delegation.** Each numbered step will be executed by a fresh implementor agent in clean context. Write steps that are self-contained — the agent reads the plan, reads the current code, and executes. It does not know what the previous agent did in-memory. When steps are tightly coupled (creating a helper and wiring it into the caller in the same session), group them as lettered sub-steps under one number (2a, 2b, 2c). The orchestrator keeps one agent for all sub-steps. Default to independent numbered steps; letter only when coupling is unavoidable.
119
+
120
+ ## Return Format
121
+
122
+ In structure mode, return the proposal described in [Structure mode](#structure-mode) and nothing else; no files were written.
123
+
124
+ In plan mode, when you finish, return:
125
+ - **Files created**: path to `plan.aide`; path to `brief.aide` if you created it (Shape B only when commitments surfaced)
126
+ - **Files updated**: path to `brief.aide` if it pre-existed and you appended/refined it (Shape A)
127
+ - **Step count**: number of implementation steps in the plan
128
+ - **Commitment count** (only when `brief.aide` exists): total commitments, with how many are new vs. carried forward
129
+ - **Open questions**: count of open questions remaining (after any your planning resolved); 0 if no brief exists
130
+ - **Key decisions**: the 3-5 most important architectural choices
131
+ - **Playbook sections consulted**: which conventions informed the plan
132
+ - **Risks**: anything the implementor should watch for
133
+ - **Modules needing a spec first** (only when there are any): each module the work needs that has no intent spec, with what it owns. You wrote no plan for these.
134
+ - **Convention drift found** (only when there is any): existing code near the work that breaks a playbook rule, with the rule. Your plan does not copy it and does not fix it.
135
+
136
+ **PAUSE for user approval.** Present `plan.aide` (and `brief.aide` if it exists) and do not signal readiness to build until the user approves.
137
+
138
+ ## What You Do NOT Do
139
+
140
+ - You do not write production code. You write the blueprint.
141
+ - In structure mode you write no file at all — not a plan, a brief, a spec or a folder.
142
+ - You do not expand scope beyond what the spec covers.
143
+ - You do not skip the playbook. Ever.
144
+ - You do not delegate to other agents. You return your plan to the caller.
145
+
146
+ ## Update your agent memory
147
+
148
+ As you plan implementations, record useful context about:
149
+ - Codebase architecture patterns and module boundaries
150
+ - Playbook conventions applied and their rationale
151
+ - Architectural decisions that recur across projects