agentera 3.0.0-dev.3 → 3.0.0-dev.5

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 (131) hide show
  1. package/README.md +39 -6
  2. package/bundle/.agentera-npx-bundle.json +1 -1
  3. package/bundle/references/cli/agent-ready-state-contract.yaml +20 -17
  4. package/bundle/references/cli/bundle-skill-vocabulary.yaml +1 -1
  5. package/bundle/references/cli/capability-instruction-contract.yaml +98 -57
  6. package/bundle/references/cli/routing-execution-vocabulary.yaml +6 -6
  7. package/bundle/references/cli/update-channels.yaml +27 -7
  8. package/bundle/references/cli/vocabulary-index.yaml +3 -3
  9. package/bundle/references/cli/vocabulary.md +28 -19
  10. package/bundle/registry.json +1 -1
  11. package/bundle/skills/agentera/SKILL.md +38 -21
  12. package/bundle/skills/agentera/agents/dokumentera.toml +1 -1
  13. package/bundle/skills/agentera/agents/hej.toml +1 -1
  14. package/bundle/skills/agentera/agents/inspektera.toml +1 -1
  15. package/bundle/skills/agentera/agents/inspirera.toml +1 -1
  16. package/bundle/skills/agentera/agents/optimera.toml +1 -1
  17. package/bundle/skills/agentera/agents/orkestrera.toml +1 -1
  18. package/bundle/skills/agentera/agents/planera.toml +1 -1
  19. package/bundle/skills/agentera/agents/profilera.toml +1 -1
  20. package/bundle/skills/agentera/agents/realisera.toml +1 -1
  21. package/bundle/skills/agentera/agents/resonera.toml +1 -1
  22. package/bundle/skills/agentera/agents/visionera.toml +1 -1
  23. package/bundle/skills/agentera/agents/visualisera.toml +1 -1
  24. package/bundle/skills/agentera/capabilities/orkestrera/schemas/validation.yaml +26 -13
  25. package/bundle/skills/agentera/capability_schema_contract.yaml +33 -14
  26. package/bundle/skills/agentera/references/contract.md +2 -2
  27. package/bundle/skills/agentera/schemas/artifacts/decisions.yaml +1 -1
  28. package/bundle/skills/agentera/schemas/artifacts/progress.yaml +15 -36
  29. package/bundle/skills/agentera/schemas/artifacts/todo.yaml +14 -0
  30. package/bundle/skills/hej/SKILL.md +1 -1
  31. package/dist/analytics/usageStats.js +23 -1
  32. package/dist/analytics/usageStats.js.map +1 -1
  33. package/dist/capabilities/dokumentera/instructions.js +6 -0
  34. package/dist/capabilities/dokumentera/instructions.js.map +1 -0
  35. package/dist/capabilities/hej/instructions.js +6 -0
  36. package/dist/capabilities/hej/instructions.js.map +1 -0
  37. package/dist/capabilities/index.js +38 -0
  38. package/dist/capabilities/index.js.map +1 -0
  39. package/dist/capabilities/inspektera/instructions.js +6 -0
  40. package/dist/capabilities/inspektera/instructions.js.map +1 -0
  41. package/dist/capabilities/inspirera/instructions.js +6 -0
  42. package/dist/capabilities/inspirera/instructions.js.map +1 -0
  43. package/dist/capabilities/optimera/instructions.js +6 -0
  44. package/dist/capabilities/optimera/instructions.js.map +1 -0
  45. package/dist/capabilities/orkestrera/instructions.js +6 -0
  46. package/dist/capabilities/orkestrera/instructions.js.map +1 -0
  47. package/dist/capabilities/planera/instructions.js +6 -0
  48. package/dist/capabilities/planera/instructions.js.map +1 -0
  49. package/dist/capabilities/profilera/instructions.js +6 -0
  50. package/dist/capabilities/profilera/instructions.js.map +1 -0
  51. package/dist/capabilities/realisera/instructions.js +6 -0
  52. package/dist/capabilities/realisera/instructions.js.map +1 -0
  53. package/dist/capabilities/resonera/instructions.js +6 -0
  54. package/dist/capabilities/resonera/instructions.js.map +1 -0
  55. package/dist/capabilities/visionera/instructions.js +6 -0
  56. package/dist/capabilities/visionera/instructions.js.map +1 -0
  57. package/dist/capabilities/visualisera/instructions.js +6 -0
  58. package/dist/capabilities/visualisera/instructions.js.map +1 -0
  59. package/dist/cli/capabilityContext.js +92 -26
  60. package/dist/cli/capabilityContext.js.map +1 -1
  61. package/dist/cli/commands/capability.js +1 -8
  62. package/dist/cli/commands/capability.js.map +1 -1
  63. package/dist/cli/commands/doctor.js +42 -3
  64. package/dist/cli/commands/doctor.js.map +1 -1
  65. package/dist/cli/commands/report.js +5 -1
  66. package/dist/cli/commands/report.js.map +1 -1
  67. package/dist/cli/commands/state.js +22 -11
  68. package/dist/cli/commands/state.js.map +1 -1
  69. package/dist/cli/commands/validate.js +12 -2
  70. package/dist/cli/commands/validate.js.map +1 -1
  71. package/dist/cli/commands/verify.js +6 -0
  72. package/dist/cli/commands/verify.js.map +1 -1
  73. package/dist/cli/dispatch.js +508 -172
  74. package/dist/cli/dispatch.js.map +1 -1
  75. package/dist/cli/errors.js +53 -0
  76. package/dist/cli/errors.js.map +1 -0
  77. package/dist/cli/help.js +201 -0
  78. package/dist/cli/help.js.map +1 -0
  79. package/dist/cli/orientation.js +9 -6
  80. package/dist/cli/orientation.js.map +1 -1
  81. package/dist/cli/stateQuery.js +7 -0
  82. package/dist/cli/stateQuery.js.map +1 -1
  83. package/dist/cli/todoMarkdown.js +33 -0
  84. package/dist/cli/todoMarkdown.js.map +1 -0
  85. package/dist/hooks/common.js +0 -2
  86. package/dist/hooks/common.js.map +1 -1
  87. package/dist/hooks/validateArtifact.js +10 -8
  88. package/dist/hooks/validateArtifact.js.map +1 -1
  89. package/dist/registries/capabilityContract.js +12 -11
  90. package/dist/registries/capabilityContract.js.map +1 -1
  91. package/dist/registries/evaluatorHandoffContract.js +171 -0
  92. package/dist/registries/evaluatorHandoffContract.js.map +1 -0
  93. package/dist/setup/codex.js +146 -5
  94. package/dist/setup/codex.js.map +1 -1
  95. package/dist/setup/doctor.js +22 -1
  96. package/dist/setup/doctor.js.map +1 -1
  97. package/dist/setup/smokeChecks.js +111 -0
  98. package/dist/setup/smokeChecks.js.map +1 -0
  99. package/dist/upgrade/channels.js +9 -3
  100. package/dist/upgrade/channels.js.map +1 -1
  101. package/dist/upgrade/migrateArtifactsV1ToV2.js +0 -1
  102. package/dist/upgrade/migrateArtifactsV1ToV2.js.map +1 -1
  103. package/dist/upgrade/nextMajorDoctor.js +121 -0
  104. package/dist/upgrade/nextMajorDoctor.js.map +1 -0
  105. package/dist/upgrade/runtimeMigration.js +19 -3
  106. package/dist/upgrade/runtimeMigration.js.map +1 -1
  107. package/dist/upgrade/versionResolution.js +4 -4
  108. package/dist/upgrade/versionResolution.js.map +1 -1
  109. package/dist/validate/appHomeContract.js +1 -1
  110. package/dist/validate/appHomeContract.js.map +1 -1
  111. package/dist/validate/capability.js +11 -3
  112. package/dist/validate/capability.js.map +1 -1
  113. package/package.json +3 -3
  114. package/bundle/skills/agentera/capabilities/dokumentera/instructions.md +0 -428
  115. package/bundle/skills/agentera/capabilities/hej/instructions.md +0 -331
  116. package/bundle/skills/agentera/capabilities/inspektera/instructions.md +0 -514
  117. package/bundle/skills/agentera/capabilities/inspirera/instructions.md +0 -280
  118. package/bundle/skills/agentera/capabilities/optimera/instructions.md +0 -437
  119. package/bundle/skills/agentera/capabilities/orkestrera/instructions.md +0 -433
  120. package/bundle/skills/agentera/capabilities/planera/instructions.md +0 -368
  121. package/bundle/skills/agentera/capabilities/profilera/instructions.md +0 -419
  122. package/bundle/skills/agentera/capabilities/realisera/instructions.md +0 -403
  123. package/bundle/skills/agentera/capabilities/resonera/instructions.md +0 -329
  124. package/bundle/skills/agentera/capabilities/visionera/instructions.md +0 -309
  125. package/bundle/skills/agentera/capabilities/visualisera/instructions.md +0 -400
  126. package/dist/cli/commands/backfill.js +0 -84
  127. package/dist/cli/commands/backfill.js.map +0 -1
  128. package/dist/core/git.js +0 -43
  129. package/dist/core/git.js.map +0 -1
  130. package/dist/state/progressCommit.js +0 -289
  131. package/dist/state/progressCommit.js.map +0 -1
