agentera 3.0.0-dev.14 → 3.0.0-dev.16

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 (221) hide show
  1. package/README.md +43 -22
  2. package/bundle/.codex-plugin/plugin.json +92 -0
  3. package/bundle/.cursor/agents/agentera.md +7 -0
  4. package/bundle/.cursor/hooks.json +32 -0
  5. package/bundle/.cursor-plugin/plugin.json +34 -0
  6. package/bundle/.github/hooks/postToolUse.json +9 -0
  7. package/bundle/.github/hooks/preToolUse.json +8 -0
  8. package/bundle/.github/hooks/sessionEnd.json +8 -0
  9. package/bundle/.github/hooks/sessionStart.json +8 -0
  10. package/bundle/.github/plugin/plugin.json +7 -0
  11. package/bundle/.opencode/agents/agentera.md +12 -0
  12. package/bundle/.opencode/commands/agentera.md +5 -0
  13. package/bundle/.opencode/package.json +31 -0
  14. package/bundle/.opencode/plugins/agentera.js +820 -0
  15. package/bundle/CHANGELOG.md +1075 -0
  16. package/bundle/DESIGN.md +233 -0
  17. package/bundle/LICENSE +201 -0
  18. package/bundle/README.md +137 -0
  19. package/bundle/UPGRADE.md +188 -0
  20. package/bundle/agents/openai.yaml +87 -0
  21. package/bundle/extract-corpus-parity.json +2 -4
  22. package/bundle/hooks/codex-hooks.json +31 -0
  23. package/bundle/hooks/codex-plugin-hooks.json +31 -0
  24. package/bundle/plugin.json +13 -0
  25. package/bundle/references/adapters/cursor.md +50 -40
  26. package/bundle/references/adapters/opencode.md +22 -23
  27. package/bundle/references/adapters/package-manifest-interface-model.yaml +36 -43
  28. package/bundle/references/adapters/package-registry.yaml +19 -52
  29. package/bundle/references/adapters/package-surface-characterization.md +61 -47
  30. package/bundle/references/adapters/runtime-adapter-characterization.md +44 -79
  31. package/bundle/references/adapters/runtime-adapter-registry.yaml +7 -169
  32. package/bundle/references/adapters/runtime-feature-parity.md +99 -167
  33. package/bundle/references/adapters/runtime-lifecycle-adapters.yaml +288 -0
  34. package/bundle/references/adapters/runtime-lifecycle-authority.yaml +73 -0
  35. package/bundle/references/adapters/runtime-lifecycle-operation-contract.yaml +83 -0
  36. package/bundle/references/adapters/runtime-retired-resources.yaml +33 -0
  37. package/bundle/references/analysis/benchmark.md +5 -5
  38. package/bundle/references/analysis/startup-measurement-contract.yaml +19 -8
  39. package/bundle/references/cli/bundle-skill-vocabulary.yaml +2 -2
  40. package/bundle/references/cli/vocabulary-index.yaml +1 -1
  41. package/bundle/references/cli/vocabulary.md +7 -7
  42. package/bundle/skills/agentera/SKILL.md +43 -2
  43. package/bundle/skills/agentera/references/contract.md +10 -3
  44. package/bundle/skills/agentera/schemas/artifacts/decisions.yaml +1 -1
  45. package/bundle/skills/agentera/schemas/artifacts/experiments.yaml +1 -1
  46. package/bundle/skills/agentera/schemas/artifacts/health.yaml +1 -1
  47. package/bundle/skills/agentera/schemas/artifacts/progress.yaml +1 -1
  48. package/dist/analytics/extractCorpus/cli.js +19 -5
  49. package/dist/analytics/extractCorpus/cli.js.map +1 -1
  50. package/dist/analytics/extractCorpus/copilotSessions.js +6 -3
  51. package/dist/analytics/extractCorpus/copilotSessions.js.map +1 -1
  52. package/dist/analytics/extractCorpus/core.js +40 -11
  53. package/dist/analytics/extractCorpus/core.js.map +1 -1
  54. package/dist/analytics/extractCorpus/corpus.js +39 -16
  55. package/dist/analytics/extractCorpus/corpus.js.map +1 -1
  56. package/dist/analytics/extractCorpus/coverageAudit.js +44 -44
  57. package/dist/analytics/extractCorpus/coverageAudit.js.map +1 -1
  58. package/dist/analytics/extractCorpus/cursorSessions.js +6 -3
  59. package/dist/analytics/extractCorpus/cursorSessions.js.map +1 -1
  60. package/dist/analytics/extractCorpus/extractCorpusParity.js +2 -2
  61. package/dist/analytics/extractCorpus/extractCorpusParity.js.map +1 -1
  62. package/dist/analytics/extractCorpus/filesystemSources.js +1 -4
  63. package/dist/analytics/extractCorpus/filesystemSources.js.map +1 -1
  64. package/dist/analytics/extractCorpus/jsonlSessions.js +24 -4
  65. package/dist/analytics/extractCorpus/jsonlSessions.js.map +1 -1
  66. package/dist/analytics/usageStats.js +51 -7
  67. package/dist/analytics/usageStats.js.map +1 -1
  68. package/dist/bin/agentera.js +3 -1
  69. package/dist/bin/agentera.js.map +1 -1
  70. package/dist/capabilities/audit/instructions.js +1 -1
  71. package/dist/capabilities/audit/instructions.js.map +1 -1
  72. package/dist/capabilities/build/instructions.js +1 -1
  73. package/dist/capabilities/build/instructions.js.map +1 -1
  74. package/dist/capabilities/discuss/instructions.js +1 -1
  75. package/dist/capabilities/discuss/instructions.js.map +1 -1
  76. package/dist/capabilities/orchestrate/instructions.js +1 -1
  77. package/dist/capabilities/orchestrate/instructions.js.map +1 -1
  78. package/dist/capabilities/plan/instructions.js +1 -1
  79. package/dist/capabilities/plan/instructions.js.map +1 -1
  80. package/dist/capabilities/profile/instructions.js +1 -1
  81. package/dist/capabilities/profile/instructions.js.map +1 -1
  82. package/dist/cli/capabilityContext/contract.js +2 -0
  83. package/dist/cli/capabilityContext/contract.js.map +1 -1
  84. package/dist/cli/capabilityContext/startup.js +2 -0
  85. package/dist/cli/capabilityContext/startup.js.map +1 -1
  86. package/dist/cli/commands/compact.js +1 -1
  87. package/dist/cli/commands/compact.js.map +1 -1
  88. package/dist/cli/commands/doctor.js +66 -4
  89. package/dist/cli/commands/doctor.js.map +1 -1
  90. package/dist/cli/commands/prime/collectOrientationState.js +15 -1
  91. package/dist/cli/commands/prime/collectOrientationState.js.map +1 -1
  92. package/dist/cli/commands/prime/orientationOutput.js +15 -1
  93. package/dist/cli/commands/prime/orientationOutput.js.map +1 -1
  94. package/dist/cli/commands/report.js +19 -4
  95. package/dist/cli/commands/report.js.map +1 -1
  96. package/dist/cli/commands/schema.js +79 -3
  97. package/dist/cli/commands/schema.js.map +1 -1
  98. package/dist/cli/commands/state/write.js +341 -0
  99. package/dist/cli/commands/state/write.js.map +1 -0
  100. package/dist/cli/commands/upgrade.js +18 -2
  101. package/dist/cli/commands/upgrade.js.map +1 -1
  102. package/dist/cli/commands/verify.js +6 -6
  103. package/dist/cli/commands/verify.js.map +1 -1
  104. package/dist/cli/dispatch/index.js +2 -1
  105. package/dist/cli/dispatch/index.js.map +1 -1
  106. package/dist/cli/dispatch/lifecycle.js +71 -3
  107. package/dist/cli/dispatch/lifecycle.js.map +1 -1
  108. package/dist/cli/dispatch/state.js +4 -0
  109. package/dist/cli/dispatch/state.js.map +1 -1
  110. package/dist/cli/errors.js +1 -0
  111. package/dist/cli/errors.js.map +1 -1
  112. package/dist/cli/help.js +34 -8
  113. package/dist/cli/help.js.map +1 -1
  114. package/dist/cli/prime-blob.js +68 -2
  115. package/dist/cli/prime-blob.js.map +1 -1
  116. package/dist/cli/startupCompletenessContract.js +1 -1
  117. package/dist/cli/startupCompletenessContract.js.map +1 -1
  118. package/dist/core/atomicWriter.js +21 -0
  119. package/dist/core/atomicWriter.js.map +1 -0
  120. package/dist/core/yaml.js +8 -0
  121. package/dist/core/yaml.js.map +1 -1
  122. package/dist/eval/evalSkills.js +13 -13
  123. package/dist/eval/evalSkills.js.map +1 -1
  124. package/dist/hooks/common.js +3 -3
  125. package/dist/hooks/common.js.map +1 -1
  126. package/dist/hooks/compaction/index.js +2 -2
  127. package/dist/hooks/compaction/index.js.map +1 -1
  128. package/dist/hooks/compaction/status.js +3 -3
  129. package/dist/hooks/compaction/status.js.map +1 -1
  130. package/dist/hooks/validateArtifact/runtime.js +4 -4
  131. package/dist/hooks/validateArtifact/schema.js +82 -6
  132. package/dist/hooks/validateArtifact/schema.js.map +1 -1
  133. package/dist/hooks/validateArtifact/violations.js +5 -2
  134. package/dist/hooks/validateArtifact/violations.js.map +1 -1
  135. package/dist/migrate/v2HandoffManifest.js +4 -0
  136. package/dist/migrate/v2HandoffManifest.js.map +1 -1
  137. package/dist/registries/artifactRegistry.js +39 -6
  138. package/dist/registries/artifactRegistry.js.map +1 -1
  139. package/dist/registries/packageRegistry.js +36 -3
  140. package/dist/registries/packageRegistry.js.map +1 -1
  141. package/dist/registries/runtimeAdapterRegistry.js +22 -16
  142. package/dist/registries/runtimeAdapterRegistry.js.map +1 -1
  143. package/dist/runtime/lifecycleAdapterContract.js +436 -0
  144. package/dist/runtime/lifecycleAdapterContract.js.map +1 -0
  145. package/dist/runtime/lifecycleAdapters.js +707 -0
  146. package/dist/runtime/lifecycleAdapters.js.map +1 -0
  147. package/dist/runtime/lifecycleAuthority.js +443 -0
  148. package/dist/runtime/lifecycleAuthority.js.map +1 -0
  149. package/dist/runtime/lifecycleOperationContract.js +109 -0
  150. package/dist/runtime/lifecycleOperationContract.js.map +1 -0
  151. package/dist/runtime/lifecycleOperations.js +627 -0
  152. package/dist/runtime/lifecycleOperations.js.map +1 -0
  153. package/dist/runtime/lifecycleOwnershipJournal.js +623 -0
  154. package/dist/runtime/lifecycleOwnershipJournal.js.map +1 -0
  155. package/dist/runtime/lifecyclePublication.js +395 -0
  156. package/dist/runtime/lifecyclePublication.js.map +1 -0
  157. package/dist/runtime/lifecycleSnapshot.js +174 -0
  158. package/dist/runtime/lifecycleSnapshot.js.map +1 -0
  159. package/dist/runtime/retiredRuntimeCleanup.js +232 -0
  160. package/dist/runtime/retiredRuntimeCleanup.js.map +1 -0
  161. package/dist/setup/codex/installRoot.js +1 -1
  162. package/dist/setup/codex/installRoot.js.map +1 -1
  163. package/dist/setup/copilot.js +1 -1
  164. package/dist/setup/copilot.js.map +1 -1
  165. package/dist/setup/cursor.js +1 -1
  166. package/dist/setup/cursor.js.map +1 -1
  167. package/dist/setup/doctor/core.js +3 -3
  168. package/dist/setup/doctor/core.js.map +1 -1
  169. package/dist/setup/doctor/diagnostics.js +0 -39
  170. package/dist/setup/doctor/diagnostics.js.map +1 -1
  171. package/dist/setup/smokeChecks.js +1 -3
  172. package/dist/setup/smokeChecks.js.map +1 -1
  173. package/dist/state/startupAnalysis/helpers.js +1 -1
  174. package/dist/state/startupAnalysis/helpers.js.map +1 -1
  175. package/dist/state/write/assign.js +21 -0
  176. package/dist/state/write/assign.js.map +1 -0
  177. package/dist/state/write/errors.js +12 -0
  178. package/dist/state/write/errors.js.map +1 -0
  179. package/dist/state/write/explain.js +151 -0
  180. package/dist/state/write/explain.js.map +1 -0
  181. package/dist/state/write/fields.js +62 -0
  182. package/dist/state/write/fields.js.map +1 -0
  183. package/dist/state/write/index.js +11 -0
  184. package/dist/state/write/index.js.map +1 -0
  185. package/dist/state/write/input.js +22 -0
  186. package/dist/state/write/input.js.map +1 -0
  187. package/dist/state/write/lock.js +108 -0
  188. package/dist/state/write/lock.js.map +1 -0
  189. package/dist/state/write/operations.js +181 -0
  190. package/dist/state/write/operations.js.map +1 -0
  191. package/dist/state/write/serialize.js +2 -0
  192. package/dist/state/write/serialize.js.map +1 -0
  193. package/dist/state/write/transaction.js +619 -0
  194. package/dist/state/write/transaction.js.map +1 -0
  195. package/dist/state/write/validate.js +8 -0
  196. package/dist/state/write/validate.js.map +1 -0
  197. package/dist/upgrade/appContentRefresh.js +8 -1
  198. package/dist/upgrade/appContentRefresh.js.map +1 -1
  199. package/dist/upgrade/atomicWriter.js +1 -22
  200. package/dist/upgrade/atomicWriter.js.map +1 -1
  201. package/dist/upgrade/doctor.js +4 -0
  202. package/dist/upgrade/doctor.js.map +1 -1
  203. package/dist/upgrade/lifecycleUpgrade.js +386 -0
  204. package/dist/upgrade/lifecycleUpgrade.js.map +1 -0
  205. package/dist/upgrade/migrateArtifactsV2ToV3.js.map +1 -1
  206. package/dist/upgrade/runtimeMigration.js +1 -8
  207. package/dist/upgrade/runtimeMigration.js.map +1 -1
  208. package/dist/upgrade/upgradeCommands.js +8 -0
  209. package/dist/upgrade/upgradeCommands.js.map +1 -1
  210. package/dist/upgrade/upgradeOrchestrator.js +148 -5
  211. package/dist/upgrade/upgradeOrchestrator.js.map +1 -1
  212. package/dist/validate/appHomeContract.js +1 -1
  213. package/dist/validate/appHomeContract.js.map +1 -1
  214. package/dist/validate/lifecycleAdapters/nodeFormChecks.js +2 -9
  215. package/dist/validate/lifecycleAdapters/nodeFormChecks.js.map +1 -1
  216. package/dist/validate/lifecycleAdapters/shared.js +1 -1
  217. package/dist/validate/lifecycleAdapters/shared.js.map +1 -1
  218. package/dist/validate/lifecycleAdapters.js +77 -2
  219. package/dist/validate/lifecycleAdapters.js.map +1 -1
  220. package/package.json +1 -1
  221. package/bundle/skills/agentera/.claude-plugin/plugin.json +0 -27
