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