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.
Files changed (317) hide show
  1. package/.aether/aether-utils.sh +3226 -3345
  2. package/.aether/agents-claude/aether-ambassador.md +265 -0
  3. package/.aether/agents-claude/aether-archaeologist.md +327 -0
  4. package/.aether/agents-claude/aether-architect.md +236 -0
  5. package/.aether/agents-claude/aether-auditor.md +271 -0
  6. package/.aether/agents-claude/aether-builder.md +224 -0
  7. package/.aether/agents-claude/aether-chaos.md +269 -0
  8. package/.aether/agents-claude/aether-chronicler.md +305 -0
  9. package/.aether/agents-claude/aether-gatekeeper.md +330 -0
  10. package/.aether/agents-claude/aether-includer.md +374 -0
  11. package/.aether/agents-claude/aether-keeper.md +272 -0
  12. package/.aether/agents-claude/aether-measurer.md +322 -0
  13. package/.aether/agents-claude/aether-oracle.md +237 -0
  14. package/.aether/agents-claude/aether-probe.md +211 -0
  15. package/.aether/agents-claude/aether-queen.md +330 -0
  16. package/.aether/agents-claude/aether-route-setter.md +178 -0
  17. package/.aether/agents-claude/aether-sage.md +418 -0
  18. package/.aether/agents-claude/aether-scout.md +179 -0
  19. package/.aether/agents-claude/aether-surveyor-disciplines.md +417 -0
  20. package/.aether/agents-claude/aether-surveyor-nest.md +355 -0
  21. package/.aether/agents-claude/aether-surveyor-pathogens.md +289 -0
  22. package/.aether/agents-claude/aether-surveyor-provisions.md +360 -0
  23. package/.aether/agents-claude/aether-tracker.md +270 -0
  24. package/.aether/agents-claude/aether-watcher.md +280 -0
  25. package/.aether/agents-claude/aether-weaver.md +248 -0
  26. package/.aether/commands/archaeology.yaml +653 -0
  27. package/.aether/commands/build.yaml +1221 -0
  28. package/.aether/commands/chaos.yaml +653 -0
  29. package/.aether/commands/colonize.yaml +442 -0
  30. package/.aether/commands/continue.yaml +1484 -0
  31. package/.aether/commands/council.yaml +509 -0
  32. package/.aether/commands/data-clean.yaml +80 -0
  33. package/.aether/commands/dream.yaml +275 -0
  34. package/.aether/commands/entomb.yaml +863 -0
  35. package/.aether/commands/export-signals.yaml +64 -0
  36. package/.aether/commands/feedback.yaml +158 -0
  37. package/.aether/commands/flag.yaml +160 -0
  38. package/.aether/commands/flags.yaml +177 -0
  39. package/.aether/commands/focus.yaml +112 -0
  40. package/.aether/commands/help.yaml +167 -0
  41. package/.aether/commands/history.yaml +137 -0
  42. package/.aether/commands/import-signals.yaml +79 -0
  43. package/.aether/commands/init.yaml +502 -0
  44. package/.aether/commands/insert-phase.yaml +102 -0
  45. package/.aether/commands/interpret.yaml +285 -0
  46. package/.aether/commands/lay-eggs.yaml +224 -0
  47. package/.aether/commands/maturity.yaml +122 -0
  48. package/.aether/commands/memory-details.yaml +74 -0
  49. package/.aether/commands/migrate-state.yaml +174 -0
  50. package/.aether/commands/oracle.yaml +1224 -0
  51. package/.aether/commands/organize.yaml +446 -0
  52. package/.aether/commands/patrol.yaml +621 -0
  53. package/.aether/commands/pause-colony.yaml +424 -0
  54. package/.aether/commands/phase.yaml +124 -0
  55. package/.aether/commands/pheromones.yaml +153 -0
  56. package/.aether/commands/plan.yaml +1364 -0
  57. package/.aether/commands/preferences.yaml +63 -0
  58. package/.aether/commands/quick.yaml +104 -0
  59. package/.aether/commands/redirect.yaml +123 -0
  60. package/.aether/commands/resume-colony.yaml +375 -0
  61. package/.aether/commands/resume.yaml +407 -0
  62. package/.aether/commands/run.yaml +229 -0
  63. package/.aether/commands/seal.yaml +1214 -0
  64. package/.aether/commands/skill-create.yaml +337 -0
  65. package/.aether/commands/status.yaml +408 -0
  66. package/.aether/commands/swarm.yaml +352 -0
  67. package/.aether/commands/tunnels.yaml +814 -0
  68. package/.aether/commands/update.yaml +131 -0
  69. package/.aether/commands/verify-castes.yaml +159 -0
  70. package/.aether/commands/watch.yaml +454 -0
  71. package/.aether/docs/INCIDENT_TEMPLATE.md +32 -0
  72. package/.aether/docs/QUEEN-SYSTEM.md +11 -11
  73. package/.aether/docs/README.md +32 -2
  74. package/.aether/docs/command-playbooks/README.md +23 -0
  75. package/.aether/docs/command-playbooks/build-complete.md +349 -0
  76. package/.aether/docs/command-playbooks/build-context.md +282 -0
  77. package/.aether/docs/command-playbooks/build-full.md +1683 -0
  78. package/.aether/docs/command-playbooks/build-prep.md +284 -0
  79. package/.aether/docs/command-playbooks/build-verify.md +405 -0
  80. package/.aether/docs/command-playbooks/build-wave.md +749 -0
  81. package/.aether/docs/command-playbooks/continue-advance.md +524 -0
  82. package/.aether/docs/command-playbooks/continue-finalize.md +447 -0
  83. package/.aether/docs/command-playbooks/continue-full.md +1725 -0
  84. package/.aether/docs/command-playbooks/continue-gates.md +686 -0
  85. package/.aether/docs/command-playbooks/continue-verify.md +407 -0
  86. package/.aether/docs/context-continuity.md +84 -0
  87. package/.aether/docs/disciplines/DISCIPLINES.md +9 -7
  88. package/.aether/docs/error-codes.md +1 -1
  89. package/.aether/docs/known-issues.md +34 -173
  90. package/.aether/docs/pheromones.md +86 -6
  91. package/.aether/docs/plans/pheromone-display-plan.md +257 -0
  92. package/.aether/docs/queen-commands.md +10 -9
  93. package/.aether/docs/source-of-truth-map.md +132 -0
  94. package/.aether/docs/xml-utilities.md +47 -0
  95. package/.aether/rules/aether-colony.md +23 -13
  96. package/.aether/scripts/incident-test-add.sh +47 -0
  97. package/.aether/scripts/weekly-audit.sh +79 -0
  98. package/.aether/skills/.index.json +649 -0
  99. package/.aether/skills/colony/.manifest.json +16 -0
  100. package/.aether/skills/colony/build-discipline/SKILL.md +78 -0
  101. package/.aether/skills/colony/colony-interaction/SKILL.md +56 -0
  102. package/.aether/skills/colony/colony-lifecycle/SKILL.md +77 -0
  103. package/.aether/skills/colony/colony-visuals/SKILL.md +112 -0
  104. package/.aether/skills/colony/context-management/SKILL.md +80 -0
  105. package/.aether/skills/colony/error-presentation/SKILL.md +99 -0
  106. package/.aether/skills/colony/pheromone-protocol/SKILL.md +79 -0
  107. package/.aether/skills/colony/pheromone-visibility/SKILL.md +81 -0
  108. package/.aether/skills/colony/state-safety/SKILL.md +84 -0
  109. package/.aether/skills/colony/worker-priming/SKILL.md +82 -0
  110. package/.aether/skills/domain/.manifest.json +24 -0
  111. package/.aether/skills/domain/README.md +33 -0
  112. package/.aether/skills/domain/django/SKILL.md +49 -0
  113. package/.aether/skills/domain/docker/SKILL.md +52 -0
  114. package/.aether/skills/domain/golang/SKILL.md +52 -0
  115. package/.aether/skills/domain/graphql/SKILL.md +51 -0
  116. package/.aether/skills/domain/html-css/SKILL.md +48 -0
  117. package/.aether/skills/domain/nextjs/SKILL.md +45 -0
  118. package/.aether/skills/domain/nodejs/SKILL.md +53 -0
  119. package/.aether/skills/domain/postgresql/SKILL.md +53 -0
  120. package/.aether/skills/domain/prisma/SKILL.md +59 -0
  121. package/.aether/skills/domain/python/SKILL.md +50 -0
  122. package/.aether/skills/domain/rails/SKILL.md +52 -0
  123. package/.aether/skills/domain/react/SKILL.md +45 -0
  124. package/.aether/skills/domain/rest-api/SKILL.md +58 -0
  125. package/.aether/skills/domain/svelte/SKILL.md +47 -0
  126. package/.aether/skills/domain/tailwind/SKILL.md +45 -0
  127. package/.aether/skills/domain/testing/SKILL.md +53 -0
  128. package/.aether/skills/domain/typescript/SKILL.md +58 -0
  129. package/.aether/skills/domain/vue/SKILL.md +49 -0
  130. package/.aether/templates/QUEEN.md.template +23 -41
  131. package/.aether/templates/colony-state-reset.jq.template +1 -0
  132. package/.aether/templates/colony-state.template.json +4 -0
  133. package/.aether/templates/learning-observations.template.json +6 -0
  134. package/.aether/templates/midden.template.json +13 -0
  135. package/.aether/templates/pheromones.template.json +6 -0
  136. package/.aether/templates/session.template.json +9 -0
  137. package/.aether/utils/atomic-write.sh +63 -17
  138. package/.aether/utils/chamber-utils.sh +145 -2
  139. package/.aether/utils/council.sh +425 -0
  140. package/.aether/utils/emoji-audit.sh +166 -0
  141. package/.aether/utils/error-handler.sh +21 -7
  142. package/.aether/utils/file-lock.sh +182 -27
  143. package/.aether/utils/flag.sh +278 -0
  144. package/.aether/utils/hive.sh +572 -0
  145. package/.aether/utils/immune.sh +508 -0
  146. package/.aether/utils/learning.sh +1928 -0
  147. package/.aether/utils/midden.sh +520 -0
  148. package/.aether/utils/oracle/oracle.md +168 -0
  149. package/.aether/utils/oracle/oracle.sh +1023 -0
  150. package/.aether/utils/pheromone.sh +2029 -0
  151. package/.aether/utils/queen.sh +1710 -0
  152. package/.aether/utils/scan.sh +860 -0
  153. package/.aether/utils/semantic-cli.sh +10 -8
  154. package/.aether/utils/session.sh +816 -0
  155. package/.aether/utils/skills.sh +509 -0
  156. package/.aether/utils/spawn-tree.sh +103 -271
  157. package/.aether/utils/spawn.sh +260 -0
  158. package/.aether/utils/state-api.sh +389 -0
  159. package/.aether/utils/state-loader.sh +8 -6
  160. package/.aether/utils/suggest.sh +611 -0
  161. package/.aether/utils/swarm-display.sh +10 -1
  162. package/.aether/utils/swarm.sh +1004 -0
  163. package/.aether/utils/watch-spawn-tree.sh +11 -2
  164. package/.aether/utils/xml-compose.sh +2 -2
  165. package/.aether/utils/xml-convert.sh +9 -5
  166. package/.aether/utils/xml-core.sh +5 -9
  167. package/.aether/utils/xml-query.sh +4 -4
  168. package/.aether/workers.md +86 -67
  169. package/.claude/agents/ant/aether-ambassador.md +2 -1
  170. package/.claude/agents/ant/aether-archaeologist.md +6 -1
  171. package/.claude/agents/ant/aether-architect.md +236 -0
  172. package/.claude/agents/ant/aether-auditor.md +6 -1
  173. package/.claude/agents/ant/aether-builder.md +38 -1
  174. package/.claude/agents/ant/aether-chaos.md +2 -1
  175. package/.claude/agents/ant/aether-chronicler.md +1 -0
  176. package/.claude/agents/ant/aether-gatekeeper.md +6 -1
  177. package/.claude/agents/ant/aether-includer.md +1 -0
  178. package/.claude/agents/ant/aether-keeper.md +1 -0
  179. package/.claude/agents/ant/aether-measurer.md +6 -1
  180. package/.claude/agents/ant/aether-oracle.md +237 -0
  181. package/.claude/agents/ant/aether-probe.md +2 -1
  182. package/.claude/agents/ant/aether-queen.md +6 -1
  183. package/.claude/agents/ant/aether-route-setter.md +6 -1
  184. package/.claude/agents/ant/aether-sage.md +68 -3
  185. package/.claude/agents/ant/aether-scout.md +38 -1
  186. package/.claude/agents/ant/aether-surveyor-disciplines.md +2 -1
  187. package/.claude/agents/ant/aether-surveyor-nest.md +2 -1
  188. package/.claude/agents/ant/aether-surveyor-pathogens.md +2 -1
  189. package/.claude/agents/ant/aether-surveyor-provisions.md +2 -1
  190. package/.claude/agents/ant/aether-tracker.md +6 -1
  191. package/.claude/agents/ant/aether-watcher.md +37 -1
  192. package/.claude/agents/ant/aether-weaver.md +2 -1
  193. package/.claude/commands/ant/archaeology.md +1 -8
  194. package/.claude/commands/ant/build.md +43 -1159
  195. package/.claude/commands/ant/chaos.md +1 -14
  196. package/.claude/commands/ant/colonize.md +3 -14
  197. package/.claude/commands/ant/continue.md +40 -1026
  198. package/.claude/commands/ant/council.md +213 -15
  199. package/.claude/commands/ant/data-clean.md +81 -0
  200. package/.claude/commands/ant/dream.md +12 -9
  201. package/.claude/commands/ant/entomb.md +62 -87
  202. package/.claude/commands/ant/export-signals.md +57 -0
  203. package/.claude/commands/ant/feedback.md +18 -0
  204. package/.claude/commands/ant/flag.md +12 -0
  205. package/.claude/commands/ant/flags.md +22 -8
  206. package/.claude/commands/ant/focus.md +18 -0
  207. package/.claude/commands/ant/help.md +40 -8
  208. package/.claude/commands/ant/history.md +3 -0
  209. package/.claude/commands/ant/import-signals.md +71 -0
  210. package/.claude/commands/ant/init.md +349 -191
  211. package/.claude/commands/ant/insert-phase.md +105 -0
  212. package/.claude/commands/ant/interpret.md +11 -0
  213. package/.claude/commands/ant/lay-eggs.md +167 -158
  214. package/.claude/commands/ant/maturity.md +22 -11
  215. package/.claude/commands/ant/memory-details.md +77 -0
  216. package/.claude/commands/ant/migrate-state.md +6 -0
  217. package/.claude/commands/ant/oracle.md +317 -62
  218. package/.claude/commands/ant/organize.md +10 -5
  219. package/.claude/commands/ant/patrol.md +620 -0
  220. package/.claude/commands/ant/pause-colony.md +8 -22
  221. package/.claude/commands/ant/phase.md +26 -37
  222. package/.claude/commands/ant/pheromones.md +156 -0
  223. package/.claude/commands/ant/plan.md +199 -50
  224. package/.claude/commands/ant/preferences.md +65 -0
  225. package/.claude/commands/ant/quick.md +100 -0
  226. package/.claude/commands/ant/redirect.md +18 -0
  227. package/.claude/commands/ant/resume-colony.md +37 -22
  228. package/.claude/commands/ant/resume.md +60 -7
  229. package/.claude/commands/ant/run.md +231 -0
  230. package/.claude/commands/ant/seal.md +506 -78
  231. package/.claude/commands/ant/skill-create.md +286 -0
  232. package/.claude/commands/ant/status.md +171 -1
  233. package/.claude/commands/ant/swarm.md +11 -23
  234. package/.claude/commands/ant/tunnels.md +1 -0
  235. package/.claude/commands/ant/update.md +58 -135
  236. package/.claude/commands/ant/verify-castes.md +90 -42
  237. package/.claude/commands/ant/watch.md +1 -0
  238. package/.opencode/agents/aether-ambassador.md +1 -1
  239. package/.opencode/agents/aether-architect.md +133 -0
  240. package/.opencode/agents/aether-builder.md +3 -3
  241. package/.opencode/agents/aether-oracle.md +137 -0
  242. package/.opencode/agents/aether-queen.md +1 -1
  243. package/.opencode/agents/aether-route-setter.md +1 -1
  244. package/.opencode/agents/aether-scout.md +1 -1
  245. package/.opencode/agents/aether-surveyor-disciplines.md +6 -1
  246. package/.opencode/agents/aether-surveyor-nest.md +6 -1
  247. package/.opencode/agents/aether-surveyor-pathogens.md +6 -1
  248. package/.opencode/agents/aether-surveyor-provisions.md +6 -1
  249. package/.opencode/agents/aether-tracker.md +1 -1
  250. package/.opencode/agents/aether-watcher.md +1 -1
  251. package/.opencode/agents/aether-weaver.md +1 -1
  252. package/.opencode/commands/ant/archaeology.md +7 -14
  253. package/.opencode/commands/ant/build.md +54 -88
  254. package/.opencode/commands/ant/chaos.md +7 -24
  255. package/.opencode/commands/ant/colonize.md +10 -17
  256. package/.opencode/commands/ant/continue.md +595 -66
  257. package/.opencode/commands/ant/council.md +150 -18
  258. package/.opencode/commands/ant/data-clean.md +77 -0
  259. package/.opencode/commands/ant/dream.md +15 -17
  260. package/.opencode/commands/ant/entomb.md +28 -18
  261. package/.opencode/commands/ant/export-signals.md +54 -0
  262. package/.opencode/commands/ant/feedback.md +24 -5
  263. package/.opencode/commands/ant/flag.md +16 -4
  264. package/.opencode/commands/ant/flags.md +24 -10
  265. package/.opencode/commands/ant/focus.md +22 -5
  266. package/.opencode/commands/ant/help.md +41 -8
  267. package/.opencode/commands/ant/history.md +9 -0
  268. package/.opencode/commands/ant/import-signals.md +68 -0
  269. package/.opencode/commands/ant/init.md +396 -154
  270. package/.opencode/commands/ant/insert-phase.md +111 -0
  271. package/.opencode/commands/ant/interpret.md +16 -0
  272. package/.opencode/commands/ant/lay-eggs.md +184 -112
  273. package/.opencode/commands/ant/maturity.md +18 -2
  274. package/.opencode/commands/ant/memory-details.md +83 -0
  275. package/.opencode/commands/ant/migrate-state.md +12 -0
  276. package/.opencode/commands/ant/oracle.md +322 -67
  277. package/.opencode/commands/ant/organize.md +14 -12
  278. package/.opencode/commands/ant/patrol.md +626 -0
  279. package/.opencode/commands/ant/pause-colony.md +12 -29
  280. package/.opencode/commands/ant/phase.md +30 -40
  281. package/.opencode/commands/ant/pheromones.md +162 -0
  282. package/.opencode/commands/ant/plan.md +210 -57
  283. package/.opencode/commands/ant/preferences.md +71 -0
  284. package/.opencode/commands/ant/quick.md +91 -0
  285. package/.opencode/commands/ant/redirect.md +22 -5
  286. package/.opencode/commands/ant/resume-colony.md +41 -29
  287. package/.opencode/commands/ant/resume.md +80 -20
  288. package/.opencode/commands/ant/run.md +237 -0
  289. package/.opencode/commands/ant/seal.md +230 -25
  290. package/.opencode/commands/ant/skill-create.md +63 -0
  291. package/.opencode/commands/ant/status.md +125 -30
  292. package/.opencode/commands/ant/swarm.md +3 -345
  293. package/.opencode/commands/ant/tunnels.md +3 -9
  294. package/.opencode/commands/ant/update.md +63 -127
  295. package/.opencode/commands/ant/verify-castes.md +96 -42
  296. package/.opencode/commands/ant/watch.md +7 -0
  297. package/CHANGELOG.md +368 -1
  298. package/README.md +195 -324
  299. package/bin/cli.js +236 -429
  300. package/bin/generate-commands.js +186 -0
  301. package/bin/generate-commands.sh +128 -89
  302. package/bin/lib/spawn-logger.js +0 -15
  303. package/bin/lib/update-transaction.js +285 -35
  304. package/bin/npx-install.js +178 -0
  305. package/bin/validate-package.sh +85 -3
  306. package/package.json +16 -4
  307. package/.aether/CONTEXT.md +0 -160
  308. package/.aether/docs/QUEEN.md +0 -84
  309. package/.aether/exchange/colony-registry.xml +0 -11
  310. package/.aether/exchange/pheromones.xml +0 -87
  311. package/.aether/exchange/queen-wisdom.xml +0 -14
  312. package/.aether/model-profiles.yaml +0 -100
  313. package/.aether/utils/spawn-with-model.sh +0 -56
  314. package/bin/lib/model-profiles.js +0 -445
  315. package/bin/lib/model-verify.js +0 -288
  316. package/bin/lib/proxy-health.js +0 -253
  317. package/bin/lib/telemetry.js +0 -441
