aether-colony 5.3.2 → 5.3.3
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.
- package/.aether/aether-utils.sh +181 -5
- package/.aether/commands/build.yaml +35 -0
- package/.aether/commands/entomb.yaml +1 -1
- package/.aether/commands/init.yaml +29 -12
- package/.aether/commands/oracle.yaml +70 -0
- package/.aether/commands/patrol.yaml +2 -2
- package/.aether/commands/run.yaml +3 -3
- package/.aether/commands/swarm.yaml +1 -1
- package/.aether/docs/command-playbooks/build-complete.md +41 -8
- package/.aether/docs/command-playbooks/build-full.md +7 -7
- package/.aether/docs/command-playbooks/build-prep.md +1 -1
- package/.aether/docs/command-playbooks/continue-advance.md +33 -0
- package/.aether/docs/command-playbooks/continue-finalize.md +15 -1
- package/.aether/docs/command-playbooks/continue-full.md +15 -1
- package/.aether/docs/source-of-truth-map.md +10 -10
- package/.aether/docs/structural-learning-stack.md +283 -0
- package/.aether/utils/consolidation-seal.sh +196 -0
- package/.aether/utils/consolidation.sh +127 -0
- package/.aether/utils/curation-ants/archivist.sh +97 -0
- package/.aether/utils/curation-ants/critic.sh +214 -0
- package/.aether/utils/curation-ants/herald.sh +102 -0
- package/.aether/utils/curation-ants/janitor.sh +121 -0
- package/.aether/utils/curation-ants/librarian.sh +99 -0
- package/.aether/utils/curation-ants/nurse.sh +153 -0
- package/.aether/utils/curation-ants/orchestrator.sh +181 -0
- package/.aether/utils/curation-ants/scribe.sh +164 -0
- package/.aether/utils/curation-ants/sentinel.sh +119 -0
- package/.aether/utils/event-bus.sh +301 -0
- package/.aether/utils/graph.sh +559 -0
- package/.aether/utils/instinct-store.sh +401 -0
- package/.aether/utils/learning.sh +79 -7
- package/.aether/utils/session.sh +13 -0
- package/.aether/utils/state-api.sh +1 -1
- package/.aether/utils/trust-scoring.sh +347 -0
- package/.aether/utils/worktree.sh +97 -0
- package/.claude/commands/ant/entomb.md +1 -1
- package/.claude/commands/ant/init.md +29 -12
- package/.claude/commands/ant/oracle.md +35 -0
- package/.claude/commands/ant/patrol.md +2 -2
- package/.claude/commands/ant/run.md +3 -3
- package/.claude/commands/ant/swarm.md +1 -1
- package/.opencode/commands/ant/build.md +35 -0
- package/.opencode/commands/ant/init.md +29 -12
- package/.opencode/commands/ant/oracle.md +35 -0
- package/.opencode/commands/ant/patrol.md +2 -2
- package/.opencode/commands/ant/run.md +3 -3
- package/CHANGELOG.md +83 -0
- package/README.md +22 -9
- package/bin/lib/update-transaction.js +8 -3
- package/bin/npx-entry.js +0 -0
- package/package.json +1 -1
- package/.aether/agents/aether-ambassador.md +0 -140
- package/.aether/agents/aether-archaeologist.md +0 -108
- package/.aether/agents/aether-architect.md +0 -133
- package/.aether/agents/aether-auditor.md +0 -144
- package/.aether/agents/aether-builder.md +0 -184
- package/.aether/agents/aether-chaos.md +0 -115
- package/.aether/agents/aether-chronicler.md +0 -122
- package/.aether/agents/aether-gatekeeper.md +0 -116
- package/.aether/agents/aether-includer.md +0 -117
- package/.aether/agents/aether-keeper.md +0 -177
- package/.aether/agents/aether-measurer.md +0 -128
- package/.aether/agents/aether-oracle.md +0 -137
- package/.aether/agents/aether-probe.md +0 -133
- package/.aether/agents/aether-queen.md +0 -286
- package/.aether/agents/aether-route-setter.md +0 -130
- package/.aether/agents/aether-sage.md +0 -106
- package/.aether/agents/aether-scout.md +0 -101
- package/.aether/agents/aether-surveyor-disciplines.md +0 -391
- package/.aether/agents/aether-surveyor-nest.md +0 -329
- package/.aether/agents/aether-surveyor-pathogens.md +0 -264
- package/.aether/agents/aether-surveyor-provisions.md +0 -334
- package/.aether/agents/aether-tracker.md +0 -137
- package/.aether/agents/aether-watcher.md +0 -174
- package/.aether/agents/aether-weaver.md +0 -130
- package/.aether/commands/claude/archaeology.md +0 -334
- package/.aether/commands/claude/build.md +0 -65
- package/.aether/commands/claude/chaos.md +0 -336
- package/.aether/commands/claude/colonize.md +0 -259
- package/.aether/commands/claude/continue.md +0 -60
- package/.aether/commands/claude/council.md +0 -507
- package/.aether/commands/claude/data-clean.md +0 -81
- package/.aether/commands/claude/dream.md +0 -268
- package/.aether/commands/claude/entomb.md +0 -498
- package/.aether/commands/claude/export-signals.md +0 -57
- package/.aether/commands/claude/feedback.md +0 -96
- package/.aether/commands/claude/flag.md +0 -151
- package/.aether/commands/claude/flags.md +0 -169
- package/.aether/commands/claude/focus.md +0 -76
- package/.aether/commands/claude/help.md +0 -154
- package/.aether/commands/claude/history.md +0 -140
- package/.aether/commands/claude/import-signals.md +0 -71
- package/.aether/commands/claude/init.md +0 -505
- package/.aether/commands/claude/insert-phase.md +0 -105
- package/.aether/commands/claude/interpret.md +0 -278
- package/.aether/commands/claude/lay-eggs.md +0 -210
- package/.aether/commands/claude/maturity.md +0 -113
- package/.aether/commands/claude/memory-details.md +0 -77
- package/.aether/commands/claude/migrate-state.md +0 -171
- package/.aether/commands/claude/oracle.md +0 -642
- package/.aether/commands/claude/organize.md +0 -232
- package/.aether/commands/claude/patrol.md +0 -620
- package/.aether/commands/claude/pause-colony.md +0 -233
- package/.aether/commands/claude/phase.md +0 -115
- package/.aether/commands/claude/pheromones.md +0 -156
- package/.aether/commands/claude/plan.md +0 -693
- package/.aether/commands/claude/preferences.md +0 -65
- package/.aether/commands/claude/quick.md +0 -100
- package/.aether/commands/claude/redirect.md +0 -76
- package/.aether/commands/claude/resume-colony.md +0 -197
- package/.aether/commands/claude/resume.md +0 -388
- package/.aether/commands/claude/run.md +0 -231
- package/.aether/commands/claude/seal.md +0 -774
- package/.aether/commands/claude/skill-create.md +0 -286
- package/.aether/commands/claude/status.md +0 -410
- package/.aether/commands/claude/swarm.md +0 -349
- package/.aether/commands/claude/tunnels.md +0 -426
- package/.aether/commands/claude/update.md +0 -132
- package/.aether/commands/claude/verify-castes.md +0 -143
- package/.aether/commands/claude/watch.md +0 -239
- package/.aether/commands/opencode/archaeology.md +0 -331
- package/.aether/commands/opencode/build.md +0 -1168
- package/.aether/commands/opencode/chaos.md +0 -329
- package/.aether/commands/opencode/colonize.md +0 -195
- package/.aether/commands/opencode/continue.md +0 -1436
- package/.aether/commands/opencode/council.md +0 -437
- package/.aether/commands/opencode/data-clean.md +0 -77
- package/.aether/commands/opencode/dream.md +0 -260
- package/.aether/commands/opencode/entomb.md +0 -377
- package/.aether/commands/opencode/export-signals.md +0 -54
- package/.aether/commands/opencode/feedback.md +0 -99
- package/.aether/commands/opencode/flag.md +0 -149
- package/.aether/commands/opencode/flags.md +0 -167
- package/.aether/commands/opencode/focus.md +0 -73
- package/.aether/commands/opencode/help.md +0 -157
- package/.aether/commands/opencode/history.md +0 -136
- package/.aether/commands/opencode/import-signals.md +0 -68
- package/.aether/commands/opencode/init.md +0 -518
- package/.aether/commands/opencode/insert-phase.md +0 -111
- package/.aether/commands/opencode/interpret.md +0 -272
- package/.aether/commands/opencode/lay-eggs.md +0 -213
- package/.aether/commands/opencode/maturity.md +0 -108
- package/.aether/commands/opencode/memory-details.md +0 -83
- package/.aether/commands/opencode/migrate-state.md +0 -165
- package/.aether/commands/opencode/oracle.md +0 -593
- package/.aether/commands/opencode/organize.md +0 -226
- package/.aether/commands/opencode/patrol.md +0 -626
- package/.aether/commands/opencode/pause-colony.md +0 -203
- package/.aether/commands/opencode/phase.md +0 -113
- package/.aether/commands/opencode/pheromones.md +0 -162
- package/.aether/commands/opencode/plan.md +0 -684
- package/.aether/commands/opencode/preferences.md +0 -71
- package/.aether/commands/opencode/quick.md +0 -91
- package/.aether/commands/opencode/redirect.md +0 -84
- package/.aether/commands/opencode/resume-colony.md +0 -190
- package/.aether/commands/opencode/resume.md +0 -394
- package/.aether/commands/opencode/run.md +0 -237
- package/.aether/commands/opencode/seal.md +0 -452
- package/.aether/commands/opencode/skill-create.md +0 -63
- package/.aether/commands/opencode/status.md +0 -307
- package/.aether/commands/opencode/swarm.md +0 -15
- package/.aether/commands/opencode/tunnels.md +0 -400
- package/.aether/commands/opencode/update.md +0 -127
- package/.aether/commands/opencode/verify-castes.md +0 -139
- 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.
|