@@ -1,14 +1,28 @@
1
1
  ---
2
2
  name: agentera
3
3
  description: >
4
- The open protocol for turning AI agents into engineering teams.
5
- One Agentera skill with twelve capabilities, each defined by human-readable
6
- prose and machine-readable schemas. The agent reads this file to route
7
- incoming requests to the right capability. Use this skill for /agentera,
8
- Agentera capability requests, and a complete user message exactly `hej`;
9
- bare `hej` runs the agentera prime orientation dashboard path instead of a generic greeting.
10
- version: "2.7.6"
4
+ The open protocol for turning AI agents into engineering teams. One Agentera
5
+ skill with twelve capabilities; per-capability prose lives in
6
+ `packages/cli/src/capabilities/<name>/instructions.ts` and the runtime serves
7
+ it through `agentera prime --context <name> --format json`. Use this skill
8
+ for /agentera, Agentera capability requests, and a complete user message
9
+ exactly `hej`; bare `hej` runs the agentera prime orientation dashboard path
10
+ instead of a generic greeting.
11
+ version: "3.0.0"
11
12
  spec_sections: [1, 2, 3, 4, 5, 6, 11, 13, 18, 19, 20, 22, 23]
13
+ capabilities:
14
+ - hej
15
+ - visionera
16
+ - resonera
17
+ - inspirera
18
+ - planera
19
+ - realisera
20
+ - optimera
21
+ - inspektera
22
+ - dokumentera
23
+ - profilera
24
+ - visualisera
25
+ - orkestrera
12
26
  ---
13
27
 
14
28
  # agentera
@@ -239,7 +253,7 @@ Bare `/agentera` returning-project output must include these visible markers:
239
253
 
240
254
  Use the README-style layout from hej Step 1b: metrics first, narrative read
241
255
  inside `status`, then attention and next. The issues summary line uses
242
- `critical · degraded · annoying` only. Omit `attention` only when the source has no attention items. Always include the
256
+ `critical · degraded · normal · annoying` in the order prime emits them. Omit `attention` only when the source has no attention items. Always include the
243
257
  mandatory `⌂ hej · <status>` marker below the dashboard code fence, and ask for
244
258
  confirmation before invoking the suggested downstream capability. For
245
259
  `/agentera <capability-name>` or `/agentera <alias>`, do not assume the route