@@ -62,7 +62,8 @@ Each Agentera skill entry file contains YAML frontmatter with `name` and `descri
62
62
 
63
63
  **Skill loading**: OpenCode loads skills on-demand via a native `skill` tool. Agents see available skills listed in the tool description and load full content by calling `skill({ name: "agentera" })`. Agentera works unmodified: it is loaded into the agent's context when invoked.
64
64
 
65
- **Gap**: None. OpenCode's skill discovery is more flexible than Claude Code's (supports `.opencode/`, `.claude/`, and `.agents/` paths). Agentera skills install cleanly.
65
+ **Gap**: None. OpenCode skill discovery supports `.opencode/`, `.claude/`
66
+ compatibility, and `.agents/` paths. Agentera skills install cleanly.
66
67
 
67
68
  ### Artifact resolution (Required)
68
69
 
@@ -133,8 +134,8 @@ Read PROFILE.md from the runtime-provided profile path (Section 21). In OpenCode
133
134
  **Concrete mapping for build Step 5 dispatch**:
134
135
 
135
136
  ```
136
- # Claude Code (reference)
137
- Spawn a Sonnet implementation agent in a worktree (isolation: "worktree")
137
+ # Runtime-neutral requirement
138
+ Spawn an implementation agent in an isolated worktree
138
139
 
