aether-colony 3.1.5 → 3.1.16

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 (133) hide show
  1. package/.claude/commands/ant/archaeology.md +12 -0
  2. package/.claude/commands/ant/build.md +382 -319
  3. package/.claude/commands/ant/chaos.md +23 -1
  4. package/.claude/commands/ant/colonize.md +147 -87
  5. package/.claude/commands/ant/continue.md +213 -23
  6. package/.claude/commands/ant/council.md +22 -0
  7. package/.claude/commands/ant/dream.md +18 -0
  8. package/.claude/commands/ant/entomb.md +178 -6
  9. package/.claude/commands/ant/init.md +87 -13
  10. package/.claude/commands/ant/lay-eggs.md +45 -5
  11. package/.claude/commands/ant/oracle.md +82 -9
  12. package/.claude/commands/ant/organize.md +2 -2
  13. package/.claude/commands/ant/pause-colony.md +86 -28
  14. package/.claude/commands/ant/phase.md +26 -0
  15. package/.claude/commands/ant/plan.md +204 -111
  16. package/.claude/commands/ant/resume-colony.md +23 -1
  17. package/.claude/commands/ant/resume.md +159 -0
  18. package/.claude/commands/ant/seal.md +177 -3
  19. package/.claude/commands/ant/swarm.md +78 -97
  20. package/.claude/commands/ant/verify-castes.md +7 -7
  21. package/.claude/commands/ant/watch.md +17 -0
  22. package/.opencode/agents/aether-ambassador.md +97 -0
  23. package/.opencode/agents/aether-archaeologist.md +91 -0
  24. package/.opencode/agents/aether-architect.md +66 -0
  25. package/.opencode/agents/aether-auditor.md +111 -0
  26. package/.opencode/agents/aether-builder.md +28 -10
  27. package/.opencode/agents/aether-chaos.md +98 -0
  28. package/.opencode/agents/aether-chronicler.md +80 -0
  29. package/.opencode/agents/aether-gatekeeper.md +107 -0
  30. package/.opencode/agents/aether-guardian.md +107 -0
  31. package/.opencode/agents/aether-includer.md +108 -0
  32. package/.opencode/agents/aether-keeper.md +106 -0
  33. package/.opencode/agents/aether-measurer.md +119 -0
  34. package/.opencode/agents/aether-probe.md +91 -0
  35. package/.opencode/agents/aether-queen.md +72 -19
  36. package/.opencode/agents/aether-route-setter.md +85 -0
  37. package/.opencode/agents/aether-sage.md +98 -0
  38. package/.opencode/agents/aether-scout.md +33 -15
  39. package/.opencode/agents/aether-surveyor-disciplines.md +334 -0
  40. package/.opencode/agents/aether-surveyor-nest.md +272 -0
  41. package/.opencode/agents/aether-surveyor-pathogens.md +209 -0
  42. package/.opencode/agents/aether-surveyor-provisions.md +277 -0
  43. package/.opencode/agents/aether-tracker.md +91 -0
  44. package/.opencode/agents/aether-watcher.md +30 -12
  45. package/.opencode/agents/aether-weaver.md +87 -0
  46. package/.opencode/agents/workers.md +1034 -0
  47. package/.opencode/commands/ant/archaeology.md +44 -26
  48. package/.opencode/commands/ant/build.md +326 -294
  49. package/.opencode/commands/ant/chaos.md +32 -4
  50. package/.opencode/commands/ant/colonize.md +119 -93
  51. package/.opencode/commands/ant/continue.md +98 -10
  52. package/.opencode/commands/ant/council.md +28 -0
  53. package/.opencode/commands/ant/dream.md +24 -0
  54. package/.opencode/commands/ant/entomb.md +73 -1
  55. package/.opencode/commands/ant/feedback.md +8 -2
  56. package/.opencode/commands/ant/flag.md +9 -3
  57. package/.opencode/commands/ant/flags.md +8 -2
  58. package/.opencode/commands/ant/focus.md +8 -2
  59. package/.opencode/commands/ant/help.md +12 -0
  60. package/.opencode/commands/ant/init.md +49 -4
  61. package/.opencode/commands/ant/lay-eggs.md +30 -2
  62. package/.opencode/commands/ant/oracle.md +39 -7
  63. package/.opencode/commands/ant/organize.md +8 -2
  64. package/.opencode/commands/ant/pause-colony.md +54 -1
  65. package/.opencode/commands/ant/phase.md +36 -4
  66. package/.opencode/commands/ant/plan.md +224 -116
  67. package/.opencode/commands/ant/redirect.md +8 -2
  68. package/.opencode/commands/ant/resume-colony.md +51 -26
  69. package/.opencode/commands/ant/seal.md +76 -0
  70. package/.opencode/commands/ant/status.md +50 -20
  71. package/.opencode/commands/ant/swarm.md +108 -104
  72. package/.opencode/commands/ant/tunnels.md +107 -2
  73. package/CHANGELOG.md +16 -0
  74. package/README.md +199 -86
  75. package/bin/cli.js +142 -25
  76. package/bin/generate-commands.sh +100 -16
  77. package/bin/lib/caste-colors.js +5 -5
  78. package/bin/lib/errors.js +16 -0
  79. package/bin/lib/file-lock.js +279 -44
  80. package/bin/lib/state-sync.js +206 -23
  81. package/bin/lib/update-transaction.js +206 -24
  82. package/bin/sync-to-runtime.sh +138 -0
  83. package/package.json +2 -2
  84. package/runtime/CONTEXT.md +160 -0
  85. package/runtime/aether-utils.sh +1421 -55
  86. package/runtime/docs/AETHER-2.0-IMPLEMENTATION-PLAN.md +1343 -0
  87. package/runtime/docs/AETHER-PHEROMONE-SYSTEM-MASTER-SPEC.md +2642 -0
  88. package/runtime/docs/PHEROMONE-INJECTION.md +240 -0
  89. package/runtime/docs/PHEROMONE-INTEGRATION.md +192 -0
  90. package/runtime/docs/PHEROMONE-SYSTEM-DESIGN.md +426 -0
  91. package/runtime/docs/README.md +94 -0
  92. package/runtime/docs/VISUAL-OUTPUT-SPEC.md +219 -0
  93. package/runtime/docs/biological-reference.md +272 -0
  94. package/runtime/docs/codebase-review.md +399 -0
  95. package/runtime/docs/command-sync.md +164 -0
  96. package/runtime/docs/implementation-learnings.md +89 -0
  97. package/runtime/docs/known-issues.md +217 -0
  98. package/runtime/docs/namespace.md +148 -0
  99. package/runtime/docs/planning-discipline.md +159 -0
  100. package/runtime/exchange/pheromone-xml.sh +574 -0
  101. package/runtime/exchange/registry-xml.sh +269 -0
  102. package/runtime/exchange/wisdom-xml.sh +312 -0
  103. package/runtime/lib/queen-utils.sh +729 -0
  104. package/runtime/model-profiles.yaml +100 -0
  105. package/runtime/recover.sh +136 -0
  106. package/runtime/schemas/aether-types.xsd +255 -0
  107. package/runtime/schemas/colony-registry.xsd +309 -0
  108. package/runtime/schemas/pheromone.xsd +163 -0
  109. package/runtime/schemas/prompt.xsd +416 -0
  110. package/runtime/schemas/queen-wisdom.xsd +325 -0
  111. package/runtime/schemas/worker-priming.xsd +276 -0
  112. package/runtime/templates/QUEEN.md.template +79 -0
  113. package/runtime/utils/atomic-write.sh +5 -5
  114. package/runtime/utils/chamber-utils.sh +6 -3
  115. package/runtime/utils/error-handler.sh +200 -0
  116. package/runtime/utils/queen-to-md.xsl +395 -0
  117. package/runtime/utils/spawn-tree.sh +428 -0
  118. package/runtime/utils/spawn-with-model.sh +56 -0
  119. package/runtime/utils/state-loader.sh +215 -0
  120. package/runtime/utils/swarm-display.sh +5 -5
  121. package/runtime/utils/watch-spawn-tree.sh +90 -22
  122. package/runtime/utils/xml-compose.sh +247 -0
  123. package/runtime/utils/xml-core.sh +186 -0
  124. package/runtime/utils/xml-utils.sh +2196 -0
  125. package/runtime/verification-loop.md +1 -1
  126. package/runtime/workers-new-castes.md +516 -0
  127. package/runtime/workers.md +18 -6
  128. package/.aether/visualizations/anthill-stages/brood-stable.txt +0 -26
  129. package/.aether/visualizations/anthill-stages/crowned-anthill.txt +0 -30
  130. package/.aether/visualizations/anthill-stages/first-mound.txt +0 -18
  131. package/.aether/visualizations/anthill-stages/open-chambers.txt +0 -24
  132. package/.aether/visualizations/anthill-stages/sealed-chambers.txt +0 -28
  133. package/.aether/visualizations/anthill-stages/ventilated-nest.txt +0 -27
