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,139 @@
1
+ VALIDATION:
2
+ 1:
3
+ id: V1
4
+ rule: user_approval_required
5
+ description: >-
6
+ Documentation MUST NOT be written or modified without explicit user
7
+ approval. Present drafts and get confirmation before writing.
8
+ This applies to all modes: intent-first, explore-and-generate,
9
+ update-and-verify, and first-run survey.
10
+ severity: critical
11
+ checks:
12
+ - "Draft presented to user before write"
13
+ - "Explicit approval received"
14
+ 2:
15
+ id: V2
16
+ rule: dtc_code_wrong
17
+ description: >-
18
+ Per DTC principle, if code diverges from documentation, the code
19
+ is wrong. Documentation MUST NOT be updated to match broken code.
20
+ The divergence MUST be documented as an issue in TODO.md instead.
21
+ severity: critical
22
+ checks:
23
+ - "Docs not updated to match broken code"
24
+ - "Divergences filed to TODO.md"
25
+ 3:
26
+ id: V3
27
+ rule: evergreen_prose
28
+ description: >-
29
+ Documentation MUST be written as the intended steady state:
30
+ evergreen and non-temporal. No changelogs, no "we recently added",
31
+ no temporal language. Write as if the feature has always existed.
32
+ severity: warning
33
+ checks:
34
+ - "No temporal language in documentation"
35
+ 4:
36
+ id: V4
37
+ rule: dry_across_docs
38
+ description: >-
39
+ Information MUST NOT be duplicated across doc files. Keep it DRY:
40
+ reference, don't repeat. Each fact lives in one authoritative
41
+ location and other docs link to it.
42
+ severity: warning
43
+ checks:
44
+ - "No duplicated content across doc files"
45
+ 5:
46
+ id: V5
47
+ rule: verification_required
48
+ description: >-
49
+ In update-and-verify mode, every doc claim MUST be checked against
50
+ code. The verification step MUST NOT be skipped.
51
+ severity: critical
52
+ checks:
53
+ - "All doc claims verified against code in update mode"
54
+ 6:
55
+ id: V6
56
+ rule: read_before_generate
57
+ description: >-
58
+ Documentation MUST NOT be auto-generated without reading the code
59
+ it describes. Understanding precedes documentation.
60
+ severity: critical
61
+ checks:
62
+ - "Source code read before generating documentation"
63
+ 7:
64
+ id: V7
65
+ rule: index_entry_brevity
66
+ description: >-
67
+ Each DOCS.md index entry description MUST be ≤15 words.
68
+ Index entries are summaries, not documentation.
69
+ severity: warning
70
+ checks:
71
+ - "Each index entry description ≤ 15 words"
72
+ 8:
73
+ id: V8
74
+ rule: exit_marker_required
75
+ description: >-
76
+ Every dokumentera invocation MUST emit an exit marker using the
77
+ canonical glyph ▤ (SG8) in the format ▤ dokumentera · <status>
78
+ where status is one of EX1-EX4.
79
+ severity: critical
80
+ checks:
81
+ - "Exit marker present"
82
+ - "Exit marker uses glyph ▤ (SG8)"
83
+ - "Exit marker status is one of complete, flagged, stuck, waiting"
84
+ 9:
85
+ id: V9
86
+ rule: closeout_context_first
87
+ description: >-
88
+ During final synchronization, Dokumentera MUST use `agentera prime
89
+ --context dokumentera --format json` and its `closeout_context`
90
+ before reading TODO, docs, changelog, or progress artifacts directly.
91
+ Complete closeout context is the normal source for mappings, version
92
+ policy, blockers, boundaries, progress evidence, benchmark evidence,
93
+ caveats, fallback commands, raw-read policy, and completeness.
94
+ severity: critical
95
+ checks:
96
+ - "Closeout starts from hej capability context"
97
+ - "Complete closeout_context is used before raw artifact reads"
98
+ - "Completeness and non-empty evidence flags are preserved"
99
+ 10:
100
+ id: V10
101
+ rule: closeout_fallback_before_raw
102
+ description: >-
103
+ If closeout context is incomplete or caveated, Dokumentera MUST run the
104
+ listed existing CLI fallback commands before any last-resort raw artifact
105
+ read. No unsupported capability-name command or new closeout command may
106
+ be introduced.
107
+ severity: critical
108
+ checks:
109
+ - "Listed CLI fallback commands run before raw artifact reads"
110
+ - "Raw reads are last-resort diagnostics or write targets only"
111
+ - "No unsupported capability-name command is introduced"
112
+ 11:
113
+ id: V11
114
+ rule: closeout_caveat_preservation
115
+ description: >-
116
+ Dokumentera MUST preserve closeout caveats about stale app/profile state,
117
+ compacted or missing state, missing benchmark evidence, absent local
118
+ metadata or tags, and unrecorded publication or remote state. Caveats must
119
+ not be hidden, reconstructed, or converted into approval to refresh apps,
120
+ profiles, vision, objective state, publication, push, or tags.
121
+ severity: critical
122
+ checks:
123
+ - "State caveats are carried into closeout notes"
124
+ - "Missing benchmark evidence remains caveated"
125
+ - "Publication, remote, tag, app refresh, and profile refresh are not invented"
126
+ 12:
127
+ id: V12
128
+ rule: satisfaction_authority_boundary
129
+ description: >-
130
+ When Dokumentera touches decision satisfaction, it may record provisional
131
+ satisfaction with evidence but MUST NOT user-confirm satisfaction. Missing,
132
+ compacted, open, provisional, or review-needed satisfaction state remains a
133
+ caveat and review pressure; automation must not reconstruct hidden outcomes
134
+ or claim it proved user intent.
135
+ severity: critical
136
+ checks:
137
+ - "Provisional satisfaction requires evidence"
138
+ - "Only the user confirms final satisfaction"
139
+ - "Missing or compacted satisfaction caveats are preserved"
@@ -0,0 +1,331 @@
1
+ # HEJ
2
+
3
+ **Holistic Entry Junction. Orient, Route, Activate**
4
+
5
+ Single entry point to the agentera suite. Detects fresh vs returning, delivers a situational briefing, routes to the right capability. Same on first install and 100th session. A bare user message exactly `hej` uses this same briefing path, not generic greeting behavior.
6
+
7
+ Each invocation = one orientation. Uses the CLI composite briefing first,
8
+ writes nothing.
9
+
10
+ ---
11
+
12
+ ## State artifacts
13
+
14
+ Glyph: **⌂** (SG1). Hej reads suite state through `agentera hej` and writes
15
+ nothing. It may fall back to direct reads only when the composite command fails
16
+ or explicitly asks for fallback.
17
+
18
+ ### CLI-first access
19
+
20
+ For returning projects, run one composite command before any individual state
21
+ access:
22
+
23
+ ```bash
24
+ npx -y agentera prime
25
+ ```
26
+
27
+ Use that output to render the dashboard and select the concrete next action. Do
28
+ not relay raw CLI lines as the user-facing briefing. Source labels such as
29
+ `mode:`, `profile:`, `v1_migration:`, `health:`, `issues:`, `plan:`,
30
+ `objective:`, `attention:`, `next_action:`, `source_contract:`, and the
31
+ compatibility `bundle:` installed-app status object are parsing aids, not
32
+ dashboard lines. Do not run `agentera plan`, `agentera progress`, `agentera
33
+ health`, `agentera todo`, `agentera decisions`, or `agentera objective` as part
34
+ of normal hej briefing assembly. Do not read raw
35
+ `.agentera/*.yaml` files for normal hej orientation. If a normal dashboard field
36
+ is missing from `agentera hej`, fix or extend the composite CLI contract instead
37
+ of adding routine fallback reads. Use top-level fallback commands only when
38
+ `agentera hej` fails or explicitly reports fallback-only recovery.
39
+
40
+ Resolve `RESOLVED_AGENTERA_HOME` with the app-home precedence `AGENTERA_HOME`
41
+ when set, otherwise the platform data home, then run
42
+ the installed command once. Do not preflight app health with `glob`, `grep`,
43
+ `read`, `ls`, `python`, `doctor`, `--help`,
44
+ `registry.json`, or `.agentera-bundle.json`.
45
+ Never combine the app-home assignment with the same shell command that expands
46
+ the managed app script path; shell expansion can otherwise turn an unset
47
+ `AGENTERA_HOME` into `npx -y agentera` before the assignment takes effect.
48
+
49
+ Recovery copy must be plain-language and recommendation-first. Never ask users
50
+ to choose between technical install concepts, internal directory states,
51
+ command-mode flags, or package-layout terms. Say what happened, what changed,
52
+ what the safe fix does, and what it will not touch. The safe fix must say it will
53
+ not edit project files, shell startup files, or unknown directories. Good recovery labels are `Use the safe fix
54
+ (Recommended)`, `Choose a different directory`, and `Stop`.
55
+
56
+ If the command cannot execute because `AGENTERA_HOME` names the old default
57
+ `$HOME/.agents/agentera` and `npx -y agentera` is missing,
58
+ do not require a successful failed CLI invocation and do not first ask the user to
59
+ unset `AGENTERA_HOME`. Say: `Agentera found an old or broken local copy of
60
+ itself. The safe fix is to install a fresh copy in the normal Agentera directory.`
61
+ Then show this preview command and say it changes nothing:
62
+
63
+ ```bash
64
+ npx -y agentera@latest doctor
65
+ ```
66
+
67
+ That preview writes nothing. Because no explicit `--install-root` is supplied,
68
+ upgrade can choose the normal platform app directory and preview repair for app
69
+ files, managed runtime surfaces, and cleanup of the old directory. Ask for
70
+ explicit approval before writes, using plain wording such as
71
+ `Approve the safe Agentera repair at <directory>`. Then apply the same safe repair path:
72
+
73
+ ```bash
74
+ npx -y agentera@latest prime
75
+ ```
76
+
77
+ After apply, retry the installed command from the platform app home reported by
78
+ the upgrade output, not from the old default directory. If the command exits
79
+ successfully, inspect the CLI-provided `bundle.status` installed-app status
80
+ object. Only `up_to_date` passes the installed Agentera app gate for normal briefing.
81
+ The object also carries `appHome`, `managedAppRoot`, `userDataRoot`,
82
+ `expectedVersionSource`, `bundle.dryRunCommand`, `bundle.applyCommand`, and
83
+ approval text. If the installed command cannot execute, is out of date, missing
84
+ `hej`, fails before argparse, or reports manual-review-needed/repair-needed status, tell
85
+ the user `Agentera found an old or broken local copy of itself.` Then preview the
86
+ repair with the CLI-provided command when present:
87
+
88
+ ```bash
89
+ npx -y agentera@latest doctor
90
+ ```
91
+
92
+ Do not run the matching apply command until the user explicitly approves the
93
+ same Agentera repair and directory.
94
+ After apply, retry `npx -y agentera prime`; do not treat local checkout
95
+ fallback as installed-app success. If `AGENTERA_HOME` names the old default
96
+ `$HOME/.agents/agentera`, no explicit `--install-root` was supplied, and
97
+ `npx -y agentera` is missing or out of date, show the normal
98
+ Agentera directory preview above instead of first asking the user to unset
99
+ `AGENTERA_HOME`; do not claim to prove where the environment value came from. If
100
+ `AGENTERA_HOME` points at any other missing path, file, or directory with unknown
101
+ files, say: `Agentera was told to use a directory it cannot safely use. Choose a
102
+ different Agentera directory, or approve --force only after checking that directory is
103
+ safe to replace.`
104
+
105
+ If doctor reports a leftover 1.x managed marker block in
106
+ shell startup files, say plainly that Agentera will not edit those files.
107
+ Cleanup is user-owned manual cleanup, not a repair write.
108
+
109
+ Use `agentera query <artifact-name> --format json|yaml` only for advanced or
110
+ custom artifact inspection when no top-level command serves the needed state.
111
+
112
+ ### Artifact path resolution
113
+
114
+ Only if `agentera hej` fails and fallback raw artifact access is explicitly
115
+ needed, check `.agentera/docs.yaml` for path mappings before reading artifacts.
116
+ Without a mapping, use the default layout:
117
+
118
+ - Human-facing artifacts at the project root (Markdown): `TODO.md`, `CHANGELOG.md`, `DESIGN.md`
119
+ - Agent-facing artifacts in `.agentera/` (YAML): `progress.yaml`, `decisions.yaml`, `health.yaml`, `plan.yaml`, `docs.yaml`, `vision.yaml`, and per-objective `objective.yaml` / `experiments.yaml`
120
+
121
+ Canonical names are identifiers, not literal paths. PROFILE.md is global:
122
+ `$PROFILERA_PROFILE_DIR/PROFILE.md`, default `$XDG_DATA_HOME/agentera/PROFILE.md`.
123
+
124
+ ### Contract values
125
+
126
+ Use protocol tokens by ID where needed: severity arrows VT5-VT8, trend arrows
127
+ VT12-VT13, progress bar VT18, separator VT16, list item VT15, section divider
128
+ VT14, flow arrow VT17, skill glyphs SG1-SG12, exits EX1-EX4, issues SI1-SI4.
129
+
130
+ ---
131
+
132
+ ## Step 0: Detect mode
133
+
134
+ Run the resolved installed `agentera hej` and use its `mode` field. If the
135
+ installed-app status check reports out-of-date or blocked, show the CLI-provided
136
+ refresh preview before normal mode handling.
137
+
138
+ - **No artifacts found** → Step 1a (first time on this project)
139
+ - **Artifacts found** → Step 1b (returning to known project)
140
+
141
+ Narration voice: warm, brief, unscripted.
142
+
143
+ ---
144
+
145
+ ## Step 0.5: CLI-owned checks
146
+
147
+ Do not run separate v1 artifact or PROFILE.md checks during normal hej
148
+ orientation. `agentera hej` owns those checks and emits the mode, profile status,
149
+ `v1_migration.detected`, `v1_migration.affected_files`,
150
+ `v1_migration.dry_run_command`, `v1_migration.apply_command`, attention items,
151
+ and next action. Render those fields; do not spend additional tool calls on
152
+ `.agentera/*.md`, `.agentera/*.yaml`, `VISION.md`, or global profile-path
153
+ discovery. Treat `v1_migration.dry_run_command` as the CLI-supplied preview and
154
+ tell the user it changes nothing. Ask before any upgrade apply command, and only run
155
+ `v1_migration.apply_command` after confirmation.
156
+ The artifacts phase migrates supported v1 Markdown files to YAML with backups
157
+ after preview and confirmation.
158
+
159
+ If `v1_migration.detected` is false, emit no upgrade notice. Profile status is
160
+ also CLI-owned: render `profile: loaded` without warning, and render
161
+ `profile.suggested_action` or a missing-profile attention item only when
162
+ `agentera hej` supplies one.
163
+
164
+ If `npx skills update` refreshed only the visible skill and `/agentera` next
165
+ finds missing or out-of-date app files, explain in plain language that Agentera
166
+ also needs to repair its local app copy; the visible skill update alone is not
167
+ enough. Package-manager repair commands remain opt-in through
168
+ `--update-packages`.
169
+
170
+ ---
171
+
172
+ ## Step 1a: Welcome
173
+
174
+ First impression: the colleague meets a new project.
175
+
176
+ 1. **Use composite state**: Build the welcome from `agentera hej` output only.
177
+ Do not scan README files, git history, languages, framework files, or project
178
+ size during bare orientation.
179
+
180
+ 2. **Share what's available**: lead with the suggested capability from
181
+ `next_action`. Do not enumerate the full suite unless asked.
182
+
183
+ 3. **Route**: ask what they'd like to do with a free-form prompt. Do not use a
184
+ native question menu on the initial welcome unless the user explicitly asked
185
+ for bounded choices. Invoke a capability only after the user confirms it.
186
+
187
+ ---
188
+
189
+ ## Step 1b: Briefing
190
+
191
+ Show where things stand.
192
+
193
+ 1. **Use composite state**: Build the briefing from `agentera hej` output.
194
+ - Use its mode, profile, health, issue counts, plan progress, objective,
195
+ attention, and next_action fields.
196
+ - Do not issue individual artifact queries during normal returning-project
197
+ orientation.
198
+ - Do not open raw `.agentera/*.yaml` files unless the composite command fails
199
+ or names a fallback need.
200
+ - If exceptional fallback is required, prefer top-level commands such as
201
+ `agentera plan`, `agentera progress`, `agentera health`, `agentera todo`,
202
+ `agentera decisions`, `agentera objective`, and `agentera experiments`.
203
+ Missing normal dashboard fields should be repaired in `agentera hej`
204
+ instead of weakening the one-command path.
205
+ - Keep `agentera query` for advanced/custom inspection only.
206
+
207
+ 2. **Brief them**: concise status, only what exists. No empty sections.
208
+ Show the agentera logo.
209
+
210
+ ```
211
+ ┌─┐┌─┐┌─┐┌┐┌┌┬┐┌─┐┬─┐┌─┐
212
+ ├─┤│ ┬├┤ │││ │ ├┤ ├┬┘├─┤
213
+ ┴ ┴└─┘└─┘┘└┘ ┴ └─┘┴└─┴ ┴
214
+
215
+ ─── status ─────────────────────────────
216
+
217
+ ⛶ health [⮉|⮋] [grade] ([worst dimension: grade])
218
+ ⇶ issues N critical · M degraded · J annoying
219
+ ≡ plan [██████▓░░░] N/M tasks
220
+ ⎘ optim [metric] [current] → [target]
221
+ ♾ profile [loaded | not found]
222
+
223
+ [1-2 sentence narrative read: what shipped, what's moving, what needs eyes.
224
+ Interpretation, not metrics. Closes the status section before attention.]
225
+
226
+ ─── attention ──────────────────────────
227
+
228
+ ⇶ [critical items, triple arrow for critical]
229
+ ⇉ [degraded items, double arrow for degraded]
230
+ → [normal items, single arrow for normal]
231
+ ⇢ [annoying items, dashed arrow for annoying]
232
+
233
+ ─── next ───────────────────────────────
234
+
235
+ suggested → [glyph] [capability] ([reason])
236
+ ```
237
+
238
+ Output constraint: ≤120 words total briefing, ≤15 words per routing suggestion.
239
+
240
+ **Exit marker**: after the closing code fence of the dashboard, emit `⌂ hej · <status>` on its own line, followed by a one-sentence summary of what you delivered. For `waiting`, `flagged`, or `stuck`, add a `▸` bullet below the summary identifying what the user needs to decide or act on next. The exit marker is mandatory on every invocation regardless of mode (fresh welcome or returning briefing).
241
+
242
+ **Formatting rules**:
243
+ - Each status line uses the skill glyph that owns that data
244
+ - Severity arrows (VT5-VT8) mark attention items by urgency
245
+ - Trend arrows (VT12/VT13) show health trajectory
246
+ - Progress bars (VT18) show plan completion visually
247
+ - The inline separator (VT16) joins counts on a single line
248
+ - Lead with status metrics, then the narrative read inside the status section
249
+ - The narrative read is colleague interpretation; metric lines above it are evidence
250
+ - The issues summary line lists critical, degraded, and annoying counts only;
251
+ normal-priority items belong in attention with → (SI3), not on the summary line
252
+ - Omit any line whose source artifact is missing
253
+ - Omit any section that would be empty (e.g., no attention items = no attention section)
254
+
255
+ 3. **Attention items**: priority order with severity arrows (SI1-SI4):
256
+ - ⇶ (SI1) Critical issues, degrading health dimensions
257
+ - ⇉ (SI2) Blocked/overdue plan tasks, stale artifacts (plan-relative per contract staleness detection; fall back to PROGRESS.md recency heuristic when no plan context exists), overdue health audits (hybrid time/cycle staleness via `AGENTERA_INSPEKTERA_MAX_AGE_DAYS` default 30 and `AGENTERA_INSPEKTERA_MAX_CYCLES` default 10; stale when either axis exceeds its threshold), loop stop-condition triggers
258
+ - → (SI3) Standard work: features, improvements, routine tasks
259
+ - ⇢ (SI4) Unresolved exploratory decisions
260
+
261
+ Nothing? Say so. A clean bill of health is useful.
262
+
263
+ 4. **Select the concrete next action before selecting the skill**.
264
+ - The routing suggestion MUST name the artifact item it would act on.
265
+ - Valid objects: `PLAN Task N: <title>`, `TODO: <item>`, `DECISION N follow-up`, `OBJECTIVE: <metric>`, or `VISION refresh`.
266
+ - A skill name without a concrete object is not a valid suggestion.
267
+
268
+ Priority order. SG codes are internal protocol references; never render them
269
+ in user-facing handoff labels:
270
+ - Active PLAN with pending tasks → suggest ⎈ orkestrera for the first unblocked pending task.
271
+ - Critical or degrading health → suggest ⛶ inspektera or ⧉ realisera for the named finding.
272
+ - Stale health audit (CLI `health.stale=true`) with no higher-priority work → suggest ⛶ inspektera for `HEALTH: Audit N stale`.
273
+ - Active non-closed OBJECTIVE with stalled or missing metric evidence → suggest ⎘ optimera for that metric.
274
+ - TODO.md open items → select the highest-severity open item, then route by shape: narrow one-cycle TODOs suggest ⧉ realisera; contract-shaped, multi-surface, dependency-heavy, migration, schema, metadata, validation, or acceptance-risky TODOs suggest ≡ planera first. Prefer items that unlock product evidence or future plans.
275
+ - Pending DECISIONS.md follow-up → suggest ❈ resonera for the named unresolved decision.
276
+ - Vision exists but no plan, objective, decision follow-up, or TODO work is active → suggest ≡ planera.
277
+ - No vision, no executable follow-ups, and no active plan → suggest ⛥ visionera to choose a direction.
278
+
279
+ Do not let `healthy + plan complete → ⛥` override active TODO, OBJECTIVE, DECISIONS, or a newer active PLAN. A completed plan means "look for the next executable follow-up," not automatically "refresh vision."
280
+
281
+ 5. **Route**: present one concrete suggestion and let the user choose. No coercion.
282
+ - Do not list generic skill options unless the user asks for the full menu.
283
+ - The waiting bullet should ask whether to run the named action, not ask the user to pick from skills.
284
+ - On the initial Agentera/hej brief, use a free-form continuation prompt rather than a native question menu unless the user asked for bounded choices or the suggested next step is a state-changing Proceed/Cancel handoff.
285
+ - Mid-conversation, use the native question tool only for at least two meaningful non-terminal next actions or a consequential Proceed/Cancel decision; `Done` and free-form/custom answer affordances do not count as alternatives.
286
+ - State-changing handoffs are consequential Proceed/Cancel decisions even when there is only one suggested action. State-changing means the proposed next step may write artifacts, edit code, run optimization or orchestration cycles, apply migrations, refresh app/runtime state, or otherwise mutate project/runtime state.
287
+ - Use the behavior rule first, with common examples such as ⧉ realisera, ≡ planera when creating or updating plans, ▤ dokumentera when writing docs, ⎘ optimera when running or applying optimization cycles, and ⎈ orkestrera when dispatching cycles.
288
+ - For one non-mutating suggested action, clear free-form acceptance such as `yes`, `start`, `do it`, or `run <capability>` confirms that suggestion. Ambiguous replies get one clarifying question.
289
+
290
+ ---
291
+
292
+ ## Step 2: Route
293
+
294
+ Narration voice: "Kicking off [skill]..." or similarly brief.
295
+
296
+ Invoke the capability. Hej's work is done.
297
+
298
+ Unclear mapping? Ask **one** clarifying question. No compound questions.
299
+
300
+ ---
301
+
302
+ ## Safety rails
303
+
304
+ <critical>
305
+ - NEVER execute implementation work. Hej orients and routes; it does not build, audit, plan, or decide.
306
+ - NEVER dump full artifact contents verbatim. Summarize concisely; the user can read the files themselves.
307
+ - NEVER skip the briefing in returning mode. The user needs context before choosing a direction.
308
+ - NEVER assume what the user wants without asking. Present the suggestion, then wait for confirmation.
309
+ - NEVER modify any state artifact. Hej is strictly read-only.
310
+ - NEVER route to a capability without the user's consent. Suggest, don't force.
311
+ </critical>
312
+
313
+ ---
314
+
315
+ ## Exit signals
316
+
317
+ Report one of these statuses at workflow completion (protocol refs: EX1-EX4).
318
+
319
+ Format: emit `⌂ hej · <status>` on its own line below the dashboard's closing code fence, followed by a one-sentence summary of what was delivered. For `flagged` (EX2), `stuck` (EX3), and `waiting` (EX4), add a `▸` (VT15) bullet below the summary identifying what the user needs to decide or act on next. The exit marker is mandatory and uses hej's canonical glyph `⌂` (SG1, U+2302).
320
+
321
+ - **complete** (EX1): Briefing delivered (or welcome shown) and user successfully routed to a capability.
322
+ - **flagged** (EX2): Briefing delivered but critical attention items were found: critical issues, degrading health, loop stop-condition triggers. Each concern is listed explicitly.
323
+ - **stuck** (EX3): Cannot orient: the working directory is not a code project, no readable files exist, or permissions prevent scanning.
324
+ - **waiting** (EX4): Briefing or welcome delivered, suggestion made, awaiting user input on which direction to take.
325
+
326
+ ---
327
+
328
+ ## Cross-capability integration
329
+
330
+ Hej is the suite entry point. It reads other capabilities' artifacts, produces
331
+ no artifact, and outputs only a briefing plus routing suggestion.
@@ -0,0 +1,69 @@
1
+ ARTIFACTS:
2
+ 1:
3
+ id: A1
4
+ artifact_id: vision
5
+ local_role: consumes
6
+ description: >-
7
+ Hej reads this for the briefing's project context.
8
+ 2:
9
+ id: A2
10
+ artifact_id: decisions
11
+ local_role: consumes
12
+ description: >-
13
+ Hej reads this to identify unresolved decisions requiring follow-up.
14
+ 3:
15
+ id: A3
16
+ artifact_id: plan
17
+ local_role: consumes
18
+ description: >-
19
+ Hej reads this to identify the next executable task and plan progress.
20
+ 4:
21
+ id: A4
22
+ artifact_id: progress
23
+ local_role: consumes
24
+ description: >-
25
+ Hej reads this for the briefing's "what shipped" context.
26
+ 5:
27
+ id: A5
28
+ artifact_id: todo
29
+ local_role: consumes
30
+ description: >-
31
+ Hej reads this to identify high-severity open items for routing.
32
+ 6:
33
+ id: A6
34
+ artifact_id: health
35
+ local_role: consumes
36
+ description: >-
37
+ Hej reads this for the health status line and attention items.
38
+ 7:
39
+ id: A7
40
+ artifact_id: objective
41
+ local_role: consumes
42
+ description: >-
43
+ Hej reads this to check for active optimization objectives.
44
+ 8:
45
+ id: A8
46
+ artifact_id: experiments
47
+ local_role: consumes
48
+ description: >-
49
+ Hej reads this alongside the active optimization target to determine
50
+ optimization status.
51
+ 9:
52
+ id: A9
53
+ artifact_id: docs
54
+ local_role: consumes
55
+ description: >-
56
+ Hej reads this first to resolve project-local artifact mappings before
57
+ reading other artifacts.
58
+ 10:
59
+ id: A10
60
+ artifact_id: design
61
+ local_role: consumes
62
+ description: >-
63
+ Hej reads this for the briefing's design status.
64
+ 11:
65
+ id: A11
66
+ artifact_id: profile
67
+ local_role: consumes
68
+ description: >-
69
+ Hej reads this to report profile status (loaded/not found) in the briefing.
@@ -0,0 +1,32 @@
1
+ EXIT_CONDITIONS:
2
+ 1:
3
+ id: E1
4
+ condition: complete
5
+ description: >-
6
+ Briefing delivered (or welcome shown in fresh mode) and user
7
+ successfully routed to a capability. Normal successful exit.
8
+ exit_signal: complete
9
+ 2:
10
+ id: E2
11
+ condition: flagged
12
+ description: >-
13
+ Briefing delivered but critical attention items were found: critical
14
+ issues, degrading health dimensions, or loop guard triggers. Each
15
+ concern is listed explicitly in the attention section.
16
+ exit_signal: flagged
17
+ 3:
18
+ id: E3
19
+ condition: stuck
20
+ description: >-
21
+ Cannot orient. The working directory is not a code project, no
22
+ readable files exist, or permissions prevent scanning. The exit
23
+ marker explains what is blocking orientation.
24
+ exit_signal: stuck
25
+ 4:
26
+ id: E4
27
+ condition: waiting
28
+ description: >-
29
+ Briefing or welcome delivered, concrete suggestion made, but awaiting
30
+ user input on which direction to take. The waiting bullet identifies
31
+ the specific decision or action the user needs to make.
32
+ exit_signal: waiting
@@ -0,0 +1,58 @@
1
+ TRIGGERS:
2
+ 1:
3
+ id: T1
4
+ description: >-
5
+ Direct invocation by name or slash command. Matches when the user
6
+ explicitly requests hej.
7
+ priority: high
8
+ patterns:
9
+ - "hej"
10
+ - "/hej"
11
+ 2:
12
+ id: T2
13
+ description: >-
14
+ Greetings and session-start signals. Matches casual greetings or
15
+ explicit session start requests.
16
+ priority: medium
17
+ patterns:
18
+ - "hello"
19
+ - "hi"
20
+ - "start"
21
+ - "begin"
22
+ - "getting started"
23
+ - "onboard me"
24
+ 3:
25
+ id: T3
26
+ description: >-
27
+ Status and orientation requests. Matches when the user wants to know
28
+ the current state of the project or get a briefing.
29
+ priority: medium
30
+ patterns:
31
+ - "status"
32
+ - "dashboard"
33
+ - "pulse"
34
+ - "brief"
35
+ - "brief me"
36
+ - "update me"
37
+ - "what needs attention"
38
+ 4:
39
+ id: T4
40
+ description: >-
41
+ Returning-to-project signals. Matches when the user resumes work
42
+ on a known project and wants to pick up where they left off.
43
+ priority: medium
44
+ patterns:
45
+ - "where were we"
46
+ - "catch me up"
47
+ - "what should I work on"
48
+ - "what's next"
49
+ 5:
50
+ id: T5
51
+ description: >-
52
+ Fallback. Hej is the default capability when no other capability's
53
+ trigger patterns match. This entry documents the fallback behavior
54
+ defined in the routing layer routing logic.
55
+ patterns:
56
+ - "*"
57
+ fallback: true
58
+ priority: low
@@ -0,0 +1,55 @@
1
+ VALIDATION:
2
+ 1:
3
+ id: V1
4
+ rule: read_only
5
+ description: >-
6
+ Hej MUST NOT produce or modify any artifacts. It is strictly read-only.
7
+ All artifacts consumed by hej are produced by other capabilities.
8
+ This rule verifies that no artifact entry has produces: true.
9
+ severity: critical
10
+ checks:
11
+ - "No artifact entry has produces: true"
12
+ 2:
13
+ id: V2
14
+ rule: briefing_completeness
15
+ description: >-
16
+ In returning mode, the briefing MUST include a status section (if any
17
+ artifacts exist), an attention section (if any issues exist), and a
18
+ concrete next-action suggestion with a named artifact item.
19
+ A skill name alone is not a valid suggestion.
20
+ severity: critical
21
+ checks:
22
+ - "Briefing contains at least one status line when artifacts exist"
23
+ - "Routing suggestion names a concrete artifact item"
24
+ 3:
25
+ id: V3
26
+ rule: exit_marker_required
27
+ description: >-
28
+ Every hej invocation MUST emit an exit marker after the briefing or
29
+ welcome. The marker uses the canonical glyph ⌂ (SG1) in the format
30
+ ⌂ hej · <status> where status is one of EX1-EX4.
31
+ severity: critical
32
+ checks:
33
+ - "Exit marker present after closing code fence"
34
+ - "Exit marker uses glyph ⌂ (SG1)"
35
+ - "Exit marker status is one of complete, flagged, stuck, waiting"
36
+ 4:
37
+ id: V4
38
+ rule: word_budget
39
+ description: >-
40
+ The briefing MUST be ≤120 words total. Each routing suggestion MUST be
41
+ ≤15 words. These constraints keep the briefing scannable and avoid
42
+ information overload.
43
+ severity: warning
44
+ checks:
45
+ - "Briefing word count ≤ 120"
46
+ - "Each routing suggestion ≤ 15 words"
47
+ 5:
48
+ id: V5
49
+ rule: single_clarifying_question
50
+ description: >-
51
+ If the routing target is unclear, hej MUST ask exactly one clarifying
52
+ question. Compound questions are not allowed.
53
+ severity: critical
54
+ checks:
55
+ - "At most one clarifying question when routing is unclear"