139
140
  # OpenCode Strategy A
140
141
  Invoke the Agentera agent (@agentera) with the implementation plan
@@ -167,7 +168,8 @@ opencode run "Explain closures in JavaScript"
167
168
  opencode run --format json "Explain closures in JavaScript"
168
169
  ```
169
170
 
170
- The `--format json` flag produces a raw JSON event stream, comparable to `claude -p --output-format json`. Each event is a separate JSON object representing a message part, tool call, or status update.
171
+ The `--format json` flag produces a raw JSON event stream. Each event is a
172
+ separate JSON object representing a message part, tool call, or status update.
171
173
 
172
174
  For long-running sessions, OpenCode's server mode provides an HTTP API with the same structured output:
173
175
 
@@ -176,15 +178,8 @@ opencode serve --port 4096
176
178
  # Then POST to the API with session creation and message sending
177
179
  ```
178
180
 
179
- **Adapter approach**: Map `claude -p --output-format json` to `opencode run --format json`:
180
-
181
- | Claude Code | OpenCode |
182
- |-------------|----------|
183
- | `claude -p "prompt"` | `opencode run "prompt"` |
184
- | `claude -p --output-format json` | `opencode run --format json "prompt"` |
185
- | `claude -p --skill build` | `opencode run "prompt"` (skill loaded via discovery) |
186
-
187
- The agentera eval runner (`scripts/eval_skills.py`) would need an OpenCode dispatch mode that calls `opencode run --format json` instead of `claude -p --output-format json`. The dispatch wrapper:
181
+ **Adapter approach**: The eval runner invokes `opencode run --format json`
182
+ directly and parses OpenCode's event schema. The dispatch wrapper:
188
183
 