@@ -261,21 +275,25 @@ v2 paths `hej --capability-context` and `--context-profile` are removed in 3.0.
261
275
  For normal ≡ planera execution, use
262
276
  `capability_context.context.planning_context.startup_contract` from
263
277
  `agentera prime --context planera --format json`
264
- before reading `skills/agentera/capabilities/planera/instructions.md`. Read Planera prose only when
265
- editing Planera, resolving contradiction or ambiguity, validating detailed
266
- behavior not covered by the compact contract, or investigating benchmark/read-trigger
267
- evidence. This preserves Planera prose as detailed authority and does not add
268
- `agentera planera`; `/agentera plan` remains routing while `agentera state plan`
269
- remains plan state (top-level `agentera plan` is a migration alias).
278
+ before reading the Planera prose from
279
+ `packages/cli/src/capabilities/planera/instructions.ts` (served via
280
+ `capability_context.prose` from the same prime call). Read the full Planera
281
+ prose only when editing Planera, resolving contradiction or ambiguity,
282
+ validating detailed behavior not covered by the compact contract, or
283
+ investigating benchmark/read-trigger evidence. This preserves Planera prose
284
+ as detailed authority and does not add `agentera planera`; `/agentera plan`
285
+ remains routing while `agentera state plan` remains plan state (top-level
286
+ `agentera plan` is a migration alias).
270
287
  For normal DECISIONS.md context, use `agentera state decisions --format json` and its
271
288
  source_contract. When `complete_for_normal_deliberation_context=true`, preserve
272
289
  returned `missing_fields`, `compacted`, `caveats`, and `satisfaction.review_needed`
273
290
  instead of raw-reading `.agentera/decisions.yaml` to reconstruct missing history.
274
291
  Raw decision artifact access is reserved for Resonera-owned writes/repairs,
275
292
  artifact corruption diagnostics, or CLI defect investigation.
276
- Reading a capability's `instructions.md` file is not itself a capability invocation;
277
- invocation means routing to the capability, following its prose, and using the
278
- CLI state layer first for artifact-backed state.
293
+ Reading a capability's instructions module is not itself a capability invocation;
294
+ invocation means routing to the capability, fetching the prose via
295
+ `agentera prime --context <name> --format json`, following that prose, and using
296
+ the CLI state layer first for artifact-backed state.
279
297
 
280
298
  Capability handoffs use glyph plus canonical capability name, for example
281
299
  `⧉ realisera` or `≡ planera`. Reserve `/agentera <alias>` wording for explicit
@@ -436,25 +454,24 @@ Before reading or writing any artifact, check if `.agentera/docs.yaml` exists. I
436
454
 
437
455
  ```
438
456
  skills/agentera/
439
- SKILL.md # This file
457
+ SKILL.md # This file (routing stub + capability table)
440
458
  protocol.yaml # Shared primitives
441
459
  capability_schema_contract.yaml # Self-referential schema contract
442
460
  capabilities/
443
461
  hej/
444
- instructions.md
445
462
  schemas/
446
463
  triggers.yaml
447
464
  artifacts.yaml
448
465
  validation.yaml
449
466
  exit.yaml
450
467
  resonera/
451
- instructions.md
452
468
  schemas/
453
469
  triggers.yaml
454
470
  artifacts.yaml
455
471
  validation.yaml
456
472
  exit.yaml
457
- ... (12 capabilities total)
473
+ ... (12 capabilities total, each with schemas/ only)
474
+ packages/cli/src/capabilities/<name>/instructions.ts # Per-capability prose (D65)
458
475
  ```
459
476
 
460
477
  Validate any capability against the contract through the canonical CLI:
@@ -2,5 +2,5 @@
2
2
  name = "dokumentera"
3
3
  description = "Documentation updates and synchronization."
4
4
  developer_instructions = """
5
- You are the Agentera dokumentera capability subagent. You have file write and file edit tools available to create or update files, but shell execution is disabled — do not attempt to run command line tools or scripts. Read the authoritative instructions at ${AGENTERA_HOME}/app/skills/agentera/capabilities/dokumentera/instructions.md when available. For local checkout development, use skills/agentera/capabilities/dokumentera/instructions.md under the active Agentera source root. Stay within the dispatched capability task, use the Agentera CLI state seam first, and preserve Agentera artifact safety rails.
5
+ You are the Agentera dokumentera capability subagent. You have file write and file edit tools available to create or update files, but shell execution is disabled — do not attempt to run command line tools or scripts. Run `agentera prime --context dokumentera --format json` to fetch the authoritative instructions as a JSON capsule (the `prose` field carries the full Markdown body). Stay within the dispatched capability task, use the Agentera CLI state seam first, and preserve Agentera artifact safety rails.
6
6
  """
@@ -2,5 +2,5 @@
2
2
  name = "hej"
3
3
  description = "Agentera orientation and routing dashboard."
4
4
  developer_instructions = """
5
- You are the Agentera hej capability subagent. You are a read-only agent — do not write files or execute shell commands. Read the authoritative instructions at ${AGENTERA_HOME}/app/skills/agentera/capabilities/hej/instructions.md when available. For local checkout development, use skills/agentera/capabilities/hej/instructions.md under the active Agentera source root. Stay within the dispatched capability task, use the Agentera CLI state seam first, and preserve Agentera artifact safety rails.
5
+ You are the Agentera hej capability subagent. You are a read-only agent — do not write files or execute shell commands. Run `agentera prime --context hej --format json` to fetch the authoritative instructions as a JSON capsule (the `prose` field carries the full Markdown body). Stay within the dispatched capability task, use the Agentera CLI state seam first, and preserve Agentera artifact safety rails.
6
6
  """
@@ -2,5 +2,5 @@
2
2
  name = "inspektera"
3
3
  description = "Codebase health audit."
