aether-colony 5.3.2 → 5.4.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 (281) hide show
  1. package/.aether/aether-utils.sh +181 -5
  2. package/.aether/commands/archaeology.yaml +3 -3
  3. package/.aether/commands/build.yaml +80 -45
  4. package/.aether/commands/chaos.yaml +7 -7
  5. package/.aether/commands/colonize.yaml +17 -17
  6. package/.aether/commands/continue.yaml +40 -40
  7. package/.aether/commands/council.yaml +6 -6
  8. package/.aether/commands/data-clean.yaml +3 -3
  9. package/.aether/commands/dream.yaml +2 -2
  10. package/.aether/commands/entomb.yaml +12 -12
  11. package/.aether/commands/export-signals.yaml +2 -2
  12. package/.aether/commands/feedback.yaml +6 -6
  13. package/.aether/commands/flag.yaml +2 -2
  14. package/.aether/commands/flags.yaml +4 -4
  15. package/.aether/commands/focus.yaml +6 -6
  16. package/.aether/commands/help.yaml +1 -1
  17. package/.aether/commands/history.yaml +1 -1
  18. package/.aether/commands/import-signals.yaml +2 -2
  19. package/.aether/commands/init.yaml +44 -27
  20. package/.aether/commands/insert-phase.yaml +1 -1
  21. package/.aether/commands/interpret.yaml +2 -2
  22. package/.aether/commands/lay-eggs.yaml +3 -3
  23. package/.aether/commands/maturity.yaml +2 -2
  24. package/.aether/commands/memory-details.yaml +1 -1
  25. package/.aether/commands/migrate-state.yaml +1 -1
  26. package/.aether/commands/oracle.yaml +147 -82
  27. package/.aether/commands/organize.yaml +5 -5
  28. package/.aether/commands/patrol.yaml +8 -8
  29. package/.aether/commands/pause-colony.yaml +7 -7
  30. package/.aether/commands/phase.yaml +1 -1
  31. package/.aether/commands/pheromones.yaml +1 -1
  32. package/.aether/commands/plan.yaml +14 -14
  33. package/.aether/commands/quick.yaml +4 -4
  34. package/.aether/commands/redirect.yaml +6 -6
  35. package/.aether/commands/resume-colony.yaml +9 -9
  36. package/.aether/commands/resume.yaml +5 -38
  37. package/.aether/commands/run.yaml +10 -10
  38. package/.aether/commands/seal.yaml +33 -33
  39. package/.aether/commands/skill-create.yaml +4 -4
  40. package/.aether/commands/status.yaml +14 -14
  41. package/.aether/commands/swarm.yaml +14 -14
  42. package/.aether/commands/tunnels.yaml +7 -7
  43. package/.aether/commands/update.yaml +1 -1
  44. package/.aether/commands/verify-castes.yaml +3 -3
  45. package/.aether/commands/watch.yaml +15 -15
  46. package/.aether/docs/command-playbooks/build-complete.md +48 -15
  47. package/.aether/docs/command-playbooks/build-context.md +11 -11
  48. package/.aether/docs/command-playbooks/build-full.md +76 -76
  49. package/.aether/docs/command-playbooks/build-prep.md +10 -10
  50. package/.aether/docs/command-playbooks/build-verify.md +27 -27
  51. package/.aether/docs/command-playbooks/build-wave.md +38 -38
  52. package/.aether/docs/command-playbooks/continue-advance.md +60 -27
  53. package/.aether/docs/command-playbooks/continue-finalize.md +25 -11
  54. package/.aether/docs/command-playbooks/continue-full.md +60 -46
  55. package/.aether/docs/command-playbooks/continue-gates.md +18 -18
  56. package/.aether/docs/command-playbooks/continue-verify.md +10 -10
  57. package/.aether/docs/source-of-truth-map.md +10 -10
  58. package/.aether/docs/structural-learning-stack.md +283 -0
  59. package/.aether/templates/colony-state-template.json +1 -0
  60. package/.aether/utils/consolidation-seal.sh +196 -0
  61. package/.aether/utils/consolidation.sh +127 -0
  62. package/.aether/utils/curation-ants/archivist.sh +97 -0
  63. package/.aether/utils/curation-ants/critic.sh +214 -0
  64. package/.aether/utils/curation-ants/herald.sh +102 -0
  65. package/.aether/utils/curation-ants/janitor.sh +121 -0
  66. package/.aether/utils/curation-ants/librarian.sh +99 -0
  67. package/.aether/utils/curation-ants/nurse.sh +153 -0
  68. package/.aether/utils/curation-ants/orchestrator.sh +181 -0
  69. package/.aether/utils/curation-ants/scribe.sh +164 -0
  70. package/.aether/utils/curation-ants/sentinel.sh +119 -0
  71. package/.aether/utils/event-bus.sh +301 -0
  72. package/.aether/utils/graph.sh +559 -0
  73. package/.aether/utils/instinct-store.sh +401 -0
  74. package/.aether/utils/learning.sh +79 -7
  75. package/.aether/utils/oracle/oracle-stop-hook.sh +896 -0
  76. package/.aether/utils/session.sh +13 -0
  77. package/.aether/utils/state-api.sh +1 -1
  78. package/.aether/utils/trust-scoring.sh +347 -0
  79. package/.aether/utils/worktree.sh +97 -0
  80. package/.claude/commands/ant/archaeology.md +2 -2
  81. package/.claude/commands/ant/chaos.md +4 -4
  82. package/.claude/commands/ant/colonize.md +9 -9
  83. package/.claude/commands/ant/council.md +6 -6
  84. package/.claude/commands/ant/data-clean.md +3 -3
  85. package/.claude/commands/ant/dream.md +2 -2
  86. package/.claude/commands/ant/entomb.md +9 -9
  87. package/.claude/commands/ant/export-signals.md +2 -2
  88. package/.claude/commands/ant/feedback.md +4 -4
  89. package/.claude/commands/ant/flag.md +2 -2
  90. package/.claude/commands/ant/flags.md +4 -4
  91. package/.claude/commands/ant/focus.md +4 -4
  92. package/.claude/commands/ant/help.md +1 -1
  93. package/.claude/commands/ant/history.md +1 -1
  94. package/.claude/commands/ant/import-signals.md +2 -2
  95. package/.claude/commands/ant/init.md +44 -27
  96. package/.claude/commands/ant/insert-phase.md +1 -1
  97. package/.claude/commands/ant/interpret.md +2 -2
  98. package/.claude/commands/ant/lay-eggs.md +2 -2
  99. package/.claude/commands/ant/maturity.md +2 -2
  100. package/.claude/commands/ant/memory-details.md +1 -1
  101. package/.claude/commands/ant/migrate-state.md +1 -1
  102. package/.claude/commands/ant/oracle.md +78 -42
  103. package/.claude/commands/ant/organize.md +3 -3
  104. package/.claude/commands/ant/patrol.md +8 -8
  105. package/.claude/commands/ant/pause-colony.md +5 -5
  106. package/.claude/commands/ant/phase.md +1 -1
  107. package/.claude/commands/ant/pheromones.md +1 -1
  108. package/.claude/commands/ant/plan.md +8 -8
  109. package/.claude/commands/ant/quick.md +4 -4
  110. package/.claude/commands/ant/redirect.md +4 -4
  111. package/.claude/commands/ant/resume-colony.md +5 -5
  112. package/.claude/commands/ant/resume.md +17 -29
  113. package/.claude/commands/ant/run.md +10 -10
  114. package/.claude/commands/ant/seal.md +25 -25
  115. package/.claude/commands/ant/skill-create.md +2 -2
  116. package/.claude/commands/ant/status.md +14 -14
  117. package/.claude/commands/ant/swarm.md +14 -14
  118. package/.claude/commands/ant/tunnels.md +4 -4
  119. package/.claude/commands/ant/update.md +1 -1
  120. package/.claude/commands/ant/verify-castes.md +2 -2
  121. package/.claude/commands/ant/watch.md +8 -8
  122. package/.opencode/commands/ant/archaeology.md +1 -1
  123. package/.opencode/commands/ant/build.md +80 -45
  124. package/.opencode/commands/ant/chaos.md +3 -3
  125. package/.opencode/commands/ant/colonize.md +8 -8
  126. package/.opencode/commands/ant/continue.md +40 -40
  127. package/.opencode/commands/ant/council.md +5 -5
  128. package/.opencode/commands/ant/data-clean.md +2 -2
  129. package/.opencode/commands/ant/dream.md +1 -1
  130. package/.opencode/commands/ant/entomb.md +3 -3
  131. package/.opencode/commands/ant/export-signals.md +1 -1
  132. package/.opencode/commands/ant/feedback.md +2 -2
  133. package/.opencode/commands/ant/flag.md +1 -1
  134. package/.opencode/commands/ant/flags.md +3 -3
  135. package/.opencode/commands/ant/focus.md +2 -2
  136. package/.opencode/commands/ant/import-signals.md +1 -1
  137. package/.opencode/commands/ant/init.md +44 -27
  138. package/.opencode/commands/ant/insert-phase.md +1 -1
  139. package/.opencode/commands/ant/interpret.md +1 -1
  140. package/.opencode/commands/ant/lay-eggs.md +2 -2
  141. package/.opencode/commands/ant/maturity.md +1 -1
  142. package/.opencode/commands/ant/memory-details.md +1 -1
  143. package/.opencode/commands/ant/oracle.md +69 -40
  144. package/.opencode/commands/ant/organize.md +2 -2
  145. package/.opencode/commands/ant/patrol.md +8 -8
  146. package/.opencode/commands/ant/pause-colony.md +2 -2
  147. package/.opencode/commands/ant/pheromones.md +1 -1
  148. package/.opencode/commands/ant/plan.md +6 -6
  149. package/.opencode/commands/ant/quick.md +4 -4
  150. package/.opencode/commands/ant/redirect.md +2 -2
  151. package/.opencode/commands/ant/resume-colony.md +4 -4
  152. package/.opencode/commands/ant/resume.md +5 -17
  153. package/.opencode/commands/ant/run.md +10 -10
  154. package/.opencode/commands/ant/seal.md +8 -8
  155. package/.opencode/commands/ant/skill-create.md +2 -2
  156. package/.opencode/commands/ant/status.md +10 -10
  157. package/.opencode/commands/ant/tunnels.md +3 -3
  158. package/.opencode/commands/ant/verify-castes.md +1 -1
  159. package/.opencode/commands/ant/watch.md +7 -7
  160. package/CHANGELOG.md +83 -0
  161. package/README.md +22 -9
  162. package/bin/cli.js +118 -3
  163. package/bin/lib/binary-downloader.js +267 -0
  164. package/bin/lib/update-transaction.js +27 -3
  165. package/bin/lib/version-gate.js +179 -0
  166. package/bin/npx-entry.js +0 -0
  167. package/package.json +1 -1
  168. package/.aether/agents/aether-ambassador.md +0 -140
  169. package/.aether/agents/aether-archaeologist.md +0 -108
  170. package/.aether/agents/aether-architect.md +0 -133
  171. package/.aether/agents/aether-auditor.md +0 -144
  172. package/.aether/agents/aether-builder.md +0 -184
  173. package/.aether/agents/aether-chaos.md +0 -115
  174. package/.aether/agents/aether-chronicler.md +0 -122
  175. package/.aether/agents/aether-gatekeeper.md +0 -116
  176. package/.aether/agents/aether-includer.md +0 -117
  177. package/.aether/agents/aether-keeper.md +0 -177
  178. package/.aether/agents/aether-measurer.md +0 -128
  179. package/.aether/agents/aether-oracle.md +0 -137
  180. package/.aether/agents/aether-probe.md +0 -133
  181. package/.aether/agents/aether-queen.md +0 -286
  182. package/.aether/agents/aether-route-setter.md +0 -130
  183. package/.aether/agents/aether-sage.md +0 -106
  184. package/.aether/agents/aether-scout.md +0 -101
  185. package/.aether/agents/aether-surveyor-disciplines.md +0 -391
  186. package/.aether/agents/aether-surveyor-nest.md +0 -329
  187. package/.aether/agents/aether-surveyor-pathogens.md +0 -264
  188. package/.aether/agents/aether-surveyor-provisions.md +0 -334
  189. package/.aether/agents/aether-tracker.md +0 -137
  190. package/.aether/agents/aether-watcher.md +0 -174
  191. package/.aether/agents/aether-weaver.md +0 -130
  192. package/.aether/commands/claude/archaeology.md +0 -334
  193. package/.aether/commands/claude/build.md +0 -65
  194. package/.aether/commands/claude/chaos.md +0 -336
  195. package/.aether/commands/claude/colonize.md +0 -259
  196. package/.aether/commands/claude/continue.md +0 -60
  197. package/.aether/commands/claude/council.md +0 -507
  198. package/.aether/commands/claude/data-clean.md +0 -81
  199. package/.aether/commands/claude/dream.md +0 -268
  200. package/.aether/commands/claude/entomb.md +0 -498
  201. package/.aether/commands/claude/export-signals.md +0 -57
  202. package/.aether/commands/claude/feedback.md +0 -96
  203. package/.aether/commands/claude/flag.md +0 -151
  204. package/.aether/commands/claude/flags.md +0 -169
  205. package/.aether/commands/claude/focus.md +0 -76
  206. package/.aether/commands/claude/help.md +0 -154
  207. package/.aether/commands/claude/history.md +0 -140
  208. package/.aether/commands/claude/import-signals.md +0 -71
  209. package/.aether/commands/claude/init.md +0 -505
  210. package/.aether/commands/claude/insert-phase.md +0 -105
  211. package/.aether/commands/claude/interpret.md +0 -278
  212. package/.aether/commands/claude/lay-eggs.md +0 -210
  213. package/.aether/commands/claude/maturity.md +0 -113
  214. package/.aether/commands/claude/memory-details.md +0 -77
  215. package/.aether/commands/claude/migrate-state.md +0 -171
  216. package/.aether/commands/claude/oracle.md +0 -642
  217. package/.aether/commands/claude/organize.md +0 -232
  218. package/.aether/commands/claude/patrol.md +0 -620
  219. package/.aether/commands/claude/pause-colony.md +0 -233
  220. package/.aether/commands/claude/phase.md +0 -115
  221. package/.aether/commands/claude/pheromones.md +0 -156
  222. package/.aether/commands/claude/plan.md +0 -693
  223. package/.aether/commands/claude/preferences.md +0 -65
  224. package/.aether/commands/claude/quick.md +0 -100
  225. package/.aether/commands/claude/redirect.md +0 -76
  226. package/.aether/commands/claude/resume-colony.md +0 -197
  227. package/.aether/commands/claude/resume.md +0 -388
  228. package/.aether/commands/claude/run.md +0 -231
  229. package/.aether/commands/claude/seal.md +0 -774
  230. package/.aether/commands/claude/skill-create.md +0 -286
  231. package/.aether/commands/claude/status.md +0 -410
  232. package/.aether/commands/claude/swarm.md +0 -349
  233. package/.aether/commands/claude/tunnels.md +0 -426
  234. package/.aether/commands/claude/update.md +0 -132
  235. package/.aether/commands/claude/verify-castes.md +0 -143
  236. package/.aether/commands/claude/watch.md +0 -239
  237. package/.aether/commands/opencode/archaeology.md +0 -331
  238. package/.aether/commands/opencode/build.md +0 -1168
  239. package/.aether/commands/opencode/chaos.md +0 -329
  240. package/.aether/commands/opencode/colonize.md +0 -195
  241. package/.aether/commands/opencode/continue.md +0 -1436
  242. package/.aether/commands/opencode/council.md +0 -437
  243. package/.aether/commands/opencode/data-clean.md +0 -77
  244. package/.aether/commands/opencode/dream.md +0 -260
  245. package/.aether/commands/opencode/entomb.md +0 -377
  246. package/.aether/commands/opencode/export-signals.md +0 -54
  247. package/.aether/commands/opencode/feedback.md +0 -99
  248. package/.aether/commands/opencode/flag.md +0 -149
  249. package/.aether/commands/opencode/flags.md +0 -167
  250. package/.aether/commands/opencode/focus.md +0 -73
  251. package/.aether/commands/opencode/help.md +0 -157
  252. package/.aether/commands/opencode/history.md +0 -136
  253. package/.aether/commands/opencode/import-signals.md +0 -68
  254. package/.aether/commands/opencode/init.md +0 -518
  255. package/.aether/commands/opencode/insert-phase.md +0 -111
  256. package/.aether/commands/opencode/interpret.md +0 -272
  257. package/.aether/commands/opencode/lay-eggs.md +0 -213
  258. package/.aether/commands/opencode/maturity.md +0 -108
  259. package/.aether/commands/opencode/memory-details.md +0 -83
  260. package/.aether/commands/opencode/migrate-state.md +0 -165
  261. package/.aether/commands/opencode/oracle.md +0 -593
  262. package/.aether/commands/opencode/organize.md +0 -226
  263. package/.aether/commands/opencode/patrol.md +0 -626
  264. package/.aether/commands/opencode/pause-colony.md +0 -203
  265. package/.aether/commands/opencode/phase.md +0 -113
  266. package/.aether/commands/opencode/pheromones.md +0 -162
  267. package/.aether/commands/opencode/plan.md +0 -684
  268. package/.aether/commands/opencode/preferences.md +0 -71
  269. package/.aether/commands/opencode/quick.md +0 -91
  270. package/.aether/commands/opencode/redirect.md +0 -84
  271. package/.aether/commands/opencode/resume-colony.md +0 -190
  272. package/.aether/commands/opencode/resume.md +0 -394
  273. package/.aether/commands/opencode/run.md +0 -237
  274. package/.aether/commands/opencode/seal.md +0 -452
  275. package/.aether/commands/opencode/skill-create.md +0 -63
  276. package/.aether/commands/opencode/status.md +0 -307
  277. package/.aether/commands/opencode/swarm.md +0 -15
  278. package/.aether/commands/opencode/tunnels.md +0 -400
  279. package/.aether/commands/opencode/update.md +0 -127
  280. package/.aether/commands/opencode/verify-castes.md +0 -139
  281. package/.aether/commands/opencode/watch.md +0 -227