189
184
  ```python
190
185
  def dispatch_opencode(skill_name: str, prompt: str) -> dict:
@@ -195,7 +190,9 @@ def dispatch_opencode(skill_name: str, prompt: str) -> dict:
195
190
  return {"output": result.stdout, "exit_code": result.returncode}
196
191
  ```
197
192
 
198
- **Gap**: Minimal. `opencode run --format json` provides structured JSON events directly comparable to `claude -p --output-format json`. The eval runner adapter parses the JSON event stream using the same pattern as the Claude Code adapter, though the event schema differs and requires a separate parser module. For smoke tests (the eval runner's primary use case), text output with exit-code checking is also sufficient.
193
+ **Gap**: Minimal. `opencode run --format json` provides structured JSON events.
194
+ The eval runner uses a dedicated OpenCode parser. For smoke tests, text output
195
+ with exit-code checking is also sufficient.
199
196
 
200
197
  ### Hook lifecycle (Optional but recommended)
201
198
 
@@ -276,9 +273,11 @@ This keeps the plugin thin while matching the packaged Python script contract.
276
273
 
277
274
  Profilera mines five canonical record types from host session data. This section maps each record type to OpenCode's data sources.
278
275
 
279
- ### memory_entry (Claude Code runtime extension)
276
+ ### memory_entry (retired historical-import extension)
280
277
 
281
- **Agentera contract**: This record type is a Claude Code runtime extension, not part of the portable corpus. Claude Code's memory files are emitted as instruction_document records with `doc_type: "claude_memory"`.
278
+ **Agentera contract**: This retired-source record type is not part of the
279
+ portable active corpus. It may appear only in explicitly consented historical
280
+ imports and remains excluded from default analytics.
282
281
 
283
282
  **OpenCode source**: OpenCode does not have a built-in memory system. The memory_entry extension does not apply.
284
283
 
@@ -315,7 +314,7 @@ Profilera mines five canonical record types from host session data. This section
315
314
  }
316
315
  ```
317
316
 
318
- **Gap**: None. OpenCode has richer instruction document support than Claude Code (remote URLs, glob patterns, explicit config).
317
+ **Gap**: None. OpenCode supports remote URLs, glob patterns, and explicit config.
319
318
 
320
319
  ### history_prompt
321
320
 
@@ -336,7 +335,7 @@ The SDK exposes message history with timestamps, project context, and session me
336
335
  1. Enumerate sessions via `opencode session list --format json`
337
336
  2. Export each session via `opencode export [sessionID]`
338
337
  3. Filter for user-originated messages from the export JSON
339
- 4. Apply decision-pattern regex (same patterns profile uses for Claude Code history) to classify prompts as `"decision"`, `"correction"`, or `"question"`
338
+ 4. Apply the shared decision-pattern classifier to label prompts as `"decision"`, `"correction"`, or `"question"`
340
339
  5. Produce history_prompt records with session and project metadata
341
340
 
342
341
  ```python