4
4
  developer_instructions = """
5
- You are the Agentera inspektera capability subagent. You have file write and file edit tools available to create or update files, but shell execution is disabled — do not attempt to run command line tools or scripts. Read the authoritative instructions at ${AGENTERA_HOME}/app/skills/agentera/capabilities/inspektera/instructions.md when available. For local checkout development, use skills/agentera/capabilities/inspektera/instructions.md under the active Agentera source root. Stay within the dispatched capability task, use the Agentera CLI state seam first, and preserve Agentera artifact safety rails.
5
+ You are the Agentera inspektera capability subagent. You have file write and file edit tools available to create or update files, but shell execution is disabled — do not attempt to run command line tools or scripts. Run `agentera prime --context inspektera --format json` to fetch the authoritative instructions as a JSON capsule (the `prose` field carries the full Markdown body). Stay within the dispatched capability task, use the Agentera CLI state seam first, and preserve Agentera artifact safety rails.
6
6
  """
@@ -2,5 +2,5 @@
2
2
  name = "inspirera"
3
3
  description = "External pattern research and synthesis."
4
4
  developer_instructions = """
5
- You are the Agentera inspirera capability subagent. You are a read-only agent — do not write files or execute shell commands. Read the authoritative instructions at ${AGENTERA_HOME}/app/skills/agentera/capabilities/inspirera/instructions.md when available. For local checkout development, use skills/agentera/capabilities/inspirera/instructions.md under the active Agentera source root. Stay within the dispatched capability task, use the Agentera CLI state seam first, and preserve Agentera artifact safety rails.
5
+ You are the Agentera inspirera capability subagent. You are a read-only agent — do not write files or execute shell commands. Run `agentera prime --context inspirera --format json` to fetch the authoritative instructions as a JSON capsule (the `prose` field carries the full Markdown body). Stay within the dispatched capability task, use the Agentera CLI state seam first, and preserve Agentera artifact safety rails.
6
6
  """
@@ -2,5 +2,5 @@
2
2
  name = "optimera"
3
3
  description = "Metric-driven optimization cycles."
4
4
  developer_instructions = """
5
- You are the Agentera optimera capability subagent. You have full file write, file edit, and shell execution tools available — use them to implement code changes, run tests, and commit results. Read the authoritative instructions at ${AGENTERA_HOME}/app/skills/agentera/capabilities/optimera/instructions.md when available. For local checkout development, use skills/agentera/capabilities/optimera/instructions.md under the active Agentera source root. Stay within the dispatched capability task, use the Agentera CLI state seam first, and preserve Agentera artifact safety rails.
5
+ You are the Agentera optimera capability subagent. You have full file write, file edit, and shell execution tools available — use them to implement code changes, run tests, and commit results. Run `agentera prime --context optimera --format json` to fetch the authoritative instructions as a JSON capsule (the `prose` field carries the full Markdown body). Stay within the dispatched capability task, use the Agentera CLI state seam first, and preserve Agentera artifact safety rails.
6
6
  """
@@ -2,5 +2,5 @@
2
2
  name = "orkestrera"
3
3
  description = "Multi-cycle orchestration over active plans."
4
4
  developer_instructions = """
5
- You are the Agentera orkestrera capability subagent. You have full file write, file edit, and shell execution tools available — use them to implement code changes, run tests, and commit results. Read the authoritative instructions at ${AGENTERA_HOME}/app/skills/agentera/capabilities/orkestrera/instructions.md when available. For local checkout development, use skills/agentera/capabilities/orkestrera/instructions.md under the active Agentera source root. Stay within the dispatched capability task, use the Agentera CLI state seam first, and preserve Agentera artifact safety rails.
5
+ You are the Agentera orkestrera capability subagent. You have full file write, file edit, and shell execution tools available — use them to implement code changes, run tests, and commit results. Run `agentera prime --context orkestrera --format json` to fetch the authoritative instructions as a JSON capsule (the `prose` field carries the full Markdown body). Stay within the dispatched capability task, use the Agentera CLI state seam first, and preserve Agentera artifact safety rails.
6
6
  """
@@ -2,5 +2,5 @@
2
2
  name = "planera"
3
3
  description = "Planning with acceptance criteria."
4
4
  developer_instructions = """
5
- You are the Agentera planera capability subagent. You have file write and file edit tools available to create or update files, but shell execution is disabled — do not attempt to run command line tools or scripts. Read the authoritative instructions at ${AGENTERA_HOME}/app/skills/agentera/capabilities/planera/instructions.md when available. For local checkout development, use skills/agentera/capabilities/planera/instructions.md under the active Agentera source root. Stay within the dispatched capability task, use the Agentera CLI state seam first, and preserve Agentera artifact safety rails.
5
+ You are the Agentera planera capability subagent. You have file write and file edit tools available to create or update files, but shell execution is disabled — do not attempt to run command line tools or scripts. Run `agentera prime --context planera --format json` to fetch the authoritative instructions as a JSON capsule (the `prose` field carries the full Markdown body). Stay within the dispatched capability task, use the Agentera CLI state seam first, and preserve Agentera artifact safety rails.
6
6
  """
@@ -2,5 +2,5 @@
2
2
  name = "profilera"
3
3
  description = "Decision profiling and preference memory."
4
4
  developer_instructions = """
5
- You are the Agentera profilera capability subagent. You have full file write, file edit, and shell execution tools available — use them to implement code changes, run tests, and commit results. Read the authoritative instructions at ${AGENTERA_HOME}/app/skills/agentera/capabilities/profilera/instructions.md when available. For local checkout development, use skills/agentera/capabilities/profilera/instructions.md under the active Agentera source root. Stay within the dispatched capability task, use the Agentera CLI state seam first, and preserve Agentera artifact safety rails.
5
+ You are the Agentera profilera capability subagent. You have full file write, file edit, and shell execution tools available — use them to implement code changes, run tests, and commit results. Run `agentera prime --context profilera --format json` to fetch the authoritative instructions as a JSON capsule (the `prose` field carries the full Markdown body). Stay within the dispatched capability task, use the Agentera CLI state seam first, and preserve Agentera artifact safety rails.
6
6
  """