@@ -1,593 +0,0 @@
1
- <!-- Generated from .aether/commands/oracle.yaml - DO NOT EDIT DIRECTLY -->
2
- ---
3
- name: ant:oracle
4
- description: "🔮🐜🧠🐜🔮 Oracle Ant - deep research agent using RALF iterative loop pattern"
5
- ---
6
-
7
- ### Step -1: Normalize Arguments
8
-
9
- Run: `normalized_args=$(bash .aether/aether-utils.sh normalize-args "$@")`
10
-
11
- This ensures arguments work correctly in both Claude Code and OpenCode. Use `$normalized_args` throughout this command.
12
-
13
- You are the **Oracle Ant** command handler. You configure and launch a deep research loop that runs autonomously in a separate process.
14
-
15
- The user's input is: `$normalized_args`
16
-
17
- ## Non-Invasive Guarantee
18
-
19
- Oracle NEVER touches COLONY_STATE.json, constraints.json, activity.log, or any code files. Only writes to `.aether/oracle/`.
20
-
21
- ## Instructions
22
-
23
- ### Step 0: Parse Arguments and Route
24
-
25
- Parse `$normalized_args` to determine the action:
26
-
27
- 1. Check for flags:
28
- - If contains `--no-visual`: set `visual_mode = false` (visual is ON by default)
29
- - Otherwise: set `visual_mode = true`
30
- - Remove flags from arguments before routing
31
-
32
- 2. **If remaining arguments is exactly `stop`** — go to **Step 0b: Stop Oracle**
33
- 3. **If remaining arguments is exactly `status`** — go to **Step 0c: Show Status**
34
- 4. **If remaining arguments is exactly `promote`** — go to **Step 0d: Promote Findings**
35
- 5. **Otherwise** — go to **Step 0.5: Initialize Visual Mode** then **Step 1: Research Wizard**
36
-
37
- ### Step 0.5: Display Header
38
-
39
- Display visual header:
40
- ```
41
- 🔮🐜🧠🐜🔮 ═══════════════════════════════════════════════
42
- O R A C L E — R e s e a r c h M o d e
43
- ═══════════════════════════════════════════════ 🔮🐜🧠🐜🔮
44
-
45
- Oracle peering into the depths...
46
- ```
47
-
48
- ---
49
-
50
- ### Step 0b: Stop Oracle
51
-
52
- Create the stop signal file:
53
-
54
- ```bash
55
- mkdir -p .aether/oracle && touch .aether/oracle/.stop
56
- ```
57
-
58
- Output:
59
-
60
- ```
61
- 🔮 Oracle Stop Signal Sent
62
-
63
- Created .aether/oracle/.stop
64
- The research loop will halt at the end of the current iteration.
65
-
66
- To check final results: /ant:oracle status
67
- ```
68
-
69
- Stop here. Do not proceed.
70
-
71
- ---
72
-
73
- ### Step 0c: Show Status
74
-
75
- Check if `.aether/oracle/research-plan.md` exists using the Read tool.
76
-
77
- **If it does NOT exist**, output:
78
-
79
- ```
80
- 🔮 Oracle Status: No Research In Progress
81
-
82
- No active research session. Start one:
83
- /ant:oracle
84
- ```
85
-
86
- Stop here.
87
-
88
- **If it exists**, read `.aether/oracle/research-plan.md` and `.aether/oracle/state.json` (if present).
89
-
90
- Output:
91
-
92
- ```
93
- 🔮 Oracle Status
94
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
95
- Topic: {topic from state.json, or "unknown"}
96
- Iteration: {iteration} of {max_iterations}
97
- Status: {status}
98
-
99
- {contents of research-plan.md}
100
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
101
-
102
- /ant:oracle stop Halt the loop
103
- /ant:oracle Start new research
104
- ```
105
-
106
- Stop here.
107
-
108
- ---
109
-
110
- ### Step 0d: Promote Findings to Colony
111
-
112
- Check if `.aether/oracle/state.json` exists. If it does NOT exist, or if the status is "active", output:
113
-
114
- ```
115
- 🔮 Oracle Promote: No Completed Research
116
-
117
- No completed research to promote. Run /ant:oracle first, then wait for completion.
118
- ```
119
-
120
- Stop here.
121
-
122
- **If state.json exists and status is "complete" or "stopped":**
123
-
124
- Read `.aether/oracle/plan.json` and extract high-confidence findings:
125
-
126
- ```bash
127
- ORACLE_DIR=".aether/oracle"
128
- topic=$(jq -r '.topic // "unknown"' "$ORACLE_DIR/state.json")
129
- status=$(jq -r '.status // "active"' "$ORACLE_DIR/state.json")
130
- count=$(jq '[.questions[] | select(.status == "answered" and .confidence >= 80)] | length' "$ORACLE_DIR/plan.json" 2>/dev/null || echo "0")
131
- total=$(jq '[.questions[]] | length' "$ORACLE_DIR/plan.json" 2>/dev/null || echo "0")
132
- echo "TOPIC=$topic"
133
- echo "STATUS=$status"
134
- echo "QUALIFYING=$count"
135
- echo "TOTAL=$total"
136
- ```
137
-
138
- If qualifying count is 0, output:
139
-
140
- ```
141
- 🔮 Oracle Promote: No Qualifying Findings
142
-
143
- Topic: {topic}
144
- Status: {status}
145
- Findings: 0 of {total} questions meet the threshold (answered + 80%+ confidence)
146
-
147
- Lower-confidence findings remain in .aether/oracle/synthesis.md for reference.
148
- ```
149
-
150
- Stop here.
151
-
152
- **If qualifying count > 0**, display the summary and ask for confirmation:
153
-
154
- ```
155
- 🔮 Oracle Promote: Colony Knowledge Integration
156
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
157
-
158
- Oracle Research: {topic}
159
- Status: {status}
160
- High-confidence findings: {count} (answering {count} of {total} questions)
161
-
162
- These findings will be promoted to:
163
- - Colony instincts (COLONY_STATE.json)
164
- - Colony learnings (learnings.json)
165
- - Observation pipeline (for queen-promote)
166
-
167
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
168
- ```
169
-
170
- Use AskUserQuestion to ask:
171
-
172
- ```
173
- Promote these findings to colony knowledge?
174
- ```
175
-
176
- Options:
177
- 1. **Yes, promote all high-confidence findings** -- Push qualifying findings to colony instincts, learnings, and observations
178
- 2. **No, skip promotion** -- Findings remain in .aether/oracle/ for reference only
179
-
180
- **If user selects Yes:**
181
-
182
- Run promotion. For each qualifying question, call the colony APIs directly:
183
-
184
- ```bash
185
- ORACLE_DIR=".aether/oracle"
186
- UTILS=".aether/aether-utils.sh"
187
- topic=$(jq -r '.topic // "unknown"' "$ORACLE_DIR/state.json")
188
- promoted=0
189
-
190
- while IFS= read -r question; do
191
- q_text=$(echo "$question" | jq -r '.text')
192
- q_confidence=$(echo "$question" | jq -r '.confidence')
193
- findings_text=$(echo "$question" | jq -r '[.key_findings[].text // .key_findings[]] | join("; ")' 2>/dev/null | head -c 200)
194
- first_finding=$(echo "$question" | jq -r '[.key_findings[].text // .key_findings[]] | first // "No findings"' 2>/dev/null)
195
-
196
- bash "$UTILS" instinct-create \
197
- --trigger "researching: $q_text" \
198
- --action "Oracle found (${q_confidence}% confidence): $findings_text" \
199
- --confidence "$(echo "scale=2; $q_confidence / 100" | bc)" \
200
- --domain "research" \
201
- --source "oracle:$topic" \
202
- --evidence "Oracle research: $q_text" 2>/dev/null || true
203
-
204
- bash "$UTILS" learning-promote \
205
- "Oracle: $q_text -- $first_finding" \
206
- "oracle" \
207
- "oracle-research" \
208
- "oracle,research" 2>/dev/null || true
209
-
210
- bash "$UTILS" memory-capture learning \
211
- "Oracle research finding: $q_text (${q_confidence}%)" \
212
- "pattern" \
213
- "oracle:promote" 2>/dev/null || true
214
-
215
- promoted=$((promoted + 1))
216
- done < <(jq -c '[.questions[] | select(.status == "answered" and .confidence >= 80)] | .[]' "$ORACLE_DIR/plan.json")
217
-
218
- echo "Promoted $promoted findings"
219
- ```
220
-
221
- Output:
222
-
223
- ```
224
- 🔮 Oracle Promote: Complete
225
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
226
-
227
- Promoted {count} findings to colony knowledge:
228
- - Instincts created in COLONY_STATE.json
229
- - Learnings stored in learnings.json
230
- - Observations tracked for wisdom promotion
231
-
232
- Run /ant:status to see colony knowledge updates.
233
-
234
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
235
- ```
236
-
237
- **If user selects No:**
238
-
239
- ```
240
- 🔮 Promotion skipped. Findings remain in .aether/oracle/synthesis.md.
241
- ```
242
-
243
- Stop here.
244
-
245
- ---
246
-
247
- ### Step 1: Research Wizard
248
-
249
- This is the setup phase. The Oracle asks questions to configure the research before launching.
250
-
251
- Output the header:
252
-
253
- ```
254
- 🔮🐜🧠🐜🔮 ═══════════════════════════════════════════════════
255
- O R A C L E A N T — R E S E A R C H W I Z A R D
256
- ═══════════════════════════════════════════════════ 🔮🐜🧠🐜🔮
257
- ```
258
-
259
- **If `$normalized_args` is not empty and not a subcommand**, use it as the initial topic suggestion. Otherwise, the topic will be asked in Question 1.
260
-
261
- Now ask questions using AskUserQuestion. Ask them one at a time so each answer can inform the next question.
262
-
263
- **Question 1: Research Topic**
264
-
265
- If `$normalized_args` already contains a topic, skip this question and use that as the topic.
266
-
267
- Otherwise ask:
268
-
269
- ```
270
- What should the Oracle research?
271
- ```
272
-
273
- Options:
274
- 1. **Codebase analysis** — Deep dive into how this codebase works (architecture, patterns, conventions)
275
- 2. **External research** — Research a technology, library, or concept using web search
276
- 3. **Both** — Combine codebase exploration with external research
277
-
278
- Then use a follow-up AskUserQuestion with a free-text prompt:
279
-
280
- ```
281
- Describe the research topic in detail. The more specific, the better the Oracle's results.
282
- ```
283
-
284
- (The user will type their topic via the "Other" free-text option.)
285
-
286
- **Question 2: Research Template**
287
-
288
- ```
289
- What type of research is this?
290
- ```
291
-
292
- Options:
293
- 1. **Technology evaluation** -- Compare and evaluate a technology, library, or tool
294
- 2. **Architecture review** -- Analyze system design, components, and dependencies
295
- 3. **Bug investigation** -- Track down and understand a specific bug or issue
296
- 4. **Best practices** -- Research recommended approaches for a domain or technique
297
- 5. **Custom research** -- Free-form research (Oracle decomposes the topic as it sees fit)
298
-
299
- Map selection to template value: 1->tech-eval, 2->architecture-review, 3->bug-investigation, 4->best-practices, 5->custom
300
-
301
- **Question 3: Research Depth**
302
-
303
- ```
304
- How deep should the Oracle go?
305
- ```
306
-
307
- Options:
308
- 1. **Quick scan (5 iterations)** — Surface-level overview, fast results
309
- 2. **Standard research (15 iterations)** — Thorough investigation, good balance
310
- 3. **Deep dive (30 iterations)** — Exhaustive research, leaves no stone unturned
311
- 4. **Marathon (50 iterations)** — Maximum depth, may take hours
312
-
313
- **Question 4: Confidence Target**
314
-
315
- ```
316
- When should the Oracle consider the research complete?
317
- ```
318
-
319
- Options:
320
- 1. **80% confidence** — Good enough for a first pass, stops early
321
- 2. **90% confidence** — Solid understanding, most questions answered
322
- 3. **95% confidence (recommended)** — Thorough, few gaps remaining
323
- 4. **99% confidence** — Near-exhaustive, won't stop until almost everything is known
324
-
325
- **Question 5: Research Scope** (only if topic involves codebase)
326
-
327
- ```
328
- Should the Oracle also search the web, or stay within the codebase?
329
- ```
330
-
331
- Options:
332
- 1. **Codebase only** — Only use Glob, Grep, Read to explore local files
333
- 2. **Codebase + web** — Also use WebSearch and WebFetch for docs, best practices, prior art
334
- 3. **Web only** — Focus on external research (libraries, concepts, techniques)
335
-
336
- **Question 6: Search Strategy**
337
-
338
- (Ask this question for all research types.)
339
-
340
- ```
341
- How should the Oracle approach the research?
342
- ```
343
-
344
- Options:
345
- 1. **Adaptive (recommended)** -- Oracle decides when to go broad vs deep based on research progress
346
- 2. **Breadth-first** -- Cover all questions with initial findings before going deep on any single one
347
- 3. **Depth-first** -- Pick the most important question and investigate it exhaustively before moving on
348
-
349
- **Question 7: Focus Areas** (optional)
350
-
351
- ```
352
- Are there specific aspects you want the Oracle to prioritize?
353
- ```
354
-
355
- Options:
356
- 1. **No specific focus** -- Let the Oracle decide what to investigate first
357
- 2. **Yes, I have focus areas** -- I want to steer the research toward specific aspects
358
-
359
- If the user selects option 2, ask a follow-up AskUserQuestion with free-text:
360
-
361
- ```
362
- List your focus areas (comma-separated). Example: "security implications, performance under load, migration path"
363
- ```
364
-
365
- Parse the comma-separated response into individual focus area strings.
366
-
367
- After collecting all answers, proceed to Step 2.
368
-
369
- ---
370
-
371
- ### Step 2: Configure Research
372
-
373
- Create the oracle directory structure:
374
-
375
- ```bash
376
- mkdir -p .aether/oracle/archive .aether/oracle/discoveries
377
- ```
378
-
379
- Generate an ISO-8601 UTC timestamp.
380
-
381
- **Archive previous research if it exists:**
382
-
383
- Check if `.aether/oracle/state.json` exists. If it does:
384
-
385
- ```bash
386
- ARCHIVE_TS=$(date +%Y-%m-%d-%H%M%S)
387
- mkdir -p .aether/oracle/archive/$ARCHIVE_TS
388
- for f in state.json plan.json gaps.md synthesis.md research-plan.md; do
389
- [ -f ".aether/oracle/$f" ] && cp ".aether/oracle/$f" ".aether/oracle/archive/$ARCHIVE_TS/"
390
- done
391
- ```
392
-
393
- **Write state.json** (replaces research.json):
394
-
395
- Use the Write tool to create `.aether/oracle/state.json`:
396
-
397
- ```json
398
- {
399
- "version": "1.1",
400
- "topic": "<the research topic>",
401
- "scope": "<codebase|web|both>",
402
- "template": "<template from Question 2: tech-eval|architecture-review|bug-investigation|best-practices|custom>",
403
- "phase": "survey",
404
- "iteration": 0,
405
- "max_iterations": <number from depth choice>,
406
- "target_confidence": <number from confidence choice>,
407
- "overall_confidence": 0,
408
- "started_at": "<ISO-8601 UTC timestamp>",
409
- "last_updated": "<ISO-8601 UTC timestamp>",
410
- "status": "active",
411
- "strategy": "<strategy from Question 6: adaptive|breadth-first|depth-first>",
412
- "focus_areas": [<array of focus area strings from Question 7, or empty array if no focus>]
413
- }
414
- ```
415
-
416
- **Emit focus area pheromones** (if any focus areas were set):
417
-
418
- For each focus area string from Question 7:
419
-
420
- ```bash
421
- bash .aether/aether-utils.sh pheromone-write FOCUS "$focus_area" \
422
- --strength 0.8 --source "oracle:wizard" \
423
- --reason "Focus area set in oracle wizard" --ttl "24h" 2>/dev/null || true
424
- ```
425
-
426
- **Write plan.json:**
427
-
428
- **If template is NOT `custom`**, pre-populate plan.json with the template's default questions. **If template IS `custom`**, break the topic into 3-8 sub-questions (adapt to topic complexity -- broader topics get more questions, focused topics fewer).
429
-
430
- Template default questions:
431
-
432
- - **tech-eval**: q1 "What problem does this technology solve and what are its core capabilities?", q2 "How does it compare to alternative solutions?", q3 "What are its known limitations and tradeoffs?", q4 "What is the adoption and community status?", q5 "What is the migration or integration path?"
433
- - **architecture-review**: q1 "What are the main components and their responsibilities?", q2 "What are the dependency relationships between components?", q3 "Where are the risk areas (coupling, complexity, single points of failure)?", q4 "How does it handle scale and growth?", q5 "What would an expert change about this architecture?"
434
- - **bug-investigation**: q1 "What is the exact failure behavior?", q2 "What are the reproduction conditions?", q3 "What is the root cause?", q4 "What are possible fixes and their tradeoffs?", q5 "Are there related issues or regression risks?"
435
- - **best-practices**: q1 "What is current industry best practice for this domain?", q2 "How does our implementation compare to best practice?", q3 "What gaps exist between our approach and best practice?", q4 "What is the recommended improvement path?"
436
-
437
- Use the Write tool to create `.aether/oracle/plan.json`:
438
-
439
- ```json
440
- {
441
- "version": "1.1",
442
- "sources": {},
443
- "questions": [
444
- {
445
- "id": "q1",
446
- "text": "<question text from template or AI-decomposed>",
447
- "status": "open",
448
- "confidence": 0,
449
- "key_findings": [],
450
- "iterations_touched": []
451
- }
452
- ],
453
- "created_at": "<ISO-8601 UTC timestamp>",
454
- "last_updated": "<ISO-8601 UTC timestamp>"
455
- }
456
- ```
457
-
458
- **Write gaps.md** (initial empty structure):
459
-
460
- Use the Write tool to create `.aether/oracle/gaps.md`:
461
-
462
- ```markdown
463
- # Knowledge Gaps
464
-
465
- ## Open Questions
466
- (No research conducted yet)
467
-
468
- ## Contradictions
469
- (None identified)
470
-
471
- ## Last Updated
472
- Iteration 0 -- <ISO-8601 UTC timestamp>
473
- ```
474
-
475
- **Write synthesis.md** (initial empty structure):
476
-
477
- Use the Write tool to create `.aether/oracle/synthesis.md`:
478
-
479
- ```markdown
480
- # Research Synthesis
481
-
482
- ## Topic
483
- <the research topic>
484
-
485
- ## Findings by Question
486
- (No findings yet -- research has not started)
487
-
488
- ## Last Updated
489
- Iteration 0 -- <ISO-8601 UTC timestamp>
490
- ```
491
-
492
- **Generate research-plan.md:**
493
-
494
- After writing plan.json, generate research-plan.md as the executive summary. Use the Write tool to create `.aether/oracle/research-plan.md`:
495
-
496
- ```markdown
497
- # Research Plan
498
-
499
- **Topic:** <topic>
500
- **Status:** active | **Iteration:** 0 of <max>
501
- **Overall Confidence:** 0%
502
-
503
- ## Questions
504
- | # | Question | Status | Confidence |
505
- |---|----------|--------|------------|
506
- | q1 | <question text> | open | 0% |
507
- | q2 | ... | open | 0% |
508
-
509
- ## Next Steps
510
- Next investigation: <text of q1, the first question>
511
-
512
- ---
513
- *Generated from plan.json -- do not edit directly*
514
- ```
515
-
516
- Proceed to Step 3.
517
-
518
- ---
519
-
520
- ### Step 3: Launch
521
-
522
- Output the research configuration summary, showing the sub-questions from plan.json:
523
-
524
- ```
525
- 🔮 Research Configured
526
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
527
-
528
- 📍 Topic: <topic>
529
- 📐 Template: <template type, e.g. "tech-eval" or "custom">
530
- 🔄 Iterations: <max_iterations>
531
- 🎯 Confidence: <target_confidence>%
532
- 🔍 Scope: <scope>
533
- 📐 Strategy: <strategy>
534
- 🎯 Focus: <focus areas comma-separated, or "None">
535
-
536
- 📋 Sub-Questions:
537
- q1. <question text from plan.json>
538
- q2. <question text from plan.json>
539
- q3. <question text from plan.json>
540
-
541
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
542
- ```
543
-
544
- Now launch the loop. Try tmux first, fall back to manual.
545
-
546
- **Try tmux:**
547
-
548
- ```bash
549
- tmux new-session -d -s oracle "cd $(pwd) && bash .aether/utils/oracle/oracle.sh; echo ''; echo '🔮 Oracle loop finished. Press any key to close.'; read -n1" 2>/dev/null && echo "TMUX_OK" || echo "TMUX_FAIL"
550
- ```
551
-
552
- **If TMUX_OK:**
553
-
554
- ```
555
- 🔮 Oracle Launched
556
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
557
-
558
- The Oracle is researching in a background tmux session.
559
-
560
- 👁️ Watch live: tmux attach -t oracle
561
- 📊 Check status: /ant:oracle status
562
- 🛑 Stop early: /ant:oracle stop
563
-
564
- Research progress visible at .aether/oracle/research-plan.md
565
- The Oracle will stop when it reaches {target_confidence}% confidence
566
- or completes {max_iterations} iterations.
567
-
568
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
569
-
570
- You can keep working. The Oracle runs independently.
571
- ```
572
-
573
- Stop here.
574
-
575
- **If TMUX_FAIL** (tmux not installed or error):
576
-
577
- ```
578
- 🔮 Ready to Launch
579
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
580
-
581
- tmux not available. Run this in a separate terminal:
582
-
583
- cd {current_working_directory}
584
- bash .aether/utils/oracle/oracle.sh
585
-
586
- Then come back here:
587
- 📊 Check status: /ant:oracle status
588
- 🛑 Stop early: /ant:oracle stop
589
-
590
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
591
- ```
592
-
593
- Stop here.