@@ -400,13 +399,13 @@ The SDK approach remains preferable for programmatic integration (e.g., as an Op
400
399
 
401
400
  **OpenCode source**: OpenCode projects are standard filesystem directories. Config files are accessible via direct file reads.
402
401
 
403
- **Adapter extraction**: Identical to Claude Code extraction. Scan the project root for known config types:
402
+ **Adapter extraction**: Scan the project root for known config types:
404
403
 
405
404
  - `package.json`, `go.mod`, `Cargo.toml`, `pyproject.toml`
406
405
  - `.golangci.yml`, `tsconfig.json`, `ruff.toml`
407
406
  - `Makefile`, `magefile.go`, `justfile`, `taskfile.yaml`
408
407
 
409
- No runtime-specific adaptation needed. The adapter uses the same config type list and extraction logic as the Claude Code adapter.
408
+ No runtime-specific adaptation is needed; the config scan is runtime-agnostic.
410
409
 
411
410
  ```python
412
411
  {
@@ -436,7 +435,7 @@ Summary of which corpus families the OpenCode adapter can produce:
436
435
  | Crystallized decisions | instruction_document | Yes | AGENTS.md files (global and project), instructions config |
437
436
  | Decision history | history_prompt | Yes (CLI) | `opencode session list --format json` enumerates sessions; `opencode export [sessionID]` provides full message JSON for prompt extraction |
438
437
  | Conversation exchanges | conversation_turn | Yes (CLI) | `opencode export [sessionID]` provides full session JSON with paired user-assistant turns |
439
- | Config patterns | project_config_signal | Yes | Direct filesystem scan, identical to Claude Code |
438
+ | Config patterns | project_config_signal | Yes | Direct filesystem scan |
440
439
 
441
440
  **Initial port profile mode**: Full. All four source families are available via included OpenCode functionality. Crystallized decisions come from AGENTS.md files and instructions config. Decision history and conversation exchanges come from `opencode export` CLI output. Config patterns come from direct filesystem scan.
442
441
 
@@ -511,7 +510,7 @@ OpenCode repair is ownership-gated. Managed slash commands include `agentera_man
511
510
  | Gap | Impact | Mitigation |
512
511
  |-----|--------|------------|
513
512
  | Sub-agent dispatch lacks built-in worktree isolation | build/orchestrate run in same working tree | Strategy A (Task tool) for initial port; manual `git worktree` commands for full isolation |
514
- | `opencode run --format json` event schema differs from `claude -p --output-format json` | Eval runner needs a separate JSON event parser | Implement an OpenCode-specific parser module in eval_skills.py; event stream structure is straightforward |
513
+ | `opencode run --format json` uses an OpenCode-specific event schema | Eval runner needs a dedicated parser | Use the OpenCode parser module in eval_skills.py; event stream structure is straightforward |
515
514
  | Session history requires JSON event schema mapping | history_prompt and conversation_turn need export parser | `opencode export [sessionID]` provides full session JSON; adapter parses the export output |
516
515
  | Python scripts require Python runtime | Hook plugin calls Python via shell | Python is already a prerequisite for agentera scripts |
517
516
 
@@ -523,7 +522,7 @@ To verify the adapter is sufficient, check each acceptance criterion from PLAN.m
523
522
 
524
523
  1. **Each of the six host capabilities is mapped**: Yes. Skill discovery, artifact resolution, and profile path have direct OpenCode equivalents with no gaps. Sub-agent dispatch maps to the Task tool (with manual git worktree as an alternative). Eval mechanism maps to `opencode run --format json`. Hook lifecycle maps to the plugin event system.
525
524
 
526
- 2. **Session Corpus Contract is mapped per record type**: Yes. All four portable record types are mapped. instruction_document and project_config_signal have immediate extraction paths. history_prompt and conversation_turn are extractable via `opencode export` CLI output. The memory_entry Claude Code extension does not apply to OpenCode.
525
+ 2. **Session Corpus Contract is mapped per record type**: Yes. All four portable record types are mapped. instruction_document and project_config_signal have immediate extraction paths. history_prompt and conversation_turn are extractable via `opencode export` CLI output. The retired historical-import extension does not apply to OpenCode.
527
526
 
528
527
  3. **A developer can implement OpenCode support without reading skill entry file source**: Yes. This document specifies the adapter mapping, installation steps, extraction logic, and remaining gaps independently.
529
528
 
@@ -5,7 +5,7 @@ intent: >
5
5
  Define the package and release-surface access Interface before introducing an
6
6
  executable registry Module. This model records ownership boundaries and the
7
7
  validation contract for future PackageManifest records. The executable registry
8
- at references/adapters/package-registry.yaml and its loader scripts/package_registry.py
8
+ at references/adapters/package-registry.yaml and its TypeScript PackageRegistry loader
9
9
  now implement this interface; this model remains the authoritative design contract.
10
10
  record:
11
11
  required_groups:
@@ -115,7 +115,7 @@ ownership:
115
115
  explicit future ADR changes persisted authority.
116
116
  future_authority_change_requires: explicit ADR
117
117
  install_root_delegated:
118
- owner: scripts/install_root.py
118
+ owner: packages/cli/src/state/installRoot.ts
119
119
  forbidden_in_package_manifest:
120
120
  - AGENTERA_HOME precedence
121
121
  - default app home
@@ -124,7 +124,7 @@ ownership:
124
124
  - unmanaged classification
125
125
  - app-home diagnostics
126
126
  runtime_adapter_delegated:
127
- owner: scripts/runtime_adapter_registry.py
127
+ owner: packages/cli/src/registries/runtimeAdapterRegistry.ts
128
128
  forbidden_in_package_manifest:
129
129
  - runtime discovery
130
130
  - lifecycle events
@@ -141,10 +141,11 @@ command_safety:
141
141
  - install-agentera-skill
142
142
  approved_runtimes:
143
143
  - all
144
- - claude
145
144
  - opencode
145
+ - codex
146
+ - cursor
147
+ - copilot
146
148
  approved_runtime_agents:
147
- - claude-code
148
149
  - opencode
149
150
  approved_package_tool:
150
151
  executable: npx
@@ -176,9 +177,15 @@ sample_manifest:
176
177
  - id: registry
177
178
  path: registry.json
178
179
  selector: skills[0].version
179
- - id: python-project
180
- path: pyproject.toml
181
- selector: project.version
180
+ - id: cli-package
181
+ path: packages/cli/package.json
182
+ selector: version
183
+ - id: cli-suite-marker
184
+ path: packages/cli/package.json
185
+ selector: agentera.suiteVersion
186
+ - id: cli-package-lock
187
+ path: packages/cli/package-lock.json
188
+ selector: version
182
189
  - id: copilot-root
183
190
  path: plugin.json
184
191
  selector: version
@@ -188,15 +195,15 @@ sample_manifest:
188
195
  - id: codex-plugin
189
196
  path: .codex-plugin/plugin.json
190
197
  selector: version
191
- - id: claude-marketplace-metadata
192
- path: .claude-plugin/marketplace.json
193
- selector: metadata.version
194
- - id: claude-marketplace-plugins
195
- path: .claude-plugin/marketplace.json
196
- selector: plugins[*].version
198
+ - id: cursor-plugin
199
+ path: .cursor-plugin/plugin.json
200
+ selector: version
197
201
  - id: opencode-plugin-marker
198
202
  path: .opencode/plugins/agentera.js
199
203
  selector: AGENTERA_VERSION
204
+ - id: skill-frontmatter
205
+ path: skills/agentera/SKILL.md
206
+ selector: frontmatter.version
200
207
  excluded_runtime_manifests:
201
208
  - .opencode/package.json
202
209
  runtime_package_manifests:
@@ -213,28 +220,27 @@ sample_manifest:
213
220
  path: .codex-plugin/plugin.json
214
221
  version_bearing: true
215
222
  package_shape: suite-bundle
216
- - runtime: claude
217
- path: .claude-plugin/marketplace.json
223
+ - runtime: cursor
224
+ path: .cursor-plugin/plugin.json
218
225
  version_bearing: true
219
226
  package_shape: suite-bundle
220
227
  - runtime: opencode
221
228
  path: .opencode/package.json
222
229
  version_bearing: false
223
- package_shape: suite-bundle
230
+ package_shape: npm-loadable-plugin
224
231
  shared_paths_policy: validate minimum shared paths separately from full bundle includes
225
232
  bundle_surfaces:
226
233
  directories:
227
234
  - skills
228
- - scripts
229
- - hooks
230
235
  - references
231
236
  - agents
232
- - .agents/plugins
233
- - .codex-plugin
234
- - .claude-plugin
237
+ - hooks
235
238
  - .github/hooks
236
- - .github/plugin
239
+ - .codex-plugin
240
+ - .cursor-plugin
241
+ - .cursor/agents
237
242
  - .opencode/commands
243
+ - .opencode/agents
238
244
  - .opencode/plugins
239
245
  files:
240
246
  - README.md
@@ -242,11 +248,11 @@ sample_manifest:
242
248
  - CHANGELOG.md
243
249
  - DESIGN.md
244
250
  - LICENSE
245
- - pyproject.toml
246
- - uv.lock
247
251
  - registry.json
248
252
  - plugin.json
253
+ - .github/plugin/plugin.json
249
254
  - .opencode/package.json
255
+ - .cursor/hooks.json
250
256
  skip_parts:
251
257
  - __pycache__
252
258
  - .pytest_cache
@@ -278,21 +284,6 @@ sample_manifest:
278
284
  - -g
279
285
  - -y
280
286
  skipped_without_update_packages_message: legacy skill removal skipped; pass --update-packages to run
281
- - runtime: claude
282
- action: install-agentera-skill
283
- phase: runtime-install
284
- argv:
285
- - npx
286
- - skills
287
- - add
288
- - jgabor/agentera
289
- - -g
290
- - -a
291
- - claude-code
292
- - --skill
293
- - agentera
294
- - -y
295
- skipped_without_update_packages_message: external package update skipped; pass --update-packages to run
296
287
  - runtime: opencode
297
288
  action: install-agentera-skill
298
289
  phase: runtime-install
@@ -318,17 +309,19 @@ sample_manifest:
318
309
  docs_targets:
319
310
  version_files_source: .agentera/docs.yaml conventions.version_files
320
311
  version_files:
321
- - pyproject.toml
322
- - uv.lock
312
+ - packages/cli/package.json
313
+ - packages/cli/package-lock.json
323
314
  - plugin.json
324
315
  - .github/plugin/plugin.json
325
316
  - .codex-plugin/plugin.json
326
- - .claude-plugin/marketplace.json
317
+ - .cursor-plugin/plugin.json
327
318
  - .opencode/plugins/agentera.js
319
+ - skills/agentera/SKILL.md
328
320
  - registry.json
329
321
  index_targets:
330
322
  - references/adapters/package-surface-characterization.md
331
323
  - references/adapters/package-manifest-interface-model.yaml
324
+ - references/adapters/package-registry.yaml
332
325
  excluded_version_files:
333
326
  - .opencode/package.json
334
327
  release_policy:
@@ -17,9 +17,12 @@ records:
17
17
  - id: registry
18
18
  path: registry.json
19
19
  selector: skills[0].version
20
- - id: python-project
21
- path: pyproject.toml
22
- selector: project.version
20
+ - id: cli-package
21
+ path: packages/cli/package.json
22
+ selector: version
23
+ - id: cli-suite-marker
24
+ path: packages/cli/package.json
25
+ selector: agentera.suiteVersion
23
26
  - id: copilot-root
24
27
  path: plugin.json
25
28
  selector: version
@@ -29,15 +32,15 @@ records:
29
32
  - id: codex-plugin
30
33
  path: .codex-plugin/plugin.json
31
34
  selector: version
32
- - id: claude-marketplace-metadata
33
- path: .claude-plugin/marketplace.json
34
- selector: metadata.version
35
- - id: claude-marketplace-plugins
36
- path: .claude-plugin/marketplace.json
37
- selector: plugins[*].version
35
+ - id: cursor-plugin
36
+ path: .cursor-plugin/plugin.json
37
+ selector: version
38
38
  - id: opencode-plugin-marker
39
39
  path: .opencode/plugins/agentera.js
40
40
  selector: AGENTERA_VERSION
41
+ - id: skill-frontmatter
42
+ path: skills/agentera/SKILL.md
43
+ selector: frontmatter.version
41
44
  excluded_runtime_manifests:
42
45
  - .opencode/package.json
43
46
  runtime_package_manifests:
@@ -62,11 +65,6 @@ records:
62
65
  path: .cursor-plugin/plugin.json
63
66
  version_bearing: true
64
67
  package_shape: suite-bundle
65
- - id: claude-marketplace-manifest
66
- runtime: claude
67
- path: .claude-plugin/marketplace.json
68
- version_bearing: true
69
- package_shape: suite-bundle
70
68
  - id: opencode-package-manifest
71
69
  runtime: opencode
72
70
  path: .opencode/package.json
@@ -76,9 +74,6 @@ records:
76
74
  - id: skills
77
75
  path: skills
78
76
  kind: dir
79
- - id: scripts
80
- path: scripts
81
- kind: dir
82
77
  - id: hooks
83
78
  path: hooks
84
79
  kind: dir
@@ -99,28 +94,20 @@ records:
99
94
  directories:
100
95
  - id: skills
101
96
  path: skills
102
- - id: scripts
103
- path: scripts
104
- - id: hooks
105
- path: hooks
106
97
  - id: references
107
98
  path: references
108
99
  - id: agents
109
100
  path: agents
110
- - id: agents-plugins
111
- path: .agents/plugins
101
+ - id: hooks
102
+ path: hooks
103
+ - id: github-hooks
104
+ path: .github/hooks
112
105
  - id: codex-plugin
113
106
  path: .codex-plugin
114
107
  - id: cursor-plugin
115
108
  path: .cursor-plugin
116
109
  - id: cursor-agents
117
110
  path: .cursor/agents
118
- - id: claude-plugin
119
- path: .claude-plugin
120
- - id: github-hooks
121
- path: .github/hooks
122
- - id: github-plugin
123
- path: .github/plugin
124
111
  - id: opencode-commands
125
112
  path: .opencode/commands
126
113
  - id: opencode-agents
@@ -138,14 +125,12 @@ records:
138
125
  path: DESIGN.md
139
126
  - id: license
140
127
  path: LICENSE
141
- - id: python-project
142
- path: pyproject.toml
143
- - id: python-lock
144
- path: uv.lock
145
128
  - id: registry
146
129
  path: registry.json
147
130
  - id: copilot-root-manifest
148
131
  path: plugin.json
132
+ - id: copilot-repository-manifest
133
+ path: .github/plugin/plugin.json
149
134
  - id: opencode-package-manifest
150
135
  path: .opencode/package.json
151
136
  - id: cursor-hooks
@@ -182,22 +167,6 @@ records:
182
167
  - -g
183
168
  - -y
184
169
  skipped_without_update_packages_message: legacy skill removal skipped; pass --update-packages to run
185
- - id: install-agentera-skill-claude
186
- runtime: claude
187
- action: install-agentera-skill
188
- phase: runtime-install
189
- argv:
190
- - npx
191
- - skills
192
- - add
193
- - jgabor/agentera
194
- - -g
195
- - -a
196
- - claude-code
197
- - --skill
198
- - agentera
199
- - -y
200
- skipped_without_update_packages_message: external package update skipped; pass --update-packages to run
201
170
  - id: install-agentera-skill-opencode
202
171
  runtime: opencode
203
172
  action: install-agentera-skill
@@ -224,13 +193,11 @@ records:
224
193
  docs_targets:
225
194
  version_files_source: .agentera/docs.yaml conventions.version_files
226
195
  version_files:
227
- - pyproject.toml
228
- - uv.lock
196
+ - packages/cli/package.json
229
197
  - plugin.json
230
198
  - .github/plugin/plugin.json
231
199
  - .codex-plugin/plugin.json
232
200
  - .cursor-plugin/plugin.json
233
- - .claude-plugin/marketplace.json
234
201
  - .opencode/plugins/agentera.js
235
202
  - skills/agentera/SKILL.md
236
203
  - registry.json
@@ -1,47 +1,61 @@
1
- # Package Surface Characterization
2
-
3
- Characterized on 2026-05-06 before the PackageManifest registry migration. This file records current behavior only; it is not the registry design.
4
-
5
- The executable PackageManifest registry at `references/adapters/package-registry.yaml` and its loader `scripts/package_registry.py` now own the single source of truth for version surfaces, runtime package manifests, bundle surfaces, package commands, and docs targets. Validators, upgrade, and tests consume registry facts instead of duplicating constants.
6
-
7
- ## Version-Bearing Surfaces
8
-
9
- `registry.json` is the persisted suite-version authority. The current suite version is `2.2.0` at `skills[0].version`.
10
-
11
- The current version-bearing surfaces are:
12
-
13
- | Surface | Kind | Current behavior |
14
- | --- | --- | --- |
15
- | `registry.json` | version-bearing surface | `skills[0].version` is the suite authority. |
16
- | `pyproject.toml` | version-bearing surface | `[project].version` matches the registry suite version. |
17
- | `plugin.json` | version-bearing surface and runtime package manifest | root Copilot manifest `version` matches the suite version. |
18
- | `.github/plugin/plugin.json` | version-bearing surface and runtime package manifest | repository Copilot manifest `version` matches the suite version. |
19
- | `.codex-plugin/plugin.json` | version-bearing surface and runtime package manifest | Codex manifest `version` matches the suite version. |
20
- | `.claude-plugin/marketplace.json` | version-bearing surface and runtime package manifest | `metadata.version` and the bundled `agentera` plugin entry version match the suite version. |
21
- | `.opencode/plugins/agentera.js` | version-bearing surface | `AGENTERA_VERSION` matches the registry suite version and drives the OpenCode command marker file `.agentera-version`. |
22
-
23
- `.opencode/package.json` is intentionally not version-bearing. Its current behavior is runtime package manifest behavior only: it keeps `type: "module"`, `main`/`exports` pointing at `./plugins/agentera.js`, `dependencies["@opencode-ai/plugin"] == "1.14.33"`, and an `agentera` npm-loadable plugin metadata block, but it has no top-level `name` or `version` field.
24
-
25
- ## Package-Manager Command Surface
26
-
27
- Upgrade package planning currently emits package-manager commands only for Claude Code and OpenCode runtime selections.
28
-
29
- | Runtime | Action | Command argv | Skipped message | Dry-run behavior | Apply behavior with mocked command |
30
- | --- | --- | --- | --- | --- | --- |
31
- | `all` | `remove-legacy-skills` | `npx skills remove hej visionera resonera inspirera planera realisera inspektera optimera orkestrera visualisera dokumentera profilera -g -y` | `legacy skill removal skipped; pass --update-packages to run` | `--update-packages` without `--yes` leaves status `pending` and does not execute. | status becomes `applied`, message `package update completed`, and command result tails are recorded. |
32
- | `claude` | `install-agentera-skill` | `npx skills add jgabor/agentera -g -a claude-code --skill agentera -y` | `external package update skipped; pass --update-packages to run` | `--update-packages` without `--yes` leaves status `pending` and does not execute. | status becomes `applied`, message `package update completed`, and command result tails are recorded. |
33
- | `opencode` | `install-agentera-skill` | `npx skills add jgabor/agentera -g -a opencode --skill agentera -y` | `external package update skipped; pass --update-packages to run` | `--update-packages` without `--yes` leaves status `pending` and does not execute. | status becomes `applied`, message `package update completed`, and command result tails are recorded. |
34
-
35
- Write gating is preserved: `--update-packages` changes package items from `skipped` to `pending`, but package-manager commands execute only during apply mode behind `--yes`. Focused tests mock `subprocess.run`; no live package-manager call is part of this characterization.
36
-
37
- ## Bundle And Docs Drift Inventory
38
-
39
- | Drift point | Surface class | Decision | Current behavior to preserve before migration |
40
- | --- | --- | --- | --- |
41
- | `pyproject.toml` force-includes and `scripts/agentera_upgrade.py` bundle lists duplicate the same shipped bundle directories and files. | bundle metadata surface | `standardize` | Keep both lists aligned now; later PackageManifest should own the list once. |
42
- | Lifecycle validation requires only the minimal shared runtime package paths (`skills`, `scripts`, `hooks`, `registry.json`, `plugin.json`, `pyproject.toml`, `README.md`) while pyproject and upgrade copy the larger distributable bundle. | runtime package manifest | `standardize` | Keep the validator as a minimum package-shape check now; later PackageManifest should separate minimal runtime metadata from full bundle includes. |
43
- | Runtime manifest `agentera.sharedPaths` includes `UPGRADE.md`, but `SUITE_BUNDLE_REQUIRED_PATHS` does not require it. | runtime package manifest | `standardize` | Keep current validator leniency now; later PackageManifest should make required shared paths explicit in one place. |
44
- | `.agentera/docs.yaml` `version_files` includes version-bearing surfaces and excludes `.opencode/package.json`. | version-bearing surface | `preserve` | Keep `.opencode/package.json` out of version checks because it is a runtime package manifest, not a suite version surface. |
45
- | `.opencode/package.json` is force-included and bundled, but it is not in docs `version_files`. | runtime package manifest | `preserve` | Keep packaging it without treating it as version-bearing. |
46
- | Upgrade package commands are represented as argv lists for Claude Code and OpenCode only; Codex and Copilot have runtime manifests but no package-manager command entries. | package-manager command surface | `preserve` | Keep command planning limited to currently managed package runtimes. |
47
- | Live package-manager behavior is not characterized by this task. | package-manager command surface | `defer` | Keep tests mocked; do not introduce live `npx skills` execution. |
1
+ # Package surface characterization
2
+
3
+ Current Agentera 3.0 package behavior is owned by
4
+ `references/adapters/package-registry.yaml` and the TypeScript
5
+ `PackageRegistry` loader.
6
+
7
+ ## Version matrix
8
+
9
+ `registry.json` `skills[0].version` is the persisted suite authority. These
10
+ mirrors must match it:
11
+
12
+ | Surface | Selector |
13
+ | --- | --- |
14
+ | `packages/cli/package.json` | `version` and `agentera.suiteVersion` |
15
+ | `packages/cli/package-lock.json` | `version` |
16
+ | `plugin.json` | `version` |
17
+ | `.github/plugin/plugin.json` | `version` |
18
+ | `.codex-plugin/plugin.json` | `version` |
19
+ | `.cursor-plugin/plugin.json` | `version` |
20
+ | `.opencode/plugins/agentera.js` | `AGENTERA_VERSION` |
21
+ | `skills/agentera/SKILL.md` | frontmatter `version` |
22
+
23
+ `.opencode/package.json` is a runtime package manifest but intentionally has no
24
+ suite-version field.
25
+
26
+ ## Active runtime manifests
27
+
28
+ The runtime manifest set covers exactly OpenCode, Codex, Cursor, and GitHub
29
+ Copilot. Claude has no package or marketplace manifest.
30
+
31
+ | Runtime | Manifest sources |
32
+ | --- | --- |
33
+ | OpenCode | `.opencode/package.json` |
34
+ | Codex | `.codex-plugin/plugin.json` |
35
+ | Cursor | `.cursor-plugin/plugin.json` |
36
+ | GitHub Copilot | `plugin.json`, `.github/plugin/plugin.json` |
37
+
38
+ ## npm bundle
39
+
40
+ The self-contained npm package ships `dist/` plus `bundle/`. Bundle data
41
+ includes the shared skill, contracts, references, release docs, and every
42
+ runtime lifecycle/package source declared by the registry:
43
+
44
+ - `.opencode/commands`, `.opencode/agents`, `.opencode/plugins`, and package manifest;
45
+ - `.codex-plugin` and both Codex hook sources under `hooks/`;
46
+ - `.cursor-plugin`, `.cursor/hooks.json`, and `.cursor/agents`;
47
+ - Copilot root/repository manifests and `.github/hooks`;
48
+ - `skills`, `references`, `registry.json`, README, upgrade guide, changelog,
49
+ design, and license.
50
+
51
+ Packaging tests inspect `npm pack --dry-run --json --ignore-scripts` and fail if
52
+ any declared runtime source disappears. The retired Claude manifest is also a
53
+ negative assertion.
54
+
55
+ ## Package-manager boundary
56
+
57
+ Lifecycle upgrade does not execute runtime-native package managers. Legacy
58
+ portable-skill cleanup and the OpenCode portable-skill install specification
59
+ remain argv-only package-registry records behind their existing update and
60
+ approval gates. Native installation, enablement, authentication, and trust are
61
+ user-owned actions.