@@ -2,5 +2,5 @@
2
2
  name = "realisera"
3
3
  description = "Autonomous development execution."
4
4
  developer_instructions = """
5
- You are the Agentera realisera capability subagent. You have full file write, file edit, and shell execution tools available — use them to implement code changes, run tests, and commit results. Read the authoritative instructions at ${AGENTERA_HOME}/app/skills/agentera/capabilities/realisera/instructions.md when available. For local checkout development, use skills/agentera/capabilities/realisera/instructions.md under the active Agentera source root. Stay within the dispatched capability task, use the Agentera CLI state seam first, and preserve Agentera artifact safety rails.
5
+ You are the Agentera realisera capability subagent. You have full file write, file edit, and shell execution tools available — use them to implement code changes, run tests, and commit results. Run `agentera prime --context realisera --format json` to fetch the authoritative instructions as a JSON capsule (the `prose` field carries the full Markdown body). Stay within the dispatched capability task, use the Agentera CLI state seam first, and preserve Agentera artifact safety rails.
6
6
  """
@@ -2,5 +2,5 @@
2
2
  name = "resonera"
3
3
  description = "Structured deliberation and decision support."
4
4
  developer_instructions = """
5
- You are the Agentera resonera capability subagent. You have file write and file edit tools available to create or update files, but shell execution is disabled — do not attempt to run command line tools or scripts. Read the authoritative instructions at ${AGENTERA_HOME}/app/skills/agentera/capabilities/resonera/instructions.md when available. For local checkout development, use skills/agentera/capabilities/resonera/instructions.md under the active Agentera source root. Stay within the dispatched capability task, use the Agentera CLI state seam first, and preserve Agentera artifact safety rails.
5
+ You are the Agentera resonera capability subagent. You have file write and file edit tools available to create or update files, but shell execution is disabled — do not attempt to run command line tools or scripts. Run `agentera prime --context resonera --format json` to fetch the authoritative instructions as a JSON capsule (the `prose` field carries the full Markdown body). Stay within the dispatched capability task, use the Agentera CLI state seam first, and preserve Agentera artifact safety rails.
6
6
  """
@@ -2,5 +2,5 @@
2
2
  name = "visionera"
3
3
  description = "Define and refine project direction."
4
4
  developer_instructions = """
5
- You are the Agentera visionera capability subagent. You have file write and file edit tools available to create or update files, but shell execution is disabled — do not attempt to run command line tools or scripts. Read the authoritative instructions at ${AGENTERA_HOME}/app/skills/agentera/capabilities/visionera/instructions.md when available. For local checkout development, use skills/agentera/capabilities/visionera/instructions.md under the active Agentera source root. Stay within the dispatched capability task, use the Agentera CLI state seam first, and preserve Agentera artifact safety rails.
5
+ You are the Agentera visionera capability subagent. You have file write and file edit tools available to create or update files, but shell execution is disabled — do not attempt to run command line tools or scripts. Run `agentera prime --context visionera --format json` to fetch the authoritative instructions as a JSON capsule (the `prose` field carries the full Markdown body). Stay within the dispatched capability task, use the Agentera CLI state seam first, and preserve Agentera artifact safety rails.
6
6
  """
@@ -2,5 +2,5 @@
2
2
  name = "visualisera"
3
3
  description = "Visual identity and design systems."
4
4
  developer_instructions = """
5
- You are the Agentera visualisera capability subagent. You have file write and file edit tools available to create or update files, but shell execution is disabled — do not attempt to run command line tools or scripts. Read the authoritative instructions at ${AGENTERA_HOME}/app/skills/agentera/capabilities/visualisera/instructions.md when available. For local checkout development, use skills/agentera/capabilities/visualisera/instructions.md under the active Agentera source root. Stay within the dispatched capability task, use the Agentera CLI state seam first, and preserve Agentera artifact safety rails.
5
+ You are the Agentera visualisera capability subagent. You have file write and file edit tools available to create or update files, but shell execution is disabled — do not attempt to run command line tools or scripts. Run `agentera prime --context visualisera --format json` to fetch the authoritative instructions as a JSON capsule (the `prose` field carries the full Markdown body). Stay within the dispatched capability task, use the Agentera CLI state seam first, and preserve Agentera artifact safety rails.
6
6
  """
@@ -10,7 +10,7 @@ VALIDATION:
10
10
  source-code read prohibition.
11
11
  severity: critical
12
12
  checks:
13
- - "instructions.md contains NEVER read implementation source code"
13
+ - "orkestrera prose (packages/cli/src/capabilities/orkestrera/instructions.ts) contains NEVER read implementation source code"
14
14
  2:
15
15
  id: V2
16
16
  rule: evaluation_gate_required
@@ -20,7 +20,7 @@ VALIDATION:
20
20
  the prose contains the never-skip-evaluation safety rail.
21
21
  severity: critical
22
22
  checks:
23
- - "instructions.md contains NEVER skip evaluation"
23
+ - "orkestrera prose contains NEVER skip evaluation"
24
24
  3:
25
25
  id: V3
26
26
  rule: retry_budget_enforced
@@ -30,7 +30,7 @@ VALIDATION:
30
30
  is stated in the prose and safety rails.
31
31
  severity: critical
32
32
  checks:
33
- - "instructions.md contains retry budget of 2"
33
+ - "orkestrera prose contains retry budget of 2"
34
34
  4:
35
35
  id: V4
36
36
  rule: exit_marker_required
@@ -40,8 +40,8 @@ VALIDATION:
40
40
  where status is one of EX1-EX4.
41
41
  severity: critical
42
42
  checks:
43
- - "instructions.md contains exit marker with glyph ⎈ (SG12)"
44
- - "instructions.md references exit signals EX1-EX4"
43
+ - "orkestrera prose contains exit marker with glyph ⎈ (SG12)"
44
+ - "orkestrera prose references exit signals EX1-EX4"
45
45
  5:
46
46
  id: V5
47
47
  rule: orchestrator_read_only_artifacts
@@ -66,9 +66,9 @@ VALIDATION:
66
66
  or decisions artifact reads.
67
67
  severity: critical
68
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"
69
+ - "orkestrera prose contains agentera prime --context orkestrera --format json"
70
+ - "orkestrera prose contains Use the returned `orchestration_context` before raw plan, progress, health, TODO, or decisions artifacts"
71
+ - "orkestrera prose contains If `source_contract.complete_for_orchestration_context` is true, do not read raw plan, progress, health, TODO, or decisions artifacts"
72
72
  7:
73
73
  id: V7
74
74
  rule: cli_fallback_before_raw_read
@@ -77,8 +77,8 @@ VALIDATION:
77
77
  routine CLI fallback commands before any last-resort raw artifact read.
78
78
  severity: critical
79
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"
80
+ - "orkestrera prose contains run the listed routine CLI fallback commands"
81
+ - "orkestrera prose contains Read a raw artifact only as a last-resort diagnostic"
82
82
  8:
83
83
  id: V8
84
84
  rule: caveats_preserved_for_evaluation
@@ -88,9 +88,9 @@ VALIDATION:
88
88
  inspektera.
89
89
  severity: critical
90
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"
91
+ - "orkestrera prose contains compacted decision caveats"
92
+ - "orkestrera prose contains stale health/profile/app caveats"
93
+ - "orkestrera prose contains retry-state provenance"
94
94
  9:
95
95
  id: V9
96
96
  rule: satisfaction_authority_boundary
@@ -105,3 +105,16 @@ VALIDATION:
105
105
  - "Provisional satisfaction requires evidence"
106
106
  - "Only the user confirms final satisfaction"
107
107
  - "Missing or compacted satisfaction caveats are preserved"
108
+ 10:
109
+ id: V10
110
+ rule: inspektera_citation_required
111
+ description: >-
112
+ Orkestrera Step 3 Surface 2 inspektera delegation MUST require a
113
+ citation: <file>:<line> (or not-applicable: <reason>) for every WARN and
114
+ FAIL finding, and require verify_command for WARN rows with file:line
115
+ citations. Authority: references/cli/capability-instruction-contract.yaml#evaluator_handoff.
116
+ severity: critical
117
+ checks:
118
+ - "orkestrera prose contains citation: `<file>:<line>` OR `not-applicable: <reason>`"
119
+ - "orkestrera prose contains verify_command"
120
+ - "orkestrera prose contains evaluator_handoff.output_requirements"
@@ -7,15 +7,24 @@
7
7
  # 1. Required groups every capability schema must contain
8
8
  # 2. Entry structure within each group (numbered, stable IDs)
9
9
  # 3. Deprecation protocol (deprecated + replaced_by)
10
- # 4. Directory structure requirements (instructions.md, schemas/)
10
+ # 4. Directory structure requirements (instruction module, schemas/)
11
11
  # 5. Machine-readable validation rules consumed by future contract loaders
12
+ #
13
+ # D65: the per-capability `instructions.md` Markdown file is retired. The
14
+ # behavioral instructions now live at
15
+ # `packages/cli/src/capabilities/<name>/instructions.ts` as a default-exported
16
+ # string constant. The directory requirement below points at the new path;
17
+ # the V1 directory_structure rule's `checks` list and the ARTIFACTS A3 path
18
+ # text follow the same move.
12
19
 
13
20
  meta:
14
21
  name: capability_schema_contract
15
22
  version: "1.0.0"
16
23
  description: >-
17
24
  Defines what a valid capability schema looks like.
18
- A capability directory must contain instructions.md and a schemas/ directory.
25
+ A capability directory must contain schemas/ and the runtime must
26
+ resolve the capability's behavioral instructions from the
27
+ packages/cli/src/capabilities/<name>/instructions.ts module.
19
28
  The union of all YAML files in schemas/ must contain all required groups.
20
29
  capability_type: contract
21
30
  self_referential: true
@@ -68,11 +77,15 @@ GROUP_PREFIXES:
68
77
  EXIT_CONDITIONS: E
69
78
 
70
79
  DIRECTORY_REQUIREMENTS:
71
- instruction_file:
72
- path: instructions.md
80
+ instruction_module:
81
+ path: packages/cli/src/capabilities/<name>/instructions.ts
73
82
  type: file
74
83
  required: true
75
- description: Behavioral instructions the agent reads.
84
+ description: >-
85
+ TypeScript module that exports the capability's behavioral instructions
86
+ as a default-exported string constant. The runtime loads it via the
87
+ compiled .js path and surfaces the prose through
88
+ `agentera prime --context <name> --format json`.
76
89
  schemas_directory:
77
90
  path: schemas
78
91
  type: directory
@@ -246,9 +259,9 @@ ARTIFACTS:
246
259
  name: capability_directory
247
260
  path: "capabilities/<name>/"
248
261
  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.
262
+ A valid capability directory. Must contain schemas/. The behavioral
263
+ instructions module lives at
264
+ packages/cli/src/capabilities/<name>/instructions.ts.
252
265
  produces: false
253
266
  consumes: true
254
267
  2:
@@ -263,11 +276,15 @@ ARTIFACTS:
263
276
  consumes: true
264
277
  3:
265
278
  id: A3
266
- name: instruction_file
267
- path: "capabilities/<name>/instructions.md"
279
+ name: instruction_module
280
+ path: "packages/cli/src/capabilities/<name>/instructions.ts"
268
281
  description: >-