@@ -0,0 +1,100 @@
1
+ version: '1.0'
2
+ description: Default model assignments for Aether colony workers
3
+ profile: default
4
+ worker_models:
5
+ prime: glm-5
6
+ archaeologist: glm-5
7
+ architect: glm-5
8
+ oracle: minimax-2.5
9
+ route_setter: kimi-k2.5
10
+ builder: kimi-k2.5
11
+ watcher: kimi-k2.5
12
+ scout: kimi-k2.5
13
+ chaos: kimi-k2.5
14
+ colonizer: kimi-k2.5
15
+ model_metadata:
16
+ glm-5:
17
+ description: '744B MoE model (40B active), long-horizon agentic engineering'
18
+ provider: z_ai
19
+ capabilities:
20
+ - planning
21
+ - coordination
22
+ - long_context
23
+ - complex_reasoning
24
+ - agentic_workflows
25
+ context_window: 200000
26
+ speed: medium
27
+ cost_tier: high
28
+ best_for:
29
+ - 'Long-horizon task execution (tested: 1 year business simulation)'
30
+ - Strategic coordination and planning
31
+ - Historical pattern analysis across large contexts
32
+ - Multi-step autonomous workflows
33
+ minimax-2.5:
34
+ description: Frontier model for architectural planning and agentic tool use
35
+ provider: minimax
36
+ capabilities:
37
+ - system_design
38
+ - architecture
39
+ - browse
40
+ - search
41
+ - task_decomposition
42
+ context_window: 200000
43
+ speed: fast
44
+ cost_tier: medium
45
+ best_for:
46
+ - Architectural-level planning and system design
47
+ - Research with browse/search (76.3% BrowseComp)
48
+ - Efficient task decomposition (20% fewer search rounds)
49
+ - Full-stack development (80.2% SWE-Bench Verified)
50
+ kimi-k2.5:
51
+ description: '1T MoE model (32B active), multimodal agent with swarm capabilities'
52
+ provider: kimi
53
+ capabilities:
54
+ - coding
55
+ - multimodal
56
+ - agent_swarm
57
+ - visual_coding
58
+ - validation
59
+ context_window: 256000
60
+ speed: fast
61
+ cost_tier: low
62
+ best_for:
63
+ - Code generation and refactoring (76.8% SWE-Bench)
64
+ - Visual coding (screenshots to code)
65
+ - Parallel exploration (up to 100 sub-agents)
66
+ - Validation and testing workflows
67
+ task_routing:
68
+ default_model: kimi-k2.5
69
+ complexity_indicators:
70
+ complex:
71
+ keywords:
72
+ - design
73
+ - architecture
74
+ - plan
75
+ - coordinate
76
+ - synthesize
77
+ - strategize
78
+ - optimize
79
+ model: glm-5
80
+ simple:
81
+ keywords:
82
+ - implement
83
+ - code
84
+ - refactor
85
+ - write
86
+ - create
87
+ model: kimi-k2.5
88
+ validate:
89
+ keywords:
90
+ - test
91
+ - validate
92
+ - verify
93
+ - check
94
+ - review
95
+ - audit
96
+ model: minimax-2.5
97
+ proxy:
98
+ endpoint: 'http://localhost:4000'
99
+ auth_token: ${LITELLM_AUTH_TOKEN:-sk-litellm-local}
100
+ health_check: 'http://localhost:4000/health'
@@ -0,0 +1,136 @@
1
+ #!/bin/bash
2
+ # Aether v3.1 Recovery Script
3
+ # Run this after reading RECOVERY-PLAN.md
4
+
5
+ set -e
6
+
7
+ echo "╔══════════════════════════════════════════════════════════════╗"
8
+ echo "║ AETHER v3.1 RECOVERY - RUNNING SYNC ║"
9
+ echo "╚══════════════════════════════════════════════════════════════╝"
10
+ echo ""
11
+
12
+ # Colors
13
+ RED='\033[0;31m'
14
+ GREEN='\033[0;32m'
15
+ YELLOW='\033[1;33m'
16
+ NC='\033[0m' # No Color
17
+
18
+ # Step 1: Check if we're in the right place
19
+ if [ ! -f "package.json" ] || [ ! -d ".aether" ] || [ ! -d "runtime" ]; then
20
+ echo -e "${RED}ERROR: Must run from Aether repo root${NC}"
21
+ exit 1
22
+ fi
23
+
24
+ # Step 2: Commit any staged changes
25
+ echo "Step 1: Checking git status..."
26
+ if ! git diff --cached --quiet; then
27
+ echo "Found staged changes. Committing..."
28
+ git commit -m "recovery: staged changes before sync"
29
+ fi
30
+
31
+ # Step 3: Sync runtime/ from .aether/
32
+ echo ""
33
+ echo "Step 2: Syncing runtime/ from .aether/..."
34
+ echo "------------------------------------------"
35
+
36
+ # Core files
37
+ echo " → workers.md"
38
+ cp .aether/workers.md runtime/workers.md
39
+
40
+ echo " → aether-utils.sh"
41
+ cp .aether/aether-utils.sh runtime/aether-utils.sh
42
+
43
+ echo " → verification-loop.md"
44
+ cp .aether/verification-loop.md runtime/verification-loop.md 2>/dev/null || echo " (skipped - not in .aether)"
45
+
46
+ # Utils - sync all files
47
+ echo ""
48
+ echo " → utilities/"
49
+ for file in .aether/utils/*.sh; do
50
+ if [ -f "$file" ]; then
51
+ filename=$(basename "$file")
52
+ echo " copying $filename"
53
+ cp "$file" "runtime/utils/$filename"
54
+ fi
55
+ done
56
+
57
+ # Docs - ensure runtime/docs/ exists and has files
58
+ if [ -d ".aether/docs" ]; then
59
+ echo ""
60
+ echo " → docs/"
61
+ mkdir -p runtime/docs
62
+ for file in .aether/docs/*.md .aether/docs/*.json 2>/dev/null; do
63
+ if [ -f "$file" ]; then
64
+ filename=$(basename "$file")
65
+ echo " copying $filename"
66
+ cp "$file" "runtime/docs/$filename"
67
+ fi
68
+ done
69
+ fi
70
+
71
+ # Step 4: Verify the sync
72
+ echo ""
73
+ echo "Step 3: Verifying sync..."
74
+ echo "------------------------------------------"
75
+
76
+ # Check emoji section
77
+ if grep -q "Caste Emoji Mapping:" runtime/workers.md; then
78
+ echo -e "${GREEN} ✓ workers.md has emoji section${NC}"
79
+ else
80
+ echo -e "${RED} ✗ workers.md MISSING emoji section${NC}"
81
+ fi
82
+
83
+ # Check get_caste_emoji
84
+ if grep -q "get_caste_emoji()" runtime/aether-utils.sh; then
85
+ echo -e "${GREEN} ✓ aether-utils.sh has get_caste_emoji${NC}"
86
+ else
87
+ echo -e "${RED} ✗ aether-utils.sh MISSING get_caste_emoji${NC}"
88
+ fi
89
+
90
+ # Count utils files
91
+ RUNTIME_UTILS=$(ls runtime/utils/*.sh 2>/dev/null | wc -l)
92
+ AETHER_UTILS=$(ls .aether/utils/*.sh 2>/dev/null | wc -l)
93
+ echo " → runtime/utils: $RUNTIME_UTILS files"
94
+ echo " → .aether/utils: $AETHER_UTILS files"
95
+
96
+ if [ "$RUNTIME_UTILS" -eq "$AETHER_UTILS" ]; then
97
+ echo -e "${GREEN} ✓ Utils counts match${NC}"
98
+ else
99
+ echo -e "${YELLOW} ⚠ Utils counts differ (may be okay if some are .aether-specific)${NC}"
100
+ fi
101
+
102
+ # Step 5: Stage the changes
103
+ echo ""
104
+ echo "Step 4: Staging changes..."
105
+ git add runtime/
106
+
107
+ # Show status
108
+ echo ""
109
+ echo "Git status after sync:"
110
+ git status --short runtime/
111
+
112
+ # Step 6: Instructions
113
+ echo ""
114
+ echo "╔══════════════════════════════════════════════════════════════╗"
115
+ echo "║ RECOVERY SYNC COMPLETE ║"
116
+ echo "╚══════════════════════════════════════════════════════════════╝"
117
+ echo ""
118
+ echo "Next steps:"
119
+ echo ""
120
+ echo " 1. Review the changes:"
121
+ echo " git diff --cached runtime/"
122
+ echo ""
123
+ echo " 2. Commit the sync:"
124
+ echo " git commit -m 'sync: runtime/ updated from working .aether/'"
125
+ echo ""
126
+ echo " 3. Reinstall to update hub:"
127
+ echo " npm install -g ."
128
+ echo ""
129
+ echo " 4. Verify hub updated:"
130
+ echo " grep 'Caste Emoji Mapping:' ~/.aether/system/workers.md"
131
+ echo ""
132
+ echo " 5. Test in this repo:"
133
+ echo " /ant:init 'Test recovery'"
134
+ echo ""
135
+ echo "Remember: .aether/ is the SOURCE OF TRUTH. runtime/ is auto-populated by bin/sync-to-runtime.sh"
136
+ echo ""
@@ -0,0 +1,255 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ Aether Shared Types Schema
4
+
5
+ Purpose: Define common types used across all Aether Colony schemas.
6
+ Eliminates duplication of caste enumerations, version patterns,
7
+ and other shared type definitions.
8
+
9
+ Usage: Import into other schemas:
10
+ <xs:import namespace="http://aether.colony/schemas/types/1.0"
11
+ schemaLocation="aether-types.xsd"/>
12
+
13
+ Version: 1.0.0
14
+ Namespace: http://aether.colony/schemas/types/1.0
15
+ -->
16
+ <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
17
+ targetNamespace="http://aether.colony/schemas/types/1.0"
18
+ xmlns:types="http://aether.colony/schemas/types/1.0"
19
+ elementFormDefault="qualified">
20
+
21
+ <xs:annotation>
22
+ <xs:documentation>
23
+ Shared type definitions for the Aether Colony XML schema ecosystem.
24
+ Import this schema to use standardized types for castes, versions,
25
+ timestamps, priorities, and pheromone signal types.
26
+ </xs:documentation>
27
+ </xs:annotation>
28
+
29
+ <!-- ============================================================ -->
30
+ <!-- Caste Enumeration (Source of Truth) -->
31
+ <!-- ============================================================ -->
32
+
33
+ <xs:simpleType name="CasteEnum">
34
+ <xs:annotation>
35
+ <xs:documentation>
36
+ Complete enumeration of all worker castes in the Aether Colony system.
37
+ This is the single source of truth for caste definitions across all schemas.
38
+ </xs:documentation>
39
+ </xs:annotation>
40
+ <xs:restriction base="xs:string">
41
+ <xs:enumeration value="builder"/>
42
+ <xs:enumeration value="watcher"/>
43
+ <xs:enumeration value="scout"/>
44
+ <xs:enumeration value="chaos"/>
45
+ <xs:enumeration value="oracle"/>
46
+ <xs:enumeration value="architect"/>
47
+ <xs:enumeration value="prime"/>
48
+ <xs:enumeration value="colonizer"/>
49
+ <xs:enumeration value="route_setter"/>
50
+ <xs:enumeration value="archaeologist"/>
51
+ <xs:enumeration value="ambassador"/>
52
+ <xs:enumeration value="auditor"/>
53
+ <xs:enumeration value="chronicler"/>
54
+ <xs:enumeration value="gatekeeper"/>
55
+ <xs:enumeration value="guardian"/>
56
+ <xs:enumeration value="includer"/>
57
+ <xs:enumeration value="keeper"/>
58
+ <xs:enumeration value="measurer"/>
59
+ <xs:enumeration value="probe"/>
60
+ <xs:enumeration value="sage"/>
61
+ <xs:enumeration value="tracker"/>
62
+ <xs:enumeration value="weaver"/>
63
+ </xs:restriction>
64
+ </xs:simpleType>
65
+
66
+ <!-- ============================================================ -->
67
+ <!-- Version and Timestamp Types -->
68
+ <!-- ============================================================ -->
69
+
70
+ <xs:simpleType name="VersionType">
71
+ <xs:annotation>
72
+ <xs:documentation>
73
+ Semantic version string format (e.g., 1.0.0, 2.1.3-alpha)
74
+ </xs:documentation>
75
+ </xs:annotation>
76
+ <xs:restriction base="xs:string">
77
+ <xs:pattern value="[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9]+)?"/>
78
+ </xs:restriction>
79
+ </xs:simpleType>
80
+
81
+ <xs:simpleType name="TimestampType">
82
+ <xs:annotation>
83
+ <xs:documentation>
84
+ ISO 8601 timestamp format with optional milliseconds and timezone
85
+ Examples: 2026-02-16T14:30:00Z, 2026-02-16T14:30:00.123+01:00
86
+ </xs:documentation>
87
+ </xs:annotation>
88
+ <xs:restriction base="xs:string">
89
+ <xs:pattern value="\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:\d{2})?"/>
90
+ </xs:restriction>
91
+ </xs:simpleType>
92
+
93
+ <!-- ============================================================ -->
94
+ <!-- Priority and Signal Types -->
95
+ <!-- ============================================================ -->
96
+
97
+ <xs:simpleType name="PriorityType">
98
+ <xs:annotation>
99
+ <xs:documentation>
100
+ Priority levels for signals, tasks, and various colony operations.
101
+ Ordered from highest to lowest urgency.
102
+ </xs:documentation>
103
+ </xs:annotation>
104
+ <xs:restriction base="xs:string">
105
+ <xs:enumeration value="critical"/>
106
+ <xs:enumeration value="high"/>
107
+ <xs:enumeration value="normal"/>
108
+ <xs:enumeration value="low"/>
109
+ </xs:restriction>
110
+ </xs:simpleType>
111
+
112
+ <xs:simpleType name="PheromoneTypeEnum">
113
+ <xs:annotation>
114
+ <xs:documentation>
115
+ Types of pheromone signals used in colony communication.
116
+ These directional signals guide worker behavior without direct commands.
117
+ </xs:documentation>
118
+ </xs:annotation>
119
+ <xs:restriction base="xs:string">
120
+ <xs:enumeration value="FOCUS"/>
121
+ <xs:enumeration value="REDIRECT"/>
122
+ <xs:enumeration value="FEEDBACK"/>
123
+ <xs:enumeration value="PHILOSOPHY"/>
124
+ <xs:enumeration value="STACK"/>
125
+ <xs:enumeration value="PATTERN"/>
126
+ <xs:enumeration value="DECREE"/>
127
+ </xs:restriction>
128
+ </xs:simpleType>
129
+
130
+ <!-- ============================================================ -->
131
+ <!-- Identifier Types -->
132
+ <!-- ============================================================ -->
133
+
134
+ <xs:simpleType name="IdentifierType">
135
+ <xs:annotation>
136
+ <xs:documentation>
137
+ Standard identifier format: alphanumeric with hyphens and underscores.
138
+ Must start with a letter. Used for IDs, keys, and references.
139
+ </xs:documentation>
140
+ </xs:annotation>
141
+ <xs:restriction base="xs:string">
142
+ <xs:pattern value="[a-zA-Z][a-zA-Z0-9_-]*"/>
143
+ <xs:minLength value="1"/>
144
+ <xs:maxLength value="64"/>
145
+ </xs:restriction>
146
+ </xs:simpleType>
147
+
148
+ <xs:simpleType name="WorkerIdType">
149
+ <xs:annotation>
150
+ <xs:documentation>
151
+ Worker-specific identifier in kebab-case format.
152
+ Must be at least 3 characters for readability.
153
+ </xs:documentation>
154
+ </xs:annotation>
155
+ <xs:restriction base="xs:string">
156
+ <xs:pattern value="[a-z][a-z0-9-]*"/>
157
+ <xs:minLength value="3"/>
158
+ <xs:maxLength value="64"/>
159
+ </xs:restriction>
160
+ </xs:simpleType>
161
+
162
+ <xs:simpleType name="WisdomIdType">
163
+ <xs:annotation>
164
+ <xs:documentation>
165
+ Wisdom entry identifier in kebab-case format.
166
+ Used for queen-wisdom entries and patterns.
167
+ </xs:documentation>
168
+ </xs:annotation>
169
+ <xs:restriction base="xs:string">
170
+ <xs:pattern value="[a-z][a-z0-9-]*"/>
171
+ <xs:minLength value="3"/>
172
+ <xs:maxLength value="64"/>
173
+ </xs:restriction>
174
+ </xs:simpleType>
175
+
176
+ <!-- ============================================================ -->
177
+ <!-- Weight and Confidence Types -->
178
+ <!-- ============================================================ -->
179
+
180
+ <xs:simpleType name="WeightType">
181
+ <xs:annotation>
182
+ <xs:documentation>
183
+ Weight value for tags and priorities, range 0.0 to 1.0.
184
+ Stored with 2 decimal places of precision.
185
+ </xs:documentation>
186
+ </xs:annotation>
187
+ <xs:restriction base="xs:decimal">
188
+ <xs:minInclusive value="0.0"/>
189
+ <xs:maxInclusive value="1.0"/>
190
+ <xs:fractionDigits value="2"/>
191
+ </xs:restriction>
192
+ </xs:simpleType>
193
+
194
+ <xs:simpleType name="ConfidenceType">
195
+ <xs:annotation>
196
+ <xs:documentation>
197
+ Confidence score for wisdom entries and patterns, range 0.0 to 1.0.
198
+ Stored with 2 decimal places of precision.
199
+ </xs:documentation>
200
+ </xs:annotation>
201
+ <xs:restriction base="xs:decimal">
202
+ <xs:minInclusive value="0.0"/>
203
+ <xs:maxInclusive value="1.0"/>
204
+ <xs:fractionDigits value="2"/>
205
+ </xs:restriction>
206
+ </xs:simpleType>
207
+
208
+ <!-- ============================================================ -->
209
+ <!-- Match and Source Types -->
210
+ <!-- ============================================================ -->
211
+
212
+ <xs:simpleType name="MatchEnum">
213
+ <xs:annotation>
214
+ <xs:documentation>
215
+ Match mode for scope filtering: any (at least one), all (all required),
216
+ or none (exclude matching).
217
+ </xs:documentation>
218
+ </xs:annotation>
219
+ <xs:restriction base="xs:string">
220
+ <xs:enumeration value="any"/>
221
+ <xs:enumeration value="all"/>
222
+ <xs:enumeration value="none"/>
223
+ </xs:restriction>
224
+ </xs:simpleType>
225
+
226
+ <xs:simpleType name="SourceTypeEnum">
227
+ <xs:annotation>
228
+ <xs:documentation>
229
+ Source of a signal or entry: user-created, worker-generated,
230
+ system-originated, or from external integration.
231
+ </xs:documentation>
232
+ </xs:annotation>
233
+ <xs:restriction base="xs:string">
234
+ <xs:enumeration value="user"/>
235
+ <xs:enumeration value="worker"/>
236
+ <xs:enumeration value="system"/>
237
+ <xs:enumeration value="external"/>
238
+ </xs:restriction>
239
+ </xs:simpleType>
240
+
241
+ <xs:simpleType name="DataFormatEnum">
242
+ <xs:annotation>
243
+ <xs:documentation>
244
+ Format of structured data attachments.
245
+ </xs:documentation>
246
+ </xs:annotation>
247
+ <xs:restriction base="xs:string">
248
+ <xs:enumeration value="json"/>
249
+ <xs:enumeration value="xml"/>
250
+ <xs:enumeration value="yaml"/>
251
+ <xs:enumeration value="plain"/>
252
+ </xs:restriction>
253
+ </xs:simpleType>
254
+
255
+ </xs:schema>