agentera 0.0.0 → 3.0.0-dev.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 (252) 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 +233 -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 +120 -0
  23. package/bundle/references/cli/vocabulary-index.yaml +160 -0
  24. package/bundle/references/cli/vocabulary.md +562 -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 +545 -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 +49 -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 +962 -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 +1052 -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 +1269 -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 +197 -0
  227. package/dist/upgrade/channels.js.map +1 -0
  228. package/dist/upgrade/compatibility.js +197 -0
  229. package/dist/upgrade/compatibility.js.map +1 -0
  230. package/dist/upgrade/doctor.js +368 -0
  231. package/dist/upgrade/doctor.js.map +1 -0
  232. package/dist/upgrade/migrateArtifactsV2ToV3.js +412 -0
  233. package/dist/upgrade/migrateArtifactsV2ToV3.js.map +1 -0
  234. package/dist/upgrade/upgradeCommands.js +40 -0
  235. package/dist/upgrade/upgradeCommands.js.map +1 -0
  236. package/dist/upgrade/upgradeOrchestrator.js +280 -0
  237. package/dist/upgrade/upgradeOrchestrator.js.map +1 -0
  238. package/dist/validate/appHomeContract.js +150 -0
  239. package/dist/validate/appHomeContract.js.map +1 -0
  240. package/dist/validate/capability.js +412 -0
  241. package/dist/validate/capability.js.map +1 -0
  242. package/dist/validate/crossCapability.js +145 -0
  243. package/dist/validate/crossCapability.js.map +1 -0
  244. package/dist/validate/lifecycleAdapters.js +772 -0
  245. package/dist/validate/lifecycleAdapters.js.map +1 -0
  246. package/dist/validate/selfAudit.js +107 -0
  247. package/dist/validate/selfAudit.js.map +1 -0
  248. package/package.json +28 -8
  249. package/LICENSE +0 -201
  250. package/bin/agentera.mjs +0 -50
  251. package/lib/exec.mjs +0 -116
  252. package/lib/resolve.mjs +0 -129
