agentera 0.0.0 → 3.0.0-dev.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 (256) hide show
  1. package/README.md +6 -45
  2. package/bundle/.agentera-npx-bundle.json +4 -0
  3. package/bundle/references/adapters/cursor.md +213 -0
  4. package/bundle/references/adapters/opencode.md +530 -0
  5. package/bundle/references/adapters/package-manifest-interface-model.yaml +337 -0
  6. package/bundle/references/adapters/package-registry.yaml +247 -0
  7. package/bundle/references/adapters/package-surface-characterization.md +48 -0
  8. package/bundle/references/adapters/runtime-adapter-characterization.md +79 -0
  9. package/bundle/references/adapters/runtime-adapter-interface-model.yaml +200 -0
  10. package/bundle/references/adapters/runtime-adapter-registry.yaml +548 -0
  11. package/bundle/references/adapters/runtime-feature-parity.md +189 -0
  12. package/bundle/references/analysis/benchmark.md +267 -0
  13. package/bundle/references/analysis/startup-measurement-contract.yaml +424 -0
  14. package/bundle/references/artifacts/artifact-registry-interface-model.yaml +288 -0
  15. package/bundle/references/cli/agent-ready-state-contract.yaml +950 -0
  16. package/bundle/references/cli/app-lifecycle-vocabulary.yaml +241 -0
  17. package/bundle/references/cli/audience-namespace-cli-migration.yaml +355 -0
  18. package/bundle/references/cli/bundle-skill-vocabulary.yaml +278 -0
  19. package/bundle/references/cli/capability-instruction-contract.yaml +123 -0
  20. package/bundle/references/cli/capability-tool-classification.yaml +53 -0
  21. package/bundle/references/cli/routing-execution-vocabulary.yaml +281 -0
  22. package/bundle/references/cli/update-channels.yaml +147 -0
  23. package/bundle/references/cli/vocabulary-index.yaml +160 -0
  24. package/bundle/references/cli/vocabulary.md +566 -0
  25. package/bundle/references/meta/documentation-inventory.md +43 -0
  26. package/bundle/references/v1-section-mapping.md +47 -0
  27. package/bundle/registry.json +39 -0
  28. package/bundle/skills/agentera/.claude-plugin/plugin.json +27 -0
  29. package/bundle/skills/agentera/SKILL.md +470 -0
  30. package/bundle/skills/agentera/agents/dokumentera.toml +6 -0
  31. package/bundle/skills/agentera/agents/hej.toml +6 -0
  32. package/bundle/skills/agentera/agents/inspektera.toml +6 -0
  33. package/bundle/skills/agentera/agents/inspirera.toml +6 -0
  34. package/bundle/skills/agentera/agents/optimera.toml +6 -0
  35. package/bundle/skills/agentera/agents/orkestrera.toml +6 -0
  36. package/bundle/skills/agentera/agents/planera.toml +6 -0
  37. package/bundle/skills/agentera/agents/profilera.toml +6 -0
  38. package/bundle/skills/agentera/agents/realisera.toml +6 -0
  39. package/bundle/skills/agentera/agents/resonera.toml +6 -0
  40. package/bundle/skills/agentera/agents/visionera.toml +6 -0
  41. package/bundle/skills/agentera/agents/visualisera.toml +6 -0
  42. package/bundle/skills/agentera/capabilities/dokumentera/instructions.md +428 -0
  43. package/bundle/skills/agentera/capabilities/dokumentera/schemas/artifacts.yaml +73 -0
  44. package/bundle/skills/agentera/capabilities/dokumentera/schemas/exit.yaml +35 -0
  45. package/bundle/skills/agentera/capabilities/dokumentera/schemas/triggers.yaml +35 -0
  46. package/bundle/skills/agentera/capabilities/dokumentera/schemas/validation.yaml +139 -0
  47. package/bundle/skills/agentera/capabilities/hej/instructions.md +331 -0
  48. package/bundle/skills/agentera/capabilities/hej/schemas/artifacts.yaml +69 -0
  49. package/bundle/skills/agentera/capabilities/hej/schemas/exit.yaml +32 -0
  50. package/bundle/skills/agentera/capabilities/hej/schemas/triggers.yaml +58 -0
  51. package/bundle/skills/agentera/capabilities/hej/schemas/validation.yaml +55 -0
  52. package/bundle/skills/agentera/capabilities/inspektera/instructions.md +514 -0
  53. package/bundle/skills/agentera/capabilities/inspektera/schemas/artifacts.yaml +76 -0
  54. package/bundle/skills/agentera/capabilities/inspektera/schemas/exit.yaml +36 -0
  55. package/bundle/skills/agentera/capabilities/inspektera/schemas/triggers.yaml +38 -0
  56. package/bundle/skills/agentera/capabilities/inspektera/schemas/validation.yaml +113 -0
  57. package/bundle/skills/agentera/capabilities/inspirera/instructions.md +280 -0
  58. package/bundle/skills/agentera/capabilities/inspirera/schemas/artifacts.yaml +24 -0
  59. package/bundle/skills/agentera/capabilities/inspirera/schemas/exit.yaml +33 -0
  60. package/bundle/skills/agentera/capabilities/inspirera/schemas/triggers.yaml +34 -0
  61. package/bundle/skills/agentera/capabilities/inspirera/schemas/validation.yaml +58 -0
  62. package/bundle/skills/agentera/capabilities/optimera/instructions.md +437 -0
  63. package/bundle/skills/agentera/capabilities/optimera/schemas/artifacts.yaml +69 -0
  64. package/bundle/skills/agentera/capabilities/optimera/schemas/exit.yaml +35 -0
  65. package/bundle/skills/agentera/capabilities/optimera/schemas/triggers.yaml +39 -0
  66. package/bundle/skills/agentera/capabilities/optimera/schemas/validation.yaml +91 -0
  67. package/bundle/skills/agentera/capabilities/orkestrera/instructions.md +433 -0
  68. package/bundle/skills/agentera/capabilities/orkestrera/schemas/artifacts.yaml +64 -0
  69. package/bundle/skills/agentera/capabilities/orkestrera/schemas/exit.yaml +34 -0
  70. package/bundle/skills/agentera/capabilities/orkestrera/schemas/triggers.yaml +42 -0
  71. package/bundle/skills/agentera/capabilities/orkestrera/schemas/validation.yaml +107 -0
  72. package/bundle/skills/agentera/capabilities/planera/instructions.md +368 -0
  73. package/bundle/skills/agentera/capabilities/planera/schemas/artifacts.yaml +62 -0
  74. package/bundle/skills/agentera/capabilities/planera/schemas/exit.yaml +33 -0
  75. package/bundle/skills/agentera/capabilities/planera/schemas/triggers.yaml +34 -0
  76. package/bundle/skills/agentera/capabilities/planera/schemas/validation.yaml +61 -0
  77. package/bundle/skills/agentera/capabilities/profilera/instructions.md +419 -0
  78. package/bundle/skills/agentera/capabilities/profilera/schemas/artifacts.yaml +18 -0
  79. package/bundle/skills/agentera/capabilities/profilera/schemas/exit.yaml +34 -0
  80. package/bundle/skills/agentera/capabilities/profilera/schemas/triggers.yaml +45 -0
  81. package/bundle/skills/agentera/capabilities/profilera/schemas/validation.yaml +57 -0
  82. package/bundle/skills/agentera/capabilities/realisera/instructions.md +403 -0
  83. package/bundle/skills/agentera/capabilities/realisera/schemas/artifacts.yaml +80 -0
  84. package/bundle/skills/agentera/capabilities/realisera/schemas/exit.yaml +35 -0
  85. package/bundle/skills/agentera/capabilities/realisera/schemas/triggers.yaml +39 -0
  86. package/bundle/skills/agentera/capabilities/realisera/schemas/validation.yaml +110 -0
  87. package/bundle/skills/agentera/capabilities/resonera/instructions.md +329 -0
  88. package/bundle/skills/agentera/capabilities/resonera/schemas/artifacts.yaml +47 -0
  89. package/bundle/skills/agentera/capabilities/resonera/schemas/exit.yaml +35 -0
  90. package/bundle/skills/agentera/capabilities/resonera/schemas/triggers.yaml +46 -0
  91. package/bundle/skills/agentera/capabilities/resonera/schemas/validation.yaml +77 -0
  92. package/bundle/skills/agentera/capabilities/visionera/instructions.md +309 -0
  93. package/bundle/skills/agentera/capabilities/visionera/schemas/artifacts.yaml +57 -0
  94. package/bundle/skills/agentera/capabilities/visionera/schemas/exit.yaml +35 -0
  95. package/bundle/skills/agentera/capabilities/visionera/schemas/triggers.yaml +41 -0
  96. package/bundle/skills/agentera/capabilities/visionera/schemas/validation.yaml +74 -0
  97. package/bundle/skills/agentera/capabilities/visualisera/instructions.md +400 -0
  98. package/bundle/skills/agentera/capabilities/visualisera/schemas/artifacts.yaml +44 -0
  99. package/bundle/skills/agentera/capabilities/visualisera/schemas/exit.yaml +34 -0
  100. package/bundle/skills/agentera/capabilities/visualisera/schemas/triggers.yaml +33 -0
  101. package/bundle/skills/agentera/capabilities/visualisera/schemas/validation.yaml +80 -0
  102. package/bundle/skills/agentera/capability_schema_contract.yaml +385 -0
  103. package/bundle/skills/agentera/protocol.yaml +463 -0
  104. package/bundle/skills/agentera/references/contract.md +1039 -0
  105. package/bundle/skills/agentera/schemas/artifacts/changelog.yaml +60 -0
  106. package/bundle/skills/agentera/schemas/artifacts/decisions.yaml +461 -0
  107. package/bundle/skills/agentera/schemas/artifacts/design.yaml +55 -0
  108. package/bundle/skills/agentera/schemas/artifacts/docs.yaml +402 -0
  109. package/bundle/skills/agentera/schemas/artifacts/experiments.yaml +373 -0
  110. package/bundle/skills/agentera/schemas/artifacts/health.yaml +484 -0
  111. package/bundle/skills/agentera/schemas/artifacts/objective.yaml +399 -0
  112. package/bundle/skills/agentera/schemas/artifacts/plan.yaml +342 -0
  113. package/bundle/skills/agentera/schemas/artifacts/progress.yaml +325 -0
  114. package/bundle/skills/agentera/schemas/artifacts/todo.yaml +110 -0
  115. package/bundle/skills/agentera/schemas/artifacts/vision.yaml +262 -0
  116. package/bundle/skills/hej/.claude-plugin/plugin.json +6 -0
  117. package/bundle/skills/hej/SKILL.md +69 -0
  118. package/bundle/skills/hej/agents/hej.toml +11 -0
  119. package/bundle/skills/hej/agents/openai.yaml +8 -0
  120. package/dist/analytics/extractCorpus.js +1791 -0
  121. package/dist/analytics/extractCorpus.js.map +1 -0
  122. package/dist/analytics/usageStats.js +487 -0
  123. package/dist/analytics/usageStats.js.map +1 -0
  124. package/dist/bin/agentera.js +4 -0
  125. package/dist/bin/agentera.js.map +1 -0
  126. package/dist/cli/appContext.js +226 -0
  127. package/dist/cli/appContext.js.map +1 -0
  128. package/dist/cli/argvalidate.js +41 -0
  129. package/dist/cli/argvalidate.js.map +1 -0
  130. package/dist/cli/capabilityContext.js +2421 -0
  131. package/dist/cli/capabilityContext.js.map +1 -0
  132. package/dist/cli/commands/backfill.js +84 -0
  133. package/dist/cli/commands/backfill.js.map +1 -0
  134. package/dist/cli/commands/capability.js +44 -0
  135. package/dist/cli/commands/capability.js.map +1 -0
  136. package/dist/cli/commands/compact.js +148 -0
  137. package/dist/cli/commands/compact.js.map +1 -0
  138. package/dist/cli/commands/doctor.js +180 -0
  139. package/dist/cli/commands/doctor.js.map +1 -0
  140. package/dist/cli/commands/lint.js +179 -0
  141. package/dist/cli/commands/lint.js.map +1 -0
  142. package/dist/cli/commands/prime.js +544 -0
  143. package/dist/cli/commands/prime.js.map +1 -0
  144. package/dist/cli/commands/query.js +346 -0
  145. package/dist/cli/commands/query.js.map +1 -0
  146. package/dist/cli/commands/report.js +210 -0
  147. package/dist/cli/commands/report.js.map +1 -0
  148. package/dist/cli/commands/schema.js +306 -0
  149. package/dist/cli/commands/schema.js.map +1 -0
  150. package/dist/cli/commands/state.js +1012 -0
  151. package/dist/cli/commands/state.js.map +1 -0
  152. package/dist/cli/commands/upgrade.js +48 -0
  153. package/dist/cli/commands/upgrade.js.map +1 -0
  154. package/dist/cli/commands/validate.js +519 -0
  155. package/dist/cli/commands/validate.js.map +1 -0
  156. package/dist/cli/commands/verify.js +204 -0
  157. package/dist/cli/commands/verify.js.map +1 -0
  158. package/dist/cli/dispatch.js +958 -0
  159. package/dist/cli/dispatch.js.map +1 -0
  160. package/dist/cli/orientation.js +595 -0
  161. package/dist/cli/orientation.js.map +1 -0
  162. package/dist/cli/prime-blob.js +3 -0
  163. package/dist/cli/prime-blob.js.map +1 -0
  164. package/dist/cli/stateQuery.js +292 -0
  165. package/dist/cli/stateQuery.js.map +1 -0
  166. package/dist/cli/structured.js +18 -0
  167. package/dist/cli/structured.js.map +1 -0
  168. package/dist/core/difflib.js +274 -0
  169. package/dist/core/difflib.js.map +1 -0
  170. package/dist/core/git.js +43 -0
  171. package/dist/core/git.js.map +1 -0
  172. package/dist/core/paths.js +50 -0
  173. package/dist/core/paths.js.map +1 -0
  174. package/dist/core/pyjson.js +101 -0
  175. package/dist/core/pyjson.js.map +1 -0
  176. package/dist/core/sourceRoot.js +72 -0
  177. package/dist/core/sourceRoot.js.map +1 -0
  178. package/dist/core/toml.js +11 -0
  179. package/dist/core/toml.js.map +1 -0
  180. package/dist/core/yaml.js +25 -0
  181. package/dist/core/yaml.js.map +1 -0
  182. package/dist/eval/evalSkills.js +258 -0
  183. package/dist/eval/evalSkills.js.map +1 -0
  184. package/dist/eval/semanticEval.js +148 -0
  185. package/dist/eval/semanticEval.js.map +1 -0
  186. package/dist/eval/semanticFixtures.js +227 -0
  187. package/dist/eval/semanticFixtures.js.map +1 -0
  188. package/dist/hooks/common.js +160 -0
  189. package/dist/hooks/common.js.map +1 -0
  190. package/dist/hooks/compaction.js +935 -0
  191. package/dist/hooks/compaction.js.map +1 -0
  192. package/dist/hooks/cursorPreToolUse.js +19 -0
  193. package/dist/hooks/cursorPreToolUse.js.map +1 -0
  194. package/dist/hooks/cursorSessionStart.js +71 -0
  195. package/dist/hooks/cursorSessionStart.js.map +1 -0
  196. package/dist/hooks/sessionStart.js +209 -0
  197. package/dist/hooks/sessionStart.js.map +1 -0
  198. package/dist/hooks/sessionStop.js +212 -0
  199. package/dist/hooks/sessionStop.js.map +1 -0
  200. package/dist/hooks/validateArtifact.js +933 -0
  201. package/dist/hooks/validateArtifact.js.map +1 -0
  202. package/dist/registries/artifactRegistry.js +206 -0
  203. package/dist/registries/artifactRegistry.js.map +1 -0
  204. package/dist/registries/capabilityContract.js +310 -0
  205. package/dist/registries/capabilityContract.js.map +1 -0
  206. package/dist/registries/packageRegistry.js +641 -0
  207. package/dist/registries/packageRegistry.js.map +1 -0
  208. package/dist/registries/runtimeAdapterRegistry.js +315 -0
  209. package/dist/registries/runtimeAdapterRegistry.js.map +1 -0
  210. package/dist/setup/codex.js +1056 -0
  211. package/dist/setup/codex.js.map +1 -0
  212. package/dist/setup/copilot.js +227 -0
  213. package/dist/setup/copilot.js.map +1 -0
  214. package/dist/setup/cursor.js +127 -0
  215. package/dist/setup/cursor.js.map +1 -0
  216. package/dist/setup/doctor.js +1276 -0
  217. package/dist/setup/doctor.js.map +1 -0
  218. package/dist/state/installRoot.js +279 -0
  219. package/dist/state/installRoot.js.map +1 -0
  220. package/dist/state/progressCommit.js +289 -0
  221. package/dist/state/progressCommit.js.map +1 -0
  222. package/dist/state/startupAnalysis.js +1953 -0
  223. package/dist/state/startupAnalysis.js.map +1 -0
  224. package/dist/upgrade/appModel.js +189 -0
  225. package/dist/upgrade/appModel.js.map +1 -0
  226. package/dist/upgrade/channels.js +208 -0
  227. package/dist/upgrade/channels.js.map +1 -0
  228. package/dist/upgrade/compatibility.js +201 -0
  229. package/dist/upgrade/compatibility.js.map +1 -0
  230. package/dist/upgrade/doctor.js +373 -0
  231. package/dist/upgrade/doctor.js.map +1 -0
  232. package/dist/upgrade/migrateArtifactsV2ToV3.js +332 -0
  233. package/dist/upgrade/migrateArtifactsV2ToV3.js.map +1 -0
  234. package/dist/upgrade/runtimeMigration.js +484 -0
  235. package/dist/upgrade/runtimeMigration.js.map +1 -0
  236. package/dist/upgrade/upgradeCommands.js +36 -0
  237. package/dist/upgrade/upgradeCommands.js.map +1 -0
  238. package/dist/upgrade/upgradeOrchestrator.js +299 -0
  239. package/dist/upgrade/upgradeOrchestrator.js.map +1 -0
  240. package/dist/upgrade/versionResolution.js +179 -0
  241. package/dist/upgrade/versionResolution.js.map +1 -0
  242. package/dist/validate/appHomeContract.js +150 -0
  243. package/dist/validate/appHomeContract.js.map +1 -0
  244. package/dist/validate/capability.js +412 -0
  245. package/dist/validate/capability.js.map +1 -0
  246. package/dist/validate/crossCapability.js +145 -0
  247. package/dist/validate/crossCapability.js.map +1 -0
  248. package/dist/validate/lifecycleAdapters.js +772 -0
  249. package/dist/validate/lifecycleAdapters.js.map +1 -0
  250. package/dist/validate/selfAudit.js +107 -0
  251. package/dist/validate/selfAudit.js.map +1 -0
  252. package/package.json +28 -8
  253. package/LICENSE +0 -201
  254. package/bin/agentera.mjs +0 -50
  255. package/lib/exec.mjs +0 -116
  256. package/lib/resolve.mjs +0 -129
