aether-colony 3.1.17 → 5.1.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 (378) hide show
  1. package/.aether/aether-utils.sh +5354 -0
  2. package/.aether/agents-claude/aether-ambassador.md +265 -0
  3. package/.aether/agents-claude/aether-archaeologist.md +327 -0
  4. package/.aether/agents-claude/aether-architect.md +236 -0
  5. package/.aether/agents-claude/aether-auditor.md +271 -0
  6. package/.aether/agents-claude/aether-builder.md +224 -0
  7. package/.aether/agents-claude/aether-chaos.md +269 -0
  8. package/.aether/agents-claude/aether-chronicler.md +305 -0
  9. package/.aether/agents-claude/aether-gatekeeper.md +330 -0
  10. package/.aether/agents-claude/aether-includer.md +374 -0
  11. package/.aether/agents-claude/aether-keeper.md +272 -0
  12. package/.aether/agents-claude/aether-measurer.md +322 -0
  13. package/.aether/agents-claude/aether-oracle.md +237 -0
  14. package/.aether/agents-claude/aether-probe.md +211 -0
  15. package/.aether/agents-claude/aether-queen.md +330 -0
  16. package/.aether/agents-claude/aether-route-setter.md +178 -0
  17. package/.aether/agents-claude/aether-sage.md +418 -0
  18. package/.aether/agents-claude/aether-scout.md +179 -0
  19. package/.aether/agents-claude/aether-surveyor-disciplines.md +417 -0
  20. package/.aether/agents-claude/aether-surveyor-nest.md +355 -0
  21. package/.aether/agents-claude/aether-surveyor-pathogens.md +289 -0
  22. package/.aether/agents-claude/aether-surveyor-provisions.md +360 -0
  23. package/.aether/agents-claude/aether-tracker.md +270 -0
  24. package/.aether/agents-claude/aether-watcher.md +280 -0
  25. package/.aether/agents-claude/aether-weaver.md +248 -0
  26. package/.aether/commands/archaeology.yaml +653 -0
  27. package/.aether/commands/build.yaml +1221 -0
  28. package/.aether/commands/chaos.yaml +653 -0
  29. package/.aether/commands/colonize.yaml +438 -0
  30. package/.aether/commands/continue.yaml +1484 -0
  31. package/.aether/commands/council.yaml +304 -0
  32. package/.aether/commands/data-clean.yaml +80 -0
  33. package/.aether/commands/dream.yaml +275 -0
  34. package/.aether/commands/entomb.yaml +863 -0
  35. package/.aether/commands/export-signals.yaml +64 -0
  36. package/.aether/commands/feedback.yaml +158 -0
  37. package/.aether/commands/flag.yaml +160 -0
  38. package/.aether/commands/flags.yaml +177 -0
  39. package/.aether/commands/focus.yaml +112 -0
  40. package/.aether/commands/help.yaml +167 -0
  41. package/.aether/commands/history.yaml +137 -0
  42. package/.aether/commands/import-signals.yaml +79 -0
  43. package/.aether/commands/init.yaml +469 -0
  44. package/.aether/commands/insert-phase.yaml +98 -0
  45. package/.aether/commands/interpret.yaml +285 -0
  46. package/.aether/commands/lay-eggs.yaml +224 -0
  47. package/.aether/commands/maturity.yaml +122 -0
  48. package/.aether/commands/memory-details.yaml +74 -0
  49. package/.aether/commands/migrate-state.yaml +174 -0
  50. package/.aether/commands/oracle.yaml +1224 -0
  51. package/.aether/commands/organize.yaml +446 -0
  52. package/.aether/commands/patrol.yaml +621 -0
  53. package/.aether/commands/pause-colony.yaml +424 -0
  54. package/.aether/commands/phase.yaml +124 -0
  55. package/.aether/commands/pheromones.yaml +153 -0
  56. package/.aether/commands/plan.yaml +1313 -0
  57. package/.aether/commands/preferences.yaml +63 -0
  58. package/.aether/commands/redirect.yaml +123 -0
  59. package/.aether/commands/resume-colony.yaml +373 -0
  60. package/.aether/commands/resume.yaml +398 -0
  61. package/.aether/commands/run.yaml +193 -0
  62. package/.aether/commands/seal.yaml +1205 -0
  63. package/.aether/commands/skill-create.yaml +337 -0
  64. package/.aether/commands/status.yaml +364 -0
  65. package/.aether/commands/swarm.yaml +352 -0
  66. package/.aether/commands/tunnels.yaml +814 -0
  67. package/.aether/commands/update.yaml +131 -0
  68. package/.aether/commands/verify-castes.yaml +159 -0
  69. package/.aether/commands/watch.yaml +454 -0
  70. package/.aether/docs/INCIDENT_TEMPLATE.md +32 -0
  71. package/.aether/docs/QUEEN-SYSTEM.md +211 -0
  72. package/.aether/docs/README.md +98 -0
  73. package/.aether/docs/caste-system.md +48 -0
  74. package/.aether/docs/command-playbooks/README.md +23 -0
  75. package/.aether/docs/command-playbooks/build-complete.md +349 -0
  76. package/.aether/docs/command-playbooks/build-context.md +282 -0
  77. package/.aether/docs/command-playbooks/build-full.md +1682 -0
  78. package/.aether/docs/command-playbooks/build-prep.md +283 -0
  79. package/.aether/docs/command-playbooks/build-verify.md +405 -0
  80. package/.aether/docs/command-playbooks/build-wave.md +749 -0
  81. package/.aether/docs/command-playbooks/continue-advance.md +524 -0
  82. package/.aether/docs/command-playbooks/continue-finalize.md +447 -0
  83. package/.aether/docs/command-playbooks/continue-full.md +1724 -0
  84. package/.aether/docs/command-playbooks/continue-gates.md +686 -0
  85. package/.aether/docs/command-playbooks/continue-verify.md +406 -0
  86. package/.aether/docs/context-continuity.md +84 -0
  87. package/{runtime → .aether/docs/disciplines}/DISCIPLINES.md +13 -11
  88. package/.aether/docs/error-codes.md +268 -0
  89. package/.aether/docs/known-issues.md +94 -0
  90. package/{runtime → .aether}/docs/pheromones.md +86 -6
  91. package/.aether/docs/plans/pheromone-display-plan.md +257 -0
  92. package/.aether/docs/queen-commands.md +98 -0
  93. package/.aether/docs/source-of-truth-map.md +132 -0
  94. package/.aether/docs/xml-utilities.md +47 -0
  95. package/{runtime → .aether}/exchange/pheromone-xml.sh +2 -1
  96. package/{runtime → .aether}/exchange/registry-xml.sh +7 -3
  97. package/{runtime → .aether}/exchange/wisdom-xml.sh +11 -4
  98. package/.aether/rules/aether-colony.md +144 -0
  99. package/.aether/schemas/example-prompt-builder.xml +234 -0
  100. package/.aether/scripts/incident-test-add.sh +47 -0
  101. package/.aether/scripts/weekly-audit.sh +79 -0
  102. package/.aether/skills/.index.json +649 -0
  103. package/.aether/skills/colony/.manifest.json +16 -0
  104. package/.aether/skills/colony/build-discipline/SKILL.md +78 -0
  105. package/.aether/skills/colony/colony-interaction/SKILL.md +56 -0
  106. package/.aether/skills/colony/colony-lifecycle/SKILL.md +77 -0
  107. package/.aether/skills/colony/colony-visuals/SKILL.md +112 -0
  108. package/.aether/skills/colony/context-management/SKILL.md +80 -0
  109. package/.aether/skills/colony/error-presentation/SKILL.md +99 -0
  110. package/.aether/skills/colony/pheromone-protocol/SKILL.md +79 -0
  111. package/.aether/skills/colony/pheromone-visibility/SKILL.md +81 -0
  112. package/.aether/skills/colony/state-safety/SKILL.md +84 -0
  113. package/.aether/skills/colony/worker-priming/SKILL.md +82 -0
  114. package/.aether/skills/domain/.manifest.json +24 -0
  115. package/.aether/skills/domain/README.md +33 -0
  116. package/.aether/skills/domain/django/SKILL.md +49 -0
  117. package/.aether/skills/domain/docker/SKILL.md +52 -0
  118. package/.aether/skills/domain/golang/SKILL.md +52 -0
  119. package/.aether/skills/domain/graphql/SKILL.md +51 -0
  120. package/.aether/skills/domain/html-css/SKILL.md +48 -0
  121. package/.aether/skills/domain/nextjs/SKILL.md +45 -0
  122. package/.aether/skills/domain/nodejs/SKILL.md +53 -0
  123. package/.aether/skills/domain/postgresql/SKILL.md +53 -0
  124. package/.aether/skills/domain/prisma/SKILL.md +59 -0
  125. package/.aether/skills/domain/python/SKILL.md +50 -0
  126. package/.aether/skills/domain/rails/SKILL.md +52 -0
  127. package/.aether/skills/domain/react/SKILL.md +45 -0
  128. package/.aether/skills/domain/rest-api/SKILL.md +58 -0
  129. package/.aether/skills/domain/svelte/SKILL.md +47 -0
  130. package/.aether/skills/domain/tailwind/SKILL.md +45 -0
  131. package/.aether/skills/domain/testing/SKILL.md +53 -0
  132. package/.aether/skills/domain/typescript/SKILL.md +58 -0
  133. package/.aether/skills/domain/vue/SKILL.md +49 -0
  134. package/.aether/templates/QUEEN.md.template +61 -0
  135. package/.aether/templates/colony-state-reset.jq.template +23 -0
  136. package/.aether/templates/colony-state.template.json +39 -0
  137. package/.aether/templates/constraints.template.json +9 -0
  138. package/.aether/templates/crowned-anthill.template.md +36 -0
  139. package/.aether/templates/handoff-build-error.template.md +30 -0
  140. package/.aether/templates/handoff-build-success.template.md +39 -0
  141. package/.aether/templates/handoff.template.md +40 -0
  142. package/.aether/templates/learning-observations.template.json +6 -0
  143. package/.aether/templates/midden.template.json +13 -0
  144. package/.aether/templates/pheromones.template.json +6 -0
  145. package/.aether/templates/session.template.json +9 -0
  146. package/{runtime → .aether}/utils/atomic-write.sh +68 -22
  147. package/{runtime → .aether}/utils/chamber-compare.sh +23 -10
  148. package/.aether/utils/chamber-utils.sh +440 -0
  149. package/.aether/utils/emoji-audit.sh +166 -0
  150. package/{runtime → .aether}/utils/error-handler.sh +34 -8
  151. package/.aether/utils/file-lock.sh +313 -0
  152. package/.aether/utils/flag.sh +267 -0
  153. package/.aether/utils/hive.sh +572 -0
  154. package/.aether/utils/learning.sh +1928 -0
  155. package/.aether/utils/midden.sh +342 -0
  156. package/.aether/utils/oracle/oracle.md +168 -0
  157. package/.aether/utils/oracle/oracle.sh +1023 -0
  158. package/.aether/utils/pheromone.sh +2029 -0
  159. package/.aether/utils/queen.sh +1698 -0
  160. package/.aether/utils/scan.sh +860 -0
  161. package/.aether/utils/semantic-cli.sh +415 -0
  162. package/.aether/utils/session.sh +552 -0
  163. package/.aether/utils/skills.sh +509 -0
  164. package/.aether/utils/spawn-tree.sh +260 -0
  165. package/.aether/utils/spawn.sh +260 -0
  166. package/.aether/utils/state-api.sh +199 -0
  167. package/{runtime → .aether}/utils/state-loader.sh +8 -6
  168. package/.aether/utils/suggest.sh +611 -0
  169. package/{runtime → .aether}/utils/swarm-display.sh +10 -1
  170. package/.aether/utils/swarm.sh +1004 -0
  171. package/{runtime → .aether}/utils/watch-spawn-tree.sh +11 -2
  172. package/{runtime → .aether}/utils/xml-compose.sh +9 -3
  173. package/.aether/utils/xml-convert.sh +277 -0
  174. package/{runtime → .aether}/utils/xml-core.sh +5 -9
  175. package/.aether/utils/xml-query.sh +201 -0
  176. package/.aether/utils/xml-utils.sh +110 -0
  177. package/{runtime → .aether}/workers.md +97 -81
  178. package/.claude/agents/ant/aether-ambassador.md +265 -0
  179. package/.claude/agents/ant/aether-archaeologist.md +327 -0
  180. package/.claude/agents/ant/aether-architect.md +236 -0
  181. package/.claude/agents/ant/aether-auditor.md +271 -0
  182. package/.claude/agents/ant/aether-builder.md +224 -0
  183. package/.claude/agents/ant/aether-chaos.md +269 -0
  184. package/.claude/agents/ant/aether-chronicler.md +305 -0
  185. package/.claude/agents/ant/aether-gatekeeper.md +330 -0
  186. package/.claude/agents/ant/aether-includer.md +374 -0
  187. package/.claude/agents/ant/aether-keeper.md +272 -0
  188. package/.claude/agents/ant/aether-measurer.md +322 -0
  189. package/.claude/agents/ant/aether-oracle.md +237 -0
  190. package/.claude/agents/ant/aether-probe.md +211 -0
  191. package/.claude/agents/ant/aether-queen.md +330 -0
  192. package/.claude/agents/ant/aether-route-setter.md +178 -0
  193. package/.claude/agents/ant/aether-sage.md +418 -0
  194. package/.claude/agents/ant/aether-scout.md +179 -0
  195. package/.claude/agents/ant/aether-surveyor-disciplines.md +417 -0
  196. package/.claude/agents/ant/aether-surveyor-nest.md +355 -0
  197. package/.claude/agents/ant/aether-surveyor-pathogens.md +289 -0
  198. package/.claude/agents/ant/aether-surveyor-provisions.md +360 -0
  199. package/.claude/agents/ant/aether-tracker.md +270 -0
  200. package/.claude/agents/ant/aether-watcher.md +280 -0
  201. package/.claude/agents/ant/aether-weaver.md +248 -0
  202. package/.claude/commands/ant/archaeology.md +16 -14
  203. package/.claude/commands/ant/build.md +43 -1028
  204. package/.claude/commands/ant/chaos.md +19 -23
  205. package/.claude/commands/ant/colonize.md +52 -31
  206. package/.claude/commands/ant/continue.md +40 -1016
  207. package/.claude/commands/ant/council.md +21 -18
  208. package/.claude/commands/ant/data-clean.md +81 -0
  209. package/.claude/commands/ant/dream.md +27 -15
  210. package/.claude/commands/ant/entomb.md +317 -225
  211. package/.claude/commands/ant/export-signals.md +57 -0
  212. package/.claude/commands/ant/feedback.md +48 -26
  213. package/.claude/commands/ant/flag.md +30 -10
  214. package/.claude/commands/ant/flags.md +34 -12
  215. package/.claude/commands/ant/focus.md +45 -19
  216. package/.claude/commands/ant/help.md +50 -8
  217. package/.claude/commands/ant/history.md +13 -0
  218. package/.claude/commands/ant/import-signals.md +71 -0
  219. package/.claude/commands/ant/init.md +345 -194
  220. package/.claude/commands/ant/insert-phase.md +101 -0
  221. package/.claude/commands/ant/interpret.md +26 -4
  222. package/.claude/commands/ant/lay-eggs.md +184 -127
  223. package/.claude/commands/ant/maturity.md +32 -11
  224. package/.claude/commands/ant/memory-details.md +77 -0
  225. package/.claude/commands/ant/migrate-state.md +20 -2
  226. package/.claude/commands/ant/oracle.md +337 -74
  227. package/.claude/commands/ant/organize.md +39 -25
  228. package/.claude/commands/ant/patrol.md +620 -0
  229. package/.claude/commands/ant/pause-colony.md +23 -27
  230. package/.claude/commands/ant/phase.md +40 -42
  231. package/.claude/commands/ant/pheromones.md +156 -0
  232. package/.claude/commands/ant/plan.md +185 -51
  233. package/.claude/commands/ant/preferences.md +65 -0
  234. package/.claude/commands/ant/redirect.md +45 -30
  235. package/.claude/commands/ant/resume-colony.md +51 -27
  236. package/.claude/commands/ant/resume.md +314 -94
  237. package/.claude/commands/ant/run.md +195 -0
  238. package/.claude/commands/ant/seal.md +650 -221
  239. package/.claude/commands/ant/skill-create.md +286 -0
  240. package/.claude/commands/ant/status.md +196 -31
  241. package/.claude/commands/ant/swarm.md +16 -46
  242. package/.claude/commands/ant/tunnels.md +280 -105
  243. package/.claude/commands/ant/update.md +73 -89
  244. package/.claude/commands/ant/verify-castes.md +100 -42
  245. package/.claude/commands/ant/watch.md +14 -12
  246. package/.opencode/agents/aether-ambassador.md +63 -20
  247. package/.opencode/agents/aether-archaeologist.md +29 -12
  248. package/.opencode/agents/aether-architect.md +103 -36
  249. package/.opencode/agents/aether-auditor.md +51 -18
  250. package/.opencode/agents/aether-builder.md +70 -20
  251. package/.opencode/agents/aether-chaos.md +29 -12
  252. package/.opencode/agents/aether-chronicler.md +60 -18
  253. package/.opencode/agents/aether-gatekeeper.md +27 -18
  254. package/.opencode/agents/aether-includer.md +27 -18
  255. package/.opencode/agents/aether-keeper.md +89 -18
  256. package/.opencode/agents/aether-measurer.md +27 -18
  257. package/.opencode/agents/aether-oracle.md +137 -0
  258. package/.opencode/agents/aether-probe.md +60 -18
  259. package/.opencode/agents/aether-queen.md +172 -24
  260. package/.opencode/agents/aether-route-setter.md +57 -12
  261. package/.opencode/agents/aether-sage.md +26 -18
  262. package/.opencode/agents/aether-scout.md +28 -20
  263. package/.opencode/agents/aether-surveyor-disciplines.md +59 -2
  264. package/.opencode/agents/aether-surveyor-nest.md +59 -2
  265. package/.opencode/agents/aether-surveyor-pathogens.md +57 -2
  266. package/.opencode/agents/aether-surveyor-provisions.md +59 -2
  267. package/.opencode/agents/aether-tracker.md +64 -18
  268. package/.opencode/agents/aether-watcher.md +66 -19
  269. package/.opencode/agents/aether-weaver.md +61 -18
  270. package/.opencode/commands/ant/archaeology.md +7 -14
  271. package/.opencode/commands/ant/build.md +437 -257
  272. package/.opencode/commands/ant/chaos.md +7 -24
  273. package/.opencode/commands/ant/colonize.md +8 -17
  274. package/.opencode/commands/ant/continue.md +661 -142
  275. package/.opencode/commands/ant/council.md +11 -22
  276. package/.opencode/commands/ant/data-clean.md +77 -0
  277. package/.opencode/commands/ant/dream.md +15 -17
  278. package/.opencode/commands/ant/entomb.md +133 -62
  279. package/.opencode/commands/ant/export-signals.md +54 -0
  280. package/.opencode/commands/ant/feedback.md +24 -5
  281. package/.opencode/commands/ant/flag.md +16 -4
  282. package/.opencode/commands/ant/flags.md +24 -10
  283. package/.opencode/commands/ant/focus.md +22 -5
  284. package/.opencode/commands/ant/help.md +41 -8
  285. package/.opencode/commands/ant/history.md +9 -0
  286. package/.opencode/commands/ant/import-signals.md +68 -0
  287. package/.opencode/commands/ant/init.md +374 -167
  288. package/.opencode/commands/ant/insert-phase.md +107 -0
  289. package/.opencode/commands/ant/interpret.md +16 -0
  290. package/.opencode/commands/ant/lay-eggs.md +184 -112
  291. package/.opencode/commands/ant/maturity.md +18 -2
  292. package/.opencode/commands/ant/memory-details.md +83 -0
  293. package/.opencode/commands/ant/migrate-state.md +12 -0
  294. package/.opencode/commands/ant/oracle.md +322 -67
  295. package/.opencode/commands/ant/organize.md +18 -16
  296. package/.opencode/commands/ant/patrol.md +626 -0
  297. package/.opencode/commands/ant/pause-colony.md +12 -29
  298. package/.opencode/commands/ant/phase.md +30 -40
  299. package/.opencode/commands/ant/pheromones.md +162 -0
  300. package/.opencode/commands/ant/plan.md +184 -56
  301. package/.opencode/commands/ant/preferences.md +71 -0
  302. package/.opencode/commands/ant/redirect.md +22 -5
  303. package/.opencode/commands/ant/resume-colony.md +38 -27
  304. package/.opencode/commands/ant/resume.md +385 -0
  305. package/.opencode/commands/ant/run.md +201 -0
  306. package/.opencode/commands/ant/seal.md +259 -45
  307. package/.opencode/commands/ant/skill-create.md +63 -0
  308. package/.opencode/commands/ant/status.md +135 -31
  309. package/.opencode/commands/ant/swarm.md +3 -345
  310. package/.opencode/commands/ant/tunnels.md +152 -9
  311. package/.opencode/commands/ant/update.md +70 -91
  312. package/.opencode/commands/ant/verify-castes.md +96 -42
  313. package/.opencode/commands/ant/watch.md +7 -0
  314. package/CHANGELOG.md +356 -0
  315. package/README.md +203 -573
  316. package/bin/cli.js +455 -527
  317. package/bin/generate-commands.js +186 -0
  318. package/bin/generate-commands.sh +127 -88
  319. package/bin/lib/init.js +13 -3
  320. package/bin/lib/spawn-logger.js +0 -15
  321. package/bin/lib/update-transaction.js +392 -140
  322. package/bin/npx-install.js +178 -0
  323. package/bin/sync-to-runtime.sh +5 -137
  324. package/bin/validate-package.sh +166 -0
  325. package/package.json +14 -7
  326. package/.opencode/agents/aether-guardian.md +0 -107
  327. package/.opencode/agents/workers.md +0 -1034
  328. package/bin/lib/model-profiles.js +0 -445
  329. package/bin/lib/model-verify.js +0 -288
  330. package/bin/lib/proxy-health.js +0 -253
  331. package/bin/lib/telemetry.js +0 -441
  332. package/runtime/CONTEXT.md +0 -160
  333. package/runtime/QUEEN_ANT_ARCHITECTURE.md +0 -402
  334. package/runtime/aether-utils.sh +0 -3879
  335. package/runtime/data/signatures.json +0 -41
  336. package/runtime/docs/AETHER-2.0-IMPLEMENTATION-PLAN.md +0 -1343
  337. package/runtime/docs/AETHER-PHEROMONE-SYSTEM-MASTER-SPEC.md +0 -2642
  338. package/runtime/docs/PHEROMONE-INJECTION.md +0 -240
  339. package/runtime/docs/PHEROMONE-INTEGRATION.md +0 -192
  340. package/runtime/docs/PHEROMONE-SYSTEM-DESIGN.md +0 -426
  341. package/runtime/docs/README.md +0 -94
  342. package/runtime/docs/VISUAL-OUTPUT-SPEC.md +0 -219
  343. package/runtime/docs/biological-reference.md +0 -272
  344. package/runtime/docs/codebase-review.md +0 -399
  345. package/runtime/docs/command-sync.md +0 -164
  346. package/runtime/docs/constraints.md +0 -116
  347. package/runtime/docs/implementation-learnings.md +0 -89
  348. package/runtime/docs/known-issues.md +0 -217
  349. package/runtime/docs/namespace.md +0 -148
  350. package/runtime/docs/pathogen-schema-example.json +0 -36
  351. package/runtime/docs/pathogen-schema.md +0 -111
  352. package/runtime/docs/planning-discipline.md +0 -159
  353. package/runtime/docs/progressive-disclosure.md +0 -184
  354. package/runtime/lib/queen-utils.sh +0 -729
  355. package/runtime/model-profiles.yaml +0 -100
  356. package/runtime/planning.md +0 -159
  357. package/runtime/recover.sh +0 -136
  358. package/runtime/templates/QUEEN.md.template +0 -79
  359. package/runtime/utils/chamber-utils.sh +0 -285
  360. package/runtime/utils/file-lock.sh +0 -122
  361. package/runtime/utils/spawn-tree.sh +0 -428
  362. package/runtime/utils/spawn-with-model.sh +0 -56
  363. package/runtime/utils/xml-utils.sh +0 -2196
  364. package/runtime/workers-new-castes.md +0 -516
  365. /package/{runtime → .aether/docs/disciplines}/coding-standards.md +0 -0
  366. /package/{runtime → .aether/docs/disciplines}/debugging.md +0 -0
  367. /package/{runtime → .aether/docs/disciplines}/learning.md +0 -0
  368. /package/{runtime → .aether/docs/disciplines}/tdd.md +0 -0
  369. /package/{runtime → .aether/docs/disciplines}/verification-loop.md +0 -0
  370. /package/{runtime → .aether/docs/disciplines}/verification.md +0 -0
  371. /package/{runtime → .aether}/schemas/aether-types.xsd +0 -0
  372. /package/{runtime → .aether}/schemas/colony-registry.xsd +0 -0
  373. /package/{runtime → .aether}/schemas/pheromone.xsd +0 -0
  374. /package/{runtime → .aether}/schemas/prompt.xsd +0 -0
  375. /package/{runtime → .aether}/schemas/queen-wisdom.xsd +0 -0
  376. /package/{runtime → .aether}/schemas/worker-priming.xsd +0 -0
  377. /package/{runtime → .aether}/utils/colorize-log.sh +0 -0
  378. /package/{runtime → .aether}/utils/queen-to-md.xsl +0 -0