269
- Behavioral instructions the agent reads. Markdown format. Contains the
270
- capability's workflow, personality, interaction rules, and examples.
282
+ Behavioral instructions the agent reads. TypeScript module that exports
283
+ a default-exported string constant. The runtime loads it via the
284
+ compiled .js path and serves the prose through
285
+ `agentera prime --context <name> --format json`. The Markdown
286
+ `instructions.md` file is no longer part of the on-disk capability
287
+ surface (D65).
271
288
  produces: false
272
289
  consumes: true
273
290
  4:
@@ -285,10 +302,12 @@ VALIDATION:
285
302
  id: V1
286
303
  rule: directory_structure
287
304
  description: >-
288
- Capability directory must contain instructions.md and schemas/ directory.
305
+ Capability directory must contain schemas/ and the instruction module
306
+ packages/cli/src/capabilities/<name>/instructions.ts must exist as a
307
+ TypeScript source file (the runtime resolves the compiled .js path).
289
308
  severity: error
290
309
  checks:
291
- - "instructions.md is a file"
310
+ - "instruction_module is a file"
292
311
  - "schemas/ is a directory"
293
312
  - "schemas/ contains at least one .yaml file"
294
313
  2:
@@ -145,7 +145,7 @@ Three project-facing files at the project root; nine operational files in `.agen
145
145
  | CHANGELOG.md | CHANGELOG.md | realisera | project contributors | ## [Unreleased], ### Added/Changed/Fixed |
146
146
  | DECISIONS.md | .agentera/decisions.yaml | resonera | planera, realisera, inspektera, profilera, optimera, orkestrera | ## Decision N · date, **Question/Context/Alternatives/Choice/Reasoning/Confidence/Feeds into** |
147
147
  | PLAN.md | .agentera/plan.yaml | planera | realisera, inspektera, orkestrera | <!-- Level/Created/Status -->, ## Tasks with ### Task N, **Status/Depends on/Acceptance** |
148
- | PROGRESS.md | .agentera/progress.yaml | realisera | planera, inspektera, dokumentera, visionera, orkestrera | ## Cycle N · date, **Phase/What/Commit/Inspiration/Discovered/Next/Context** |
148
+ | PROGRESS.md | .agentera/progress.yaml | realisera | planera, inspektera, dokumentera, visionera, orkestrera | ## Cycle N · date, **Phase/What/Inspiration/Discovered/Next/Context** |
149
149
  | HEALTH.md | .agentera/health.yaml | inspektera | realisera, planera, orkestrera | ## Audit N · date, **Dimensions/Findings/Overall/Grades**, per-dimension sections |
150
150
  | OBJECTIVE.md | .agentera/optimera/<name>/objective.yaml | optimera | optimera | ## Metric, ## Target, ## Baseline, ## Constraints, **Status** |
151
151
  | EXPERIMENTS.md | .agentera/optimera/<name>/experiments.yaml | optimera | optimera | ## Experiment N · date, **Hypothesis/Method/Result/Conclusion**; ## Closure · date, **Final value/Target/Reason** |
@@ -669,7 +669,7 @@ This gate is orthogonal to Section 19 Staleness Detection. Section 19 asks: did
669
669
 
670
670
  ### Evidence format
671
671
 
672
- Every cycle entry in PROGRESS.md carries a `verified` field alongside phase, what, commit, inspiration, discovered, next, and context fields. The field is mandatory: no cycle is considered closed without it. The field accepts exactly one of three shapes:
672
+ Every cycle entry in PROGRESS.md carries a `verified` field alongside phase, what, inspiration, discovered, next, and context fields. The field is mandatory: no cycle is considered closed without it. The field accepts exactly one of three shapes:
673
673
 
674
674
  | Shape | Content |
675
675
  |-------|---------|
@@ -55,7 +55,7 @@ BUDGET:
55
55
  1:
56
56
  id: DB1
57
57
  scope: per_decision_entry
58
- max_words: 200
58
+ max_words: 1000
59
59
  description: >-
60
60
  Maximum words per decision entry. Budgets are guidelines, not hard
61
61
  blockers.
@@ -1,7 +1,7 @@
1
1
  # Progress Artifact Schema
2
2
  #
3
3
  # Cycle-by-cycle operational log for realisera. Each entry records what happened
4
- # in one development cycle: phase, work done, commit, discoveries, verification,
4
+ # in one development cycle: phase, work done, discoveries, verification,
5
5
  # next steps, and context envelope.
6
6
  #
7
7
  # Structural pattern: UPPER_CASE groups with numbered entries and stable IDs,
@@ -16,12 +16,11 @@
16
16
  # (type-prefix from heading) CYCLE.type PR3
17
17
  # **Phase**: <phase> CYCLE.phase PR4
18
18
  # **What**: <text> CYCLE.what PR5
19
- # **Commit**: <hash/N/A> CYCLE.commit PR6
20
- # **Inspiration**: <text> CYCLE.inspiration PR7
21
- # **Discovered**: <text> CYCLE.discovered PR8
22
- # **Verified**: <text> CYCLE.verified PR9
23
- # **Next**: <text> CYCLE.next PR10
24
- # **Context**: <text> CYCLE.context PR11
19
+ # **Inspiration**: <text> CYCLE.inspiration PR6
20
+ # **Discovered**: <text> CYCLE.discovered PR7
21
+ # **Verified**: <text> CYCLE.verified PR8
22
+ # **Next**: <text> CYCLE.next PR9
23
+ # **Context**: <text> CYCLE.context PR10
25
24
  # (intent from Context) CONTEXT.intent PT1
26
25
  # (constraints from Context) CONTEXT.constraints PT2
27
26
  # (unknowns from Context) CONTEXT.unknowns PT3
@@ -172,57 +171,38 @@ CYCLE:
172
171
  - "Non-empty string"
173
172
  6:
174
173
  id: PR6
175
- field: commit
176
- type: string
177
- required: true
178
- description: >-
179
- Git commit that contains the product change for this cycle—not the commit
180
- that last edited progress metadata. Use `pending` until that hash is known;
181
- then the product commit hash, optionally with subject (e.g.
182
- `abc1234 Speed up pytest suite`). Use `N/A: …` when no product commit was
183
- made.
184
- validation:
185
- - "Non-empty string"
186
- - "Use `pending` until the product-change commit hash is known; do not amend solely to backfill this field"
187
- - >-
188
- Hashes that do not resolve as commit objects in the local clone (another
189
- machine's copy, shallow CI checkout, or not yet fetched) are intentionally
190
- not flagged by progress validation or `agentera check backfill`; reconcile
191
- with a full clone or forward-fill once the product commit exists locally
192
- 7:
193
- id: PR7
194
174
  field: inspiration
195
175
  type: string
196
176
  required: false
197
177
  description: >-
198
178
  What prompted this cycle. References to active plan tasks,
199
179
  decisions, or conventions that drove the work.
200
- 8:
201
- id: PR8
180
+ 7:
181
+ id: PR7
202
182
  field: discovered
203
183
  type: string
204
184
  required: false
205
185
  description: >-
206
186
  Unexpected findings during the cycle. Things learned that were
207
187
  not known before starting.
208
- 9:
209
- id: PR9
188
+ 8:
189
+ id: PR8
210
190
  field: verified
211
191
  type: string
212
192
  required: false
213
193
  description: >-
214
194
  Evidence that the work was verified. Test commands run, validation
215
195
  passed, manual checks performed.
216
- 10:
217
- id: PR10
196
+ 9:
197
+ id: PR9
218
198
  field: next
219
199
  type: string
220
200
  required: false
221
201
  description: >-
222
202
  What should happen next. Guidance for subsequent cycles.
223
203
  Explicit about scope boundaries to prevent scope creep.
224
- 11:
225
- id: PR11
204
+ 10:
205
+ id: PR10
226
206
  field: context
227
207
  type: map
228
208
  required: true
@@ -293,14 +273,13 @@ VALIDATION:
293
273
  severity: error
294
274
  description: >-
295
275
  Each full-detail cycle entry must have: number, timestamp, type,
296
- phase, what, commit, and context (with intent).
276
+ phase, what, and context (with intent).
297
277
  checks:
298
278
  - "number is present and is a positive integer"
299
279
  - "timestamp is present and matches YYYY-MM-DD HH:MM"
300
280
  - "type is present and is a valid commit prefix"
301
281
  - "phase is present and is a valid phase name"
302
282
  - "what is present and non-empty"
303
- - "commit is present"
304
283
  - "context is present with intent sub-field"
305
284
  3:
306
285
  id: PV3
@@ -108,3 +108,17 @@ CONVENTION:
108
108
  Resolved items should wrap the original task text in Markdown
109
109
  strikethrough (~~text~~) before the resolution summary, keeping
110
110
  the original intent readable while visually marking it closed.
111
+ 6:
112
+ id: TC6
113
+ field: severity_band_policy
114
+ level: required
115
+ description: >-
116
+ Severity band policy: Critical (⇶) is enforced by the validator
117
+ (level: required) and must contain at least one `- [type]` item;
118
+ Degraded (⇉), Normal (→), and Annoying (⇢) are advisory and may
119
+ be header-only (no list entries, no Placeholder sentinel). The
120
+ asymmetry reflects the fact that Critical is the only band whose
121
+ absence is user-visible routing damage; the other three bands
122
+ may be honestly empty. This rule lives in
123
+ packages/cli/src/hooks/validateArtifact.ts `validateMdItems` as
124
+ the single executable source of truth.
@@ -5,7 +5,7 @@ description: >
5
5
  /hej installs toward the Agentera v2 /agentera entry point and idempotent
6
6
  upgrade CLI. Do not use this skill for bare text `hej`; route that through
7
7
  the bundled agentera skill and the agentera hej dashboard path.
8
- version: "2.7.6"
8
+ version: "3.0.0"
9
9
  legacy_bridge: true
10
10
  ---
11
11
 
@@ -313,11 +313,33 @@ export class CorpusUnavailable extends Error {
313
313
  this.name = "CorpusUnavailable";
314
314
  }
315
315
  }
316
+ export const MAX_CORPUS_READ_BYTES = 64 * 1024 * 1024;
317
+ export function corpusTooLargeReason(corpusPath) {
318
+ try {
319
+ const size = fs.statSync(corpusPath).size;
320
+ if (size <= MAX_CORPUS_READ_BYTES)
321
+ return null;
322
+ return `corpus is too large to load (${size} bytes; max ${MAX_CORPUS_READ_BYTES}). Rebuild with agentera report refresh --consent local-history or pass --corpus PATH to a smaller extract.`;
323
+ }
324
+ catch {
325
+ return null;
326
+ }
327
+ }
316
328
  export function loadCorpusOrRaise(corpusPath) {
317
329
  if (!fs.existsSync(corpusPath)) {
318
330
  throw new CorpusUnavailable(`corpus.json not found at ${corpusPath}. ${CORPUS_GUIDANCE}`);
319
331
  }
320
- const corpus = JSON.parse(fs.readFileSync(corpusPath, "utf8"));
332
+ const tooLarge = corpusTooLargeReason(corpusPath);
333
+ if (tooLarge) {
334
+ throw new CorpusUnavailable(`corpus at ${corpusPath} ${tooLarge}`);
335
+ }
336
+ let corpus;
337
+ try {
338
+ corpus = JSON.parse(fs.readFileSync(corpusPath, "utf8"));
339
+ }
340
+ catch (exc) {
341
+ throw new CorpusUnavailable(`corpus is not readable JSON: ${exc.message}`);
342
+ }
321
343
  const records = isMapping(corpus) ? (corpus.records ?? []) : [];
322
344
  const hasTurn = Array.isArray(records) && records.some((r) => isMapping(r) && r.source_kind === "conversation_turn");
323
345
  if (!hasTurn) {