@@ -0,0 +1,385 @@
1
+ # Capability Schema Contract
2
+ #
3
+ # Self-referential: this file IS a valid capability schema.
4
+ # Validating it against its own rules passes.
5
+ #
6
+ # The contract defines:
7
+ # 1. Required groups every capability schema must contain
8
+ # 2. Entry structure within each group (numbered, stable IDs)
9
+ # 3. Deprecation protocol (deprecated + replaced_by)
10
+ # 4. Directory structure requirements (instructions.md, schemas/)
11
+ # 5. Machine-readable validation rules consumed by future contract loaders
12
+
13
+ meta:
14
+ name: capability_schema_contract
15
+ version: "1.0.0"
16
+ description: >-
17
+ Defines what a valid capability schema looks like.
18
+ A capability directory must contain instructions.md and a schemas/ directory.
19
+ The union of all YAML files in schemas/ must contain all required groups.
20
+ capability_type: contract
21
+ self_referential: true
22
+
23
+ REQUIRED_GROUPS:
24
+ - TRIGGERS
25
+ - ARTIFACTS
26
+ - VALIDATION
27
+ - EXIT_CONDITIONS
28
+
29
+ ENTRY_SCHEMA:
30
+ description: >-
31
+ Every entry within a group follows this structure.
32
+ Entries are numbered map keys (1, 2, 3, ...).
33
+ Each entry MUST have a stable `id` field.
34
+ Entries MAY carry `deprecated: true` and `replaced_by: <id>`.
35
+ fields:
36
+ id:
37
+ type: string
38
+ required: true
39
+ description: "Stable identifier that survives renames. Format: <GROUP_PREFIX><N> (e.g. T1, A3, V2, E1)."
40
+ description:
41
+ type: string
42
+ required: true
43
+ description: Human-readable explanation of this entry.
44
+ priority:
45
+ type: string
46
+ required: false
47
+ description: >-
48
+ Priority of this trigger entry for routing confidence. Used in the
49
+ five-layer routing model (Decision 42). Valid values: high, medium, low.
50
+ Required for all TRIGGERS entries.
51
+ deprecated:
52
+ type: boolean
53
+ required: false
54
+ default: false
55
+ description: Mark this entry as deprecated. Deprecated entries must not be removed.
56
+ replaced_by:
57
+ type: string
58
+ required: false
59
+ description: >-
60
+ ID of the entry that replaces this deprecated entry.
61
+ Required when deprecated is true. Must reference a valid entry ID
62
+ within the same group.
63
+
64
+ GROUP_PREFIXES:
65
+ TRIGGERS: T
66
+ ARTIFACTS: A
67
+ VALIDATION: V
68
+ EXIT_CONDITIONS: E
69
+
70
+ DIRECTORY_REQUIREMENTS:
71
+ instruction_file:
72
+ path: instructions.md
73
+ type: file
74
+ required: true
75
+ description: Behavioral instructions the agent reads.
76
+ schemas_directory:
77
+ path: schemas
78
+ type: directory
79
+ required: true
80
+ description: Directory containing YAML schema files.
81
+ schema_files:
82
+ directory: schemas
83
+ glob: "*.yaml"
84
+ minimum_count: 1
85
+ description: Capability schema files whose union must satisfy REQUIRED_GROUPS.
86
+ optional_files: []
87
+
88
+ ENTRY_REQUIREMENTS:
89
+ description: >-
90
+ Structured entry rules for each required capability schema group. These
91
+ rules mirror current validator behavior and keep enforcement contract-owned.
92
+ default_required_fields:
93
+ - id
94
+ - description
95
+ groups:
96
+ TRIGGERS:
97
+ required_fields:
98
+ - id
99
+ - description
100
+ - priority
101
+ ARTIFACTS:
102
+ required_fields:
103
+ - id
104
+ - description
105
+ VALIDATION:
106
+ required_fields:
107
+ - id
108
+ - description
109
+ EXIT_CONDITIONS:
110
+ required_fields:
111
+ - id
112
+ - description
113
+ deprecation:
114
+ marker_field: deprecated
115
+ marker_value: true
116
+ replacement_field: replaced_by
117
+ replacement_required_when_deprecated: true
118
+ replacement_scope: same_group
119
+ replacement_target_field: id
120
+ unresolved_replacement_severity: warning
121
+ preserve_deprecated_entries: true
122
+
123
+ FIELD_RULES:
124
+ TRIGGERS:
125
+ priority:
126
+ required: true
127
+ allowed_values:
128
+ - high
129
+ - medium
130
+ - low
131
+ description: Priority of this trigger entry for routing confidence.
132
+
133
+ PRIMITIVE_REFERENCE_FIELDS:
134
+ description: >-
135
+ Capability schema fields that reference protocol primitive groups. This
136
+ contract owns the field-to-group mapping; protocol.yaml owns the primitive
137
+ group definitions and allowed values.
138
+ protocol_values_authority: protocol.yaml
139
+ fields:
140
+ severity:
141
+ protocol_groups:
142
+ - SEVERITY_FINDING
143
+ - SEVERITY_ISSUE
144
+ finding_severity:
145
+ protocol_groups:
146
+ - SEVERITY_FINDING
147
+ issue_severity:
148
+ protocol_groups:
149
+ - SEVERITY_ISSUE
150
+ decision_label:
151
+ protocol_groups:
152
+ - DECISION_LABELS
153
+ exit_signal:
154
+ protocol_groups:
155
+ - EXIT_SIGNALS
156
+ phase:
157
+ protocol_groups:
158
+ - PHASES
159
+
160
+ ROUTE_ALIASES:
161
+ description: >-
162
+ Primary plain slash-route aliases from Decision 43. These aliases are exact
163
+ `/agentera <alias>` routes for users; the Swedish -era capability directory
164
+ names remain canonical protocol identity. Alias routes are not CLI commands.
165
+ route_prefix: /agentera
166
+ canonical_name_precedence: true
167
+ cli_boundary: >-
168
+ Slash routes and state commands are distinct: `/agentera plan` routes to
169
+ planera, while `agentera plan` remains the state-oriented CLI command for
170
+ reading plan state. Do not add non-hej capability or alias commands to the
171
+ CLI.
172
+ primary_aliases:
173
+ - alias: status
174
+ capability: hej
175
+ - alias: vision
176
+ capability: visionera
177
+ - alias: discuss
178
+ capability: resonera
179
+ - alias: research
180
+ capability: inspirera
181
+ - alias: plan
182
+ capability: planera
183
+ - alias: build
184
+ capability: realisera
185
+ - alias: optimize
186
+ capability: optimera
187
+ - alias: audit
188
+ capability: inspektera
189
+ - alias: document
190
+ capability: dokumentera
191
+ - alias: profile
192
+ capability: profilera
193
+ - alias: design
194
+ capability: visualisera
195
+ - alias: orchestrate
196
+ capability: orkestrera
197
+
198
+ # ---------------------------------------------------------------------------
199
+ # The four required groups follow. The contract IS a valid capability schema,
200
+ # so these groups demonstrate the structure they define.
201
+ # ---------------------------------------------------------------------------
202
+
203
+ TRIGGERS:
204
+ 1:
205
+ id: T1
206
+ description: >-
207
+ Validate a capability directory. Invoked when checking if a capability
208
+ conforms to this contract (directory structure, required groups, entry
209
+ structure, deprecation consistency).
210
+ priority: high
211
+ patterns:
212
+ - "validate a capability"
213
+ - "check capability schema"
214
+ - "validate schema contract"
215
+ 2:
216
+ id: T2
217
+ description: >-
218
+ Parse a capability schema YAML file. Invoked when reading a single schema
219
+ file to verify it contains properly structured entries within its groups.
220
+ priority: medium
221
+ patterns:
222
+ - "parse capability schema"
223
+ - "read schema file"
224
+ 3:
225
+ id: T3
226
+ description: >-
227
+ Schema evolution check. Invoked when verifying that deprecated entries
228
+ have valid replaced_by references and no orphaned deprecation chains.
229
+ priority: medium
230
+ patterns:
231
+ - "check deprecation"
232
+ - "schema evolution"
233
+ 4:
234
+ id: T4
235
+ description: >-
236
+ Self-validation. The contract file validates against its own rules.
237
+ Ensures the meta-schema is a correct instance of itself.
238
+ priority: medium
239
+ patterns:
240
+ - "self-validate contract"
241
+ - "validate schema contract against itself"
242
+
243
+ ARTIFACTS:
244
+ 1:
245
+ id: A1
246
+ name: capability_directory
247
+ path: "capabilities/<name>/"
248
+ description: >-
249
+ A valid capability directory. Must contain instructions.md and schemas/.
250
+ The schemas/ directory holds YAML files whose union covers all required
251
+ groups.
252
+ produces: false
253
+ consumes: true
254
+ 2:
255
+ id: A2
256
+ name: schema_file
257
+ path: "capabilities/<name>/schemas/<filename>.yaml"
258
+ description: >-
259
+ A YAML file within a capability's schemas/ directory. Contains one or
260
+ more groups (TRIGGERS, ARTIFACTS, VALIDATION, EXIT_CONDITIONS). Multiple
261
+ files are allowed; the validator checks their union for completeness.
262
+ produces: false
263
+ consumes: true
264
+ 3:
265
+ id: A3
266
+ name: instruction_file
267
+ path: "capabilities/<name>/instructions.md"
268
+ description: >-
269
+ Behavioral instructions the agent reads. Markdown format. Contains the
270
+ capability's workflow, personality, interaction rules, and examples.
271
+ produces: false
272
+ consumes: true
273
+ 4:
274
+ id: A4
275
+ name: validation_report
276
+ path: "stdout"
277
+ description: >-
278
+ Output of the validation script. Reports pass/fail per check, with
279
+ details on any violations found.
280
+ produces: true
281
+ consumes: false
282
+
283
+ VALIDATION:
284
+ 1:
285
+ id: V1
286
+ rule: directory_structure
287
+ description: >-
288
+ Capability directory must contain instructions.md and schemas/ directory.
289
+ severity: error
290
+ checks:
291
+ - "instructions.md is a file"
292
+ - "schemas/ is a directory"
293
+ - "schemas/ contains at least one .yaml file"
294
+ 2:
295
+ id: V2
296
+ rule: required_groups_present
297
+ description: >-
298
+ The union of all YAML files in schemas/ must contain all four required
299
+ groups: TRIGGERS, ARTIFACTS, VALIDATION, EXIT_CONDITIONS.
300
+ severity: error
301
+ checks:
302
+ - "TRIGGERS group exists in at least one schema file"
303
+ - "ARTIFACTS group exists in at least one schema file"
304
+ - "VALIDATION group exists in at least one schema file"
305
+ - "EXIT_CONDITIONS group exists in at least one schema file"
306
+ 3:
307
+ id: V3
308
+ rule: numbered_entries
309
+ description: >-
310
+ Each group must contain numbered entries (1, 2, 3, ...) as map keys.
311
+ Non-numeric keys within groups are not allowed.
312
+ severity: error
313
+ checks:
314
+ - "Group keys are positive integers"
315
+ 4:
316
+ id: V4
317
+ rule: stable_ids
318
+ description: >-
319
+ Every entry must have a stable `id` field. The id should follow the
320
+ GROUP_PREFIX pattern (T for TRIGGERS, A for ARTIFACTS, V for VALIDATION,
321
+ E for EXIT_CONDITIONS) followed by a number.
322
+ severity: error
323
+ checks:
324
+ - "Each entry has an 'id' field"
325
+ - "Each entry has a 'description' field"
326
+ 5:
327
+ id: V5
328
+ rule: deprecation_consistency
329
+ description: >-
330
+ Entries marked deprecated: true must have a replaced_by field. The
331
+ replaced_by value must reference a valid entry ID within the same group.
332
+ Deprecated entries must not be removed; they stay for referential
333
+ integrity.
334
+ severity: warning
335
+ checks:
336
+ - "deprecated entries have replaced_by field"
337
+ - "replaced_by references a valid entry ID"
338
+ 6:
339
+ id: V6
340
+ rule: self_referential
341
+ description: >-
342
+ The capability schema contract file must pass its own validation rules.
343
+ This ensures the meta-schema is internally consistent.
344
+ severity: error
345
+ checks:
346
+ - "Contract file contains all required groups"
347
+ - "Contract file entries follow entry schema structure"
348
+ - "Contract file passes deprecation consistency check"
349
+
350
+ EXIT_CONDITIONS:
351
+ 1:
352
+ id: E1
353
+ condition: valid
354
+ description: >-
355
+ All validation checks pass. The capability directory conforms to the
356
+ schema contract.
357
+ exit_code: 0
358
+ 2:
359
+ id: E2
360
+ condition: invalid_structure
361
+ description: >-
362
+ Directory structure validation failed. Missing instructions.md, schemas/
363
+ directory, or YAML files.
364
+ exit_code: 1
365
+ 3:
366
+ id: E3
367
+ condition: missing_groups
368
+ description: >-
369
+ One or more required groups are absent from the union of schema files.
370
+ exit_code: 1
371
+ 4:
372
+ id: E4
373
+ condition: invalid_entries
374
+ description: >-
375
+ Entries within groups violate the entry schema (missing id, unnumbered
376
+ keys, missing description).
377
+ exit_code: 1
378
+ 5:
379
+ id: E5
380
+ condition: deprecation_warnings
381
+ description: >-
382
+ Deprecated entries have inconsistent replaced_by references. Treated as
383
+ warnings, not errors. Validation still passes (exit 0) but reports are
384
+ emitted to stderr.
385
+ exit_code: 0