@@ -0,0 +1,399 @@
1
+ # Objective Artifact Schema
2
+ #
3
+ # Optimization objective maintained by optimera. Each objective lives in its
4
+ # own subdirectory under .agentera/optimera/<name>/ and captures the metric,
5
+ # target, baseline, constraints, measurement method, gates, and scope.
6
+ #
7
+ # Structural pattern: UPPER_CASE groups with numbered entries and stable IDs,
8
+ # following capability_schema_contract.yaml and protocol.yaml conventions.
9
+ #
10
+ # ── Field-by-field mapping: v1 OBJECTIVE.md → v2 objective.yaml ──
11
+ #
12
+ # v1 Field v2 Field v2 ID
13
+ # ─────────────────────────────────────────────────────────────────────
14
+ # # <title> HEADER.title OB1
15
+ # **Status**: <status> HEADER.status OB2
16
+ # **Closed at**: <timestamp> HEADER.closed_at OB3
17
+ # **Final value**: <value> HEADER.final_value OB4
18
+ # **Target**: <target> HEADER.target_ref OB5
19
+ # **Reason**: <text> HEADER.reason OB6
20
+ # ## Objective / description OBJECTIVE.description OJ1
21
+ # ### Two-tier metric (or single) OBJECTIVE.metric_type OJ2
22
+ # **Tier 1 (primary metric)**: <text> METRIC.description OM1
23
+ # Direction/Unit/Variance METRIC.direction OM2
24
+ # METRIC.unit OM3
25
+ # METRIC.variance OM4
26
+ # **Tier 2 (behavioral)**: <text> VALIDATION.description OV1
27
+ # **Keep gate**: <text> VALIDATION.keep_gate OV2
28
+ # **Discard gate**: <text> VALIDATION.discard_gate OV3
29
+ # ### Why two tiers OBJECTIVE.rationale OJ3
30
+ # ## Why this matters OBJECTIVE.why OJ4
31
+ # ## Measurement OBJECTIVE.measurement OJ5
32
+ # ## Gates GATES.description OG1
33
+ # **Causal**: <text> GATES.causal OG2
34
+ # **Structural**: <text> GATES.structural OG3
35
+ # **Regression**: <text> GATES.regression OG4
36
+ # ## Constraints OBJECTIVE.constraints OJ6
37
+ # ## Scope / In scope SCOPE.included OS1
38
+ # ## Scope / Out of scope SCOPE.excluded OS2
39
+ # ## Baseline BASELINE.description OB7
40
+ # ## Measurement model BASELINE.model_notes OB8
41
+ #
42
+ # Protocol references:
43
+ # exit signals: EX1-EX4 (protocol.yaml EXIT_SIGNALS)
44
+ # visual tokens: VT1-VT4 (protocol.yaml VISUAL_TOKENS, status display)
45
+
46
+ meta:
47
+ name: objective
48
+ version: "1.0.0"
49
+ description: >-
50
+ Optimization objective. Produced by optimera and resonera. Each objective
51
+ lives in its own subdirectory under .agentera/optimera/<name>/.
52
+ artifact_type: agent_facing
53
+ path: ".agentera/optimera/<name>/objective.yaml"
54
+ producer: [optimera, resonera]
55
+ consumers: [hej, optimera, resonera]
56
+ format: yaml
57
+
58
+ GROUP_PREFIXES:
59
+ BUDGET: OB_BUDGET
60
+ HEADER: OB_HDR
61
+ OBJECTIVE: OJ
62
+ METRIC: OM
63
+ BASELINE: OB_BL
64
+ SCOPE: OS
65
+ GATES: OG
66
+ VALIDATION: OV
67
+ CLOSURE: OC
68
+ VALIDATION_RULES: OVR
69
+
70
+ BUDGET:
71
+ 1:
72
+ id: OB_BUDGET1
73
+ scope: full_file
74
+ max_words: null
75
+ description: >-
76
+ No explicit word budget for objectives. The objective document is
77
+ written once and referenced during optimization cycles. Size is
78
+ bounded by the measurement description's inherent complexity.
79
+
80
+ HEADER:
81
+ 1:
82
+ id: OB_HDR1
83
+ field: title
84
+ type: string
85
+ required: true
86
+ description: >-
87
+ Short descriptive title for the optimization objective. Used as
88
+ the subdirectory name when slugified.
89
+ validation:
90
+ - "Non-empty string"
91
+ 2:
92
+ id: OB_HDR2
93
+ field: status
94
+ type: string
95
+ required: true
96
+ description: >-
97
+ Objective lifecycle status. 'open' when optimization is active;
98
+ 'closed' when the target has been met or the objective abandoned.
99
+ validation:
100
+ - "Must be one of: open, closed"
101
+ 3:
102
+ id: OB_HDR3
103
+ field: closed_at
104
+ type: string
105
+ format: "ISO-8601 UTC"
106
+ required: false
107
+ description: >-
108
+ Timestamp when the objective was closed. Only present when
109
+ status is 'closed'. Per the objective closure contract.
110
+ 4:
111
+ id: OB_HDR4
112
+ field: final_value
113
+ type: string
114
+ required: false
115
+ description: >-
116
+ Final metric value when the objective was closed. Only present
117
+ when status is 'closed'.
118
+ 5:
119
+ id: OB_HDR5
120
+ field: target_ref
121
+ type: string
122
+ required: false
123
+ description: >-
124
+ Target value that was met or abandoned. Only present when
125
+ status is 'closed'.
126
+ 6:
127
+ id: OB_HDR6
128
+ field: reason
129
+ type: string
130
+ required: false
131
+ description: >-
132
+ Why the objective was closed (target met, abandoned, etc.).
133
+ Only present when status is 'closed'.
134
+
135
+ OBJECTIVE:
136
+ 1:
137
+ id: OJ1
138
+ field: description
139
+ type: string
140
+ required: true
141
+ description: >-
142
+ What the optimization objective sets out to achieve. Quantitative
143
+ target statement with percentage or absolute improvement goal.
144
+ validation:
145
+ - "Non-empty string"
146
+ 2:
147
+ id: OJ2
148
+ field: metric_type
149
+ type: string
150
+ required: false
151
+ description: >-
152
+ Whether the objective uses a single metric or multi-tier
153
+ (e.g., two-tier with primary and behavioral validation).
154
+ 'single' or 'multi'.
155
+ 3:
156
+ id: OJ3
157
+ field: rationale
158
+ type: string
159
+ required: false
160
+ description: >-
161
+ Why the metric design was chosen. Explains variance analysis,
162
+ signal-to-noise considerations, and tier separation logic.
163
+ 4:
164
+ id: OJ4
165
+ field: why
166
+ type: string
167
+ required: true
168
+ description: >-
169
+ Why this optimization matters to the project. Business case
170
+ for investing compute in this objective.
171
+ validation:
172
+ - "Non-empty string"
173
+ 5:
174
+ id: OJ5
175
+ field: measurement
176
+ type: string
177
+ required: true
178
+ description: >-
179
+ How the metric is measured. Describes the harness, vehicle,
180
+ substrate, model, flags, and output capture mechanism.
181
+ validation:
182
+ - "Non-empty string"
183
+ 6:
184
+ id: OJ6
185
+ field: constraints
186
+ type: list[string]
187
+ required: false
188
+ description: >-
189
+ Hard constraints that experiments must not violate. Each entry
190
+ names a constraint (e.g., linter must pass, no remote pushes).
191
+
192
+ METRIC:
193
+ 1:
194
+ id: OM1
195
+ field: description
196
+ type: string
197
+ required: true
198
+ description: >-
199
+ Detailed description of the primary metric. What is measured,
200
+ how it is computed, and what API or tool produces it.
201
+ validation:
202
+ - "Non-empty string"
203
+ 2:
204
+ id: OM2
205
+ field: direction
206
+ type: string
207
+ required: true
208
+ description: >-
209
+ Whether improvement means the metric goes up or down.
210
+ validation:
211
+ - "Must be one of: lower, higher"
212
+ 3:
213
+ id: OM3
214
+ field: unit
215
+ type: string
216
+ required: true
217
+ description: >-
218
+ Measurement unit (e.g., tokens, milliseconds, bytes, percent).
219
+ validation:
220
+ - "Non-empty string"
221
+ 4:
222
+ id: OM4
223
+ field: variance
224
+ type: string
225
+ required: false
226
+ description: >-
227
+ Expected variance characteristics (e.g., 'zero (deterministic)',
228
+ '~13% run-to-run'). Guides experiment interpretation.
229
+
230
+ BASELINE:
231
+ 1:
232
+ id: OB_BL1
233
+ field: description
234
+ type: string
235
+ required: true
236
+ description: >-
237
+ How the baseline is established. Describes the initial measurement
238
+ or Experiment 0 that locks the starting metric value.
239
+ validation:
240
+ - "Non-empty string"
241
+ 2:
242
+ id: OB_BL2
243
+ field: model_notes
244
+ type: string
245
+ required: false
246
+ description: >-
247
+ Notes on the measurement model, hermeticity tradeoffs, budget
248
+ constraints, and substrate design decisions.
249
+
250
+ SCOPE:
251
+ 1:
252
+ id: OS1
253
+ field: included
254
+ type: list[string]
255
+ required: true
256
+ description: >-
257
+ Files and surfaces that experiments may modify. Each entry names
258
+ a file path, directory, or system boundary that is fair game.
259
+ validation:
260
+ - "At least one entry required"
261
+ 2:
262
+ id: OS2
263
+ field: excluded
264
+ type: list[string]
265
+ required: true
266
+ description: >-
267
+ Files and surfaces that must never be modified, even if data
268
+ suggests wins there. Each entry names a hard boundary.
269
+
270
+ GATES:
271
+ 1:
272
+ id: OG1
273
+ field: description
274
+ type: string
275
+ required: false
276
+ description: >-
277
+ Overview of the gate structure. Explains which gates must all
278
+ pass for an experiment to be kept. Pre-registered; cannot be
279
+ loosened during optimization.
280
+ 2:
281
+ id: OG2
282
+ field: causal
283
+ type: string
284
+ required: false
285
+ description: >-
286
+ Causal gate: evidence that the skill activated and influenced
287
+ the run. Zero signal = discard.
288
+ 3:
289
+ id: OG3
290
+ field: structural
291
+ type: string
292
+ required: false
293
+ description: >-
294
+ Structural gate: evidence that the skill completed its core
295
+ workflow and produced meaningful output.
296
+ 4:
297
+ id: OG4
298
+ field: regression
299
+ type: string
300
+ required: false
301
+ description: >-
302
+ Regression gate: existing tests and linters must continue to
303
+ pass after the experiment's changes.
304
+
305
+ VALIDATION:
306
+ 1:
307
+ id: OV1
308
+ field: description
309
+ type: string
310
+ required: false
311
+ description: >-
312
+ Description of secondary (behavioral) validation tier, if
313
+ applicable. Explains what behavioral checks supplement the
314
+ primary metric.
315
+ 2:
316
+ id: OV2
317
+ field: keep_gate
318
+ type: string
319
+ required: false
320
+ description: >-
321
+ Conditions under which an experiment is kept. Both primary
322
+ metric improvement AND gate passage are typically required.
323
+ 3:
324
+ id: OV3
325
+ field: discard_gate
326
+ type: string
327
+ required: false
328
+ description: >-
329
+ Conditions under which an experiment is discarded. Primary
330
+ metric does not improve, OR gates fail.
331
+
332
+ CLOSURE:
333
+ 1:
334
+ id: OC1
335
+ field: final_value
336
+ type: string
337
+ required: false
338
+ description: >-
339
+ Final metric value at objective closure. Matches HEADER.final_value.
340
+ Per the objective closure contract.
341
+ 2:
342
+ id: OC2
343
+ field: target
344
+ type: string
345
+ required: false
346
+ description: >-
347
+ Target value that was met. Per the objective closure contract.
348
+ 3:
349
+ id: OC3
350
+ field: reason
351
+ type: string
352
+ required: false
353
+ description: >-
354
+ Why the objective was closed (target met, abandoned, etc.).
355
+ Per the objective closure contract.
356
+
357
+ VALIDATION_RULES:
358
+ 1:
359
+ id: OVR1
360
+ rule: required_fields
361
+ severity: error
362
+ description: >-
363
+ The objective must have: title, status, description, why,
364
+ measurement, metric (description, direction, unit), baseline,
365
+ and scope (included, excluded).
366
+ checks:
367
+ - "title is present and non-empty"
368
+ - "status is present and is 'open' or 'closed'"
369
+ - "description is present and non-empty"
370
+ - "why is present and non-empty"
371
+ - "measurement is present and non-empty"
372
+ - "metric.description is present and non-empty"
373
+ - "metric.direction is present"
374
+ - "metric.unit is present"
375
+ - "baseline.description is present"
376
+ - "scope.included has at least one entry"
377
+ - "scope.excluded has at least one entry"
378
+ 2:
379
+ id: OVR2
380
+ rule: closure_consistency
381
+ severity: error
382
+ description: >-
383
+ If status is 'closed', the closure fields must be present and
384
+ consistent with the header closure fields.
385
+ checks:
386
+ - "closed_at is present when status is 'closed'"
387
+ - "final_value is present when status is 'closed'"
388
+ - "target_ref is present when status is 'closed'"
389
+ - "reason is present when status is 'closed'"
390
+ 3:
391
+ id: OVR3
392
+ rule: closure_isolation
393
+ severity: error
394
+ description: >-
395
+ Closure never creates a registry, symlink, root-level objective
396
+ artifact, or DOCS fixed mapping. Per the objective closure contract.
397
+ checks:
398
+ - "No registry references in closure fields"
399
+ - "No DOCS mapping references in closure fields"