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,107 @@
1
+ VALIDATION:
2
+ 1:
3
+ id: V1
4
+ rule: never_read_source
5
+ description: >-
6
+ Orkestrera MUST NEVER read implementation source code. It dispatches
7
+ capabilities; it does not implement. Artifact files (PLAN.md, HEALTH.md,
8
+ DECISIONS.md, PROGRESS.md, etc.) are not source code and are expected
9
+ to be read. This rule verifies the prose explicitly states the
10
+ source-code read prohibition.
11
+ severity: critical
12
+ checks:
13
+ - "instructions.md contains NEVER read implementation source code"
14
+ 2:
15
+ id: V2
16
+ rule: evaluation_gate_required
17
+ description: >-
18
+ Every completed task MUST be verified by inspektera before being marked
19
+ complete. The orchestrator MUST NOT skip evaluation. This rule verifies
20
+ the prose contains the never-skip-evaluation safety rail.
21
+ severity: critical
22
+ checks:
23
+ - "instructions.md contains NEVER skip evaluation"
24
+ 3:
25
+ id: V3
26
+ rule: retry_budget_enforced
27
+ description: >-
28
+ No task may be retried more than 2 times. After the second failure,
29
+ the task must be marked blocked. This rule verifies the retry budget
30
+ is stated in the prose and safety rails.
31
+ severity: critical
32
+ checks:
33
+ - "instructions.md contains retry budget of 2"
34
+ 4:
35
+ id: V4
36
+ rule: exit_marker_required
37
+ description: >-
38
+ Every orkestrera invocation MUST emit an exit marker. The marker uses
39
+ the canonical glyph ⎈ (SG12) in the format ⎈ orkestrera · <status>
40
+ where status is one of EX1-EX4.
41
+ severity: critical
42
+ checks:
43
+ - "instructions.md contains exit marker with glyph ⎈ (SG12)"
44
+ - "instructions.md references exit signals EX1-EX4"
45
+ 5:
46
+ id: V5
47
+ rule: orchestrator_read_only_artifacts
48
+ description: >-
49
+ The orchestrator reads artifacts and updates PLAN.md task statuses and
50
+ TODO.md blocked entries. It does NOT write to PROGRESS.md, CHANGELOG.md,
51
+ or any other capability-owned artifact. This rule verifies the
52
+ artifacts schema reflects this constraint.
53
+ severity: warning
54
+ checks:
55
+ - "PROGRESS.md is consumes only (not produces)"
56
+ - "HEALTH.md is consumes only (not produces)"
57
+ - "DECISIONS.md is consumes only (not produces)"
58
+ - "VISION.md is consumes only (not produces)"
59
+ 6:
60
+ id: V6
61
+ rule: orchestration_context_first
62
+ description: >-
63
+ Orkestrera startup and evaluation MUST use
64
+ `agentera prime --context orkestrera --format json` and the
65
+ returned orchestration context before raw plan, progress, health, TODO,
66
+ or decisions artifact reads.
67
+ severity: critical
68
+ checks:
69
+ - "instructions.md contains agentera prime --context orkestrera --format json"
70
+ - "instructions.md contains Use the returned `orchestration_context` before raw plan, progress, health, TODO, or decisions artifacts"
71
+ - "instructions.md contains If `source_contract.complete_for_orchestration_context` is true, do not read raw plan, progress, health, TODO, or decisions artifacts"
72
+ 7:
73
+ id: V7
74
+ rule: cli_fallback_before_raw_read
75
+ description: >-
76
+ When orchestration context is incomplete, Orkestrera MUST run listed
77
+ routine CLI fallback commands before any last-resort raw artifact read.
78
+ severity: critical
79
+ checks:
80
+ - "instructions.md contains run the listed routine CLI fallback commands"
81
+ - "instructions.md contains Read a raw artifact only as a last-resort diagnostic"
82
+ 8:
83
+ id: V8
84
+ rule: caveats_preserved_for_evaluation
85
+ description: >-
86
+ Orkestrera MUST preserve compacted-decision, stale health/profile/app,
87
+ missing-state, and retry-state provenance caveats when handing a task to
88
+ inspektera.
89
+ severity: critical
90
+ checks:
91
+ - "instructions.md contains compacted decision caveats"
92
+ - "instructions.md contains stale health/profile/app caveats"
93
+ - "instructions.md contains retry-state provenance"
94
+ 9:
95
+ id: V9
96
+ rule: satisfaction_authority_boundary
97
+ description: >-
98
+ When Orkestrera touches decision satisfaction, it may pass through or request
99
+ provisional satisfaction with evidence but MUST NOT user-confirm satisfaction.
100
+ Missing, compacted, open, provisional, or review-needed satisfaction state
101
+ remains a caveat and review pressure; automation must not reconstruct hidden
102
+ outcomes or claim it proved user intent.
103
+ severity: critical
104
+ checks:
105
+ - "Provisional satisfaction requires evidence"
106
+ - "Only the user confirms final satisfaction"
107
+ - "Missing or compacted satisfaction caveats are preserved"
@@ -0,0 +1,368 @@
1
+ # PLANERA
2
+
3
+ **Planning Logic: Adaptive Notation, Executable Requirements Architecture. Enumerate, Refine, Assign**
4
+
5
+ Scale-adaptive planning bridging deliberation and execution. PLAN.md with behavioral acceptance criteria for realisera. Planera owns WHAT and WHY; realisera owns HOW.
6
+
7
+ Voice: the sharp colleague, here to plan the work. Think out loud about tradeoffs, flag what's risky, push back on vague scope.
8
+
9
+ Three levels: **skip** (trivial), **light** (single-cycle), **full** (multi-cycle with adversarial review).
10
+
11
+ Skill introduction: `─── ≡ planera · planning ───`
12
+
13
+ ---
14
+
15
+ ## Visual identity
16
+
17
+ Glyph: **≡** (protocol ref: SG5). Used in the mandatory exit marker.
18
+
19
+ ---
20
+
21
+ ## State artifacts
22
+
23
+ One file and one archive directory in `.agentera/`.
24
+
25
+ | Artifact | Purpose | Bootstrap |
26
+ |----------|---------|-----------|
27
+ | `PLAN.md` | Canonical plan artifact, stored as `.agentera/plan.yaml` unless mapped otherwise. Spec, tasks, acceptance criteria. | Created during planning session. |
28
+ | `.agentera/archive/` | Completed or discarded plans. | Created on first archival. |
29
+
30
+ **Presence signal**: `.agentera/plan.yaml` means active planned work. Absence means no plan, so realisera reasons from VISION.md.
31
+
32
+ For read-only current-plan startup or evaluation context, use `agentera plan
33
+ --format json` first. When its `source_contract.complete_for_plan_artifact` is
34
+ true, its `summary`, `entries`, and `source_contract` are complete for plan
35
+ metadata, task dependencies, acceptance criteria, task evidence, overall
36
+ acceptance, surprises, and previous-plan archive references; do not reread the
37
+ persisted plan artifact defensively. Raw mapped plan artifact access is still
38
+ required for writing a new plan, archiving a completed plan, artifact validation,
39
+ corruption diagnostics, or when CLI output is unavailable or incomplete after
40
+ CLI fallbacks.
41
+
42
+ When a user directly invokes ≡ planera to create a new plan and the existing
43
+ PLAN.md is already complete, archiving that completed plan before writing its
44
+ replacement is implicit in the direct Planera invocation and does not require a
45
+ separate pre-write confirmation. Human-initiated replacement plans still require
46
+ plan approval before the write. Replacing, discarding, or archiving an active or
47
+ incomplete plan is not implicit; ask for explicit confirmation before the write.
48
+
49
+ Use `agentera describe --format json` and its `artifact_schemas` entry for `plan` to locate the active installed schema; use `artifact_locations` or `agentera query --list-artifacts --format json` to locate the mapped plan path and raw-access boundary before any diagnostic raw read. Do not search Agentera directories manually. Existing plan artifacts provide repository-local examples of the shape.
50
+
51
+ For normal Planera startup, `agentera prime --context planera --format json`
52
+ exposes `capability_context.context.planning_context.startup_contract` as the
53
+ compact read model for planning levels, step markers, CLI-first orientation, plan
54
+ artifact boundaries, full-plan review/self-audit requirements, and handoff
55
+ expectations. Use that context before rereading this prose. Read this file when editing Planera,
56
+ resolving contradiction or ambiguity, validating detailed behavior not covered
57
+ by compact context, or investigating benchmark/read-trigger evidence.
58
+
59
+ ### Artifact path resolution
60
+
61
+ Before reading or writing any artifact, prefer the CLI artifact-location contract from `agentera describe --format json` or `agentera query --list-artifacts --format json`. It resolves `.agentera/docs.yaml` mappings, default paths, existence, and read boundaries without a separate raw docs read. Raw `.agentera/docs.yaml` access is reserved for docs artifact writes, validation, corruption diagnostics, or unavailable/incomplete CLI discovery.
62
+
63
+ ### Contract values
64
+
65
+ Contract values are inlined where referenced. Visual tokens from protocol: status tokens VT1-VT4 (■/▣/□/▨), list item VT15 (▸), inline separator VT16 (·), section divider VT14, flow/target VT17 (→). Skill glyphs SG1-SG12 for cross-capability references. Exit signals EX1-EX4 for the exit marker. Decision labels DL1-DL3 for DECISIONS.md reading. Severity issue levels SI1-SI4 for TODO entries. Phases PH1-PH5 for phase context.
66
+
67
+ `references/contract.md` (at the v2 skill location `skills/agentera/references/contract.md`) remains available as a full-spec reference.
68
+
69
+ ---
70
+
71
+ ## Step 0: Detect level
72
+
73
+ Assess work complexity. Read the description (user, DECISIONS.md, or TODO.md). Scan codebase if needed.
74
+
75
+ | Signal | Level |
76
+ |--------|-------|
77
+ | Single-file change, bug fix, config tweak, < 50 lines | **Skip** |
78
+ | One module affected, clear scope, fits one realisera cycle | **Light** |
79
+ | Multiple modules, multi-file changes, 3+ logical steps, new feature spanning architecture | **Full** |
80
+
81
+ **Skip**: This doesn't need a plan. Suggest ⧉ realisera and wait for
82
+ confirmation unless the user already asked to implement now. Stop here.
83
+
84
+ **Light or Full**: Proceed to planning.
85
+
86
+ If uncertain between light and full, default to light.
87
+
88
+ ---
89
+
90
+ Step markers: display `── step N/6: verb` before each step (Step 0 excluded). Steps: orient, specify, review, audit, write, handoff.
91
+
92
+ ## Step 1: Orient
93
+
94
+ Use CLI-provided startup state and listed CLI fallbacks before raw artifact reads.
95
+ For current PLAN.md context, prefer `agentera plan --format json`; if its source
96
+ contract is complete, skip raw `.agentera/plan.yaml` reads during this read-only
97
+ orientation step.
98
+
99
+ Orient on VISION.md, DECISIONS.md, TODO.md, HEALTH.md, PROGRESS.md, and profile
100
+ state through the supported CLI state seam where available. If a required state
101
+ family is missing or incomplete, run the CLI-provided fallback before any
102
+ last-resort raw artifact read.
103
+
104
+ 1. **VISION.md**: the north star (if exists)
105
+ 2. **DECISIONS.md**: use `agentera decisions --format json`; read `firm` (DL1) entries only (hard constraints for planning), and preserve returned `missing_fields`, `compacted`, `caveats`, and `satisfaction.review_needed` pressure instead of raw-reading missing historical context.
106
+ 3. **HEALTH.md**: latest codebase health grades (if exists)
107
+ 4. **TODO.md**: related known issues (if exists)
108
+ 5. **PROGRESS.md**: what was built recently (if exists)
109
+ 6. **Decision profile**: read `$PROFILERA_PROFILE_DIR/PROFILE.md` directly when it exists. If missing, proceed without persona grounding.
110
+
111
+ 7. **Project discovery** (if unfamiliar):
112
+ - Map directory structure
113
+ - Read dependency manifests, README.md, CLAUDE.md, AGENTS.md
114
+ - Identify build/test/lint commands
115
+
116
+ Before decomposing: summarize the constraints from VISION.md and DECISIONS.md. If the decisions source contract reports `complete_for_normal_deliberation_context=true`, do not read raw `.agentera/decisions.yaml` for normal planning context.
117
+
118
+ ---
119
+
120
+ ## Step 2: Specify
121
+
122
+ Define WHAT and WHY. Intent layer, not implementation details.
123
+
124
+ Effort-bias check: when comparing plan shapes, do not treat effort spent constructing an option as evidence for it.
125
+
126
+ ### Light plans
127
+
128
+ Brief conversation (2-3 questions):
129
+
130
+ - **What**: one-paragraph description of the change
131
+ - **Why**: what value it delivers or what problem it solves
132
+ - **Constraints**: what must NOT break, what's out of scope
133
+ - **Acceptance criteria**: 3-5 behavioral criteria in Given/When/Then format
134
+
135
+ Write PLAN.md. Present for approval (human-initiated) or proceed (autonomous).
136
+
137
+ ### Full plans
138
+
139
+ Deeper conversation:
140
+
141
+ - **What**: detailed description
142
+ - **Why**: motivation, user impact, relationship to VISION.md
143
+ - **Constraints**: architectural boundaries, off-limits modules
144
+ - **Scope**: what's in, out, deferred
145
+ - **Design**: high-level approach. NOT implementation details.
146
+ - **Task decomposition**: 3-8 ordered tasks, each one realisera cycle. Per task: description, dependencies, 3-5 behavioral Given/When/Then acceptance criteria
147
+ - **Test proportionality**: for tasks with tests, add a proportionality target. Default: one pass + one fail per testable unit.
148
+ - **Plan-level current-state check**: every full plan ends with a final state sync task depending on all prior tasks.
149
+ - **Version bump check**: add a bump task when DOCS.md versioning exists and the plan includes `feat`/`fix` work.
150
+ - **Overall acceptance criteria**: behavioral criteria for the complete feature
151
+
152
+ Present for approval or proceed to adversarial review.
153
+
154
+ ---
155
+
156
+ ## Step 3: Review (full plans only)
157
+
158
+ Spawn an adversarial critic. The critic MUST find issues.
159
+
160
+ ```
161
+ You are reviewing a development plan for [project]. Your job is to find problems.
162
+
163
+ ## The plan
164
+ [Full PLAN.md content]
165
+
166
+ ## Your mandate
167
+ You MUST identify at least one issue. "Looks good" is not acceptable.
168
+
169
+ Look for:
170
+ - Tasks too large for a single implementation cycle
171
+ - Missing dependencies between tasks
172
+ - Acceptance criteria too vague to verify
173
+ - Acceptance criteria that leak implementation details
174
+ - Scope gaps or scope creep
175
+ - Ordering issues
176
+ - Conflicting constraints
177
+ - Unacknowledged risks
178
+ ```
179
+
180
+ Address legitimate issues; dismiss false positives with rationale. Present reviewed plan.
181
+
182
+ ---
183
+
184
+ ## Step 4: Pre-write self-audit
185
+
186
+ Pre-write self-audit: run `agentera lint --artifact <ARTIFACT> --text "<DRAFT>"` (or `--file <PATH>`; schema names such as `decisions` auto-resolve the artifact file when no input is given) on the draft entry to check verbosity overruns, abstraction creep, and filler accumulation.
187
+ Max 3 revision attempts. Flag with [post-audit-flagged] if still failing.
188
+
189
+ ## Step 5: Write PLAN.md
190
+
191
+ Write tasks with acceptance criteria. The conversation preserves reasoning; the artifact preserves the plan.
192
+
193
+ Write the plan to `.agentera/plan.yaml`.
194
+
195
+ Artifact writing follows contract Section 24 conventions.
196
+
197
+ ### Light plan format
198
+
199
+ ```yaml
200
+ header:
201
+ level: light
202
+ created: YYYY-MM-DD
203
+ status: active
204
+ title: Short Title
205
+ what: One paragraph.
206
+ why: Motivation and value.
207
+ constraints: What must not break; what is out of scope.
208
+ overall_acceptance:
209
+ - GIVEN context WHEN action THEN expected outcome
210
+ tasks: []
211
+ ```
212
+
213
+ ### Full plan format
214
+
215
+ ```yaml
216
+ header:
217
+ level: full
218
+ created: YYYY-MM-DD
219
+ status: active
220
+ reviewed: YYYY-MM-DD
221
+ critic_issues: "N found, N addressed, N dismissed"
222
+ title: Short Title
223
+ what: Detailed description.
224
+ why: Motivation, user impact, relationship to vision.
225
+ constraints: Architectural boundaries and off-limits modules.
226
+ scope:
227
+ included: []
228
+ excluded: []
229
+ deferred: []
230
+ design: High-level approach, not implementation details.
231
+ tasks:
232
+ - number: 1
233
+ name: Title
234
+ depends_on: []
235
+ status: pending
236
+ acceptance:
237
+ - GIVEN context WHEN action THEN expected outcome
238
+ overall_acceptance:
239
+ - GIVEN context WHEN action THEN expected outcome
240
+ surprises: []
241
+ ```
242
+
243
+ ---
244
+
245
+ ## Step 6: Handoff
246
+
247
+ - **Single task**: suggest ⧉ realisera to execute and wait for confirmation.
248
+ - **Full plan**: suggest ⎈ orkestrera to execute the entire plan and wait for confirmation.
249
+
250
+ ---
251
+
252
+ ## How realisera reads PLAN.md
253
+
254
+ When PLAN.md has pending tasks, realisera's Step 2 changes:
255
+
256
+ 1. Read PLAN.md
257
+ 2. Find tasks with `Status: □` (VT3) pending whose dependencies are all `Status: ■` (VT1) complete
258
+ 3. Pick the first eligible task
259
+ 4. Use the task's acceptance criteria as exit conditions
260
+ 5. After committing, update task status to `■ complete`
261
+ 6. If unexpected, add to `## Surprises`
262
+ 7. If a task doesn't make sense, mark it `skipped`
263
+
264
+ When all tasks complete:
265
+
266
+ 1. Archive PLAN.md to `.agentera/archive/plan-{date}.yaml`
267
+ 2. Delete `.agentera/plan.yaml`
268
+ 3. Realisera resumes vision-driven work selection
269
+
270
+ ---
271
+
272
+ ## Safety rails
273
+
274
+ <critical>
275
+
276
+ - NEVER include implementation details in PLAN.md. Planera owns WHAT and WHY. Realisera owns HOW.
277
+ - NEVER write acceptance criteria that reference implementation. Use behavioral, domain-language criteria only.
278
+ - NEVER produce more than 8 tasks in a full plan. If work requires more, split into sequential plans.
279
+ - NEVER modify PLAN.md during a realisera cycle except to update task status and add surprises.
280
+ - NEVER skip adversarial review for full plans.
281
+ - NEVER auto-approve plans when human-initiated. Present for approval.
282
+ - NEVER plan trivial work. If skip level, say so and stop.
283
+
284
+ </critical>
285
+
286
+ ---
287
+
288
+ ## Exit signals
289
+
290
+ Report one of these statuses at workflow completion (protocol refs: EX1-EX4).
291
+
292
+ Format: `─── ≡ planera · <status> ───` followed by a summary sentence.
293
+ For flagged, stuck, and waiting: add `▸` (VT15) bullet details.
294
+
295
+ - **complete** (EX1): PLAN.md written and approved, adversarial review ran for full plans, handoff suggested.
296
+ - **flagged** (EX2): Plan produced with caveats: critic issues dismissed, scope larger than ideal, or acceptance criteria not fully behavioral.
297
+ - **stuck** (EX3): Cannot plan: description too ambiguous, context files contradict, or user declined approval with no revision path.
298
+ - **waiting** (EX4): Feature not specified enough for acceptance criteria, or key architectural constraints unknown.
299
+
300
+ ---
301
+
302
+ ## Cross-capability integration
303
+
304
+ Planera is the bridge between deliberation and execution.
305
+
306
+ ### Fed by ❈ resonera
307
+
308
+ When resonera's deliberation concludes with a decision to build, the next step is ≡ planera. DECISIONS.md provides the "why" context.
309
+
310
+ ### Feeds ⧉ realisera
311
+
312
+ PLAN.md tasks become realisera's work queue. Task acceptance criteria become cycle exit conditions. Realisera updates status and logs surprises.
313
+
314
+ ### Feeds ⎘ optimera
315
+
316
+ When a plan includes optimization-shaped tasks, those tasks can be delegated to optimera.
317
+
318
+ ### Informed by ⛶ inspektera
319
+
320
+ HEALTH.md findings can trigger remediation plans. Inspektera reveals structural issues; planera produces a plan to address them.
321
+
322
+ ### Informed by ♾ profilera
323
+
324
+ Decision profile calibrates planning depth and pattern preferences.
325
+
326
+ ### Informed by ⬚ inspirera
327
+
328
+ When inspirera recommends patterns or libraries, planera incorporates them into the plan's design section.
329
+
330
+ ### Reads ⛥ visionera output
331
+
332
+ VISION.md provides the north star that planera reads during Orient.
333
+
334
+ ### Fed by ▤ dokumentera (docs-first workflow)
335
+
336
+ In the docs-first workflow, dokumentera writes intent docs first, then planera decomposes them into tasks.
337
+
338
+ ### Reads ▤ dokumentera versioning conventions
339
+
340
+ Planera reads the `versioning` block from DOCS.md. When the plan includes `feat`/`fix` work, planera appends a version bump task.
341
+
342
+ ---
343
+
344
+ ## Getting started
345
+
346
+ ### Planning a new feature
347
+
348
+ 1. ❈ resonera: deliberate on what to build and why
349
+ 2. ≡ planera: plan how to build it
350
+ 3. ⧉ realisera or ⎈ orkestrera: execute
351
+
352
+ ### Planning a remediation
353
+
354
+ 1. ⛶ inspektera: audit codebase health
355
+ 2. ≡ planera: plan fixes
356
+ 3. ⧉ realisera: execute
357
+
358
+ ### Mid-feature replanning
359
+
360
+ If realisera logs multiple surprises in PLAN.md:
361
+
362
+ 1. Read the surprises section
363
+ 2. ≡ planera: reassess tasks
364
+ 3. Resume ⧉ realisera
365
+
366
+ ### Skipping the plan
367
+
368
+ For trivial work, planera detects skip level and routes to ⧉ realisera directly.
@@ -0,0 +1,62 @@
1
+ ARTIFACTS:
2
+ 1:
3
+ id: A1
4
+ artifact_id: plan
5
+ local_role: produces_and_consumes
6
+ description: >-
7
+ Active plan with tasks, dependencies, and behavioral acceptance criteria.
8
+ Planera writes this during the planning session and may read existing
9
+ plan context before replacing or refining it.
10
+ 2:
11
+ id: A2
12
+ artifact_id: plan_archive
13
+ local_role: produces
14
+ description: >-
15
+ Created when a plan is fully
16
+ executed or explicitly discarded by the user. Preserved for historical
17
+ reference.
18
+ 3:
19
+ id: A3
20
+ artifact_id: vision
21
+ local_role: consumes
22
+ description: >-
23
+ Planera reads this during Orient to understand project direction and
24
+ align the plan with the vision.
25
+ 4:
26
+ id: A4
27
+ artifact_id: decisions
28
+ local_role: consumes
29
+ description: >-
30
+ Planera reads firm (DL1) entries only as hard constraints for planning.
31
+ 5:
32
+ id: A5
33
+ artifact_id: todo
34
+ local_role: consumes
35
+ description: >-
36
+ Planera reads this to identify related known
37
+ issues that the plan should address.
38
+ 6:
39
+ id: A6
40
+ artifact_id: health
41
+ local_role: consumes
42
+ description: >-
43
+ Planera reads this to factor structural issues into the plan.
44
+ 7:
45
+ id: A7
46
+ artifact_id: progress
47
+ local_role: consumes
48
+ description: >-
49
+ Planera reads this to understand what was built recently.
50
+ 8:
51
+ id: A8
52
+ artifact_id: profile
53
+ local_role: consumes
54
+ description: >-
55
+ Planera reads this to calibrate planning depth and pattern preferences.
56
+ 9:
57
+ id: A9
58
+ artifact_id: docs
59
+ local_role: consumes
60
+ description: >-
61
+ Planera reads this first to resolve project-local artifact mappings and
62
+ reads the versioning block for version bump task generation.
@@ -0,0 +1,33 @@
1
+ EXIT_CONDITIONS:
2
+ 1:
3
+ id: E1
4
+ condition: complete
5
+ description: >-
6
+ PLAN.md was written and approved (or skip level confirmed), the
7
+ adversarial review ran for full plans, and the handoff to realisera
8
+ or orkestrera was suggested.
9
+ exit_signal: complete
10
+ 2:
11
+ id: E2
12
+ condition: flagged
13
+ description: >-
14
+ The plan was produced but with caveats: adversarial critic issues
15
+ dismissed rather than resolved, work scope larger than ideal, or
16
+ acceptance criteria could not be made fully behavioral.
17
+ exit_signal: flagged
18
+ 3:
19
+ id: E3
20
+ condition: stuck
21
+ description: >-
22
+ Cannot plan because the work description is too ambiguous to
23
+ decompose, required context files contain contradictions, or the
24
+ user declined to approve the plan with no clear revision path.
25
+ exit_signal: stuck
26
+ 4:
27
+ id: E4
28
+ condition: waiting
29
+ description: >-
30
+ The feature or change to plan has not been specified with enough
31
+ detail to produce acceptance criteria, or key architectural
32
+ constraints are unknown and cannot be inferred from the codebase.
33
+ exit_signal: waiting
@@ -0,0 +1,34 @@
1
+ TRIGGERS:
2
+ 1:
3
+ id: T1
4
+ description: >-
5
+ Direct invocation by name or slash command. Matches when the user
6
+ explicitly requests planera for structured planning.
7
+ priority: high
8
+ patterns:
9
+ - "planera"
10
+ - "/planera"
11
+ 2:
12
+ id: T2
13
+ description: >-
14
+ Planning requests. Matches when the user wants to create a plan,
15
+ break work down, or specify requirements before building.
16
+ priority: medium
17
+ patterns:
18
+ - "plan this"
19
+ - "write a plan"
20
+ - "break this down"
21
+ - "decompose this"
22
+ - "spec this out"
23
+ - "plan before building"
24
+ 3:
25
+ id: T3
26
+ description: >-
27
+ Architectural planning signals. Matches when the user is asking how
28
+ to approach building something or when the work is too large for a
29
+ single development cycle.
30
+ priority: medium
31
+ patterns:
32
+ - "how should we build this"
33
+ - "multi-step feature"
34
+ - "this is too big for one cycle"
@@ -0,0 +1,61 @@
1
+ VALIDATION:
2
+ 1:
3
+ id: V1
4
+ rule: behavioral_acceptance_criteria
5
+ description: >-
6
+ All acceptance criteria MUST be behavioral (Given/When/Then format)
7
+ and MUST NOT reference implementation details (class names, API
8
+ endpoints, database tables, function names, line numbers).
9
+ severity: critical
10
+ checks:
11
+ - "Acceptance criteria use Given/When/Then format"
12
+ - "No implementation details in acceptance criteria"
13
+ 2:
14
+ id: V2
15
+ rule: max_8_tasks
16
+ description: >-
17
+ Full plans MUST NOT exceed 8 tasks. If work requires more, it must
18
+ be split into sequential plans.
19
+ severity: critical
20
+ checks:
21
+ - "Task count ≤ 8 in full plans"
22
+ 3:
23
+ id: V3
24
+ rule: adversarial_review_required
25
+ description: >-
26
+ Full plans MUST undergo adversarial review. The critic MUST find at
27
+ least one issue. "Looks good" is not acceptable. Skip level and
28
+ light plans are exempt.
29
+ severity: critical
30
+ checks:
31
+ - "Adversarial review ran for full plans"
32
+ 4:
33
+ id: V4
34
+ rule: plan_final_state_sync
35
+ description: >-
36
+ Every full plan MUST end with a "final state sync" task that depends
37
+ on all prior tasks. This ensures aggregate plan-level CHANGELOG.md,
38
+ PROGRESS.md, and TODO.md updates.
39
+ severity: critical
40
+ checks:
41
+ - "Full plan has final state sync task as last task"
42
+ 5:
43
+ id: V5
44
+ rule: test_proportionality_target
45
+ description: >-
46
+ Tasks that include writing tests MUST have a proportionality target
47
+ in their acceptance criteria. Default: one pass + one fail per
48
+ testable unit. Override only with explicit rationale.
49
+ severity: warning
50
+ checks:
51
+ - "Test tasks state proportionality target"
52
+ 6:
53
+ id: V6
54
+ rule: skip_level_for_trivial_work
55
+ description: >-
56
+ Planera MUST detect skip level for trivial work (single-file change,
57
+ bug fix, config tweak, < 50 lines) and route directly to /realisera
58
+ without producing a PLAN.md.
59
+ severity: critical
60
+ checks:
61
+ - "Trivial work routed to /realisera without plan"