@@ -1,89 +0,0 @@
1
- # Implementation Learnings
2
-
3
- Valuable findings from Aether v3.1 development that apply to other projects.
4
-
5
- ## Workflow Patterns
6
-
7
- 1. **Claude Code global sync** works by copying commands from `.claude/commands/` to `~/.claude/commands/`
8
- - This enables sharing commands across all projects
9
- - Source of truth is the repo, hub is the distribution mechanism
10
-
11
- 2. **OpenCode requires repo-local setup**
12
- - Each repo that wants ant commands must set them up locally
13
- - Unlike Claude Code, there's no global command directory
14
-
15
- 3. **Hash comparison prevents unnecessary file writes**
16
- - Comparing SHA-1 hashes before writes preserves file timestamps
17
- - Reduces git noise from unchanged files
18
-
19
- 4. **Namespace isolation via 'ant:' prefix**
20
- - Prevents collisions with other agents
21
- - Creates clear command ownership
22
-
23
- 5. **CLI sync verification catches content drift**
24
- - `generate-commands.sh check` uses SHA-1 checksums
25
- - Detects when .claude/ and .opencode/ mirrors diverge
26
-
27
- ## Error Handling Patterns
28
-
29
- - Use `json_err "$E_*" "message"` consistently (not bare strings)
30
- - Always release locks in error paths (use trap or explicit release)
31
- - Validate JSON before atomic writes
32
- - Use fallback json_err for backward compatibility
33
-
34
- ## File Operation Patterns
35
-
36
- - Use `atomic_write()` for all state modifications
37
- - Acquire locks before reading/writing shared state
38
- - Create backups BEFORE validation for true atomicity
39
- - Use temp file + mv pattern for atomic operations
40
-
41
- ## Model Routing Patterns
42
-
43
- - Validate LiteLLM proxy health before spawning
44
- - Support CLI --model override for one-time changes
45
- - Log actual model used per spawn for telemetry
46
- - Use task-based routing keywords for automatic selection
47
-
48
- ## Codebase Patterns Discovered
49
-
50
- ### Pattern 1: JSON Error Response Standard
51
- All commands output JSON with `{"ok": true/false, "result": ...}` or `{"ok": false, "error": ...}`
52
-
53
- ### Pattern 2: Feature Degradation Pattern
54
- ```bash
55
- if type feature_enabled &>/dev/null && ! feature_enabled "file_locking"; then
56
- json_warn "W_DEGRADED" "File locking disabled - proceeding without lock"
57
- else
58
- acquire_lock ...
59
- fi
60
- ```
61
-
62
- ### Pattern 3: Atomic Write Pattern
63
- All state modifications use `atomic_write()` from atomic-write.sh (temp file + mv)
64
-
65
- ### Pattern 4: Trap-based Cleanup
66
- file-lock.sh uses `trap cleanup_locks EXIT TERM INT` for lock cleanup
67
-
68
- ### Pattern 5: Inconsistent Error Code Evolution
69
- Commands added early use hardcoded strings; commands added later use `$E_VALIDATION_FAILED` constant. This creates inconsistency that should be standardized.
70
-
71
- ## Connections Between Issues
72
-
73
- 1. **BUG-005** (flag-auto-resolve lock leak) and **BUG-002** (flag-add lock leak) share the same root cause: inconsistent error handling patterns
74
- 2. **BUG-004** and **ISSUE-001** are the same issue: missing error code constants
75
- 3. **ISSUE-004** (template path) affects **GAP-006** (missing docs) - both relate to queen-* command usability
76
- 4. **BUG-001** (awk apostrophes) affects the same lines that use Pattern 2 (feature degradation)
77
-
78
- ## Fix Priority Matrix
79
-
80
- | Priority | Issues | Effort | Impact |
81
- |----------|--------|--------|--------|
82
- | Critical | BUG-005, BUG-011 | Low | Deadlock prevention |
83
- | High | BUG-002, BUG-008 | Low | Lock safety |
84
- | Medium | BUG-003, BUG-006, BUG-007 | Medium | Code quality |
85
- | Low | ISSUE-001 through ISSUE-007 | Medium | Consistency |
86
-
87
- ---
88
-
89
- *Preserved from Phase 0 cleanup - 2026-02-15*
@@ -1,217 +0,0 @@
1
- # Known Issues and Workarounds
2
-
3
- Documented issues from Oracle research findings. These are known limitations and bugs in the Aether system.
4
-
5
- ---
6
-
7
- ## Fixed Issues
8
-
9
- ### Checkpoint Allowlist System (Fixed 2026-02-15)
10
-
11
- **Issue:** Build checkpoint could stash user work (TO-DOs.md, dreams, Oracle specs)
12
-
13
- **Root Cause:** `git stash` touched files outside system allowlist, stashing 1,145 lines of user work
14
-
15
- **Fix:** Explicit allowlist system implemented
16
- - Created `.aether/data/checkpoint-allowlist.json` defining safe system files
17
- - Added `checkpoint-check` helper to `.aether/aether-utils.sh`
18
- - Updated `build.md` (Claude and OpenCode) to use allowlist
19
- - User data (`.aether/data/`, `.aether/dreams/`, `TO-DOs.md`) is never touched
20
- - Warning displayed if user files are present during checkpoint
21
-
22
- **System Files (Safe):**
23
- - `.aether/aether-utils.sh`, `.aether/workers.md`, `.aether/docs/**/*.md`
24
- - `.claude/commands/ant/**/*.md`, `.claude/commands/st/**/*.md`
25
- - `.opencode/commands/ant/**/*.md`, `.opencode/agents/**/*.md`
26
- - `runtime/**/*`, `bin/**/*`
27
-
28
- **User Data (Never Touch):**
29
- - `.aether/data/`, `.aether/dreams/`, `.aether/oracle/`
30
- - `TO-DOs.md`, `COLONY_STATE.json`, `.env`, `*.log`
31
-
32
- ---
33
-
34
- ## Critical Issues (Fix Immediately)
35
-
36
- ### BUG-005: Missing lock release in flag-auto-resolve
37
- **Location:** `.aether/aether-utils.sh:1022`
38
- **Severity:** HIGH
39
- **Symptom:** If jq command fails during flag resolution, lock is never released
40
- **Impact:** Deadlock on flags.json if jq fails (malformed JSON, disk full, etc.)
41
- **Workaround:** Restart the colony session if commands hang on flag operations
42
- **Fix:** Add error handling with lock release before json_err
43
-
44
- ### BUG-011: Missing error handling in flag-auto-resolve jq
45
- **Location:** `.aether/aether-utils.sh:1022`
46
- **Severity:** HIGH
47
- **Symptom:** jq failure during auto-resolve not handled
48
- **Impact:** Combined with BUG-005, causes deadlock
49
- **Fix:** Add `|| { release_lock; json_err ... }` pattern
50
-
51
- ---
52
-
53
- ## Medium Priority Issues
54
-
55
- ### BUG-002: Missing release_lock in flag-add error path
56
- **Location:** `.aether/aether-utils.sh:814`
57
- **Severity:** MEDIUM
58
- **Symptom:** If acquire_lock succeeds but jq fails, lock is never released
59
- **Impact:** Potential deadlock on file operations
60
- **Fix:** Use trap-based cleanup or ensure release_lock in all exit paths
61
-
62
- ### BUG-003: Race condition in backup creation
63
- **Location:** `.aether/utils/atomic-write.sh:75`
64
- **Severity:** MEDIUM
65
- **Symptom:** Backup created AFTER temp file validation but BEFORE atomic move
66
- **Impact:** If process crashes between validation and backup, inconsistent state
67
- **Fix:** Create backup BEFORE validation, or use transactional approach
68
-
69
- ### BUG-004: Missing error code in flag-acknowledge
70
- **Location:** `.aether/aether-utils.sh:930`
71
- **Severity:** MEDIUM
72
- **Symptom:** Uses hardcoded string instead of `$E_VALIDATION_FAILED`
73
- **Impact:** Inconsistent error handling
74
- **Fix:** Change to `json_err "$E_VALIDATION_FAILED" "Usage: ..."`
75
-
76
- ### BUG-006: No lock release on JSON validation failure
77
- **Location:** `.aether/utils/atomic-write.sh:66`
78
- **Severity:** MEDIUM
79
- **Symptom:** If JSON validation fails, temp file cleaned but lock not released
80
- **Impact:** Lock remains held if caller had acquired it
81
- **Fix:** Document lock ownership contract clearly
82
-
83
- ### BUG-007: 17+ instances of missing error codes
84
- **Location:** `.aether/aether-utils.sh` various lines
85
- **Severity:** MEDIUM
86
- **Symptom:** Commands use hardcoded strings instead of error constants
87
- **Impact:** Inconsistent error handling, harder programmatic processing
88
- **Fix:** Standardize all to use `json_err "$E_*" "message"` pattern
89
-
90
- ### BUG-008: Missing error code in flag-add jq failure
91
- **Location:** `.aether/aether-utils.sh:856`
92
- **Severity:** HIGH
93
- **Symptom:** Lock released but error code missing on jq failure
94
- **Impact:** Error response lacks proper error code
95
- **Fix:** Change to `json_err "$E_JSON_INVALID" "Failed to add flag"`
96
-
97
- ### BUG-009: Missing error codes in file checks
98
- **Location:** `.aether/aether-utils.sh:899, 933`
99
- **Severity:** MEDIUM
100
- **Symptom:** File not found errors use hardcoded strings
101
- **Impact:** Inconsistent with other file not found errors
102
- **Fix:** Use `json_err "$E_FILE_NOT_FOUND" "..."`
103
-
104
- ### BUG-010: Missing error codes in context-update
105
- **Location:** `.aether/aether-utils.sh:1758+`
106
- **Severity:** MEDIUM
107
- **Symptom:** Various error paths lack error code constants
108
- **Impact:** Inconsistent error handling
109
-
110
- ### BUG-012: Missing error code in unknown command
111
- **Location:** `.aether/aether-utils.sh:2947`
112
- **Severity:** LOW
113
- **Symptom:** Unknown command handler uses bare string
114
- **Impact:** Inconsistent error response
115
-
116
- ---
117
-
118
- ## Architecture Issues
119
-
120
- ### ISSUE-001: Inconsistent error code usage
121
- **Location:** Multiple locations
122
- **Severity:** MEDIUM
123
- **Description:** Some `json_err` calls use hardcoded strings instead of constants
124
- **Pattern:** Commands added early use strings; later commands use constants
125
-
126
- ### ISSUE-002: Missing exec error handling
127
- **Location:** `.aether/aether-utils.sh:2132-2144`
128
- **Severity:** LOW
129
- **Description:** `model-get` and `model-list` use `exec` without fallback
130
- **Impact:** If exec fails, script continues to unknown command handler
131
-
132
- ### ISSUE-003: Incomplete help command
133
- **Location:** `.aether/aether-utils.sh:106-111`
134
- **Severity:** LOW
135
- **Description:** Help command missing newer commands like queen-*, view-state-*, swarm-timing-*
136
- **Impact:** Users cannot discover all available commands
137
-
138
- ### ISSUE-004: Template path hardcoded to runtime/
139
- **Location:** `.aether/aether-utils.sh:2689`
140
- **Severity:** MEDIUM
141
- **Description:** queen-init uses runtime/ directory which may not exist in npm installs
142
- **Impact:** queen-init will fail when Aether is installed as npm package
143
- **Workaround:** Use git clone instead of npm install
144
-
145
- ### ISSUE-005: Potential infinite loop in spawn-tree
146
- **Location:** `.aether/aether-utils.sh:402-448`, `spawn-tree.sh:222-263`
147
- **Severity:** LOW
148
- **Description:** Edge case with circular parent chain could cause issues
149
- **Mitigation:** Safety limit of 5 exists
150
-
151
- ### ISSUE-006: Fallback json_err incompatible
152
- **Location:** `.aether/aether-utils.sh:65-72`
153
- **Severity:** LOW
154
- **Description:** Fallback json_err doesn't accept error code parameter
155
- **Impact:** If error-handler.sh fails to load, error codes are lost
156
-
157
- ### ISSUE-007: Feature detection race condition
158
- **Location:** `.aether/aether-utils.sh:33-45`
159
- **Severity:** LOW
160
- **Description:** Feature detection runs before error handler fully sourced
161
-
162
- ---
163
-
164
- ## Architecture Gaps
165
-
166
- ### GAP-001: No schema version validation
167
- **Description:** Commands assume state structure without validating version
168
- **Impact:** Silent failures when state structure changes
169
-
170
- ### GAP-002: No cleanup for stale spawn-tree entries
171
- **Description:** spawn-tree.txt grows indefinitely
172
- **Impact:** File could grow very large over many sessions
173
-
174
- ### GAP-003: No retry logic for failed spawns
175
- **Description:** Task tool calls don't have retry logic
176
- **Impact:** Transient failures cause build failures
177
-
178
- ### GAP-004: Missing queen-* documentation
179
- **Description:** No docs for queen-init, queen-read, queen-promote
180
- **Impact:** Users cannot discover wisdom feedback loop
181
-
182
- ### GAP-005: No validation of queen-read JSON output
183
- **Description:** queen-read builds JSON but doesn't validate before returning
184
- **Impact:** Could return malformed response
185
-
186
- ### GAP-006: Missing queen-* command documentation
187
- **Description:** Duplicate of GAP-004 - no documentation exists
188
- **Impact:** Commands are undiscoverable
189
-
190
- ### GAP-007: No error code standards documentation
191
- **Description:** Error codes exist but aren't documented
192
- **Impact:** Developers don't know which codes to use
193
-
194
- ### GAP-008: Missing error path test coverage
195
- **Description:** Error handling paths not tested
196
- **Impact:** Bugs in error handling go undetected
197
-
198
- ### GAP-009: context-update has no file locking
199
- **Description:** Race condition possible during concurrent context updates
200
- **Impact:** Potential data corruption
201
-
202
- ### GAP-010: Missing error code standards documentation
203
- **Description:** Duplicate of GAP-007
204
-
205
- ---
206
-
207
- ## Workarounds Summary
208
-
209
- | Issue | Workaround |
210
- |-------|------------|
211
- | Lock-related deadlocks (BUG-005, BUG-002) | Restart colony session |
212
- | Template path issue (ISSUE-004) | Use git clone instead of npm |
213
- | Missing command docs (GAP-004) | Read source code directly |
214
-
215
- ---
216
-
217
- *Generated from Oracle Research findings - 2026-02-15*
@@ -1,148 +0,0 @@
1
- # Namespace Distinctiveness -- Command System
2
-
3
- This document explains how Aether's command namespace (`ant`) is distinct from other agent namespaces in the global Claude Code configuration, ensuring bulletproof isolation and preventing command collisions.
4
-
5
- ---
6
-
7
- ## Overview
8
-
9
- Aether uses a directory-based command namespace system that is distinct from other agent systems. The namespace is designed to be bulletproof against collisions with other agent frameworks.
10
-
11
- ---
12
-
13
- ## Existing Agent Namespaces
14
-
15
- The global Claude Code commands directory (`~/.claude/commands/`) contains multiple agent namespaces:
16
-
17
- | Namespace | Type | Location | Example Commands |
18
- |-----------|------|----------|-------------------|
19
- | `ant` | Directory | `ant/` | `/ant:build`, `/ant:plan`, `/ant:focus` |
20
- | `cds` | Directory | `cds/` | `/cds:new-project`, `/cds:execute-phase` |
21
- | `mds` | Directory | `mds/` | `/mds:build`, `/mds:plan`, `/mds:test` |
22
- | `st:` | Prefix | Root files | `/st:caption`, `/st:research` |
23
-
24
- ---
25
-
26
- ## How Commands Are Invoked
27
-
28
- ### Claude Code (Slash Commands)
29
-
30
- Claude Code uses a slash-based command syntax with namespace prefixing:
31
-
32
- ```
33
- /ant:build 1 # Aether build command
34
- /ant:focus "auth" # Aether focus command
35
- /ant:plan # Aether plan command
36
-
37
- /cds:new-project "myapp" # Claude Development System
38
- /mds:build # MDS system
39
- /st:caption "image.png" # ST system (prefix in filename)
40
- ```
41
-
42
- **Format:** `/<namespace>:<command> <arguments>`
43
-
44
- ### OpenCode
45
-
46
- OpenCode uses a different syntax with namespace prefixes:
47
-
48
- ```
49
- mds:ant:build 1 # Build using Aether in OpenCode
50
- mds:cds:new-project myapp # CDS in OpenCode
51
- ```
52
-
53
- **Format:** `<tool>:<namespace>:<command> <arguments>`
54
-
55
- ---
56
-
57
- ## Why 'ant' Won't Collide
58
-
59
- ### 1. Directory-Based Isolation
60
-
61
- The `ant` namespace is stored in a dedicated directory (`~/.claude/commands/ant/`). This provides:
62
-
63
- - **Physical separation**: Files exist in a distinct directory, not mixed with other commands
64
- - **Clear ownership**: The `ant/` directory is explicitly owned by Aether
65
- - **No filename conflicts**: Each command is a separate file in the `ant/` subdirectory
66
-
67
- ### 2. Unique Naming Convention
68
-
69
- Aether commands use biological/colony metaphors that don't overlap with other systems:
70
-
71
- | Aether Commands | Other Systems |
72
- |-----------------|---------------|
73
- | `/ant:build` | `/cds:execute-phase` |
74
- | `/ant:plan` | `/mds:plan` |
75
- | `/ant:focus` | `/st:research` |
76
- | `/ant:colonize` | `/cds:new-milestone` |
77
-
78
- **Key distinction:** The `ant:` prefix is unique to Aether. No other agent system uses this prefix.
79
-
80
- ### 3. File Extension Pattern
81
-
82
- Aether commands are `.md` files within the `ant/` directory:
83
-
84
- ```
85
- .claude/commands/ant/build.md # Invoked as /ant:build
86
- .claude/commands/ant/plan.md # Invoked as /ant:plan
87
- .claude/commands/ant/focus.md # Invoked as /ant:focus
88
- ```
89
-
90
- This is distinct from:
91
- - `st:*` commands which use prefixes in filenames (e.g., `st:caption.md`)
92
- - Root-level commands which have no namespace prefix (e.g., `create-prompt.md`)
93
-
94
- ### 4. Sync Mechanism Provides Safety
95
-
96
- The Aether CLI (`bin/cli.js`) implements hash-based idempotent sync:
97
-
98
- - **Source**: `.claude/commands/ant/` in the package
99
- - **Destination**: `~/.aether/commands/claude/` (hub) and `~/.claude/commands/ant/` (global)
100
- - **Behavior**: Files are only copied when content changes (hash comparison)
101
- - **Cleanup**: Stale files are automatically removed
102
-
103
- This ensures:
104
- - Local modifications are preserved
105
- - Only Aether-owned files exist in the `ant/` directory
106
- - No cross-contamination from other namespaces
107
-
108
- ---
109
-
110
- ## Collision Prevention Checklist
111
-
112
- When adding new commands to Aether, verify:
113
-
114
- - [ ] Command file is in `.claude/commands/ant/` directory
115
- - [ ] Filename uses lowercase alphanumeric with hyphens (e.g., `build.md`)
116
- - [ ] Frontmatter uses `ant:` prefix (e.g., `name: ant:build`)
117
- - [ ] No naming overlap with existing commands in `cds/`, `mds/`, or root
118
-
119
- ---
120
-
121
- ## Command Count
122
-
123
- | Namespace | Command Count | Files |
124
- |-----------|---------------|-------|
125
- | `ant` | 29 commands | `ant/*.md` |
126
- | `cds` | 20 commands | `cds/*.md` |
127
- | `mds` | 19 commands | `mds/*.md` |
128
- | `st:` | 13 commands | `st:*.md` |
129
-
130
- ---
131
-
132
- ## Best Practices
133
-
134
- 1. **Never modify commands outside the `ant/` directory** - This maintains clear ownership
135
- 2. **Use the sync mechanism** - Let `aether-cli` handle global distribution
136
- 3. **Follow naming conventions** - Use lowercase, hyphens, biological metaphors
137
- 4. **Keep commands atomic** - Each command should do one thing well
138
-
139
- ---
140
-
141
- ## Summary
142
-
143
- The `ant` namespace is bulletproof because:
144
-
145
- 1. **Directory isolation** - Commands live in `~/.claude/commands/ant/`, separate from other namespaces
146
- 2. **Unique prefix** - `/ant:` is exclusively used by Aether
147
- 3. **Hash-based sync** - Idempotent updates prevent drift and contamination
148
- 4. **Clear ownership** - No other system uses the `ant` prefix or directory
@@ -1,36 +0,0 @@
1
- {
2
- "pathogens": [
3
- {
4
- "name": "unchecked_error_return",
5
- "description": "Function return value not checked for error condition",
6
- "severity": "critical",
7
- "first_seen": "2026-02-11T12:00:00Z",
8
- "last_seen": "2026-02-11T14:30:00Z",
9
- "occurrences": 5,
10
- "projects": ["Aether"],
11
- "resolved": false,
12
- "signature_type": "fuzzy",
13
- "pattern_string": "\\|\\| true$",
14
- "confidence_threshold": 0.9,
15
- "escalation_level": "swarm"
16
- },
17
- {
18
- "name": "hardcoded_path",
19
- "description": "Absolute path hardcoded instead of using variable",
20
- "severity": "warning",
21
- "first_seen": "2026-02-11T12:00:00Z",
22
- "last_seen": "2026-02-11T12:00:00Z",
23
- "occurrences": 1,
24
- "projects": ["Aether"],
25
- "resolved": false,
26
- "signature_type": "exact",
27
- "pattern_string": "/Users/",
28
- "confidence_threshold": 0.5,
29
- "escalation_level": "log"
30
- }
31
- ],
32
- "metadata": {
33
- "version": "1.0",
34
- "last_updated": "2026-02-11T14:30:00Z"
35
- }
36
- }
@@ -1,111 +0,0 @@
1
- # Pathogen Signature Schema
2
-
3
- ## Overview
4
-
5
- Pathogen signatures extend the existing error pattern format (`.aether/error-patterns.json`) with fields for automated detection and escalation. The schema is backward-compatible: existing jq queries on core fields (`name`, `description`, `severity`, `occurrences`, etc.) work unchanged on pathogen entries.
6
-
7
- ## Storage
8
-
9
- - **File:** `.aether/data/pathogens.json` (project-local)
10
- - **Format:** JSON, jq-compatible
11
- - **Relationship:** Extends `error-patterns.json` field set; stored separately to avoid polluting global pattern data
12
-
13
- ## Schema
14
-
15
- ### Root Object
16
-
17
- | Field | Type | Description |
18
- |-------|------|-------------|
19
- | `pathogens` | array | Array of pathogen signature objects |
20
- | `metadata` | object | File-level metadata |
21
-
22
- ### Metadata Object
23
-
24
- | Field | Type | Description |
25
- |-------|------|-------------|
26
- | `version` | string | Schema version (currently `"1.0"`) |
27
- | `last_updated` | string\|null | ISO 8601 UTC timestamp of last modification |
28
-
29
- ### Pathogen Signature Object
30
-
31
- #### Inherited Fields (from error-patterns format)
32
-
33
- These fields match the existing `error-patterns.json` schema exactly. Any jq query that works on error patterns will work on pathogen entries.
34
-
35
- | Field | Type | Description |
36
- |-------|------|-------------|
37
- | `name` | string | Unique identifier for the pathogen |
38
- | `description` | string | Human-readable description |
39
- | `severity` | string | `"warning"` \| `"critical"` |
40
- | `first_seen` | string | ISO 8601 UTC timestamp |
41
- | `last_seen` | string | ISO 8601 UTC timestamp |
42
- | `occurrences` | number | Count of times detected |
43
- | `projects` | array[string] | Project names where detected |
44
- | `resolved` | boolean | Whether the pathogen has been resolved |
45
-
46
- #### New Fields (pathogen-specific)
47
-
48
- | Field | Type | Description |
49
- |-------|------|-------------|
50
- | `signature_type` | string | `"exact"` \| `"fuzzy"` — matching strategy |
51
- | `pattern_string` | string | The literal string or regex to match against |
52
- | `confidence_threshold` | number | Float 0.0–1.0, minimum confidence for a match |
53
- | `escalation_level` | string | `"log"` \| `"elevated"` \| `"swarm"` — response tier |
54
-
55
- ## Escalation Thresholds (Hardcoded)
56
-
57
- | Confidence | Escalation Level | Action |
58
- |------------|-----------------|--------|
59
- | >= 0.9 | `"swarm"` | Immediate swarm response |
60
- | 0.7–0.89 | `"elevated"` | Elevated scrutiny |
61
- | < 0.7 | `"log"` | Log only |
62
-
63
- ## Backward Compatibility
64
-
65
- ### Existing queries that still work
66
-
67
- ```bash
68
- # Select by name (works on both error patterns and pathogens)
69
- jq '.pathogens[] | select(.name == "some_name")' pathogens.json
70
-
71
- # Filter by severity
72
- jq '.pathogens[] | select(.severity == "critical")' pathogens.json
73
-
74
- # Filter recurring (2+ occurrences, unresolved)
75
- jq '[.pathogens[] | select(.occurrences >= 2 and .resolved == false)]' pathogens.json
76
-
77
- # Get all names
78
- jq '[.pathogens[].name]' pathogens.json
79
- ```
80
-
81
- ### New queries for pathogen-specific fields
82
-
83
- ```bash
84
- # Filter by confidence threshold
85
- jq '.pathogens[] | select(.confidence_threshold >= 0.7)' pathogens.json
86
-
87
- # Get all exact-match pathogens
88
- jq '[.pathogens[] | select(.signature_type == "exact")]' pathogens.json
89
-
90
- # Get pathogens requiring swarm escalation
91
- jq '[.pathogens[] | select(.escalation_level == "swarm")]' pathogens.json
92
-
93
- # Search for a specific pattern string
94
- jq --arg pat "error_string" '.pathogens[] | select(.pattern_string == $pat)' pathogens.json
95
- ```
96
-
97
- ## Validation
98
-
99
- Validate the file structure:
100
-
101
- ```bash
102
- # Check file is valid JSON
103
- jq empty pathogens.json
104
-
105
- # Verify required fields exist on all entries
106
- jq '.pathogens[] | has("name", "signature_type", "pattern_string", "confidence_threshold", "escalation_level")' pathogens.json
107
-
108
- # Verify confidence is in range
109
- jq '.pathogens[] | select(.confidence_threshold < 0 or .confidence_threshold > 1)' pathogens.json
110
- # (should return empty if all valid)
111
- ```