aether-colony 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (207) hide show
  1. package/.aether/CONTEXT.md +160 -0
  2. package/.aether/QUEEN.md +84 -0
  3. package/.aether/aether-utils.sh +7749 -0
  4. package/.aether/docs/QUEEN-SYSTEM.md +211 -0
  5. package/.aether/docs/README.md +68 -0
  6. package/.aether/docs/caste-system.md +48 -0
  7. package/.aether/docs/disciplines/DISCIPLINES.md +93 -0
  8. package/.aether/docs/disciplines/coding-standards.md +197 -0
  9. package/.aether/docs/disciplines/debugging.md +207 -0
  10. package/.aether/docs/disciplines/learning.md +254 -0
  11. package/.aether/docs/disciplines/tdd.md +257 -0
  12. package/.aether/docs/disciplines/verification-loop.md +167 -0
  13. package/.aether/docs/disciplines/verification.md +116 -0
  14. package/.aether/docs/error-codes.md +268 -0
  15. package/.aether/docs/known-issues.md +233 -0
  16. package/.aether/docs/pheromones.md +205 -0
  17. package/.aether/docs/queen-commands.md +97 -0
  18. package/.aether/exchange/colony-registry.xml +11 -0
  19. package/.aether/exchange/pheromone-xml.sh +575 -0
  20. package/.aether/exchange/pheromones.xml +87 -0
  21. package/.aether/exchange/queen-wisdom.xml +14 -0
  22. package/.aether/exchange/registry-xml.sh +273 -0
  23. package/.aether/exchange/wisdom-xml.sh +319 -0
  24. package/.aether/midden/approach-changes.md +5 -0
  25. package/.aether/midden/build-failures.md +5 -0
  26. package/.aether/midden/test-failures.md +5 -0
  27. package/.aether/model-profiles.yaml +100 -0
  28. package/.aether/rules/aether-colony.md +134 -0
  29. package/.aether/schemas/aether-types.xsd +255 -0
  30. package/.aether/schemas/colony-registry.xsd +309 -0
  31. package/.aether/schemas/example-prompt-builder.xml +234 -0
  32. package/.aether/schemas/pheromone.xsd +163 -0
  33. package/.aether/schemas/prompt.xsd +416 -0
  34. package/.aether/schemas/queen-wisdom.xsd +325 -0
  35. package/.aether/schemas/worker-priming.xsd +276 -0
  36. package/.aether/templates/QUEEN.md.template +79 -0
  37. package/.aether/templates/colony-state-reset.jq.template +22 -0
  38. package/.aether/templates/colony-state.template.json +35 -0
  39. package/.aether/templates/constraints.template.json +9 -0
  40. package/.aether/templates/crowned-anthill.template.md +36 -0
  41. package/.aether/templates/handoff-build-error.template.md +30 -0
  42. package/.aether/templates/handoff-build-success.template.md +39 -0
  43. package/.aether/templates/handoff.template.md +40 -0
  44. package/.aether/templates/learning-observations.template.json +6 -0
  45. package/.aether/templates/midden.template.json +7 -0
  46. package/.aether/templates/pheromones.template.json +6 -0
  47. package/.aether/templates/session.template.json +9 -0
  48. package/.aether/utils/atomic-write.sh +219 -0
  49. package/.aether/utils/chamber-compare.sh +193 -0
  50. package/.aether/utils/chamber-utils.sh +297 -0
  51. package/.aether/utils/colorize-log.sh +132 -0
  52. package/.aether/utils/error-handler.sh +212 -0
  53. package/.aether/utils/file-lock.sh +158 -0
  54. package/.aether/utils/queen-to-md.xsl +395 -0
  55. package/.aether/utils/semantic-cli.sh +413 -0
  56. package/.aether/utils/spawn-tree.sh +428 -0
  57. package/.aether/utils/spawn-with-model.sh +56 -0
  58. package/.aether/utils/state-loader.sh +215 -0
  59. package/.aether/utils/swarm-display.sh +268 -0
  60. package/.aether/utils/watch-spawn-tree.sh +253 -0
  61. package/.aether/utils/xml-compose.sh +253 -0
  62. package/.aether/utils/xml-convert.sh +273 -0
  63. package/.aether/utils/xml-core.sh +186 -0
  64. package/.aether/utils/xml-query.sh +201 -0
  65. package/.aether/utils/xml-utils.sh +110 -0
  66. package/.aether/workers.md +765 -0
  67. package/.claude/agents/ant/aether-ambassador.md +264 -0
  68. package/.claude/agents/ant/aether-archaeologist.md +322 -0
  69. package/.claude/agents/ant/aether-auditor.md +266 -0
  70. package/.claude/agents/ant/aether-builder.md +187 -0
  71. package/.claude/agents/ant/aether-chaos.md +268 -0
  72. package/.claude/agents/ant/aether-chronicler.md +304 -0
  73. package/.claude/agents/ant/aether-gatekeeper.md +325 -0
  74. package/.claude/agents/ant/aether-includer.md +373 -0
  75. package/.claude/agents/ant/aether-keeper.md +271 -0
  76. package/.claude/agents/ant/aether-measurer.md +317 -0
  77. package/.claude/agents/ant/aether-probe.md +210 -0
  78. package/.claude/agents/ant/aether-queen.md +325 -0
  79. package/.claude/agents/ant/aether-route-setter.md +173 -0
  80. package/.claude/agents/ant/aether-sage.md +353 -0
  81. package/.claude/agents/ant/aether-scout.md +142 -0
  82. package/.claude/agents/ant/aether-surveyor-disciplines.md +416 -0
  83. package/.claude/agents/ant/aether-surveyor-nest.md +354 -0
  84. package/.claude/agents/ant/aether-surveyor-pathogens.md +288 -0
  85. package/.claude/agents/ant/aether-surveyor-provisions.md +359 -0
  86. package/.claude/agents/ant/aether-tracker.md +265 -0
  87. package/.claude/agents/ant/aether-watcher.md +244 -0
  88. package/.claude/agents/ant/aether-weaver.md +247 -0
  89. package/.claude/commands/ant/archaeology.md +341 -0
  90. package/.claude/commands/ant/build.md +1160 -0
  91. package/.claude/commands/ant/chaos.md +349 -0
  92. package/.claude/commands/ant/colonize.md +270 -0
  93. package/.claude/commands/ant/continue.md +1070 -0
  94. package/.claude/commands/ant/council.md +309 -0
  95. package/.claude/commands/ant/dream.md +265 -0
  96. package/.claude/commands/ant/entomb.md +487 -0
  97. package/.claude/commands/ant/feedback.md +78 -0
  98. package/.claude/commands/ant/flag.md +139 -0
  99. package/.claude/commands/ant/flags.md +155 -0
  100. package/.claude/commands/ant/focus.md +58 -0
  101. package/.claude/commands/ant/help.md +122 -0
  102. package/.claude/commands/ant/history.md +137 -0
  103. package/.claude/commands/ant/init.md +409 -0
  104. package/.claude/commands/ant/interpret.md +267 -0
  105. package/.claude/commands/ant/lay-eggs.md +201 -0
  106. package/.claude/commands/ant/maturity.md +102 -0
  107. package/.claude/commands/ant/memory-details.md +77 -0
  108. package/.claude/commands/ant/migrate-state.md +165 -0
  109. package/.claude/commands/ant/oracle.md +387 -0
  110. package/.claude/commands/ant/organize.md +227 -0
  111. package/.claude/commands/ant/pause-colony.md +247 -0
  112. package/.claude/commands/ant/phase.md +126 -0
  113. package/.claude/commands/ant/plan.md +544 -0
  114. package/.claude/commands/ant/redirect.md +58 -0
  115. package/.claude/commands/ant/resume-colony.md +182 -0
  116. package/.claude/commands/ant/resume.md +363 -0
  117. package/.claude/commands/ant/seal.md +306 -0
  118. package/.claude/commands/ant/status.md +272 -0
  119. package/.claude/commands/ant/swarm.md +361 -0
  120. package/.claude/commands/ant/tunnels.md +425 -0
  121. package/.claude/commands/ant/update.md +209 -0
  122. package/.claude/commands/ant/verify-castes.md +95 -0
  123. package/.claude/commands/ant/watch.md +238 -0
  124. package/.opencode/agents/aether-ambassador.md +140 -0
  125. package/.opencode/agents/aether-archaeologist.md +108 -0
  126. package/.opencode/agents/aether-auditor.md +144 -0
  127. package/.opencode/agents/aether-builder.md +184 -0
  128. package/.opencode/agents/aether-chaos.md +115 -0
  129. package/.opencode/agents/aether-chronicler.md +122 -0
  130. package/.opencode/agents/aether-gatekeeper.md +116 -0
  131. package/.opencode/agents/aether-includer.md +117 -0
  132. package/.opencode/agents/aether-keeper.md +177 -0
  133. package/.opencode/agents/aether-measurer.md +128 -0
  134. package/.opencode/agents/aether-probe.md +133 -0
  135. package/.opencode/agents/aether-queen.md +286 -0
  136. package/.opencode/agents/aether-route-setter.md +130 -0
  137. package/.opencode/agents/aether-sage.md +106 -0
  138. package/.opencode/agents/aether-scout.md +101 -0
  139. package/.opencode/agents/aether-surveyor-disciplines.md +386 -0
  140. package/.opencode/agents/aether-surveyor-nest.md +324 -0
  141. package/.opencode/agents/aether-surveyor-pathogens.md +259 -0
  142. package/.opencode/agents/aether-surveyor-provisions.md +329 -0
  143. package/.opencode/agents/aether-tracker.md +137 -0
  144. package/.opencode/agents/aether-watcher.md +174 -0
  145. package/.opencode/agents/aether-weaver.md +130 -0
  146. package/.opencode/commands/ant/archaeology.md +338 -0
  147. package/.opencode/commands/ant/build.md +1200 -0
  148. package/.opencode/commands/ant/chaos.md +346 -0
  149. package/.opencode/commands/ant/colonize.md +202 -0
  150. package/.opencode/commands/ant/continue.md +938 -0
  151. package/.opencode/commands/ant/council.md +305 -0
  152. package/.opencode/commands/ant/dream.md +262 -0
  153. package/.opencode/commands/ant/entomb.md +367 -0
  154. package/.opencode/commands/ant/feedback.md +80 -0
  155. package/.opencode/commands/ant/flag.md +137 -0
  156. package/.opencode/commands/ant/flags.md +153 -0
  157. package/.opencode/commands/ant/focus.md +56 -0
  158. package/.opencode/commands/ant/help.md +124 -0
  159. package/.opencode/commands/ant/history.md +127 -0
  160. package/.opencode/commands/ant/init.md +337 -0
  161. package/.opencode/commands/ant/interpret.md +256 -0
  162. package/.opencode/commands/ant/lay-eggs.md +141 -0
  163. package/.opencode/commands/ant/maturity.md +92 -0
  164. package/.opencode/commands/ant/memory-details.md +77 -0
  165. package/.opencode/commands/ant/migrate-state.md +153 -0
  166. package/.opencode/commands/ant/oracle.md +338 -0
  167. package/.opencode/commands/ant/organize.md +224 -0
  168. package/.opencode/commands/ant/pause-colony.md +220 -0
  169. package/.opencode/commands/ant/phase.md +123 -0
  170. package/.opencode/commands/ant/plan.md +531 -0
  171. package/.opencode/commands/ant/redirect.md +67 -0
  172. package/.opencode/commands/ant/resume-colony.md +178 -0
  173. package/.opencode/commands/ant/resume.md +363 -0
  174. package/.opencode/commands/ant/seal.md +247 -0
  175. package/.opencode/commands/ant/status.md +272 -0
  176. package/.opencode/commands/ant/swarm.md +357 -0
  177. package/.opencode/commands/ant/tunnels.md +406 -0
  178. package/.opencode/commands/ant/update.md +191 -0
  179. package/.opencode/commands/ant/verify-castes.md +85 -0
  180. package/.opencode/commands/ant/watch.md +220 -0
  181. package/.opencode/opencode.json +3 -0
  182. package/CHANGELOG.md +325 -0
  183. package/DISCLAIMER.md +74 -0
  184. package/LICENSE +21 -0
  185. package/README.md +258 -0
  186. package/bin/cli.js +2436 -0
  187. package/bin/generate-commands.sh +291 -0
  188. package/bin/lib/caste-colors.js +57 -0
  189. package/bin/lib/colors.js +76 -0
  190. package/bin/lib/errors.js +255 -0
  191. package/bin/lib/event-types.js +190 -0
  192. package/bin/lib/file-lock.js +695 -0
  193. package/bin/lib/init.js +454 -0
  194. package/bin/lib/logger.js +242 -0
  195. package/bin/lib/model-profiles.js +445 -0
  196. package/bin/lib/model-verify.js +288 -0
  197. package/bin/lib/nestmate-loader.js +130 -0
  198. package/bin/lib/proxy-health.js +253 -0
  199. package/bin/lib/spawn-logger.js +266 -0
  200. package/bin/lib/state-guard.js +602 -0
  201. package/bin/lib/state-sync.js +516 -0
  202. package/bin/lib/telemetry.js +441 -0
  203. package/bin/lib/update-transaction.js +1454 -0
  204. package/bin/npx-install.js +178 -0
  205. package/bin/sync-to-runtime.sh +6 -0
  206. package/bin/validate-package.sh +88 -0
  207. package/package.json +70 -0