@@ -0,0 +1,686 @@
1
+ ### Step 1.6: Spawn Enforcement Gate (MANDATORY)
2
+
3
+ **The Iron Law:** No phase advancement without worker spawning for non-trivial phases.
4
+
5
+ Read `.aether/data/spawn-tree.txt` to count spawns for this phase.
6
+
7
+ Run using the Bash tool with description "Verifying spawn requirements...": `spawn_count=$(grep -c "spawned" .aether/data/spawn-tree.txt 2>/dev/null || echo "0") && watcher_count=$(grep -c "watcher" .aether/data/spawn-tree.txt 2>/dev/null || echo "0") && echo "{\"spawn_count\": $spawn_count, \"watcher_count\": $watcher_count}"`
8
+
9
+ **HARD REJECTION - If spawn_count == 0 and phase had 3+ tasks:**
10
+
11
+ ```
12
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
13
+ ⛔🐜 S P A W N G A T E F A I L E D
14
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
15
+
16
+ This phase had {task_count} tasks but spawn_count: 0
17
+ The Prime Worker violated the spawn protocol.
18
+
19
+ 🐜 The colony requires actual parallelism:
20
+ - Prime Worker MUST spawn specialists for non-trivial work
21
+ - A single agent doing everything is NOT a colony
22
+ - "Justifications" for not spawning are not accepted
23
+
24
+ 🔧 Required Actions:
25
+ 1. Run /ant:build {phase} again
26
+ 2. Prime Worker MUST spawn at least 1 specialist
27
+ 3. Re-run /ant:continue after spawns complete
28
+
29
+ The phase will NOT advance until spawning occurs.
30
+ ```
31
+
32
+ **CRITICAL:** Do NOT proceed to Step 1.7. Do NOT advance the phase.
33
+ Log the violation:
34
+ ```bash
35
+ bash .aether/aether-utils.sh activity-log "BLOCKED" "colony" "Spawn gate failed: {task_count} tasks, 0 spawns"
36
+ bash .aether/aether-utils.sh error-flag-pattern "no-spawn-violation" "Prime Worker completed phase without spawning specialists" "critical"
37
+ ```
38
+
39
+ **HARD REJECTION - If watcher_count == 0 (no testing separation):**
40
+
41
+ ```
42
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
43
+ ⛔👁️🐜 W A T C H E R G A T E F A I L E D
44
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
45
+
46
+ No Watcher ant was spawned for testing/verification.
47
+ Testing MUST be performed by a separate agent, not the builder.
48
+
49
+ 🐜 Why this matters:
50
+ - Builders verify their own work = confirmation bias
51
+ - Independent Watchers catch bugs builders miss
52
+ - "Build passing" ≠ "App working"
53
+
54
+ 🔧 Required Actions:
55
+ 1. Run /ant:build {phase} again
56
+ 2. Prime Worker MUST spawn at least 1 Watcher
57
+ 3. Watcher must independently verify the work
58
+
59
+ The phase will NOT advance until a Watcher validates.
60
+ ```
61
+
62
+ **CRITICAL:** Do NOT proceed. Log the violation.
63
+
64
+ **If spawn_count >= 1 AND watcher_count >= 1:**
65
+
66
+ ```
67
+ ✅🐜 SPAWN GATE PASSED — {spawn_count} workers | {watcher_count} watchers
68
+ ```
69
+
70
+ Continue to Step 1.7.
71
+
72
+ ### Step 1.7: Anti-Pattern Gate
73
+
74
+ Scan all modified/created files for known anti-patterns. This catches recurring bugs before they reach production.
75
+
76
+ For each file, run using the Bash tool with description "Scanning for anti-patterns...": `bash .aether/aether-utils.sh check-antipattern "{file_path}"`
77
+
78
+ Run for each file in `files_created` and `files_modified` from Prime Worker output.
79
+
80
+ **Anti-Pattern Report:**
81
+
82
+ ```
83
+ 🔍🐜 Anti-Pattern Scan — {count} files scanned
84
+
85
+ {if critical issues:}
86
+ 🛑 CRITICAL (must fix):
87
+ {list each with file:line and description}
88
+
89
+ {if warnings:}
90
+ ⚠️ WARNINGS:
91
+ {list each with file:line and description}
92
+
93
+ {if clean:}
94
+ ✅🐜 No anti-patterns detected
95
+ ```
96
+
97
+ **CRITICAL issues block phase advancement:**
98
+ - Swift didSet infinite recursion
99
+ - Exposed secrets/credentials
100
+ - SQL injection patterns
101
+ - Known crash patterns
102
+
103
+ **WARNINGS are logged but don't block:**
104
+ - TypeScript `any` usage
105
+ - Console.log in production code
106
+ - TODO/FIXME comments
107
+
108
+ If CRITICAL issues found, display:
109
+
110
+ ```
111
+ ⛔🐜 ANTI-PATTERN GATE FAILED
112
+
113
+ Critical anti-patterns detected:
114
+ {list issues with file paths}
115
+
116
+ Run /ant:build {phase} again after fixing.
117
+ ```
118
+
119
+ Do NOT proceed to Step 2.
120
+
121
+ If no CRITICAL issues, continue to Step 1.7.1.
122
+
123
+ ### Step 1.7.1: Proactive Refactoring Gate (Conditional)
124
+
125
+ **Complexity-based refactoring — runs when code exceeds maintainability thresholds.**
126
+
127
+ 1. **Get modified/created files from recent work:**
128
+ Run using the Bash tool with description "Getting modified files for complexity check...": `modified_files=$(git diff --name-only HEAD~1 2>/dev/null || git diff --name-only) && echo "$modified_files"`
129
+
130
+ 2. **Check complexity thresholds for each file:**
131
+
132
+ For each file, check:
133
+ - Line count > 300 lines
134
+ - Long functions > 50 lines (simplified heuristic)
135
+ - Directory density > 10 new files
136
+
137
+ Run using the Bash tool with description "Checking complexity thresholds...":
138
+ ```bash
139
+ modified_files=$(git diff --name-only HEAD~1 2>/dev/null || git diff --name-only)
140
+
141
+ complexity_trigger=false
142
+ files_needing_refactor=""
143
+
144
+ for file in $modified_files; do
145
+ if [[ -f "$file" ]]; then
146
+ # Check line count
147
+ line_count=$(wc -l < "$file" 2>/dev/null || echo "0")
148
+ if [[ "$line_count" -gt 300 ]]; then
149
+ complexity_trigger=true
150
+ files_needing_refactor="$files_needing_refactor $file"
151
+ continue
152
+ fi
153
+
154
+ # Check for long functions (simplified heuristic)
155
+ long_funcs=$(grep -c "^[[:space:]]*[a-zA-Z_][a-zA-Z0-9_]*[[:space:]]*(" "$file" 2>/dev/null || echo "0")
156
+ if [[ "$long_funcs" -gt 50 ]]; then
157
+ complexity_trigger=true
158
+ files_needing_refactor="$files_needing_refactor $file"
159
+ fi
160
+ fi
161
+ done
162
+
163
+ # Check directory density
164
+ if [[ -n "$modified_files" ]]; then
165
+ dir_counts=$(echo "$modified_files" | xargs -I {} dirname {} 2>/dev/null | sort | uniq -c | sort -rn)
166
+ high_density_dir=$(echo "$dir_counts" | awk '$1 > 10 {print $2}' | head -1)
167
+ if [[ -n "$high_density_dir" ]]; then
168
+ complexity_trigger=true
169
+ fi
170
+ fi
171
+
172
+ echo "{\"complexity_trigger\": \"$complexity_trigger\", \"files_needing_refactor\": \"$files_needing_refactor\"}"
173
+ ```
174
+
175
+ 3. **If complexity thresholds NOT exceeded:**
176
+ ```
177
+ 🔄🐜 Weaver: Complexity thresholds not exceeded — skipping proactive refactoring
178
+ ```
179
+ Continue to Step 1.8.
180
+
181
+ 4. **If complexity thresholds exceeded:**
182
+
183
+ a. **Establish test baseline before refactoring:**
184
+ Run using the Bash tool with description "Establishing test baseline...": `test_output_before=$(npm test 2>&1 || echo "TEST_FAILED") && tests_passing_before=$(echo "$test_output_before" | grep -oE '[0-9]+ passing' | grep -oE '[0-9]+' || echo "0") && echo "Baseline: $tests_passing_before tests passing"`
185
+
186
+ b. **Generate Weaver name and dispatch:**
187
+ Run using the Bash tool with description "Generating Weaver name...": `weaver_name=$(bash .aether/aether-utils.sh generate-ant-name "weaver" | jq -r '.result') && bash .aether/aether-utils.sh spawn-log "Queen" "weaver" "$weaver_name" "Proactive refactoring" && echo "{\"name\":\"$weaver_name\"}"`
188
+
189
+ c. **Display:**
190
+ ```
191
+ ━━━ 🔄🐜 W E A V E R ━━━
192
+ ──── 🔄🐜 Spawning {weaver_name} — Proactive refactoring ────
193
+ ```
194
+
195
+ e. **Spawn Weaver agent:**
196
+
197
+ Use the Task tool with subagent_type="aether-weaver" (if available; otherwise use general-purpose and inject the Weaver role from `.opencode/agents/aether-weaver.md`):
198
+
199
+ ```xml
200
+ <mission>
201
+ Refactor complex code to improve maintainability while preserving behavior.
202
+ </mission>
203
+
204
+ <work>
205
+ 1. Analyze target files for complexity issues
206
+ 2. Plan incremental refactoring steps
207
+ 3. Execute one step at a time
208
+ 4. Run tests after each step
209
+ 5. If tests pass, continue; if fail, revert and try smaller step
210
+ 6. Report all changes made
211
+ </work>
212
+
213
+ <context>
214
+ Target Files: {files_needing_refactor}
215
+ Test Baseline: {tests_passing_before} tests passing (MUST maintain after refactor)
216
+
217
+ Refactoring Guidelines:
218
+ - Extract methods/functions over 50 lines
219
+ - Split files over 300 lines
220
+ - Remove duplication (DRY)
221
+ - Improve naming for clarity
222
+ - Apply Single Responsibility Principle
223
+ </context>
224
+
225
+ <constraints>
226
+ - NEVER change behavior — only structure
227
+ - Run tests after each refactoring step
228
+ - If tests fail, revert immediately
229
+ - Do NOT modify test expectations to make tests pass
230
+ - Do NOT modify .aether/ system files
231
+ </constraints>
232
+
233
+ <output>
234
+ Provide JSON output matching this schema:
235
+ {
236
+ "ant_name": "your weaver name",
237
+ "caste": "weaver",
238
+ "status": "completed" | "failed" | "blocked",
239
+ "summary": "Brief summary of refactoring",
240
+ "files_refactored": [],
241
+ "complexity_before": 0,
242
+ "complexity_after": 0,
243
+ "duplication_eliminated": 0,
244
+ "methods_extracted": [],
245
+ "patterns_applied": [],
246
+ "tests_all_passing": true,
247
+ "next_recommendations": [],
248
+ "blockers": []
249
+ }
250
+ </output>
251
+ ```
252
+
253
+ f. **Parse Weaver JSON output and verify tests:**
254
+ Extract: `files_refactored`, `tests_all_passing`, `complexity_before`, `complexity_after`
255
+
256
+ Run using the Bash tool with description "Verifying tests after refactoring...":
257
+ ```bash
258
+ test_output_after=$(npm test 2>&1 || echo "TEST_FAILED")
259
+ tests_passing_after=$(echo "$test_output_after" | grep -oE '[0-9]+ passing' | grep -oE '[0-9]+' || echo "0")
260
+
261
+ if [[ "$tests_passing_after" -lt "$tests_passing_before" ]]; then
262
+ echo "REVERT_NEEDED: Tests failed after refactoring"
263
+ git checkout -- $files_needing_refactor
264
+ weaver_status="reverted"
265
+ else
266
+ echo "PASSING: Tests passing after refactoring ($tests_passing_after)"
267
+ weaver_status="completed"
268
+ fi
269
+ ```
270
+
271
+ g. **Log completion:**
272
+ Run using the Bash tool with description "Logging Weaver completion...": `bash .aether/aether-utils.sh spawn-complete "$weaver_name" "$weaver_status" "Refactoring $weaver_status"`
273
+
274
+ h. **Log to midden:**
275
+ Run using the Bash tool with description "Logging refactoring activity to midden...": `bash .aether/aether-utils.sh midden-write "refactoring" "Weaver refactored files, complexity before/after: ${complexity_before}/${complexity_after}" "weaver"`
276
+
277
+ 5. **Display completion:**
278
+ ```
279
+ 🔄🐜 Weaver: Proactive refactoring {weaver_status}
280
+ Files refactored: {count} | Complexity: {before} → {after}
281
+ ```
282
+
283
+ 6. **NON-BLOCKING continuation:**
284
+ The Weaver step is NON-BLOCKING — continue to Step 1.8 regardless of refactoring results.
285
+
286
+ Continue to Step 1.8.
287
+
288
+ ### Step 1.8: Gatekeeper Security Gate (Conditional)
289
+
290
+ **Supply chain security audit — runs only when package.json exists.**
291
+
292
+ First, check for package.json:
293
+ Run using the Bash tool with description "Checking for package.json...": `test -f package.json && echo "exists" || echo "missing"`
294
+
295
+ **If package.json is missing:**
296
+ ```
297
+ 📦🐜 Gatekeeper: No package.json found — skipping supply chain audit
298
+ ```
299
+ Continue to Step 1.9.
300
+
301
+ **If package.json exists:**
302
+
303
+ 1. Generate Gatekeeper name and log spawn:
304
+ Run using the Bash tool with description "Generating Gatekeeper name...": `gatekeeper_name=$(bash .aether/aether-utils.sh generate-ant-name "gatekeeper" | jq -r '.result') && bash .aether/aether-utils.sh spawn-log "Queen" "gatekeeper" "$gatekeeper_name" "Supply chain security audit" && echo "{\"name\":\"$gatekeeper_name\"}"`
305
+
306
+ 2. Display:
307
+ ```
308
+ ━━━ 📦🐜 G A T E K E E P E R ━━━
309
+ ──── 📦🐜 Spawning {gatekeeper_name} — Supply chain security audit ────
310
+ ```
311
+
312
+ 4. Spawn Gatekeeper agent:
313
+
314
+ Use the Task tool with subagent_type="aether-gatekeeper" (if available; otherwise use general-purpose and inject the Gatekeeper role from `.opencode/agents/aether-gatekeeper.md`):
315
+
316
+ ```xml
317
+ <mission>
318
+ Perform supply chain security audit on this codebase.
319
+ </mission>
320
+
321
+ <work>
322
+ 1. Inventory all dependencies from package.json
323
+ 2. Scan for known CVEs using npm audit or equivalent
324
+ 3. Check license compliance for all packages
325
+ 4. Assess dependency health (outdated, deprecated, maintenance status)
326
+ 5. Report findings with severity levels
327
+ </work>
328
+
329
+ <output>
330
+ Provide JSON output matching this schema:
331
+ {
332
+ "ant_name": "your gatekeeper name",
333
+ "caste": "gatekeeper",
334
+ "status": "completed" | "failed" | "blocked",
335
+ "summary": "Brief summary of findings",
336
+ "security": {
337
+ "critical": 0,
338
+ "high": 0,
339
+ "medium": 0,
340
+ "low": 0
341
+ },
342
+ "licenses": {},
343
+ "outdated_packages": [],
344
+ "recommendations": [],
345
+ "blockers": []
346
+ }
347
+ </output>
348
+ ```
349
+
350
+ 5. Parse Gatekeeper JSON output and log completion:
351
+ Extract: `security.critical`, `security.high`, `status`
352
+
353
+ Run using the Bash tool with description "Logging Gatekeeper completion...": `bash .aether/aether-utils.sh spawn-complete "$gatekeeper_name" "completed" "{\"security\":{\"critical\":$critical_count,\"high\":$high_count}}"`
354
+
355
+ **Gate Decision Logic:**
356
+
357
+ - **If `security.critical > 0`:**
358
+ ```
359
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
360
+ ⛔📦🐜 G A T E K E E P E R G A T E F A I L E D
361
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
362
+
363
+ Critical security vulnerabilities detected: {critical_count}
364
+
365
+ 🚨 CRITICAL CVEs must be fixed before phase advancement.
366
+
367
+ 🔧 Required Actions:
368
+ 1. Run `npm audit` to see full details
369
+ 2. Fix or update vulnerable dependencies
370
+ 3. Run /ant:continue again after resolving
371
+
372
+ The phase will NOT advance with critical CVEs.
373
+ ```
374
+ **CRITICAL:** Do NOT proceed to Step 1.9. Stop here.
375
+
376
+ - **If `security.high > 0`:**
377
+ ```
378
+ ⚠️📦🐜 Gatekeeper: {high_count} high-severity issues found
379
+
380
+ Security warnings logged to midden for later review.
381
+ Proceeding with caution...
382
+ ```
383
+ Run using the Bash tool with description "Logging high-severity warnings...": `bash .aether/aether-utils.sh midden-write "security" "High CVEs found: $high_count" "gatekeeper"`
384
+ Continue to Step 1.9.
385
+
386
+ - **If clean (no critical or high):**
387
+ ```
388
+ ✅📦🐜 Gatekeeper: No critical security issues found
389
+ ```
390
+ Continue to Step 1.9.
391
+
392
+ ### Step 1.9: Auditor Quality Gate (MANDATORY)
393
+
394
+ **Code quality audit — runs on every `/ant:continue` for consistent coverage.**
395
+
396
+ 1. Generate Auditor name and log spawn:
397
+ Run using the Bash tool with description "Generating Auditor name...": `auditor_name=$(bash .aether/aether-utils.sh generate-ant-name "auditor" | jq -r '.result') && bash .aether/aether-utils.sh spawn-log "Queen" "auditor" "$auditor_name" "Code quality audit" && echo "{\"name\":\"$auditor_name\"}"`
398
+
399
+ 2. Display:
400
+ ```
401
+ ━━━ 👥🐜 A U D I T O R ━━━
402
+ ──── 👥🐜 Spawning {auditor_name} — Code quality audit ────
403
+ ```
404
+
405
+ 4. Get modified files for audit context:
406
+ Run using the Bash tool with description "Getting modified files...": `modified_files=$(git diff --name-only HEAD~1 2>/dev/null || git diff --name-only) && echo "$modified_files"`
407
+
408
+ 5. Spawn Auditor agent:
409
+
410
+ Use the Task tool with subagent_type="aether-auditor" (if available; otherwise use general-purpose and inject the Auditor role from `.opencode/agents/aether-auditor.md`):
411
+
412
+ ```xml
413
+ <mission>
414
+ Perform comprehensive code quality audit on this codebase.
415
+ </mission>
416
+
417
+ <work>
418
+ 1. Review all modified files from the recent commit(s)
419
+ 2. Apply all 4 audit lenses: security, performance, quality, maintainability
420
+ 3. Score each finding by severity (CRITICAL/HIGH/MEDIUM/LOW/INFO)
421
+ 4. Calculate overall quality score (0-100)
422
+ 5. Document specific issues with file:line references and fix suggestions
423
+ </work>
424
+
425
+ <context>
426
+ Phase: {current_phase}
427
+ Modified files: {modified_files}
428
+ </context>
429
+
430
+ <output>
431
+ Provide JSON output matching this schema:
432
+ {
433
+ "ant_name": "your auditor name",
434
+ "caste": "auditor",
435
+ "status": "completed" | "failed" | "blocked",
436
+ "summary": "Brief summary of findings",
437
+ "dimensions_audited": ["security", "performance", "quality", "maintainability"],
438
+ "findings": {
439
+ "critical": 0,
440
+ "high": 0,
441
+ "medium": 0,
442
+ "low": 0,
443
+ "info": 0
444
+ },
445
+ "issues": [
446
+ {"severity": "HIGH", "location": "file:line", "issue": "description", "fix": "suggestion"}
447
+ ],
448
+ "overall_score": 75,
449
+ "recommendation": "Top priority fix",
450
+ "blockers": []
451
+ }
452
+ </output>
453
+ ```
454
+
455
+ 6. Parse Auditor JSON output and log completion:
456
+ Extract: `findings.critical`, `findings.high`, `findings.medium`, `findings.low`, `findings.info`, `overall_score`, `dimensions_audited`
457
+
458
+ Run using the Bash tool with description "Logging Auditor completion...": `bash .aether/aether-utils.sh spawn-complete "$auditor_name" "completed" "{\"findings\":{\"critical\":$critical_count,\"high\":$high_count,\"medium\":$medium_count,\"low\":$low_count,\"info\":$info_count},\"score\":$overall_score}"`
459
+
460
+ **Gate Decision Logic:**
461
+
462
+ - **If `findings.critical > 0`:**
463
+ ```
464
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
465
+ ⛔👥🐜 A U D I T O R G A T E F A I L E D
466
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
467
+
468
+ Critical code quality issues detected: {critical_count}
469
+
470
+ 🚨 CRITICAL findings must be fixed before phase advancement.
471
+
472
+ 🔧 Required Actions:
473
+ 1. Review the critical issues listed below
474
+ 2. Fix each critical finding
475
+ 3. Run /ant:continue again after resolving
476
+
477
+ Critical Findings:
478
+ {list each critical finding with file:line and description}
479
+
480
+ The phase will NOT advance with critical quality issues.
481
+ ```
482
+ Run using the Bash tool with description "Logging critical quality block...": `bash .aether/aether-utils.sh error-flag-pattern "auditor-critical-findings" "$critical_count critical quality issues found" "critical"`
483
+ **CRITICAL:** Do NOT proceed to Step 1.10. Stop here.
484
+
485
+ - **Else if `overall_score < 60`:**
486
+ ```
487
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
488
+ ⛔👥🐜 A U D I T O R G A T E F A I L E D
489
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
490
+
491
+ Code quality score below threshold: {overall_score}/100 (threshold: 60)
492
+
493
+ 🚨 Quality score must reach 60+ before phase advancement.
494
+
495
+ 🔧 Required Actions:
496
+ 1. Address the top issues preventing score improvement:
497
+ {list top 3-5 issues with severity and location}
498
+ 2. Focus on HIGH severity items first
499
+ 3. Run /ant:continue again after improving quality
500
+
501
+ The phase will NOT advance with quality score below 60.
502
+ ```
503
+ Run using the Bash tool with description "Logging quality score block...": `bash .aether/aether-utils.sh error-flag-pattern "auditor-quality-score" "Score $overall_score below threshold 60" "critical"`
504
+ **CRITICAL:** Do NOT proceed to Step 1.10. Stop here.
505
+
506
+ - **Else if `findings.high > 0`:**
507
+ ```
508
+ ⚠️👥🐜 Auditor: Quality score {overall_score}/100 — PASSED with warnings
509
+
510
+ {high_count} high-severity quality issues found:
511
+ {list high findings}
512
+
513
+ Quality warnings logged to midden for later review.
514
+ Proceeding with caution...
515
+ ```
516
+ Run using the Bash tool with description "Logging high-quality warnings...": `bash .aether/aether-utils.sh midden-write "quality" "High severity issues: $high_count (score: $overall_score)" "auditor"`
517
+ Continue to Step 1.10.
518
+
519
+ - **If clean (score >= 60, no critical):**
520
+ ```
521
+ ✅👥🐜 Auditor: Quality score {overall_score}/100 — PASSED
522
+ ```
523
+ Continue to Step 1.10.
524
+
525
+ ### Step 1.10: TDD Evidence Gate (MANDATORY)
526
+
527
+ **The Iron Law:** No TDD claims without actual test files.
528
+
529
+ If Prime Worker reported TDD metrics (tests_added, tests_total, coverage_percent), verify test files exist:
530
+
531
+ Run using the Bash tool with description "Locating test files...": `find . -name "*.test.*" -o -name "*_test.*" -o -name "*Tests.swift" -o -name "test_*.py" 2>/dev/null | head -10`
532
+
533
+ **If Prime Worker claimed tests_added > 0 but no test files found:**
534
+
535
+ ```
536
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
537
+ ⛔🧪🐜 T D D G A T E F A I L E D
538
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
539
+
540
+ Prime Worker claimed:
541
+ tests_added: {claimed_count}
542
+ tests_total: {claimed_total}
543
+ coverage: {claimed_coverage}%
544
+
545
+ But no test files were found in the codebase.
546
+
547
+ 🚨 CRITICAL violation — fabricated TDD metrics.
548
+
549
+ 🔧 Required Actions:
550
+ 1. Run /ant:build {phase} again
551
+ 2. Actually write test files (not just claim them)
552
+ 3. Tests must exist and be runnable
553
+
554
+ The phase will NOT advance with fabricated metrics.
555
+ ```
556
+
557
+ **CRITICAL:** Do NOT proceed. Log the violation:
558
+ ```bash
559
+ bash .aether/aether-utils.sh error-flag-pattern "fabricated-tdd" "Prime Worker reported TDD metrics without creating test files" "critical"
560
+ ```
561
+
562
+ **If tests_added == 0 or test files exist matching claims:**
563
+
564
+ Continue to Step 1.11.
565
+
566
+ ### Step 1.11: Runtime Verification Gate (MANDATORY)
567
+
568
+ **The Iron Law:** Build passing ≠ App working.
569
+
570
+ Before advancing, the user must confirm the application actually runs.
571
+
572
+ Use AskUserQuestion:
573
+
574
+ ```
575
+ ──────────────────────────────────────────────────
576
+ 🐜 Runtime Verification Required
577
+ ──────────────────────────────────────────────────
578
+
579
+ Build checks passed — but does the app actually work?
580
+
581
+ Have you tested the application at runtime?
582
+ ```
583
+
584
+ Options:
585
+ 1. **Yes, tested and working** - App runs correctly, features work
586
+ 2. **Yes, tested but has issues** - App runs but has bugs (describe)
587
+ 3. **No, haven't tested yet** - Need to test before continuing
588
+ 4. **Skip (not applicable)** - No runnable app in this phase (e.g., library code)
589
+
590
+ **If "Yes, tested and working":**
591
+ ```
592
+ ✅🐜 RUNTIME VERIFIED — User confirmed app works.
593
+ ```
594
+ Continue to Step 1.12.
595
+
596
+ **If "Yes, tested but has issues":**
597
+ ```
598
+ ⛔🐜 RUNTIME GATE FAILED — User reported issues.
599
+
600
+ Please describe the issues so they can be addressed:
601
+ ```
602
+
603
+ Use AskUserQuestion to get issue details. Log to errors.records:
604
+ ```bash
605
+ bash .aether/aether-utils.sh error-add "runtime" "critical" "{user_description}" {phase}
606
+ ```
607
+
608
+ Do NOT proceed to Step 2.
609
+
610
+ **If "No, haven't tested yet":**
611
+ ```
612
+ ⏸️🐜 RUNTIME PENDING — Test the app, then run /ant:continue again.
613
+
614
+ - [ ] App launches without crashing
615
+ - [ ] Core features work as expected
616
+ - [ ] UI responds to user interaction
617
+ - [ ] No freezes or hangs
618
+ ```
619
+
620
+ Do NOT proceed to Step 2.
621
+
622
+ **If "Skip (not applicable)":**
623
+
624
+ Only valid for phases that don't produce runnable code (e.g., documentation, config files, library code with no entry point).
625
+
626
+ ```
627
+ ⏭️ RUNTIME CHECK SKIPPED
628
+
629
+ User indicated no runnable app for this phase.
630
+ Proceeding to phase advancement.
631
+ ```
632
+
633
+ Continue to Step 1.12.
634
+
635
+ ### Step 1.12: Flags Gate (MANDATORY)
636
+
637
+ **The Iron Law:** No phase advancement with unresolved blockers.
638
+
639
+ First, auto-resolve any flags eligible for resolution now that verification has passed:
640
+ Run using the Bash tool with description "Auto-resolving flags...": `bash .aether/aether-utils.sh flag-auto-resolve "build_pass"`
641
+
642
+ Then check for remaining blocking flags:
643
+ Run using the Bash tool with description "Checking for blockers...": `bash .aether/aether-utils.sh flag-check-blockers {current_phase}`
644
+
645
+ Parse result for `blockers`, `issues`, and `notes` counts.
646
+
647
+ **If blockers > 0:**
648
+
649
+ ```
650
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
651
+ ⛔🚩🐜 F L A G S G A T E F A I L E D
652
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
653
+
654
+ {blockers} blocker(s) must be resolved first.
655
+
656
+ 🚩 Active Blockers:
657
+ {list each blocker flag with ID, title, and description}
658
+
659
+ 🔧 Required Actions:
660
+ 1. Fix the issues described in each blocker
661
+ 2. Resolve flags: /ant:flags --resolve {flag_id} "resolution message"
662
+ 3. Run /ant:continue again after resolving all blockers
663
+ ```
664
+
665
+ **CRITICAL:** Do NOT proceed to Step 2. Do NOT advance the phase.
666
+
667
+ **If blockers == 0 but issues > 0:**
668
+
669
+ ```
670
+ ⚠️🐜 FLAGS: {issues} issue(s) noted (non-blocking)
671
+
672
+ {list each issue flag}
673
+
674
+ Use /ant:flags to review.
675
+ ```
676
+
677
+ Continue to Step 2.
678
+
679
+ **If all clear (no blockers or issues):**
680
+
681
+ ```
682
+ ✅🐜 FLAGS GATE PASSED — No blockers.
683
+ ```
684
+
685
+ Continue to Step 2.
686
+