aether-colony 5.0.0 → 5.2.1
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 +3226 -3345
- package/.aether/agents-claude/aether-ambassador.md +265 -0
- package/.aether/agents-claude/aether-archaeologist.md +327 -0
- package/.aether/agents-claude/aether-architect.md +236 -0
- package/.aether/agents-claude/aether-auditor.md +271 -0
- package/.aether/agents-claude/aether-builder.md +224 -0
- package/.aether/agents-claude/aether-chaos.md +269 -0
- package/.aether/agents-claude/aether-chronicler.md +305 -0
- package/.aether/agents-claude/aether-gatekeeper.md +330 -0
- package/.aether/agents-claude/aether-includer.md +374 -0
- package/.aether/agents-claude/aether-keeper.md +272 -0
- package/.aether/agents-claude/aether-measurer.md +322 -0
- package/.aether/agents-claude/aether-oracle.md +237 -0
- package/.aether/agents-claude/aether-probe.md +211 -0
- package/.aether/agents-claude/aether-queen.md +330 -0
- package/.aether/agents-claude/aether-route-setter.md +178 -0
- package/.aether/agents-claude/aether-sage.md +418 -0
- package/.aether/agents-claude/aether-scout.md +179 -0
- package/.aether/agents-claude/aether-surveyor-disciplines.md +417 -0
- package/.aether/agents-claude/aether-surveyor-nest.md +355 -0
- package/.aether/agents-claude/aether-surveyor-pathogens.md +289 -0
- package/.aether/agents-claude/aether-surveyor-provisions.md +360 -0
- package/.aether/agents-claude/aether-tracker.md +270 -0
- package/.aether/agents-claude/aether-watcher.md +280 -0
- package/.aether/agents-claude/aether-weaver.md +248 -0
- package/.aether/commands/archaeology.yaml +653 -0
- package/.aether/commands/build.yaml +1221 -0
- package/.aether/commands/chaos.yaml +653 -0
- package/.aether/commands/colonize.yaml +442 -0
- package/.aether/commands/continue.yaml +1484 -0
- package/.aether/commands/council.yaml +509 -0
- package/.aether/commands/data-clean.yaml +80 -0
- package/.aether/commands/dream.yaml +275 -0
- package/.aether/commands/entomb.yaml +863 -0
- package/.aether/commands/export-signals.yaml +64 -0
- package/.aether/commands/feedback.yaml +158 -0
- package/.aether/commands/flag.yaml +160 -0
- package/.aether/commands/flags.yaml +177 -0
- package/.aether/commands/focus.yaml +112 -0
- package/.aether/commands/help.yaml +167 -0
- package/.aether/commands/history.yaml +137 -0
- package/.aether/commands/import-signals.yaml +79 -0
- package/.aether/commands/init.yaml +502 -0
- package/.aether/commands/insert-phase.yaml +102 -0
- package/.aether/commands/interpret.yaml +285 -0
- package/.aether/commands/lay-eggs.yaml +224 -0
- package/.aether/commands/maturity.yaml +122 -0
- package/.aether/commands/memory-details.yaml +74 -0
- package/.aether/commands/migrate-state.yaml +174 -0
- package/.aether/commands/oracle.yaml +1224 -0
- package/.aether/commands/organize.yaml +446 -0
- package/.aether/commands/patrol.yaml +621 -0
- package/.aether/commands/pause-colony.yaml +424 -0
- package/.aether/commands/phase.yaml +124 -0
- package/.aether/commands/pheromones.yaml +153 -0
- package/.aether/commands/plan.yaml +1364 -0
- package/.aether/commands/preferences.yaml +63 -0
- package/.aether/commands/quick.yaml +104 -0
- package/.aether/commands/redirect.yaml +123 -0
- package/.aether/commands/resume-colony.yaml +375 -0
- package/.aether/commands/resume.yaml +407 -0
- package/.aether/commands/run.yaml +229 -0
- package/.aether/commands/seal.yaml +1214 -0
- package/.aether/commands/skill-create.yaml +337 -0
- package/.aether/commands/status.yaml +408 -0
- package/.aether/commands/swarm.yaml +352 -0
- package/.aether/commands/tunnels.yaml +814 -0
- package/.aether/commands/update.yaml +131 -0
- package/.aether/commands/verify-castes.yaml +159 -0
- package/.aether/commands/watch.yaml +454 -0
- package/.aether/docs/INCIDENT_TEMPLATE.md +32 -0
- package/.aether/docs/QUEEN-SYSTEM.md +11 -11
- package/.aether/docs/README.md +32 -2
- package/.aether/docs/command-playbooks/README.md +23 -0
- package/.aether/docs/command-playbooks/build-complete.md +349 -0
- package/.aether/docs/command-playbooks/build-context.md +282 -0
- package/.aether/docs/command-playbooks/build-full.md +1683 -0
- package/.aether/docs/command-playbooks/build-prep.md +284 -0
- package/.aether/docs/command-playbooks/build-verify.md +405 -0
- package/.aether/docs/command-playbooks/build-wave.md +749 -0
- package/.aether/docs/command-playbooks/continue-advance.md +524 -0
- package/.aether/docs/command-playbooks/continue-finalize.md +447 -0
- package/.aether/docs/command-playbooks/continue-full.md +1725 -0
- package/.aether/docs/command-playbooks/continue-gates.md +686 -0
- package/.aether/docs/command-playbooks/continue-verify.md +407 -0
- package/.aether/docs/context-continuity.md +84 -0
- package/.aether/docs/disciplines/DISCIPLINES.md +9 -7
- package/.aether/docs/error-codes.md +1 -1
- package/.aether/docs/known-issues.md +34 -173
- package/.aether/docs/pheromones.md +86 -6
- package/.aether/docs/plans/pheromone-display-plan.md +257 -0
- package/.aether/docs/queen-commands.md +10 -9
- package/.aether/docs/source-of-truth-map.md +132 -0
- package/.aether/docs/xml-utilities.md +47 -0
- package/.aether/rules/aether-colony.md +23 -13
- package/.aether/scripts/incident-test-add.sh +47 -0
- package/.aether/scripts/weekly-audit.sh +79 -0
- package/.aether/skills/.index.json +649 -0
- package/.aether/skills/colony/.manifest.json +16 -0
- package/.aether/skills/colony/build-discipline/SKILL.md +78 -0
- package/.aether/skills/colony/colony-interaction/SKILL.md +56 -0
- package/.aether/skills/colony/colony-lifecycle/SKILL.md +77 -0
- package/.aether/skills/colony/colony-visuals/SKILL.md +112 -0
- package/.aether/skills/colony/context-management/SKILL.md +80 -0
- package/.aether/skills/colony/error-presentation/SKILL.md +99 -0
- package/.aether/skills/colony/pheromone-protocol/SKILL.md +79 -0
- package/.aether/skills/colony/pheromone-visibility/SKILL.md +81 -0
- package/.aether/skills/colony/state-safety/SKILL.md +84 -0
- package/.aether/skills/colony/worker-priming/SKILL.md +82 -0
- package/.aether/skills/domain/.manifest.json +24 -0
- package/.aether/skills/domain/README.md +33 -0
- package/.aether/skills/domain/django/SKILL.md +49 -0
- package/.aether/skills/domain/docker/SKILL.md +52 -0
- package/.aether/skills/domain/golang/SKILL.md +52 -0
- package/.aether/skills/domain/graphql/SKILL.md +51 -0
- package/.aether/skills/domain/html-css/SKILL.md +48 -0
- package/.aether/skills/domain/nextjs/SKILL.md +45 -0
- package/.aether/skills/domain/nodejs/SKILL.md +53 -0
- package/.aether/skills/domain/postgresql/SKILL.md +53 -0
- package/.aether/skills/domain/prisma/SKILL.md +59 -0
- package/.aether/skills/domain/python/SKILL.md +50 -0
- package/.aether/skills/domain/rails/SKILL.md +52 -0
- package/.aether/skills/domain/react/SKILL.md +45 -0
- package/.aether/skills/domain/rest-api/SKILL.md +58 -0
- package/.aether/skills/domain/svelte/SKILL.md +47 -0
- package/.aether/skills/domain/tailwind/SKILL.md +45 -0
- package/.aether/skills/domain/testing/SKILL.md +53 -0
- package/.aether/skills/domain/typescript/SKILL.md +58 -0
- package/.aether/skills/domain/vue/SKILL.md +49 -0
- package/.aether/templates/QUEEN.md.template +23 -41
- package/.aether/templates/colony-state-reset.jq.template +1 -0
- package/.aether/templates/colony-state.template.json +4 -0
- package/.aether/templates/learning-observations.template.json +6 -0
- package/.aether/templates/midden.template.json +13 -0
- package/.aether/templates/pheromones.template.json +6 -0
- package/.aether/templates/session.template.json +9 -0
- package/.aether/utils/atomic-write.sh +63 -17
- package/.aether/utils/chamber-utils.sh +145 -2
- package/.aether/utils/council.sh +425 -0
- package/.aether/utils/emoji-audit.sh +166 -0
- package/.aether/utils/error-handler.sh +21 -7
- package/.aether/utils/file-lock.sh +182 -27
- package/.aether/utils/flag.sh +278 -0
- package/.aether/utils/hive.sh +572 -0
- package/.aether/utils/immune.sh +508 -0
- package/.aether/utils/learning.sh +1928 -0
- package/.aether/utils/midden.sh +520 -0
- package/.aether/utils/oracle/oracle.md +168 -0
- package/.aether/utils/oracle/oracle.sh +1023 -0
- package/.aether/utils/pheromone.sh +2029 -0
- package/.aether/utils/queen.sh +1710 -0
- package/.aether/utils/scan.sh +860 -0
- package/.aether/utils/semantic-cli.sh +10 -8
- package/.aether/utils/session.sh +816 -0
- package/.aether/utils/skills.sh +509 -0
- package/.aether/utils/spawn-tree.sh +103 -271
- package/.aether/utils/spawn.sh +260 -0
- package/.aether/utils/state-api.sh +389 -0
- package/.aether/utils/state-loader.sh +8 -6
- package/.aether/utils/suggest.sh +611 -0
- package/.aether/utils/swarm-display.sh +10 -1
- package/.aether/utils/swarm.sh +1004 -0
- package/.aether/utils/watch-spawn-tree.sh +11 -2
- package/.aether/utils/xml-compose.sh +2 -2
- package/.aether/utils/xml-convert.sh +9 -5
- package/.aether/utils/xml-core.sh +5 -9
- package/.aether/utils/xml-query.sh +4 -4
- package/.aether/workers.md +86 -67
- package/.claude/agents/ant/aether-ambassador.md +2 -1
- package/.claude/agents/ant/aether-archaeologist.md +6 -1
- package/.claude/agents/ant/aether-architect.md +236 -0
- package/.claude/agents/ant/aether-auditor.md +6 -1
- package/.claude/agents/ant/aether-builder.md +38 -1
- package/.claude/agents/ant/aether-chaos.md +2 -1
- package/.claude/agents/ant/aether-chronicler.md +1 -0
- package/.claude/agents/ant/aether-gatekeeper.md +6 -1
- package/.claude/agents/ant/aether-includer.md +1 -0
- package/.claude/agents/ant/aether-keeper.md +1 -0
- package/.claude/agents/ant/aether-measurer.md +6 -1
- package/.claude/agents/ant/aether-oracle.md +237 -0
- package/.claude/agents/ant/aether-probe.md +2 -1
- package/.claude/agents/ant/aether-queen.md +6 -1
- package/.claude/agents/ant/aether-route-setter.md +6 -1
- package/.claude/agents/ant/aether-sage.md +68 -3
- package/.claude/agents/ant/aether-scout.md +38 -1
- package/.claude/agents/ant/aether-surveyor-disciplines.md +2 -1
- package/.claude/agents/ant/aether-surveyor-nest.md +2 -1
- package/.claude/agents/ant/aether-surveyor-pathogens.md +2 -1
- package/.claude/agents/ant/aether-surveyor-provisions.md +2 -1
- package/.claude/agents/ant/aether-tracker.md +6 -1
- package/.claude/agents/ant/aether-watcher.md +37 -1
- package/.claude/agents/ant/aether-weaver.md +2 -1
- package/.claude/commands/ant/archaeology.md +1 -8
- package/.claude/commands/ant/build.md +43 -1159
- package/.claude/commands/ant/chaos.md +1 -14
- package/.claude/commands/ant/colonize.md +3 -14
- package/.claude/commands/ant/continue.md +40 -1026
- package/.claude/commands/ant/council.md +213 -15
- package/.claude/commands/ant/data-clean.md +81 -0
- package/.claude/commands/ant/dream.md +12 -9
- package/.claude/commands/ant/entomb.md +62 -87
- package/.claude/commands/ant/export-signals.md +57 -0
- package/.claude/commands/ant/feedback.md +18 -0
- package/.claude/commands/ant/flag.md +12 -0
- package/.claude/commands/ant/flags.md +22 -8
- package/.claude/commands/ant/focus.md +18 -0
- package/.claude/commands/ant/help.md +40 -8
- package/.claude/commands/ant/history.md +3 -0
- package/.claude/commands/ant/import-signals.md +71 -0
- package/.claude/commands/ant/init.md +349 -191
- package/.claude/commands/ant/insert-phase.md +105 -0
- package/.claude/commands/ant/interpret.md +11 -0
- package/.claude/commands/ant/lay-eggs.md +167 -158
- package/.claude/commands/ant/maturity.md +22 -11
- package/.claude/commands/ant/memory-details.md +77 -0
- package/.claude/commands/ant/migrate-state.md +6 -0
- package/.claude/commands/ant/oracle.md +317 -62
- package/.claude/commands/ant/organize.md +10 -5
- package/.claude/commands/ant/patrol.md +620 -0
- package/.claude/commands/ant/pause-colony.md +8 -22
- package/.claude/commands/ant/phase.md +26 -37
- package/.claude/commands/ant/pheromones.md +156 -0
- package/.claude/commands/ant/plan.md +199 -50
- package/.claude/commands/ant/preferences.md +65 -0
- package/.claude/commands/ant/quick.md +100 -0
- package/.claude/commands/ant/redirect.md +18 -0
- package/.claude/commands/ant/resume-colony.md +37 -22
- package/.claude/commands/ant/resume.md +60 -7
- package/.claude/commands/ant/run.md +231 -0
- package/.claude/commands/ant/seal.md +506 -78
- package/.claude/commands/ant/skill-create.md +286 -0
- package/.claude/commands/ant/status.md +171 -1
- package/.claude/commands/ant/swarm.md +11 -23
- package/.claude/commands/ant/tunnels.md +1 -0
- package/.claude/commands/ant/update.md +58 -135
- package/.claude/commands/ant/verify-castes.md +90 -42
- package/.claude/commands/ant/watch.md +1 -0
- package/.opencode/agents/aether-ambassador.md +1 -1
- package/.opencode/agents/aether-architect.md +133 -0
- package/.opencode/agents/aether-builder.md +3 -3
- package/.opencode/agents/aether-oracle.md +137 -0
- package/.opencode/agents/aether-queen.md +1 -1
- package/.opencode/agents/aether-route-setter.md +1 -1
- package/.opencode/agents/aether-scout.md +1 -1
- package/.opencode/agents/aether-surveyor-disciplines.md +6 -1
- package/.opencode/agents/aether-surveyor-nest.md +6 -1
- package/.opencode/agents/aether-surveyor-pathogens.md +6 -1
- package/.opencode/agents/aether-surveyor-provisions.md +6 -1
- package/.opencode/agents/aether-tracker.md +1 -1
- package/.opencode/agents/aether-watcher.md +1 -1
- package/.opencode/agents/aether-weaver.md +1 -1
- package/.opencode/commands/ant/archaeology.md +7 -14
- package/.opencode/commands/ant/build.md +54 -88
- package/.opencode/commands/ant/chaos.md +7 -24
- package/.opencode/commands/ant/colonize.md +10 -17
- package/.opencode/commands/ant/continue.md +595 -66
- package/.opencode/commands/ant/council.md +150 -18
- package/.opencode/commands/ant/data-clean.md +77 -0
- package/.opencode/commands/ant/dream.md +15 -17
- package/.opencode/commands/ant/entomb.md +28 -18
- package/.opencode/commands/ant/export-signals.md +54 -0
- package/.opencode/commands/ant/feedback.md +24 -5
- package/.opencode/commands/ant/flag.md +16 -4
- package/.opencode/commands/ant/flags.md +24 -10
- package/.opencode/commands/ant/focus.md +22 -5
- package/.opencode/commands/ant/help.md +41 -8
- package/.opencode/commands/ant/history.md +9 -0
- package/.opencode/commands/ant/import-signals.md +68 -0
- package/.opencode/commands/ant/init.md +396 -154
- package/.opencode/commands/ant/insert-phase.md +111 -0
- package/.opencode/commands/ant/interpret.md +16 -0
- package/.opencode/commands/ant/lay-eggs.md +184 -112
- package/.opencode/commands/ant/maturity.md +18 -2
- package/.opencode/commands/ant/memory-details.md +83 -0
- package/.opencode/commands/ant/migrate-state.md +12 -0
- package/.opencode/commands/ant/oracle.md +322 -67
- package/.opencode/commands/ant/organize.md +14 -12
- package/.opencode/commands/ant/patrol.md +626 -0
- package/.opencode/commands/ant/pause-colony.md +12 -29
- package/.opencode/commands/ant/phase.md +30 -40
- package/.opencode/commands/ant/pheromones.md +162 -0
- package/.opencode/commands/ant/plan.md +210 -57
- package/.opencode/commands/ant/preferences.md +71 -0
- package/.opencode/commands/ant/quick.md +91 -0
- package/.opencode/commands/ant/redirect.md +22 -5
- package/.opencode/commands/ant/resume-colony.md +41 -29
- package/.opencode/commands/ant/resume.md +80 -20
- package/.opencode/commands/ant/run.md +237 -0
- package/.opencode/commands/ant/seal.md +230 -25
- package/.opencode/commands/ant/skill-create.md +63 -0
- package/.opencode/commands/ant/status.md +125 -30
- package/.opencode/commands/ant/swarm.md +3 -345
- package/.opencode/commands/ant/tunnels.md +3 -9
- package/.opencode/commands/ant/update.md +63 -127
- package/.opencode/commands/ant/verify-castes.md +96 -42
- package/.opencode/commands/ant/watch.md +7 -0
- package/CHANGELOG.md +368 -1
- package/README.md +195 -324
- package/bin/cli.js +236 -429
- package/bin/generate-commands.js +186 -0
- package/bin/generate-commands.sh +128 -89
- package/bin/lib/spawn-logger.js +0 -15
- package/bin/lib/update-transaction.js +285 -35
- package/bin/npx-install.js +178 -0
- package/bin/validate-package.sh +85 -3
- package/package.json +16 -4
- package/.aether/CONTEXT.md +0 -160
- package/.aether/docs/QUEEN.md +0 -84
- package/.aether/exchange/colony-registry.xml +0 -11
- package/.aether/exchange/pheromones.xml +0 -87
- package/.aether/exchange/queen-wisdom.xml +0 -14
- package/.aether/model-profiles.yaml +0 -100
- package/.aether/utils/spawn-with-model.sh +0 -56
- package/bin/lib/model-profiles.js +0 -445
- package/bin/lib/model-verify.js +0 -288
- package/bin/lib/proxy-health.js +0 -253
- package/bin/lib/telemetry.js +0 -441
|
@@ -3,8 +3,17 @@
|
|
|
3
3
|
# Usage: bash watch-spawn-tree.sh [data_dir]
|
|
4
4
|
|
|
5
5
|
DATA_DIR="${1:-.aether/data}"
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
# Resolve COLONY_DATA_DIR for per-colony files (standalone script)
|
|
7
|
+
COLONY_DATA_DIR="${COLONY_DATA_DIR:-$DATA_DIR}"
|
|
8
|
+
if [[ -f "$DATA_DIR/COLONY_STATE.json" ]]; then
|
|
9
|
+
_cn=$(jq -r '.colony_name // empty' "$DATA_DIR/COLONY_STATE.json" 2>/dev/null)
|
|
10
|
+
if [[ -n "$_cn" ]]; then
|
|
11
|
+
_cn_safe=$(echo "$_cn" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/-/g' | sed 's/--*/-/g' | sed 's/^-//;s/-$//')
|
|
12
|
+
[[ -n "$_cn_safe" ]] && COLONY_DATA_DIR="$DATA_DIR/colonies/$_cn_safe"
|
|
13
|
+
fi
|
|
14
|
+
fi
|
|
15
|
+
SPAWN_FILE="$COLONY_DATA_DIR/spawn-tree.txt"
|
|
16
|
+
VIEW_STATE_FILE="$COLONY_DATA_DIR/view-state.json"
|
|
8
17
|
|
|
9
18
|
# ANSI colors
|
|
10
19
|
YELLOW='\033[33m'
|
|
@@ -113,12 +113,12 @@ xml-compose() {
|
|
|
113
113
|
echo "$composed" > "$output_xml"
|
|
114
114
|
local escaped_output
|
|
115
115
|
escaped_output=$(echo "$output_xml" | jq -Rs '.[:-1]')
|
|
116
|
-
xml_json_ok "{
|
|
116
|
+
xml_json_ok "$(jq -n --argjson output "$escaped_output" '{composed: true, output: $output, sources_resolved: "auto"}')"
|
|
117
117
|
else
|
|
118
118
|
# Output to stdout wrapped in JSON
|
|
119
119
|
local escaped_composed
|
|
120
120
|
escaped_composed=$(echo "$composed" | jq -Rs '.')
|
|
121
|
-
xml_json_ok "{
|
|
121
|
+
xml_json_ok "$(jq -n --argjson xml "$escaped_composed" '{composed: true, xml: $xml, sources_resolved: "auto"}')"
|
|
122
122
|
fi
|
|
123
123
|
return 0
|
|
124
124
|
fi
|
|
@@ -103,7 +103,7 @@ xml-to-json() {
|
|
|
103
103
|
fi
|
|
104
104
|
local escaped_json
|
|
105
105
|
escaped_json=$(echo "$json_output" | jq -Rs '.')
|
|
106
|
-
xml_json_ok "{
|
|
106
|
+
xml_json_ok "$(jq -n --argjson json "$escaped_json" '{format: "object", json: $json}')"
|
|
107
107
|
return 0
|
|
108
108
|
fi
|
|
109
109
|
fi
|
|
@@ -147,7 +147,9 @@ XSLT
|
|
|
147
147
|
xml_json_err "CONVERSION_ERROR" "XSLT conversion failed"
|
|
148
148
|
return 1
|
|
149
149
|
}
|
|
150
|
-
|
|
150
|
+
local xslt_escaped_json
|
|
151
|
+
xslt_escaped_json=$(echo "$json_result" | jq -Rs '.')
|
|
152
|
+
xml_json_ok "$(jq -n --argjson json "$xslt_escaped_json" '{format: "object", json: $json}')"
|
|
151
153
|
return 0
|
|
152
154
|
fi
|
|
153
155
|
|
|
@@ -158,7 +160,9 @@ XSLT
|
|
|
158
160
|
xml_json_err "CONVERSION_ERROR" "xmlstarlet conversion failed"
|
|
159
161
|
return 1
|
|
160
162
|
}
|
|
161
|
-
|
|
163
|
+
local xmlstar_escaped_json
|
|
164
|
+
xmlstar_escaped_json=$(echo "$json_result" | jq -Rs '.')
|
|
165
|
+
xml_json_ok "$(jq -n --argjson json "$xmlstar_escaped_json" '{format: "object", json: $json}')"
|
|
162
166
|
return 0
|
|
163
167
|
fi
|
|
164
168
|
|
|
@@ -216,7 +220,7 @@ json-to-xml() {
|
|
|
216
220
|
# Escape the XML for JSON output
|
|
217
221
|
local escaped_xml
|
|
218
222
|
escaped_xml=$(echo "$xml_output" | jq -Rs '.')
|
|
219
|
-
xml_json_ok "
|
|
223
|
+
xml_json_ok "$(jq -n --argjson xml "$escaped_xml" '{xml: $xml}')"
|
|
220
224
|
}
|
|
221
225
|
|
|
222
226
|
# ============================================================================
|
|
@@ -259,7 +263,7 @@ xml-merge() {
|
|
|
259
263
|
|
|
260
264
|
local escaped_output
|
|
261
265
|
escaped_output=$(echo "$output_file" | jq -Rs '.[:-1]')
|
|
262
|
-
xml_json_ok "
|
|
266
|
+
xml_json_ok "$(jq -n --argjson output "$escaped_output" --argjson sources_resolved "$resolved_count" '{merged: true, output: $output, sources_resolved: $sources_resolved}')"
|
|
263
267
|
return 0
|
|
264
268
|
fi
|
|
265
269
|
|
|
@@ -89,10 +89,8 @@ xml-validate() {
|
|
|
89
89
|
xml_json_ok '{"valid":true,"errors":[]}'
|
|
90
90
|
return 0
|
|
91
91
|
} || {
|
|
92
|
-
# Escape errors for JSON
|
|
93
|
-
|
|
94
|
-
escaped_errors=$(echo "$errors" | sed 's/\\/\\\\/g; s/"/\\"/g; s/\t/\\t/g' | tr '\n' ' ')
|
|
95
|
-
xml_json_ok "{\"valid\":false,\"errors\":[\"$escaped_errors\"]}"
|
|
92
|
+
# Escape errors for JSON using jq
|
|
93
|
+
xml_json_ok "$(jq -n --arg errors "$errors" '{valid: false, errors: [$errors]}')"
|
|
96
94
|
return 0
|
|
97
95
|
}
|
|
98
96
|
}
|
|
@@ -144,12 +142,10 @@ xml-format() {
|
|
|
144
142
|
|
|
145
143
|
if [[ -n "$output_file" ]]; then
|
|
146
144
|
echo "$formatted" > "$output_file"
|
|
147
|
-
xml_json_ok "{
|
|
145
|
+
xml_json_ok "$(jq -n --arg path "$output_file" '{formatted: true, path: $path}')"
|
|
148
146
|
else
|
|
149
|
-
# Escape for JSON
|
|
150
|
-
|
|
151
|
-
escaped=$(echo "$formatted" | sed 's/\\/\\\\/g; s/"/\\"/g' | tr '\n' ' ')
|
|
152
|
-
xml_json_ok "{\"formatted\":true,\"output\":\"$escaped\"}"
|
|
147
|
+
# Escape for JSON using jq
|
|
148
|
+
xml_json_ok "$(jq -n --arg output "$formatted" '{formatted: true, output: $output}')"
|
|
153
149
|
fi
|
|
154
150
|
}
|
|
155
151
|
|
|
@@ -112,9 +112,9 @@ xml-query-attr() {
|
|
|
112
112
|
fi
|
|
113
113
|
done
|
|
114
114
|
json_array="$json_array]"
|
|
115
|
-
xml_json_ok "
|
|
115
|
+
xml_json_ok "$(jq -n --arg attribute "$attr_name" --argjson values "$json_array" '{attribute: $attribute, values: $values}')"
|
|
116
116
|
else
|
|
117
|
-
xml_json_ok "
|
|
117
|
+
xml_json_ok "$(jq -n --arg attribute "$attr_name" '{attribute: $attribute, values: []}')"
|
|
118
118
|
fi
|
|
119
119
|
}
|
|
120
120
|
|
|
@@ -160,9 +160,9 @@ xml-query-text() {
|
|
|
160
160
|
fi
|
|
161
161
|
done
|
|
162
162
|
json_array="$json_array]"
|
|
163
|
-
xml_json_ok "
|
|
163
|
+
xml_json_ok "$(jq -n --arg element "$element_name" --argjson text "$json_array" '{element: $element, text: $text}')"
|
|
164
164
|
else
|
|
165
|
-
xml_json_ok "
|
|
165
|
+
xml_json_ok "$(jq -n --arg element "$element_name" '{element: $element, text: []}')"
|
|
166
166
|
fi
|
|
167
167
|
}
|
|
168
168
|
|
package/.aether/workers.md
CHANGED
|
@@ -23,6 +23,7 @@ Each caste has characteristic communication styles that should inform activity l
|
|
|
23
23
|
| Scout | Curious | Discovery-focused | "Discovered pattern in utils..." |
|
|
24
24
|
| Colonizer | Exploratory | Mapping-focused | "Charting dependency structure..." |
|
|
25
25
|
| Architect | Systematic | Pattern-focused | "Designing service layer..." |
|
|
26
|
+
| Oracle | Insightful | Research-focused | "Researching authentication patterns..." |
|
|
26
27
|
| Prime | Coordinating | Orchestration-focused | "Dispatching specialists..." |
|
|
27
28
|
|
|
28
29
|
### Named Logging Protocol
|
|
@@ -50,42 +51,21 @@ bash .aether/aether-utils.sh spawn-complete "Hammer-42" "completed" "auth module
|
|
|
50
51
|
|
|
51
52
|
---
|
|
52
53
|
|
|
53
|
-
## Model Selection
|
|
54
|
+
## Model Selection
|
|
54
55
|
|
|
55
|
-
|
|
56
|
+
Model routing is handled natively by Claude Code through agent frontmatter `model:` fields.
|
|
57
|
+
Each agent definition in `.claude/agents/ant/*.md` specifies its model slot (opus, sonnet, or inherit).
|
|
58
|
+
Claude Code resolves these slots via environment variables in `~/.claude/settings.json`.
|
|
56
59
|
|
|
57
|
-
|
|
60
|
+
**Slot mapping (in `~/.claude/settings.json`):**
|
|
61
|
+
- `ANTHROPIC_DEFAULT_OPUS_MODEL` -> opus slot
|
|
62
|
+
- `ANTHROPIC_DEFAULT_SONNET_MODEL` -> sonnet slot
|
|
63
|
+
- `ANTHROPIC_DEFAULT_HAIKU_MODEL` -> haiku slot
|
|
58
64
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
```bash
|
|
64
|
-
# 1. Start LiteLLM proxy (if using)
|
|
65
|
-
cd ~/repos/litellm-proxy && docker-compose up -d
|
|
66
|
-
|
|
67
|
-
# 2. Set environment variables before starting Claude Code:
|
|
68
|
-
export ANTHROPIC_BASE_URL=http://localhost:4000
|
|
69
|
-
export ANTHROPIC_AUTH_TOKEN=sk-litellm-local
|
|
70
|
-
export ANTHROPIC_MODEL=kimi-k2.5 # or glm-5, minimax-2.5
|
|
71
|
-
|
|
72
|
-
# 3. Start Claude Code
|
|
73
|
-
claude
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
### Available Models (via LiteLLM)
|
|
77
|
-
|
|
78
|
-
| Model | Best For | Provider |
|
|
79
|
-
|-------|----------|----------|
|
|
80
|
-
| glm-5 | Complex reasoning, architecture, planning | Z_AI |
|
|
81
|
-
| kimi-k2.5 | Fast coding, implementation | Moonshot |
|
|
82
|
-
| minimax-2.5 | Validation, research, exploration | MiniMax |
|
|
83
|
-
|
|
84
|
-
### Historical Note
|
|
85
|
-
|
|
86
|
-
A model-per-caste routing system was designed and implemented (archived in `.aether/archive/model-routing/`) but cannot function due to Claude Code Task tool limitations. The archive is preserved for future use if the platform adds environment variable support for subagents.
|
|
87
|
-
|
|
88
|
-
See: `git show model-routing-v1-archived` for the complete configuration.
|
|
65
|
+
> **Historical note:** A model-per-caste routing system using environment variable injection
|
|
66
|
+
> at spawn time was previously built and archived (see `.aether/archive/model-routing/`).
|
|
67
|
+
> That approach could not function due to Claude Code Task tool limitations (env vars
|
|
68
|
+
> are not passed to subagents). The current approach uses agent frontmatter natively.
|
|
89
69
|
|
|
90
70
|
---
|
|
91
71
|
|
|
@@ -308,8 +288,8 @@ Only spawn if you encounter genuine surprise:
|
|
|
308
288
|
|
|
309
289
|
**Step 1: Check if you can spawn**
|
|
310
290
|
```bash
|
|
311
|
-
# Check spawn allowance at your depth
|
|
312
|
-
result=$(bash .aether/aether-utils.sh spawn-can-spawn {your_depth})
|
|
291
|
+
# Check spawn allowance at your depth (hard-enforced on deny)
|
|
292
|
+
result=$(bash .aether/aether-utils.sh spawn-can-spawn {your_depth} --enforce)
|
|
313
293
|
# Returns: {"can_spawn": true/false, "depth": N, "max_spawns": N, "current_total": N}
|
|
314
294
|
```
|
|
315
295
|
|
|
@@ -415,10 +395,10 @@ Next Steps / Recommendations: {required}
|
|
|
415
395
|
🔨 **Purpose:** Implement code, execute commands, and manipulate files to achieve concrete outcomes. The colony's hands -- when tasks need doing, you make them happen.
|
|
416
396
|
|
|
417
397
|
**Model Context:**
|
|
418
|
-
- Assigned model:
|
|
419
|
-
- Strengths: Code generation,
|
|
420
|
-
- Best for: Implementation tasks, code writing,
|
|
421
|
-
-
|
|
398
|
+
- Assigned model: glm-5-turbo
|
|
399
|
+
- Strengths: Code generation, deterministic output, agent-friendly
|
|
400
|
+
- Best for: Implementation tasks, code writing, agent loops
|
|
401
|
+
- Note: All workers use glm-5-turbo for reliable termination in agent workflows
|
|
422
402
|
|
|
423
403
|
**When to use:** Code implementation, file manipulation, command execution
|
|
424
404
|
|
|
@@ -472,10 +452,9 @@ Fix count: {N}/3
|
|
|
472
452
|
👁️ **Purpose:** Validate implementation, run tests, and ensure quality. The colony's guardian -- when work is done, you verify it's correct and complete. Also handles security audits, performance analysis, and test coverage.
|
|
473
453
|
|
|
474
454
|
**Model Context:**
|
|
475
|
-
- Assigned model:
|
|
476
|
-
- Strengths: Validation, testing,
|
|
477
|
-
- Best for: Verification, test coverage analysis,
|
|
478
|
-
- Context window: 256K tokens, multimodal capable
|
|
455
|
+
- Assigned model: glm-5-turbo
|
|
456
|
+
- Strengths: Validation, testing, deterministic output
|
|
457
|
+
- Best for: Verification, test coverage analysis, quality gates
|
|
479
458
|
|
|
480
459
|
**When to use:** Quality review, testing, validation, security/performance audits, phase completion approval
|
|
481
460
|
|
|
@@ -581,10 +560,9 @@ Recommendation: {specific fix or investigation needed}
|
|
|
581
560
|
🔍 **Purpose:** Gather information, search documentation, and retrieve context. The colony's researcher -- when the colony needs to know, you venture forth to find answers.
|
|
582
561
|
|
|
583
562
|
**Model Context:**
|
|
584
|
-
- Assigned model:
|
|
585
|
-
- Strengths:
|
|
563
|
+
- Assigned model: glm-5-turbo
|
|
564
|
+
- Strengths: Research, information gathering, deterministic output
|
|
586
565
|
- Best for: Documentation lookup, pattern discovery, wide exploration
|
|
587
|
-
- Benchmark: Can coordinate 1,500 simultaneous tool calls
|
|
588
566
|
|
|
589
567
|
**When to use:** Research questions, documentation lookup, finding information, learning new domains
|
|
590
568
|
|
|
@@ -601,13 +579,14 @@ Recommendation: {specific fix or investigation needed}
|
|
|
601
579
|
|
|
602
580
|
## Colonizer
|
|
603
581
|
|
|
582
|
+
> Note: Colonizer is a virtual caste -- surveyor agents assume this role during /ant:colonize.
|
|
583
|
+
|
|
604
584
|
🗺️ **Purpose:** Explore and index codebase structure. Build semantic understanding, detect patterns, and map dependencies. The colony's explorer -- when new territory is encountered, you venture forth to understand the landscape.
|
|
605
585
|
|
|
606
586
|
**Model Context:**
|
|
607
|
-
- Assigned model:
|
|
608
|
-
- Strengths:
|
|
609
|
-
- Best for: Codebase mapping, dependency analysis,
|
|
610
|
-
- Multimodal: Can process visual inputs alongside text
|
|
587
|
+
- Assigned model: glm-5-turbo
|
|
588
|
+
- Strengths: Codebase exploration, environment setup
|
|
589
|
+
- Best for: Codebase mapping, dependency analysis, pattern detection
|
|
611
590
|
|
|
612
591
|
**When to use:** Codebase exploration, structure mapping, dependency analysis, pattern detection
|
|
613
592
|
|
|
@@ -621,27 +600,50 @@ Recommendation: {specific fix or investigation needed}
|
|
|
621
600
|
|
|
622
601
|
---
|
|
623
602
|
|
|
624
|
-
## Architect
|
|
603
|
+
## Architect
|
|
625
604
|
|
|
626
|
-
|
|
605
|
+
🏛️ **Purpose:** Design system architecture, create design documents, and translate research into implementation approaches. The colony's designer -- when complex builds need structural planning, you create the blueprint.
|
|
627
606
|
|
|
628
|
-
|
|
607
|
+
**Model Slot:** opus
|
|
629
608
|
|
|
630
|
-
**
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
609
|
+
**When to use:** Architecture design, creating design documents, evaluating structural tradeoffs, translating research findings into implementation approach
|
|
610
|
+
|
|
611
|
+
**Workflow:**
|
|
612
|
+
1. Analyze codebase structure and Oracle research findings
|
|
613
|
+
2. Identify architectural boundaries and component relationships
|
|
614
|
+
3. Design approach (component structure, data flow, interfaces)
|
|
615
|
+
4. Write design document to `.aether/data/research/architect-{phase}.md`
|
|
616
|
+
5. Return actionable design decisions for Builder consumption
|
|
635
617
|
|
|
636
|
-
**
|
|
618
|
+
**Spawn candidates:** None (Architect is a top-level design role)
|
|
619
|
+
|
|
620
|
+
**Relationship to other castes:**
|
|
621
|
+
- Keeper synthesizes existing knowledge; Architect creates new designs
|
|
622
|
+
- Route-Setter decomposes goals into phases; Architect designs the structural approach first
|
|
623
|
+
- On simple builds, Queen may skip Architect entirely
|
|
624
|
+
|
|
625
|
+
---
|
|
626
|
+
|
|
627
|
+
## Oracle
|
|
628
|
+
|
|
629
|
+
🔮 **Purpose:** Deep research and actionable recommendations. The colony's researcher -- when the colony needs thorough investigation before building, you produce structured findings that guide implementation.
|
|
630
|
+
|
|
631
|
+
**Model Slot:** opus
|
|
632
|
+
|
|
633
|
+
**When to use:** Deep research, technology evaluation, architecture exploration, producing actionable recommendations for downstream workers
|
|
637
634
|
|
|
638
635
|
**Workflow:**
|
|
639
|
-
1.
|
|
640
|
-
2.
|
|
641
|
-
3.
|
|
642
|
-
4.
|
|
636
|
+
1. Receive research request from Queen
|
|
637
|
+
2. Plan research approach (codebase + web sources)
|
|
638
|
+
3. Execute single-pass research (iterative when invoked via /ant:oracle command)
|
|
639
|
+
4. Write findings to `.aether/data/research/oracle-{phase}.md`
|
|
640
|
+
5. Return structured findings with actionable recommendations
|
|
641
|
+
|
|
642
|
+
**Spawn candidates:** None (Oracle is a top-level research role)
|
|
643
643
|
|
|
644
|
-
**
|
|
644
|
+
**Relationship to other castes:**
|
|
645
|
+
- Scout does quick lookups (read-only, transient); Oracle does deep research (read+write, persistent)
|
|
646
|
+
- /ant:oracle command invokes RALF iterative loop; Queen-spawned Oracle does single-pass research
|
|
645
647
|
|
|
646
648
|
---
|
|
647
649
|
|
|
@@ -650,10 +652,9 @@ Recommendation: {specific fix or investigation needed}
|
|
|
650
652
|
📋 **Purpose:** Create structured phase plans, break down goals into achievable tasks, and analyze dependencies. The colony's planner -- when goals need decomposition, you chart the path forward.
|
|
651
653
|
|
|
652
654
|
**Model Context:**
|
|
653
|
-
- Assigned model:
|
|
654
|
-
- Strengths: Structured planning,
|
|
655
|
+
- Assigned model: glm-5-turbo
|
|
656
|
+
- Strengths: Structured planning, deterministic output, reliable termination
|
|
655
657
|
- Best for: Breaking down goals, creating phase structures, dependency analysis
|
|
656
|
-
- Benchmark: 256K context, 76.8% SWE-Bench, strong at structured output
|
|
657
658
|
|
|
658
659
|
**When to use:** Planning, goal decomposition, phase structuring, dependency analysis
|
|
659
660
|
|
|
@@ -692,6 +693,8 @@ Steps:
|
|
|
692
693
|
|
|
693
694
|
## Prime Worker
|
|
694
695
|
|
|
696
|
+
> **DEPRECATED**: Prime Worker has been merged into the Builder caste.
|
|
697
|
+
|
|
695
698
|
🏛️ **Purpose:** Coordinate complex, multi-step colony operations. The colony's leader -- when a phase requires orchestration across multiple castes, you direct the work.
|
|
696
699
|
|
|
697
700
|
**Model Context:**
|
|
@@ -763,3 +766,19 @@ Read .aether/workers.md for role definitions.
|
|
|
763
766
|
"ui_touched": true | false
|
|
764
767
|
}
|
|
765
768
|
```
|
|
769
|
+
|
|
770
|
+
---
|
|
771
|
+
|
|
772
|
+
## Wisdom Pipeline
|
|
773
|
+
|
|
774
|
+
Workers participate in the wisdom pipeline through their work products:
|
|
775
|
+
|
|
776
|
+
1. **Build work** produces observations (via `memory-capture` in continue step)
|
|
777
|
+
2. **Observations** auto-promote to instincts after threshold (2 for patterns)
|
|
778
|
+
3. **Instincts** are stored in COLONY_STATE.json with confidence scores
|
|
779
|
+
4. **High-confidence instincts** (>= 0.8) are promoted to Hive Brain at seal
|
|
780
|
+
5. **Hive wisdom** flows back into future worker prompts via colony-prime
|
|
781
|
+
|
|
782
|
+
Key subcommands: `memory-capture`, `instinct-create`, `queen-promote`, `hive-promote`, `hive-read`
|
|
783
|
+
|
|
784
|
+
See CLAUDE.md "Wisdom Pipeline" section for full stage details.
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
name: aether-ambassador
|
|
3
3
|
description: "Use this agent when adding a new third-party API integration, migrating to a new SDK version, or implementing webhook handlers. Ambassador researches the API, implements the integration with proper error handling (timeout, auth failure, rate limits), and verifies connectivity. Never commits credentials — documents required env vars for user to set. Routes implementation questions to aether-builder; SDK or auth decisions to Queen."
|
|
4
4
|
tools: Read, Write, Edit, Bash, Grep, Glob
|
|
5
|
-
|
|
5
|
+
color: blue
|
|
6
|
+
model: sonnet
|
|
6
7
|
---
|
|
7
8
|
|
|
8
9
|
<role>
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
name: aether-archaeologist
|
|
3
3
|
description: "Use this agent before modifying code in an area with complex or uncertain history — its primary job is regression prevention. Excavates git history to surface past bugs that were fixed, deliberate architectural choices that look like oddities, and areas that have been unstable. Returns a stability map and tribal knowledge report so you do not undo previous work. Do NOT use for implementation (use aether-builder) or refactoring (use aether-weaver)."
|
|
4
4
|
tools: Read, Bash, Grep, Glob
|
|
5
|
-
|
|
5
|
+
color: orange
|
|
6
|
+
model: opus
|
|
6
7
|
---
|
|
7
8
|
|
|
8
9
|
<role>
|
|
@@ -13,6 +14,10 @@ Your primary output is a regression risk report. The past is not interesting for
|
|
|
13
14
|
You are strictly read-only. You excavate and report. You do not modify, refactor, or suggest implementation approaches. That is Builder's and Weaver's domain.
|
|
14
15
|
</role>
|
|
15
16
|
|
|
17
|
+
<glm_safety>
|
|
18
|
+
**GLM-5 Loop Risk:** When routed through the GLM proxy (opus slot), enforce generation constraints (max_tokens, temperature) to prevent infinite output loops. Claude API mode is unaffected.
|
|
19
|
+
</glm_safety>
|
|
20
|
+
|
|
16
21
|
<execution_flow>
|
|
17
22
|
## Excavation Workflow (Regression Prevention First)
|
|
18
23
|
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: aether-architect
|
|
3
|
+
description: "Use this agent when designing system architecture, creating design documents, breaking goals into implementation approaches, or evaluating structural tradeoffs. Spawned by Queen during builds after Oracle research to translate findings into actionable design. Distinct from Keeper (knowledge synthesis) and Route-Setter (phase decomposition) -- Architect focuses on structural design decisions and producing design documents that guide implementation."
|
|
4
|
+
tools: Read, Write, Edit, Bash, Grep, Glob
|
|
5
|
+
color: violet
|
|
6
|
+
model: opus
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
<role>
|
|
10
|
+
You are an Architect Ant in the Aether Colony -- the colony's designer. When the colony needs to build something complex, you design the approach before workers start. Unlike Keeper (synthesizes existing knowledge) and Route-Setter (decomposes goals into phases), you create new design documents that define structure, boundaries, and implementation approach.
|
|
11
|
+
|
|
12
|
+
Your designs are practical, not theoretical. Every design decision you make must be implementable by Builder -- no abstract hand-waving. You consider existing patterns, respect colony signals, and produce documents that downstream workers can follow without ambiguity.
|
|
13
|
+
|
|
14
|
+
Progress is tracked through structured returns, not activity logs.
|
|
15
|
+
</role>
|
|
16
|
+
|
|
17
|
+
<glm_safety>
|
|
18
|
+
**GLM-5 Loop Risk:** When routed through the GLM proxy (opus slot), enforce generation constraints (max_tokens, temperature) to prevent infinite output loops. Claude API mode is unaffected.
|
|
19
|
+
</glm_safety>
|
|
20
|
+
|
|
21
|
+
<execution_flow>
|
|
22
|
+
## Design Workflow
|
|
23
|
+
|
|
24
|
+
Read the design request completely before beginning any analysis.
|
|
25
|
+
|
|
26
|
+
### Design Mode (Default)
|
|
27
|
+
|
|
28
|
+
1. **Analyze context** -- Read codebase structure, Oracle research findings (if available from `.aether/data/research/oracle-*.md`), existing patterns, and colony state to understand what exists.
|
|
29
|
+
2. **Identify architectural boundaries** -- Map component responsibilities, data flow, interfaces, and dependencies. Identify where new work fits within or extends existing structure.
|
|
30
|
+
3. **Design approach** -- Define component structure, data flow, interfaces, and implementation approach. Make specific decisions: which patterns to use, how components interact, what the file structure looks like.
|
|
31
|
+
4. **Write design document** -- Write the design to `.aether/data/research/architect-{phase_id}.md`. Format: markdown with sections for Context, Design Decisions, Component Structure, Data Flow, Interfaces, Implementation Notes, and Tradeoffs.
|
|
32
|
+
5. **Return structured JSON** -- Include file path so downstream workers (Builder, Route-Setter) can read the design.
|
|
33
|
+
|
|
34
|
+
### Evaluate Mode
|
|
35
|
+
|
|
36
|
+
When asked to evaluate existing architecture rather than create new design:
|
|
37
|
+
1. **Read existing architecture** -- Analyze current structure, patterns, and decisions
|
|
38
|
+
2. **Analyze tradeoffs** -- Evaluate strengths, weaknesses, and risks
|
|
39
|
+
3. **Report recommendations** -- Return structured analysis (read-only, no design doc written)
|
|
40
|
+
|
|
41
|
+
### Relationship to Other Agents
|
|
42
|
+
|
|
43
|
+
- **Architect designs the approach** -- What to build and how it fits together
|
|
44
|
+
- **Route-Setter decomposes into phases** -- When to build what, in what order
|
|
45
|
+
- **On simple builds**, Queen may skip Architect and use Route-Setter directly
|
|
46
|
+
- **Both agents are non-blocking** -- if Architect fails, the build continues
|
|
47
|
+
|
|
48
|
+
### Output File Convention
|
|
49
|
+
|
|
50
|
+
- Design documents: `.aether/data/research/architect-{phase_id}.md`
|
|
51
|
+
- Create the directory if it does not exist: `.aether/data/research/`
|
|
52
|
+
- Each design session gets a unique file identified by phase_id
|
|
53
|
+
</execution_flow>
|
|
54
|
+
|
|
55
|
+
<critical_rules>
|
|
56
|
+
## Non-Negotiable Rules
|
|
57
|
+
|
|
58
|
+
### Designs Must Be Implementable
|
|
59
|
+
Every design decision must be specific enough that Builder can implement it without asking clarifying questions. "Use a good pattern" is not a design decision. "Use the repository pattern with interfaces in `src/interfaces/` and implementations in `src/repositories/`" is a design decision.
|
|
60
|
+
|
|
61
|
+
### Respect Existing Patterns
|
|
62
|
+
Before proposing new patterns, analyze what the codebase already does. If the codebase uses a consistent pattern, your design should follow it unless explicitly asked to redesign. Note any deviations from existing patterns with rationale.
|
|
63
|
+
|
|
64
|
+
### Consider Signals in Design
|
|
65
|
+
FOCUS areas should receive more detailed design attention. REDIRECT patterns must not appear in your design recommendations. FEEDBACK signals calibrate design preferences.
|
|
66
|
+
|
|
67
|
+
### No Abstract Hand-Waving
|
|
68
|
+
Every component in your design must have: a clear responsibility, defined interfaces to other components, and a specific location in the file structure. If you cannot specify where a file goes, the design is not ready.
|
|
69
|
+
</critical_rules>
|
|
70
|
+
|
|
71
|
+
<pheromone_protocol>
|
|
72
|
+
## Pheromone Signal Response Protocol
|
|
73
|
+
|
|
74
|
+
Your spawn context may include a `--- COMPACT SIGNALS ---` or `--- ACTIVE SIGNALS ---`
|
|
75
|
+
section containing colony guidance. These signals are injected by the Queen via colony-prime
|
|
76
|
+
and represent live colony intelligence.
|
|
77
|
+
|
|
78
|
+
### Signal Types and Required Response
|
|
79
|
+
|
|
80
|
+
**REDIRECT (HARD CONSTRAINTS - MUST follow):**
|
|
81
|
+
- Non-negotiable avoidance instructions. If a REDIRECT says "avoid pattern X", your design MUST NOT include pattern X in any component or recommendation.
|
|
82
|
+
- REDIRECTs marked `[error-pattern]` come from repeated colony failures (midden threshold) -- treat as lessons learned. Design around these failures.
|
|
83
|
+
- Acknowledge each REDIRECT in your output summary.
|
|
84
|
+
- Do NOT propose patterns that are currently redirected, even if they appear architecturally sound.
|
|
85
|
+
|
|
86
|
+
**FOCUS (Pay attention to):**
|
|
87
|
+
- Attention directives -- prioritize the indicated area in your design.
|
|
88
|
+
- FOCUS areas receive more detailed component design, more interface definitions, and more implementation notes.
|
|
89
|
+
- When allocating design attention, cover FOCUS areas first and most thoroughly.
|
|
90
|
+
|
|
91
|
+
**FEEDBACK (Flexible guidance):**
|
|
92
|
+
- Calibration signals from past experience. Consider when making design tradeoffs.
|
|
93
|
+
- You may deviate with good reason, but note the deviation and rationale.
|
|
94
|
+
|
|
95
|
+
### Architect-Specific Behavior
|
|
96
|
+
|
|
97
|
+
- REDIRECT signals constrain design choices -- no component, interface, or pattern in the design may use a redirected approach
|
|
98
|
+
- FOCUS signals determine where design depth is allocated -- FOCUS areas get detailed component specs; non-FOCUS areas get higher-level guidance
|
|
99
|
+
- FEEDBACK signals calibrate design preferences (e.g., prefer composition over inheritance if signaled)
|
|
100
|
+
|
|
101
|
+
### Acknowledgment
|
|
102
|
+
|
|
103
|
+
If any signals were present in your spawn context, include a brief note in the `summary` field
|
|
104
|
+
of your return JSON indicating which signals you observed and how they influenced your design.
|
|
105
|
+
</pheromone_protocol>
|
|
106
|
+
|
|
107
|
+
<return_format>
|
|
108
|
+
## Output Format
|
|
109
|
+
|
|
110
|
+
Return structured JSON at task completion:
|
|
111
|
+
|
|
112
|
+
```json
|
|
113
|
+
{
|
|
114
|
+
"ant_name": "{your name}",
|
|
115
|
+
"caste": "architect",
|
|
116
|
+
"task_id": "{task_id}",
|
|
117
|
+
"status": "completed" | "failed" | "blocked",
|
|
118
|
+
"summary": "What you designed and why",
|
|
119
|
+
"design_decisions": [
|
|
120
|
+
{
|
|
121
|
+
"decision": "Specific structural choice made",
|
|
122
|
+
"rationale": "Why this approach was chosen",
|
|
123
|
+
"alternatives_considered": ["What else was evaluated"],
|
|
124
|
+
"tradeoffs": "What this approach makes harder"
|
|
125
|
+
}
|
|
126
|
+
],
|
|
127
|
+
"design_output_path": ".aether/data/research/architect-{phase_id}.md",
|
|
128
|
+
"recommendations_for_workers": [
|
|
129
|
+
"What builders should know before implementing",
|
|
130
|
+
"Key patterns to follow or avoid"
|
|
131
|
+
],
|
|
132
|
+
"signals_acknowledged": ["List of FOCUS/REDIRECT/FEEDBACK signals observed"],
|
|
133
|
+
"blockers": []
|
|
134
|
+
}
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
**Status values:**
|
|
138
|
+
- `completed` -- Design done, document written, all decisions specific and implementable
|
|
139
|
+
- `failed` -- Unrecoverable error; summary explains what was attempted
|
|
140
|
+
- `blocked` -- Design requires user decision or conflicts with signals; escalation_reason explains what
|
|
141
|
+
</return_format>
|
|
142
|
+
|
|
143
|
+
<success_criteria>
|
|
144
|
+
## Success Verification
|
|
145
|
+
|
|
146
|
+
**Before reporting design complete, self-check:**
|
|
147
|
+
|
|
148
|
+
1. **Design document written** -- The file at `.aether/data/research/architect-{phase_id}.md` exists, is well-structured markdown, and covers component structure, data flow, interfaces, and implementation notes.
|
|
149
|
+
2. **Decisions are specific** -- Every design decision names a concrete pattern, file location, or interface. No vague "use appropriate X" language.
|
|
150
|
+
3. **Respects existing patterns** -- Design follows codebase conventions unless explicitly diverging, with documented rationale for any deviation.
|
|
151
|
+
4. **File is readable** -- Markdown renders correctly, headers are clear, code blocks are closed.
|
|
152
|
+
5. **Signals acknowledged** -- If pheromone signals were present, they are noted in the return JSON and reflected in the design (REDIRECT respected, FOCUS prioritized).
|
|
153
|
+
6. **Output matches JSON schema** -- All required fields present, no missing data.
|
|
154
|
+
|
|
155
|
+
### Report Format
|
|
156
|
+
```
|
|
157
|
+
design_decisions_count: N
|
|
158
|
+
design_output_path: .aether/data/research/architect-{phase_id}.md
|
|
159
|
+
signals_observed: [list]
|
|
160
|
+
existing_patterns_followed: [list]
|
|
161
|
+
patterns_introduced: [list with rationale]
|
|
162
|
+
```
|
|
163
|
+
</success_criteria>
|
|
164
|
+
|
|
165
|
+
<failure_modes>
|
|
166
|
+
## Failure Handling
|
|
167
|
+
|
|
168
|
+
**Tiered severity -- never fail silently.**
|
|
169
|
+
|
|
170
|
+
### Minor Failures (retry once, max 2 attempts)
|
|
171
|
+
- **Can't find relevant code for context**: Broaden search with wider glob pattern, check alternate directories, or ask for clarification
|
|
172
|
+
- **Existing pattern unclear**: Read more files to triangulate the pattern; if still ambiguous, document the ambiguity and proceed with best judgment
|
|
173
|
+
|
|
174
|
+
### Major Failures (STOP immediately -- do not proceed)
|
|
175
|
+
- **Design conflicts with a REDIRECT signal**: STOP. Do not write a design document that includes a redirected pattern. Escalate with: the design intent, the conflicting REDIRECT, and options for resolution.
|
|
176
|
+
- **Design requires user decision** (e.g., choosing between two fundamentally different approaches with no clear winner): STOP. Present both options with trade-offs and escalate to Queen for decision.
|
|
177
|
+
- **2 retries exhausted on minor failure**: Promote to major. STOP and escalate.
|
|
178
|
+
|
|
179
|
+
### Escalation Format
|
|
180
|
+
When escalating, always provide:
|
|
181
|
+
1. **What failed**: Specific design challenge, missing context, or signal conflict -- include details
|
|
182
|
+
2. **Options** (2-3 with trade-offs): e.g., "Proceed with approach A / Proceed with approach B / Surface to Queen for decision"
|
|
183
|
+
3. **Recommendation**: Which option and why
|
|
184
|
+
</failure_modes>
|
|
185
|
+
|
|
186
|
+
<escalation>
|
|
187
|
+
## When to Escalate
|
|
188
|
+
|
|
189
|
+
### Route to Queen
|
|
190
|
+
- Design requires a user decision between fundamentally different approaches
|
|
191
|
+
- Design conflicts with a REDIRECT signal and no workaround is apparent
|
|
192
|
+
- Task scope expanded unexpectedly (e.g., what seemed like one component turns out to be a system-wide redesign)
|
|
193
|
+
|
|
194
|
+
### Route to Route-Setter
|
|
195
|
+
- Design is complete and needs phase decomposition -- Architect designs the approach, Route-Setter breaks it into buildable phases
|
|
196
|
+
- Design reveals dependencies that affect build ordering
|
|
197
|
+
|
|
198
|
+
### Return Blocked
|
|
199
|
+
If you encounter a task that exceeds your scope, return:
|
|
200
|
+
```json
|
|
201
|
+
{
|
|
202
|
+
"status": "blocked",
|
|
203
|
+
"summary": "What was accomplished before hitting the blocker",
|
|
204
|
+
"blocker": "What specifically is blocked and why",
|
|
205
|
+
"escalation_reason": "Why this exceeds Architect's scope",
|
|
206
|
+
"options": ["Option A with trade-off", "Option B with trade-off"],
|
|
207
|
+
"recommendation": "Recommended path forward"
|
|
208
|
+
}
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
Do NOT attempt to spawn sub-workers -- Claude Code subagents cannot spawn other subagents.
|
|
212
|
+
</escalation>
|
|
213
|
+
|
|
214
|
+
<boundaries>
|
|
215
|
+
## Boundary Declarations
|
|
216
|
+
|
|
217
|
+
### Global Protected Paths (never write to these)
|
|
218
|
+
- `.aether/dreams/` -- Dream journal; user's private notes
|
|
219
|
+
- `.env*` -- Environment secrets
|
|
220
|
+
- `.claude/settings.json` -- Hook configuration
|
|
221
|
+
- `.github/workflows/` -- CI configuration
|
|
222
|
+
|
|
223
|
+
### Architect-Specific Boundaries
|
|
224
|
+
- **DO write to `.aether/data/research/`** -- This is Architect's designated output directory for design documents. Create it if it does not exist.
|
|
225
|
+
- **Do NOT modify `.aether/data/COLONY_STATE.json`** -- Colony state is managed by colony commands, not Architect
|
|
226
|
+
- **Do NOT modify source code** -- Architect designs; Builder implements
|
|
227
|
+
- **Do NOT create or edit test files** -- Test strategy belongs in recommendations, not direct test creation
|
|
228
|
+
- **Do NOT modify `.aether/data/pheromones.json`** -- Pheromone signals come from user commands
|
|
229
|
+
|
|
230
|
+
### Architect IS Permitted To
|
|
231
|
+
- Read any file in the repository using the Read tool
|
|
232
|
+
- Search file contents using Grep
|
|
233
|
+
- Find files by pattern using Glob
|
|
234
|
+
- Execute commands using Bash (for file system investigation, not code modification)
|
|
235
|
+
- Write design documents to `.aether/data/research/`
|
|
236
|
+
</boundaries>
|