@@ -0,0 +1,163 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
3
+ xmlns:ph="http://aether.colony/schemas/pheromones"
4
+ xmlns:types="http://aether.colony/schemas/types/1.0"
5
+ targetNamespace="http://aether.colony/schemas/pheromones"
6
+ elementFormDefault="qualified"
7
+ attributeFormDefault="unqualified">
8
+
9
+ <!-- Import shared types from aether-types.xsd -->
10
+ <xs:import namespace="http://aether.colony/schemas/types/1.0"
11
+ schemaLocation="aether-types.xsd"/>
12
+
13
+ <xs:annotation>
14
+ <xs:documentation>
15
+ Aether Colony Pheromone Exchange Format Schema
16
+
17
+ Defines the XML structure for pheromone signals used in colony
18
+ communication. Pheromones are directional signals that guide
19
+ worker behavior without direct command chains.
20
+
21
+ Signal Types:
22
+ - FOCUS: Direct attention to specific area (normal priority)
23
+ - REDIRECT: Hard constraint, avoid this path (high priority)
24
+ - FEEDBACK: Gentle adjustment based on observation (low priority)
25
+
26
+ Version: 1.0.0
27
+ </xs:documentation>
28
+ </xs:annotation>
29
+
30
+ <!-- Root element: container for all pheromone signals -->
31
+ <xs:element name="pheromones" type="ph:PheromonesType">
32
+ <xs:annotation>
33
+ <xs:documentation>
34
+ Root element containing a collection of pheromone signals.
35
+ Signals are processed in priority order (high to low) then
36
+ by creation time (newest first).
37
+ </xs:documentation>
38
+ </xs:annotation>
39
+ </xs:element>
40
+
41
+ <!-- Complex type for the root pheromones container -->
42
+ <xs:complexType name="PheromonesType">
43
+ <xs:sequence>
44
+ <xs:element name="metadata" type="ph:MetadataType" minOccurs="0" maxOccurs="1"/>
45
+ <xs:element name="signal" type="ph:SignalType" minOccurs="0" maxOccurs="unbounded"/>
46
+ </xs:sequence>
47
+ <xs:attribute name="version" type="types:VersionType" use="required"/>
48
+ <xs:attribute name="generated_at" type="xs:dateTime" use="required"/>
49
+ <xs:attribute name="colony_id" type="types:IdentifierType" use="optional"/>
50
+ <xs:anyAttribute namespace="##any" processContents="lax"/>
51
+ </xs:complexType>
52
+
53
+ <!-- Metadata for the pheromone collection -->
54
+ <xs:complexType name="MetadataType">
55
+ <xs:sequence>
56
+ <xs:element name="source" type="ph:SourceType" minOccurs="0" maxOccurs="1"/>
57
+ <xs:element name="context" type="xs:string" minOccurs="0" maxOccurs="1"/>
58
+ </xs:sequence>
59
+ </xs:complexType>
60
+
61
+ <!-- Source information for traceability -->
62
+ <xs:complexType name="SourceType">
63
+ <xs:simpleContent>
64
+ <xs:extension base="xs:string">
65
+ <xs:attribute name="type" type="types:SourceTypeEnum" use="required"/>
66
+ <xs:attribute name="version" type="types:VersionType" use="optional"/>
67
+ </xs:extension>
68
+ </xs:simpleContent>
69
+ </xs:complexType>
70
+
71
+ <!-- Individual pheromone signal -->
72
+ <xs:complexType name="SignalType">
73
+ <xs:sequence>
74
+ <xs:element name="content" type="ph:ContentType"/>
75
+ <xs:element name="tags" type="ph:TagsType" minOccurs="0" maxOccurs="1"/>
76
+ <xs:element name="scope" type="ph:ScopeType" minOccurs="0" maxOccurs="1"/>
77
+ </xs:sequence>
78
+ <xs:attribute name="id" type="types:IdentifierType" use="required"/>
79
+ <xs:attribute name="type" type="ph:SignalTypeEnum" use="required"/>
80
+ <xs:attribute name="priority" type="types:PriorityType" use="required"/>
81
+ <xs:attribute name="source" type="types:IdentifierType" use="required"/>
82
+ <xs:attribute name="created_at" type="xs:dateTime" use="required"/>
83
+ <xs:attribute name="expires_at" type="xs:dateTime" use="optional"/>
84
+ <xs:attribute name="active" type="xs:boolean" use="optional" default="true"/>
85
+ </xs:complexType>
86
+
87
+ <!-- Signal content with optional structured data -->
88
+ <xs:complexType name="ContentType" mixed="true">
89
+ <xs:sequence>
90
+ <xs:element name="text" type="xs:string" minOccurs="0" maxOccurs="1"/>
91
+ <xs:element name="data" type="ph:DataType" minOccurs="0" maxOccurs="1"/>
92
+ </xs:sequence>
93
+ </xs:complexType>
94
+
95
+ <!-- Structured data attachment -->
96
+ <xs:complexType name="DataType">
97
+ <xs:sequence>
98
+ <xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
99
+ </xs:sequence>
100
+ <xs:attribute name="format" type="types:DataFormatEnum" use="optional" default="json"/>
101
+ </xs:complexType>
102
+
103
+ <!-- Tags for categorization and filtering -->
104
+ <xs:complexType name="TagsType">
105
+ <xs:sequence>
106
+ <xs:element name="tag" type="ph:TagType" minOccurs="0" maxOccurs="unbounded"/>
107
+ </xs:sequence>
108
+ </xs:complexType>
109
+
110
+ <!-- Individual tag with optional weight -->
111
+ <xs:complexType name="TagType">
112
+ <xs:simpleContent>
113
+ <xs:extension base="xs:string">
114
+ <xs:attribute name="weight" type="types:WeightType" use="optional" default="1.0"/>
115
+ <xs:attribute name="category" type="xs:string" use="optional"/>
116
+ </xs:extension>
117
+ </xs:simpleContent>
118
+ </xs:complexType>
119
+
120
+ <!-- Scope definition for signal applicability -->
121
+ <xs:complexType name="ScopeType">
122
+ <xs:sequence>
123
+ <xs:element name="castes" type="ph:CastesType" minOccurs="0" maxOccurs="1"/>
124
+ <xs:element name="paths" type="ph:PathsType" minOccurs="0" maxOccurs="1"/>
125
+ <xs:element name="phases" type="ph:PhasesType" minOccurs="0" maxOccurs="1"/>
126
+ </xs:sequence>
127
+ <xs:attribute name="global" type="xs:boolean" use="optional" default="false"/>
128
+ </xs:complexType>
129
+
130
+ <!-- Target castes -->
131
+ <xs:complexType name="CastesType">
132
+ <xs:sequence>
133
+ <xs:element name="caste" type="types:CasteEnum" minOccurs="0" maxOccurs="unbounded"/>
134
+ </xs:sequence>
135
+ <xs:attribute name="match" type="types:MatchEnum" use="optional" default="any"/>
136
+ </xs:complexType>
137
+
138
+ <!-- Target file paths (glob patterns supported) -->
139
+ <xs:complexType name="PathsType">
140
+ <xs:sequence>
141
+ <xs:element name="path" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
142
+ </xs:sequence>
143
+ <xs:attribute name="match" type="types:MatchEnum" use="optional" default="any"/>
144
+ </xs:complexType>
145
+
146
+ <!-- Target phases -->
147
+ <xs:complexType name="PhasesType">
148
+ <xs:sequence>
149
+ <xs:element name="phase" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
150
+ </xs:sequence>
151
+ <xs:attribute name="match" type="types:MatchEnum" use="optional" default="any"/>
152
+ </xs:complexType>
153
+
154
+ <!-- Signal type enumeration (pheromone-specific, not in shared types) -->
155
+ <xs:simpleType name="SignalTypeEnum">
156
+ <xs:restriction base="xs:string">
157
+ <xs:enumeration value="FOCUS"/>
158
+ <xs:enumeration value="REDIRECT"/>
159
+ <xs:enumeration value="FEEDBACK"/>
160
+ </xs:restriction>
161
+ </xs:simpleType>
162
+
163
+ </xs:schema>
@@ -0,0 +1,416 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ Aether Prompt XML Schema (XSD)
4
+
5
+ Purpose: Define structured prompts for colony workers and commands.
6
+ XML-structured prompts are more reliable, parseable, and
7
+ self-documenting than free-form text.
8
+
9
+ Architecture: Replaces ad-hoc markdown prompts with semantic XML tags
10
+ that Claude parses more reliably.
11
+
12
+ Version: 1.0.0
13
+ Namespace: http://aether.colony/schemas/prompt/1.0
14
+ -->
15
+ <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
16
+ xmlns:ap="http://aether.colony/schemas/prompt/1.0"
17
+ elementFormDefault="unqualified"
18
+ attributeFormDefault="unqualified">
19
+
20
+ <!-- ============================================================ -->
21
+ <!-- Simple Types -->
22
+ <!-- ============================================================ -->
23
+
24
+ <!-- Prompt type classification -->
25
+ <xs:simpleType name="promptType">
26
+ <xs:restriction base="xs:string">
27
+ <xs:enumeration value="worker"/>
28
+ <xs:enumeration value="command"/>
29
+ <xs:enumeration value="agent"/>
30
+ <xs:enumeration value="system"/>
31
+ </xs:restriction>
32
+ </xs:simpleType>
33
+
34
+ <!-- Caste assignment for worker prompts -->
35
+ <xs:simpleType name="casteType">
36
+ <xs:restriction base="xs:string">
37
+ <xs:enumeration value="builder"/>
38
+ <xs:enumeration value="watcher"/>
39
+ <xs:enumeration value="scout"/>
40
+ <xs:enumeration value="chaos"/>
41
+ <xs:enumeration value="oracle"/>
42
+ <xs:enumeration value="architect"/>
43
+ <xs:enumeration value="prime"/>
44
+ <xs:enumeration value="colonizer"/>
45
+ <xs:enumeration value="route_setter"/>
46
+ <xs:enumeration value="archaeologist"/>
47
+ <xs:enumeration value="chronicler"/>
48
+ <xs:enumeration value="guardian"/>
49
+ <xs:enumeration value="gatekeeper"/>
50
+ <xs:enumeration value="weaver"/>
51
+ <xs:enumeration value="probe"/>
52
+ <xs:enumeration value="sage"/>
53
+ <xs:enumeration value="measurer"/>
54
+ <xs:enumeration value="keeper"/>
55
+ <xs:enumeration value="tracker"/>
56
+ <xs:enumeration value="includer"/>
57
+ </xs:restriction>
58
+ </xs:simpleType>
59
+
60
+ <!-- Priority levels -->
61
+ <xs:simpleType name="priorityType">
62
+ <xs:restriction base="xs:string">
63
+ <xs:enumeration value="critical"/>
64
+ <xs:enumeration value="high"/>
65
+ <xs:enumeration value="normal"/>
66
+ <xs:enumeration value="low"/>
67
+ </xs:restriction>
68
+ </xs:simpleType>
69
+
70
+ <!-- Constraint strength -->
71
+ <xs:simpleType name="constraintStrengthType">
72
+ <xs:restriction base="xs:string">
73
+ <xs:enumeration value="must"/>
74
+ <xs:enumeration value="should"/>
75
+ <xs:enumeration value="may"/>
76
+ <xs:enumeration value="must-not"/>
77
+ <xs:enumeration value="should-not"/>
78
+ </xs:restriction>
79
+ </xs:simpleType>
80
+
81
+ <!-- Version string -->
82
+ <xs:simpleType name="versionType">
83
+ <xs:restriction base="xs:string">
84
+ <xs:pattern value="\d+\.\d+\.\d+(-[a-zA-Z0-9]+)?"/>
85
+ </xs:restriction>
86
+ </xs:simpleType>
87
+
88
+ <!-- ============================================================ -->
89
+ <!-- Complex Types -->
90
+ <!-- ============================================================ -->
91
+
92
+ <!-- Individual requirement item -->
93
+ <xs:complexType name="requirementType">
94
+ <xs:sequence>
95
+ <xs:element name="description" type="xs:string"/>
96
+ <xs:element name="rationale" type="xs:string" minOccurs="0"/>
97
+ </xs:sequence>
98
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
99
+ <xs:attribute name="priority" type="priorityType" use="optional" default="normal"/>
100
+ </xs:complexType>
101
+
102
+ <!-- Requirements container -->
103
+ <xs:complexType name="requirementsType">
104
+ <xs:sequence>
105
+ <xs:element name="requirement" type="requirementType" maxOccurs="unbounded"/>
106
+ </xs:sequence>
107
+ </xs:complexType>
108
+
109
+ <!-- Constraint item -->
110
+ <xs:complexType name="constraintType">
111
+ <xs:sequence>
112
+ <xs:element name="rule" type="xs:string"/>
113
+ <xs:element name="exception" type="xs:string" minOccurs="0"/>
114
+ <xs:element name="enforcement" type="xs:string" minOccurs="0"/>
115
+ </xs:sequence>
116
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
117
+ <xs:attribute name="strength" type="constraintStrengthType" use="optional" default="should"/>
118
+ </xs:complexType>
119
+
120
+ <!-- Constraints container -->
121
+ <xs:complexType name="constraintsType">
122
+ <xs:sequence>
123
+ <xs:element name="constraint" type="constraintType" maxOccurs="unbounded"/>
124
+ </xs:sequence>
125
+ </xs:complexType>
126
+
127
+ <!-- Expected output specification -->
128
+ <xs:complexType name="outputType">
129
+ <xs:sequence>
130
+ <xs:element name="format" type="xs:string">
131
+ <xs:annotation>
132
+ <xs:documentation>Expected output format (e.g., "JSON", "Markdown", "XML")</xs:documentation>
133
+ </xs:annotation>
134
+ </xs:element>
135
+ <xs:element name="structure" type="xs:string" minOccurs="0">
136
+ <xs:annotation>
137
+ <xs:documentation>Description of expected structure or schema</xs:documentation>
138
+ </xs:annotation>
139
+ </xs:element>
140
+ <xs:element name="example" type="xs:string" minOccurs="0">
141
+ <xs:annotation>
142
+ <xs:documentation>Example of expected output</xs:documentation>
143
+ </xs:annotation>
144
+ </xs:element>
145
+ </xs:sequence>
146
+ </xs:complexType>
147
+
148
+ <!-- Verification method -->
149
+ <xs:complexType name="verificationType">
150
+ <xs:sequence>
151
+ <xs:element name="method" type="xs:string">
152
+ <xs:annotation>
153
+ <xs:documentation>How to verify the output (e.g., "Run tests", "Validate against schema")</xs:documentation>
154
+ </xs:annotation>
155
+ </xs:element>
156
+ <xs:element name="steps" minOccurs="0">
157
+ <xs:complexType>
158
+ <xs:sequence>
159
+ <xs:element name="step" type="xs:string" maxOccurs="unbounded"/>
160
+ </xs:sequence>
161
+ </xs:complexType>
162
+ </xs:element>
163
+ <xs:element name="tools" minOccurs="0">
164
+ <xs:complexType>
165
+ <xs:sequence>
166
+ <xs:element name="tool" type="xs:string" maxOccurs="unbounded"/>
167
+ </xs:sequence>
168
+ </xs:complexType>
169
+ </xs:element>
170
+ </xs:sequence>
171
+ </xs:complexType>
172
+
173
+ <!-- Success criteria -->
174
+ <xs:complexType name="successCriteriaType">
175
+ <xs:sequence>
176
+ <xs:element name="criterion" maxOccurs="unbounded">
177
+ <xs:complexType>
178
+ <xs:sequence>
179
+ <xs:element name="description" type="xs:string"/>
180
+ <xs:element name="measure" type="xs:string" minOccurs="0">
181
+ <xs:annotation>
182
+ <xs:documentation>How to measure this criterion (e.g., "Code coverage > 80%")</xs:documentation>
183
+ </xs:annotation>
184
+ </xs:element>
185
+ </xs:sequence>
186
+ <xs:attribute name="id" type="xs:ID" use="optional"/>
187
+ <xs:attribute name="required" type="xs:boolean" use="optional" default="true"/>
188
+ </xs:complexType>
189
+ </xs:element>
190
+ </xs:sequence>
191
+ </xs:complexType>
192
+
193
+ <!-- Context information -->
194
+ <xs:complexType name="contextType">
195
+ <xs:sequence>
196
+ <xs:element name="background" type="xs:string" minOccurs="0">
197
+ <xs:annotation>
198
+ <xs:documentation>Background information the prompt executor should know</xs:documentation>
199
+ </xs:annotation>
200
+ </xs:element>
201
+ <xs:element name="assumptions" minOccurs="0">
202
+ <xs:complexType>
203
+ <xs:sequence>
204
+ <xs:element name="assumption" type="xs:string" maxOccurs="unbounded"/>
205
+ </xs:sequence>
206
+ </xs:complexType>
207
+ </xs:element>
208
+ <xs:element name="dependencies" minOccurs="0">
209
+ <xs:complexType>
210
+ <xs:sequence>
211
+ <xs:element name="dependency" maxOccurs="unbounded">
212
+ <xs:complexType>
213
+ <xs:simpleContent>
214
+ <xs:extension base="xs:string">
215
+ <xs:attribute name="type" use="optional">
216
+ <xs:simpleType>
217
+ <xs:restriction base="xs:string">
218
+ <xs:enumeration value="file"/>
219
+ <xs:enumeration value="command"/>
220
+ <xs:enumeration value="data"/>
221
+ <xs:enumeration value="service"/>
222
+ </xs:restriction>
223
+ </xs:simpleType>
224
+ </xs:attribute>
225
+ </xs:extension>
226
+ </xs:simpleContent>
227
+ </xs:complexType>
228
+ </xs:element>
229
+ </xs:sequence>
230
+ </xs:complexType>
231
+ </xs:element>
232
+ </xs:sequence>
233
+ </xs:complexType>
234
+
235
+ <!-- Tool specification -->
236
+ <xs:complexType name="toolsType">
237
+ <xs:sequence>
238
+ <xs:element name="tool" maxOccurs="unbounded">
239
+ <xs:complexType>
240
+ <xs:sequence>
241
+ <xs:element name="name" type="xs:string"/>
242
+ <xs:element name="purpose" type="xs:string"/>
243
+ <xs:element name="when_to_use" type="xs:string" minOccurs="0"/>
244
+ </xs:sequence>
245
+ <xs:attribute name="required" type="xs:boolean" use="optional" default="true"/>
246
+ </xs:complexType>
247
+ </xs:element>
248
+ </xs:sequence>
249
+ </xs:complexType>
250
+
251
+ <!-- Thought process guidance -->
252
+ <xs:complexType name="thinkingType">
253
+ <xs:sequence>
254
+ <xs:element name="approach" type="xs:string">
255
+ <xs:annotation>
256
+ <xs:documentation>How to approach the task (e.g., "Research first, then implement")</xs:documentation>
257
+ </xs:annotation>
258
+ </xs:element>
259
+ <xs:element name="steps" minOccurs="0">
260
+ <xs:complexType>
261
+ <xs:sequence>
262
+ <xs:element name="step" maxOccurs="unbounded">
263
+ <xs:complexType>
264
+ <xs:sequence>
265
+ <xs:element name="description" type="xs:string"/>
266
+ <xs:element name="checkpoint" type="xs:string" minOccurs="0">
267
+ <xs:annotation>
268
+ <xs:documentation>What to verify before proceeding</xs:documentation>
269
+ </xs:annotation>
270
+ </xs:element>
271
+ </xs:sequence>
272
+ <xs:attribute name="order" type="xs:positiveInteger" use="required"/>
273
+ <xs:attribute name="optional" type="xs:boolean" use="optional" default="false"/>
274
+ </xs:complexType>
275
+ </xs:element>
276
+ </xs:sequence>
277
+ </xs:complexType>
278
+ </xs:element>
279
+ <xs:element name="pitfalls" minOccurs="0">
280
+ <xs:complexType>
281
+ <xs:sequence>
282
+ <xs:element name="pitfall" type="xs:string" maxOccurs="unbounded"/>
283
+ </xs:sequence>
284
+ </xs:complexType>
285
+ </xs:element>
286
+ </xs:sequence>
287
+ </xs:complexType>
288
+
289
+ <!-- Error handling guidance -->
290
+ <xs:complexType name="errorHandlingType">
291
+ <xs:sequence>
292
+ <xs:element name="on_failure" type="xs:string">
293
+ <xs:annotation>
294
+ <xs:documentation>What to do when things go wrong</xs:documentation>
295
+ </xs:annotation>
296
+ </xs:element>
297
+ <xs:element name="escalation" type="xs:string" minOccurs="0">
298
+ <xs:annotation>
299
+ <xs:documentation>When and how to escalate to user or Queen</xs:documentation>
300
+ </xs:annotation>
301
+ </xs:element>
302
+ <xs:element name="recovery_steps" minOccurs="0">
303
+ <xs:complexType>
304
+ <xs:sequence>
305
+ <xs:element name="step" type="xs:string" maxOccurs="unbounded"/>
306
+ </xs:sequence>
307
+ </xs:complexType>
308
+ </xs:element>
309
+ </xs:sequence>
310
+ </xs:complexType>
311
+
312
+ <!-- Metadata -->
313
+ <xs:complexType name="metadataType">
314
+ <xs:sequence>
315
+ <xs:element name="version" type="versionType"/>
316
+ <xs:element name="author" type="xs:string" minOccurs="0"/>
317
+ <xs:element name="created" type="xs:dateTime" minOccurs="0"/>
318
+ <xs:element name="modified" type="xs:dateTime" minOccurs="0"/>
319
+ <xs:element name="tags" minOccurs="0">
320
+ <xs:complexType>
321
+ <xs:sequence>
322
+ <xs:element name="tag" type="xs:string" maxOccurs="unbounded"/>
323
+ </xs:sequence>
324
+ </xs:complexType>
325
+ </xs:element>
326
+ </xs:sequence>
327
+ </xs:complexType>
328
+
329
+ <!-- ============================================================ -->
330
+ <!-- Root Element: Aether Prompt -->
331
+ <!-- ============================================================ -->
332
+
333
+ <xs:element name="aether-prompt">
334
+ <xs:complexType>
335
+ <xs:sequence>
336
+ <!-- Metadata -->
337
+ <xs:element name="metadata" type="metadataType" minOccurs="0"/>
338
+
339
+ <!-- Identification -->
340
+ <xs:element name="name" type="xs:string">
341
+ <xs:annotation>
342
+ <xs:documentation>Unique name for this prompt</xs:documentation>
343
+ </xs:annotation>
344
+ </xs:element>
345
+
346
+ <xs:element name="type" type="promptType"/>
347
+
348
+ <xs:element name="caste" type="casteType" minOccurs="0">
349
+ <xs:annotation>
350
+ <xs:documentation>Required for worker-type prompts</xs:documentation>
351
+ </xs:annotation>
352
+ </xs:element>
353
+
354
+ <!-- Core Content -->
355
+ <xs:element name="objective" type="xs:string">
356
+ <xs:annotation>
357
+ <xs:documentation>What this prompt should accomplish</xs:documentation>
358
+ </xs:annotation>
359
+ </xs:element>
360
+
361
+ <xs:element name="context" type="contextType" minOccurs="0"/>
362
+
363
+ <xs:element name="requirements" type="requirementsType">
364
+ <xs:annotation>
365
+ <xs:documentation>What must be done to complete this prompt successfully</xs:documentation>
366
+ </xs:annotation>
367
+ </xs:element>
368
+
369
+ <xs:element name="constraints" type="constraintsType" minOccurs="0">
370
+ <xs:annotation>
371
+ <xs:documentation>Hard and soft constraints on execution</xs:documentation>
372
+ </xs:annotation>
373
+ </xs:element>
374
+
375
+ <xs:element name="thinking" type="thinkingType" minOccurs="0">
376
+ <xs:annotation>
377
+ <xs:documentation>Guidance on how to think about and approach the task</xs:documentation>
378
+ </xs:annotation>
379
+ </xs:element>
380
+
381
+ <xs:element name="tools" type="toolsType" minOccurs="0">
382
+ <xs:annotation>
383
+ <xs:documentation>Tools available and when to use them</xs:documentation>
384
+ </xs:annotation>
385
+ </xs:element>
386
+
387
+ <xs:element name="output" type="outputType">
388
+ <xs:annotation>
389
+ <xs:documentation>Expected output format and structure</xs:documentation>
390
+ </xs:annotation>
391
+ </xs:element>
392
+
393
+ <xs:element name="verification" type="verificationType">
394
+ <xs:annotation>
395
+ <xs:documentation>How to verify the output is correct</xs:documentation>
396
+ </xs:annotation>
397
+ </xs:element>
398
+
399
+ <xs:element name="success_criteria" type="successCriteriaType">
400
+ <xs:annotation>
401
+ <xs:documentation>What constitutes successful completion</xs:documentation>
402
+ </xs:annotation>
403
+ </xs:element>
404
+
405
+ <xs:element name="error_handling" type="errorHandlingType" minOccurs="0">
406
+ <xs:annotation>
407
+ <xs:documentation>How to handle errors and edge cases</xs:documentation>
408
+ </xs:annotation>
409
+ </xs:element>
410
+ </xs:sequence>
411
+
412
+ <xs:attribute name="version" type="versionType" use="optional" default="1.0.0"/>
413
+ </xs:complexType>
414
+ </xs:element>
415
+
416
+ </xs:schema>