agentera 0.0.0 → 3.0.0-dev.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (252) hide show
  1. package/README.md +6 -45
  2. package/bundle/.agentera-npx-bundle.json +4 -0
  3. package/bundle/references/adapters/cursor.md +213 -0
  4. package/bundle/references/adapters/opencode.md +530 -0
  5. package/bundle/references/adapters/package-manifest-interface-model.yaml +337 -0
  6. package/bundle/references/adapters/package-registry.yaml +247 -0
  7. package/bundle/references/adapters/package-surface-characterization.md +48 -0
  8. package/bundle/references/adapters/runtime-adapter-characterization.md +79 -0
  9. package/bundle/references/adapters/runtime-adapter-interface-model.yaml +200 -0
  10. package/bundle/references/adapters/runtime-adapter-registry.yaml +548 -0
  11. package/bundle/references/adapters/runtime-feature-parity.md +189 -0
  12. package/bundle/references/analysis/benchmark.md +267 -0
  13. package/bundle/references/analysis/startup-measurement-contract.yaml +424 -0
  14. package/bundle/references/artifacts/artifact-registry-interface-model.yaml +288 -0
  15. package/bundle/references/cli/agent-ready-state-contract.yaml +950 -0
  16. package/bundle/references/cli/app-lifecycle-vocabulary.yaml +233 -0
  17. package/bundle/references/cli/audience-namespace-cli-migration.yaml +355 -0
  18. package/bundle/references/cli/bundle-skill-vocabulary.yaml +278 -0
  19. package/bundle/references/cli/capability-instruction-contract.yaml +123 -0
  20. package/bundle/references/cli/capability-tool-classification.yaml +53 -0
  21. package/bundle/references/cli/routing-execution-vocabulary.yaml +281 -0
  22. package/bundle/references/cli/update-channels.yaml +120 -0
  23. package/bundle/references/cli/vocabulary-index.yaml +160 -0
  24. package/bundle/references/cli/vocabulary.md +562 -0
  25. package/bundle/references/meta/documentation-inventory.md +43 -0
  26. package/bundle/references/v1-section-mapping.md +47 -0
  27. package/bundle/registry.json +39 -0
  28. package/bundle/skills/agentera/.claude-plugin/plugin.json +27 -0
  29. package/bundle/skills/agentera/SKILL.md +470 -0
  30. package/bundle/skills/agentera/agents/dokumentera.toml +6 -0
  31. package/bundle/skills/agentera/agents/hej.toml +6 -0
  32. package/bundle/skills/agentera/agents/inspektera.toml +6 -0
  33. package/bundle/skills/agentera/agents/inspirera.toml +6 -0
  34. package/bundle/skills/agentera/agents/optimera.toml +6 -0
  35. package/bundle/skills/agentera/agents/orkestrera.toml +6 -0
  36. package/bundle/skills/agentera/agents/planera.toml +6 -0
  37. package/bundle/skills/agentera/agents/profilera.toml +6 -0
  38. package/bundle/skills/agentera/agents/realisera.toml +6 -0
  39. package/bundle/skills/agentera/agents/resonera.toml +6 -0
  40. package/bundle/skills/agentera/agents/visionera.toml +6 -0
  41. package/bundle/skills/agentera/agents/visualisera.toml +6 -0
  42. package/bundle/skills/agentera/capabilities/dokumentera/instructions.md +428 -0
  43. package/bundle/skills/agentera/capabilities/dokumentera/schemas/artifacts.yaml +73 -0
  44. package/bundle/skills/agentera/capabilities/dokumentera/schemas/exit.yaml +35 -0
  45. package/bundle/skills/agentera/capabilities/dokumentera/schemas/triggers.yaml +35 -0
  46. package/bundle/skills/agentera/capabilities/dokumentera/schemas/validation.yaml +139 -0
  47. package/bundle/skills/agentera/capabilities/hej/instructions.md +331 -0
  48. package/bundle/skills/agentera/capabilities/hej/schemas/artifacts.yaml +69 -0
  49. package/bundle/skills/agentera/capabilities/hej/schemas/exit.yaml +32 -0
  50. package/bundle/skills/agentera/capabilities/hej/schemas/triggers.yaml +58 -0
  51. package/bundle/skills/agentera/capabilities/hej/schemas/validation.yaml +55 -0
  52. package/bundle/skills/agentera/capabilities/inspektera/instructions.md +514 -0
  53. package/bundle/skills/agentera/capabilities/inspektera/schemas/artifacts.yaml +76 -0
  54. package/bundle/skills/agentera/capabilities/inspektera/schemas/exit.yaml +36 -0
  55. package/bundle/skills/agentera/capabilities/inspektera/schemas/triggers.yaml +38 -0
  56. package/bundle/skills/agentera/capabilities/inspektera/schemas/validation.yaml +113 -0
  57. package/bundle/skills/agentera/capabilities/inspirera/instructions.md +280 -0
  58. package/bundle/skills/agentera/capabilities/inspirera/schemas/artifacts.yaml +24 -0
  59. package/bundle/skills/agentera/capabilities/inspirera/schemas/exit.yaml +33 -0
  60. package/bundle/skills/agentera/capabilities/inspirera/schemas/triggers.yaml +34 -0
  61. package/bundle/skills/agentera/capabilities/inspirera/schemas/validation.yaml +58 -0
  62. package/bundle/skills/agentera/capabilities/optimera/instructions.md +437 -0
  63. package/bundle/skills/agentera/capabilities/optimera/schemas/artifacts.yaml +69 -0
  64. package/bundle/skills/agentera/capabilities/optimera/schemas/exit.yaml +35 -0
  65. package/bundle/skills/agentera/capabilities/optimera/schemas/triggers.yaml +39 -0
  66. package/bundle/skills/agentera/capabilities/optimera/schemas/validation.yaml +91 -0
  67. package/bundle/skills/agentera/capabilities/orkestrera/instructions.md +433 -0
  68. package/bundle/skills/agentera/capabilities/orkestrera/schemas/artifacts.yaml +64 -0
  69. package/bundle/skills/agentera/capabilities/orkestrera/schemas/exit.yaml +34 -0
  70. package/bundle/skills/agentera/capabilities/orkestrera/schemas/triggers.yaml +42 -0
  71. package/bundle/skills/agentera/capabilities/orkestrera/schemas/validation.yaml +107 -0
  72. package/bundle/skills/agentera/capabilities/planera/instructions.md +368 -0
  73. package/bundle/skills/agentera/capabilities/planera/schemas/artifacts.yaml +62 -0
  74. package/bundle/skills/agentera/capabilities/planera/schemas/exit.yaml +33 -0
  75. package/bundle/skills/agentera/capabilities/planera/schemas/triggers.yaml +34 -0
  76. package/bundle/skills/agentera/capabilities/planera/schemas/validation.yaml +61 -0
  77. package/bundle/skills/agentera/capabilities/profilera/instructions.md +419 -0
  78. package/bundle/skills/agentera/capabilities/profilera/schemas/artifacts.yaml +18 -0
  79. package/bundle/skills/agentera/capabilities/profilera/schemas/exit.yaml +34 -0
  80. package/bundle/skills/agentera/capabilities/profilera/schemas/triggers.yaml +45 -0
  81. package/bundle/skills/agentera/capabilities/profilera/schemas/validation.yaml +57 -0
  82. package/bundle/skills/agentera/capabilities/realisera/instructions.md +403 -0
  83. package/bundle/skills/agentera/capabilities/realisera/schemas/artifacts.yaml +80 -0
  84. package/bundle/skills/agentera/capabilities/realisera/schemas/exit.yaml +35 -0
  85. package/bundle/skills/agentera/capabilities/realisera/schemas/triggers.yaml +39 -0
  86. package/bundle/skills/agentera/capabilities/realisera/schemas/validation.yaml +110 -0
  87. package/bundle/skills/agentera/capabilities/resonera/instructions.md +329 -0
  88. package/bundle/skills/agentera/capabilities/resonera/schemas/artifacts.yaml +47 -0
  89. package/bundle/skills/agentera/capabilities/resonera/schemas/exit.yaml +35 -0
  90. package/bundle/skills/agentera/capabilities/resonera/schemas/triggers.yaml +46 -0
  91. package/bundle/skills/agentera/capabilities/resonera/schemas/validation.yaml +77 -0
  92. package/bundle/skills/agentera/capabilities/visionera/instructions.md +309 -0
  93. package/bundle/skills/agentera/capabilities/visionera/schemas/artifacts.yaml +57 -0
  94. package/bundle/skills/agentera/capabilities/visionera/schemas/exit.yaml +35 -0
  95. package/bundle/skills/agentera/capabilities/visionera/schemas/triggers.yaml +41 -0
  96. package/bundle/skills/agentera/capabilities/visionera/schemas/validation.yaml +74 -0
  97. package/bundle/skills/agentera/capabilities/visualisera/instructions.md +400 -0
  98. package/bundle/skills/agentera/capabilities/visualisera/schemas/artifacts.yaml +44 -0
  99. package/bundle/skills/agentera/capabilities/visualisera/schemas/exit.yaml +34 -0
  100. package/bundle/skills/agentera/capabilities/visualisera/schemas/triggers.yaml +33 -0
  101. package/bundle/skills/agentera/capabilities/visualisera/schemas/validation.yaml +80 -0
  102. package/bundle/skills/agentera/capability_schema_contract.yaml +385 -0
  103. package/bundle/skills/agentera/protocol.yaml +463 -0
  104. package/bundle/skills/agentera/references/contract.md +1039 -0
  105. package/bundle/skills/agentera/schemas/artifacts/changelog.yaml +60 -0
  106. package/bundle/skills/agentera/schemas/artifacts/decisions.yaml +461 -0
  107. package/bundle/skills/agentera/schemas/artifacts/design.yaml +55 -0
  108. package/bundle/skills/agentera/schemas/artifacts/docs.yaml +402 -0
  109. package/bundle/skills/agentera/schemas/artifacts/experiments.yaml +373 -0
  110. package/bundle/skills/agentera/schemas/artifacts/health.yaml +484 -0
  111. package/bundle/skills/agentera/schemas/artifacts/objective.yaml +399 -0
  112. package/bundle/skills/agentera/schemas/artifacts/plan.yaml +342 -0
  113. package/bundle/skills/agentera/schemas/artifacts/progress.yaml +325 -0
  114. package/bundle/skills/agentera/schemas/artifacts/todo.yaml +110 -0
  115. package/bundle/skills/agentera/schemas/artifacts/vision.yaml +262 -0
  116. package/bundle/skills/hej/.claude-plugin/plugin.json +6 -0
  117. package/bundle/skills/hej/SKILL.md +69 -0
  118. package/bundle/skills/hej/agents/hej.toml +11 -0
  119. package/bundle/skills/hej/agents/openai.yaml +8 -0
  120. package/dist/analytics/extractCorpus.js +1791 -0
  121. package/dist/analytics/extractCorpus.js.map +1 -0
  122. package/dist/analytics/usageStats.js +487 -0
  123. package/dist/analytics/usageStats.js.map +1 -0
  124. package/dist/bin/agentera.js +4 -0
  125. package/dist/bin/agentera.js.map +1 -0
  126. package/dist/cli/appContext.js +226 -0
  127. package/dist/cli/appContext.js.map +1 -0
  128. package/dist/cli/argvalidate.js +41 -0
  129. package/dist/cli/argvalidate.js.map +1 -0
  130. package/dist/cli/capabilityContext.js +2421 -0
  131. package/dist/cli/capabilityContext.js.map +1 -0
  132. package/dist/cli/commands/backfill.js +84 -0
  133. package/dist/cli/commands/backfill.js.map +1 -0
  134. package/dist/cli/commands/capability.js +44 -0
  135. package/dist/cli/commands/capability.js.map +1 -0
  136. package/dist/cli/commands/compact.js +148 -0
  137. package/dist/cli/commands/compact.js.map +1 -0
  138. package/dist/cli/commands/doctor.js +180 -0
  139. package/dist/cli/commands/doctor.js.map +1 -0
  140. package/dist/cli/commands/lint.js +179 -0
  141. package/dist/cli/commands/lint.js.map +1 -0
  142. package/dist/cli/commands/prime.js +545 -0
  143. package/dist/cli/commands/prime.js.map +1 -0
  144. package/dist/cli/commands/query.js +346 -0
  145. package/dist/cli/commands/query.js.map +1 -0
  146. package/dist/cli/commands/report.js +210 -0
  147. package/dist/cli/commands/report.js.map +1 -0
  148. package/dist/cli/commands/schema.js +306 -0
  149. package/dist/cli/commands/schema.js.map +1 -0
  150. package/dist/cli/commands/state.js +1012 -0
  151. package/dist/cli/commands/state.js.map +1 -0
  152. package/dist/cli/commands/upgrade.js +49 -0
  153. package/dist/cli/commands/upgrade.js.map +1 -0
  154. package/dist/cli/commands/validate.js +519 -0
  155. package/dist/cli/commands/validate.js.map +1 -0
  156. package/dist/cli/commands/verify.js +204 -0
  157. package/dist/cli/commands/verify.js.map +1 -0
  158. package/dist/cli/dispatch.js +962 -0
  159. package/dist/cli/dispatch.js.map +1 -0
  160. package/dist/cli/orientation.js +595 -0
  161. package/dist/cli/orientation.js.map +1 -0
  162. package/dist/cli/prime-blob.js +3 -0
  163. package/dist/cli/prime-blob.js.map +1 -0
  164. package/dist/cli/stateQuery.js +292 -0
  165. package/dist/cli/stateQuery.js.map +1 -0
  166. package/dist/cli/structured.js +18 -0
  167. package/dist/cli/structured.js.map +1 -0
  168. package/dist/core/difflib.js +274 -0
  169. package/dist/core/difflib.js.map +1 -0
  170. package/dist/core/git.js +43 -0
  171. package/dist/core/git.js.map +1 -0
  172. package/dist/core/paths.js +50 -0
  173. package/dist/core/paths.js.map +1 -0
  174. package/dist/core/pyjson.js +101 -0
  175. package/dist/core/pyjson.js.map +1 -0
  176. package/dist/core/sourceRoot.js +72 -0
  177. package/dist/core/sourceRoot.js.map +1 -0
  178. package/dist/core/toml.js +11 -0
  179. package/dist/core/toml.js.map +1 -0
  180. package/dist/core/yaml.js +25 -0
  181. package/dist/core/yaml.js.map +1 -0
  182. package/dist/eval/evalSkills.js +258 -0
  183. package/dist/eval/evalSkills.js.map +1 -0
  184. package/dist/eval/semanticEval.js +148 -0
  185. package/dist/eval/semanticEval.js.map +1 -0
  186. package/dist/eval/semanticFixtures.js +227 -0
  187. package/dist/eval/semanticFixtures.js.map +1 -0
  188. package/dist/hooks/common.js +160 -0
  189. package/dist/hooks/common.js.map +1 -0
  190. package/dist/hooks/compaction.js +935 -0
  191. package/dist/hooks/compaction.js.map +1 -0
  192. package/dist/hooks/cursorPreToolUse.js +19 -0
  193. package/dist/hooks/cursorPreToolUse.js.map +1 -0
  194. package/dist/hooks/cursorSessionStart.js +71 -0
  195. package/dist/hooks/cursorSessionStart.js.map +1 -0
  196. package/dist/hooks/sessionStart.js +209 -0
  197. package/dist/hooks/sessionStart.js.map +1 -0
  198. package/dist/hooks/sessionStop.js +212 -0
  199. package/dist/hooks/sessionStop.js.map +1 -0
  200. package/dist/hooks/validateArtifact.js +933 -0
  201. package/dist/hooks/validateArtifact.js.map +1 -0
  202. package/dist/registries/artifactRegistry.js +206 -0
  203. package/dist/registries/artifactRegistry.js.map +1 -0
  204. package/dist/registries/capabilityContract.js +310 -0
  205. package/dist/registries/capabilityContract.js.map +1 -0
  206. package/dist/registries/packageRegistry.js +641 -0
  207. package/dist/registries/packageRegistry.js.map +1 -0
  208. package/dist/registries/runtimeAdapterRegistry.js +315 -0
  209. package/dist/registries/runtimeAdapterRegistry.js.map +1 -0
  210. package/dist/setup/codex.js +1052 -0
  211. package/dist/setup/codex.js.map +1 -0
  212. package/dist/setup/copilot.js +227 -0
  213. package/dist/setup/copilot.js.map +1 -0
  214. package/dist/setup/cursor.js +127 -0
  215. package/dist/setup/cursor.js.map +1 -0
  216. package/dist/setup/doctor.js +1269 -0
  217. package/dist/setup/doctor.js.map +1 -0
  218. package/dist/state/installRoot.js +279 -0
  219. package/dist/state/installRoot.js.map +1 -0
  220. package/dist/state/progressCommit.js +289 -0
  221. package/dist/state/progressCommit.js.map +1 -0
  222. package/dist/state/startupAnalysis.js +1953 -0
  223. package/dist/state/startupAnalysis.js.map +1 -0
  224. package/dist/upgrade/appModel.js +189 -0
  225. package/dist/upgrade/appModel.js.map +1 -0
  226. package/dist/upgrade/channels.js +197 -0
  227. package/dist/upgrade/channels.js.map +1 -0
  228. package/dist/upgrade/compatibility.js +197 -0
  229. package/dist/upgrade/compatibility.js.map +1 -0
  230. package/dist/upgrade/doctor.js +368 -0
  231. package/dist/upgrade/doctor.js.map +1 -0
  232. package/dist/upgrade/migrateArtifactsV2ToV3.js +412 -0
  233. package/dist/upgrade/migrateArtifactsV2ToV3.js.map +1 -0
  234. package/dist/upgrade/upgradeCommands.js +40 -0
  235. package/dist/upgrade/upgradeCommands.js.map +1 -0
  236. package/dist/upgrade/upgradeOrchestrator.js +280 -0
  237. package/dist/upgrade/upgradeOrchestrator.js.map +1 -0
  238. package/dist/validate/appHomeContract.js +150 -0
  239. package/dist/validate/appHomeContract.js.map +1 -0
  240. package/dist/validate/capability.js +412 -0
  241. package/dist/validate/capability.js.map +1 -0
  242. package/dist/validate/crossCapability.js +145 -0
  243. package/dist/validate/crossCapability.js.map +1 -0
  244. package/dist/validate/lifecycleAdapters.js +772 -0
  245. package/dist/validate/lifecycleAdapters.js.map +1 -0
  246. package/dist/validate/selfAudit.js +107 -0
  247. package/dist/validate/selfAudit.js.map +1 -0
  248. package/package.json +28 -8
  249. package/LICENSE +0 -201
  250. package/bin/agentera.mjs +0 -50
  251. package/lib/exec.mjs +0 -116
  252. package/lib/resolve.mjs +0 -129
@@ -0,0 +1,530 @@
1
+ # OpenCode Adapter
2
+
3
+ Maps agentera's host adapter contract (SPEC.md Section 21) and session corpus contract (SPEC.md Section 22) to OpenCode's specific mechanisms. A developer reading only this document can implement portable-core agentera support and a profilera-compatible session corpus in OpenCode without reading any skill entry file source code.
4
+
5
+ ---
6
+
7
+ ## Implementation Status
8
+
9
+ Status: production reference (formerly design document).
10
+
11
+ | Component | Status | Location |
12
+ |-----------|--------|----------|
13
+ | Hook plugin | Shipped | `.opencode/plugins/agentera.js` |
14
+ | Package-loadable plugin metadata | Shipped | `.opencode/package.json` `main`/`exports` |
15
+ | Bare `hej` router | Shipped | `.opencode/plugins/agentera.js` `chat.message` |
16
+ | Eval runner support | Shipped | `scripts/eval_skills.py --runtime opencode` |
17
+ | Skill install | Documented below | `npx skills add jgabor/agentera -g -a opencode --skill agentera -y` |
18
+ | Profile path | Documented below | `~/.config/opencode/profile/PROFILE.md` |
19
+
20
+ Routes exact bare text hej through chat.message to the bundled Agentera dashboard path. The public docs page omits this hook, but `packages/plugin/src/index.ts` defines `"chat.message"` on the exported `Hooks` interface.
21
+
22
+ The plugin was promoted from `references/adapters/opencode-plugin.js` to `.opencode/plugins/agentera.js` and is now the production local-file location. Install it with:
23
+
24
+ ```bash
25
+ cp .opencode/plugins/agentera.js ~/.config/opencode/plugins/
26
+ ```
27
+
28
+ `.opencode/package.json` exposes the same file through `main` and `exports` so
29
+ OpenCode can also load the adapter as an npm-style plugin package. The package
30
+ manifest is not a suite version authority; `.opencode/plugins/agentera.js`
31
+ continues to carry the `AGENTERA_VERSION` marker used by release checks.
32
+
33
+ ---
34
+
35
+ ## Section 21: Host Adapter Capability Mapping
36
+
37
+ ### Skill discovery (Required)
38
+
39
+ **What agentera requires**: A mechanism to find and load SKILL.md files so the runtime can present available skills to the user.
40
+
41
+ **OpenCode mechanism**: OpenCode discovers skills from multiple directory conventions, walking up from the current working directory to the git worktree root.
42
+
43
+ OpenCode skill search paths:
44
+
45
+ | Location | Scope |
46
+ |----------|-------|
47
+ | `.opencode/skills/<name>/SKILL.md` | Project-local |
48
+ | `.claude/skills/<name>/SKILL.md` | Project-local (Claude Code compatibility) |
49
+ | `.agents/skills/<name>/SKILL.md` | Project-local (agent-compatible) |
50
+ | `~/.config/opencode/skills/<name>/SKILL.md` | Global |
51
+ | `~/.claude/skills/<name>/SKILL.md` | Global (Claude Code compatibility) |
52
+ | `~/.agents/skills/<name>/SKILL.md` | Global (agent-compatible) |
53
+
54
+ **Adapter approach**: Install agentera's active `skills/agentera/` directory into one of the recognized skill directories. The recommended approach:
55
+
56
+ - Global install: `npx skills add jgabor/agentera -g -a opencode --skill agentera -y`
57
+ - Project install: symlink or copy `skills/agentera/` into `.opencode/skills/agentera/` or `.agents/skills/agentera/`
58
+
59
+ The temporary `skills/hej/` entry point is a v1 upgrade bridge, not a new-install target. Each Agentera skill entry file already contains YAML frontmatter with `name` and `description`, which matches OpenCode's frontmatter requirements exactly. The OpenCode plugin adds one prompt transformation: when the complete user message is exactly bare text `hej`, `chat.message` rewrites it to load the bundled `agentera` skill and route through the `agentera hej` dashboard path. The match is exact except for OpenCode's CLI-added single trailing newline transport artifact, and does not apply to `/hej`, `Hej`, `hej there`, attachments, or other message parts.
60
+
61
+ **OpenCode frontmatter validation** requires: `name` (1-64 chars, lowercase alphanumeric with single hyphens), `description` (1-1024 chars). Agentera entry point names are lowercase, matching the validation regex `^[a-z0-9]+(-[a-z0-9]+)*$`.
62
+
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
+
65
+ **Gap**: None. OpenCode's skill discovery is more flexible than Claude Code's (supports `.opencode/`, `.claude/`, and `.agents/` paths). Agentera skills install cleanly.
66
+
67
+ ### Artifact resolution (Required)
68
+
69
+ **What agentera requires**: Ability to read and write files at paths specified by DOCS.md or the default layout (project root + `.agentera/`).
70
+
71
+ **OpenCode mechanism**: Direct filesystem access. OpenCode agents have full file read/write capabilities through their `read`, `write`, and `edit` tools. The runtime places no restrictions on which paths an agent can access beyond what the host OS enforces.
72
+
73
+ **Adapter approach**: No adapter code needed. The default agentera layout (VISION.md, TODO.md, CHANGELOG.md at root; everything else in `.agentera/`) works directly. DOCS.md path overrides are also filesystem paths and resolve normally.
74
+
75
+ **Gap**: None. Artifact resolution is pure filesystem access, identical between runtimes.
76
+
77
+ ### Profile path (Required)
78
+
79
+ **What agentera requires**: A global configuration directory where PROFILE.md lives, readable by all skills that consume the generated profile artifact.
80
+
81
+ **OpenCode mechanism**: Global configuration lives in `~/.config/opencode/`. This path is consistent across platforms (Linux and macOS). Managed/admin settings on macOS use `/Library/Application Support/opencode/`, but user-level global config is always `~/.config/opencode/`.
82
+
83
+ **Adapter approach**: Place PROFILE.md at `~/.config/opencode/profile/PROFILE.md` (or `~/.config/opencode/PROFILE.md` for simplicity). Update the profile-path references:
84
+
85
+ - Skills reference `$PROFILERA_PROFILE_DIR/PROFILE.md` (default: `$XDG_DATA_HOME/agentera/PROFILE.md`) with `<!-- platform: profile-path -->` annotations
86
+ - The OpenCode adapter substitutes `~/.config/opencode/profile/PROFILE.md`
87
+ - Profilera writes to this path when generating the profile
88
+
89
+ **Concrete substitution**: In contract.md files, the annotated line:
90
+
91
+ ```
92
+ Read PROFILE.md from the profilera-determined profile path (`$PROFILERA_PROFILE_DIR/PROFILE.md`, defaulting to `$XDG_DATA_HOME/agentera/PROFILE.md` on Linux). <!-- platform: profile-path -->
93
+ ```
94
+
95
+ becomes in the OpenCode context:
96
+
97
+ ```
98
+ Read PROFILE.md from the runtime-provided profile path (Section 21). In OpenCode, this resolves to `~/.config/opencode/profile/PROFILE.md`.
99
+ ```
100
+
101
+ **Gap**: None. The path convention is straightforward. The XDG-compliant location is well-established.
102
+
103
+ ### Sub-agent dispatch (Capability-gated)
104
+
105
+ **What agentera requires**: Ability to spawn subordinate agents with workspace isolation for parallel implementation tasks.
106
+
107
+ **OpenCode mechanism**: OpenCode has a built-in subagent system:
108
+
109
+ 1. **Subagents via Task tool**: Primary agents can invoke subagents (e.g., `@general`, `@explore`) using the Task tool. These run in child sessions within the same project. Custom subagents can be defined via JSON config or markdown files in `.opencode/agents/` or `~/.config/opencode/agents/`.
110
+
111
+ 2. **Git worktree isolation (manual)**: OpenCode does not include a built-in worktree primitive. Workspace isolation can be achieved by using standard `git worktree` commands before dispatching subagents, then merging branches after completion.
112
+
113
+ **Adapter approach**: Map agentera's worktree isolation to one of two strategies:
114
+
115
+ **Strategy A: Managed descriptor dispatch (recommended for current port)**
116
+
117
+ - Define Agentera's dispatched capabilities as OpenCode subagents
118
+ - Each capability gets a managed markdown file in `.opencode/agents/`
119
+ - Descriptor frontmatter stays within documented OpenCode agent fields: `description` and `mode: subagent`; the file name supplies the agent name.
120
+ - Agentera ownership is recorded in a body comment marker, not custom frontmatter, so unknown options are not passed through as model options.
121
+ - The OpenCode plugin copies those descriptors to `~/.config/opencode/agents/` on startup and preserves user-owned collisions
122
+ - The orchestrating skill (realisera, orkestrera) uses `@<capability>` to invoke work
123
+ - Limitation: runs in the same working tree, not isolated. Suitable for non-destructive work.
124
+
125
+ **Strategy B: Manual git worktree (full isolation parity)**
126
+
127
+ - Create a git worktree via `git worktree add` before dispatching
128
+ - Dispatch a subagent into the worktree directory
129
+ - Merge the branch and clean up the worktree after completion
130
+ - Provides true parallel implementation with independent branches
131
+ - Requires explicit orchestration in the skill workflow
132
+
133
+ **Concrete mapping for realisera Step 5 dispatch**:
134
+
135
+ ```
136
+ # Claude Code (reference)
137
+ Spawn a Sonnet implementation agent in a worktree (isolation: "worktree")
138
+
139
+ # OpenCode Strategy A
140
+ Invoke the relevant managed capability descriptor, for example @realisera, with the implementation plan
141
+
142
+ # OpenCode Strategy B
143
+ git worktree add ../worktree-branch branch-name
144
+ Dispatch the relevant managed descriptor with cwd set to ../worktree-branch
145
+ After completion: git merge, git worktree remove
146
+ ```
147
+
148
+ **Gap**: Strategy A lacks workspace isolation (same working tree). Strategy B requires manual git worktree orchestration in the skill workflow. Agentera v2 ships managed descriptors, so the remaining gap is isolation, not descriptor availability.
149
+
150
+ ### Eval mechanism (Capability-gated)
151
+
152
+ **What agentera requires**: Ability to invoke a skill against a prompt and capture the output for behavioral verification.
153
+
154
+ **OpenCode mechanism**: OpenCode supports non-interactive execution via CLI:
155
+
156
+ ```bash
157
+ opencode run "Run one autonomous development cycle."
158
+ ```
159
+
160
+ This pipes a prompt to OpenCode and returns the agent's response. The output format is text by default, but structured JSON is available:
161
+
162
+ ```bash
163
+ # Text output (default)
164
+ opencode run "Explain closures in JavaScript"
165
+
166
+ # Raw JSON event stream
167
+ opencode run --format json "Explain closures in JavaScript"
168
+ ```
169
+
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
+
172
+ For long-running sessions, OpenCode's server mode provides an HTTP API with the same structured output:
173
+
174
+ ```bash
175
+ opencode serve --port 4096
176
+ # Then POST to the API with session creation and message sending
177
+ ```
178
+
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 realisera` | `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:
188
+
189
+ ```python
190
+ def dispatch_opencode(skill_name: str, prompt: str) -> dict:
191
+ result = subprocess.run(
192
+ ["opencode", "run", "--format", "json", prompt],
193
+ capture_output=True, text=True, timeout=120
194
+ )
195
+ return {"output": result.stdout, "exit_code": result.returncode}
196
+ ```
197
+
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.
199
+
200
+ ### Hook lifecycle (Optional but recommended)
201
+
202
+ **What agentera requires**: Callbacks at session start, session stop, before tool use for hard-gated artifact validation, and after tool use for validation warnings.
203
+
204
+ **OpenCode mechanism**: OpenCode provides a rich plugin event system. Session lifecycle events arrive through the generic `event` hook as `event.type` payload values. The documented plugin example branches on `event.type === "session.idle"` inside `event`, and the local `@opencode-ai/plugin` types expose `event?: ({ event }) => Promise<void>`. The plugin source `packages/plugin/src/index.ts` also exposes `"chat.message"` and `"experimental.session.compacting"` on the exported `Hooks` interface.
205
+
206
+ | Agentera hook | OpenCode event | Notes |
207
+ |---------------|----------------|-------|
208
+ | SessionStart | `event` hook with `event.type === "session.created"` | Observation only unless a supported context-injection hook is also used |
209
+ | Stop | `event` hook with `event.type === "session.idle"` | Fires when a session reaches idle state |
210
+ | Exact bare `hej` | `chat.message` | Rewrites only the complete text message `hej` so the bundled `agentera` skill owns the dashboard path |
211
+ | PreToolUse | `tool.execute.before` | Blocks invalid reconstructable artifact candidates by throwing an error |
212
+ | PostToolUse | `tool.execute.after` | Fires after every tool execution |
213
+ | Compaction context | `experimental.session.compacting` | Appends bounded Agentera state from `agentera hej --format json` |
214
+
215
+ OpenCode plugins subscribe to session events by exporting one generic `event` hook:
216
+
217
+ ```javascript
218
+ export const AgenteraPlugin = async ({ project, client, $, directory, worktree }) => {
219
+ return {
220
+ event: async ({ event }) => {
221
+ if (event.type === "session.idle") {
222
+ // Stop equivalent: persist session bookmark
223
+ }
224
+
225
+ if (event.type === "session.created") {
226
+ // SessionStart observation point.
227
+ }
228
+ },
229
+ "tool.execute.before": async (input, output) => {
230
+ // PreToolUse equivalent: deny invalid reconstructable artifact candidates
231
+ },
232
+ "tool.execute.after": async (input, output) => {
233
+ // PostToolUse equivalent: report validation warnings
234
+ },
235
+ "chat.message": async (input, output) => {
236
+ // Exact bare hej prompt rewrite.
237
+ },
238
+ "experimental.session.compacting": async (input, output) => {
239
+ // Append bounded Agentera CLI state context.
240
+ }
241
+ }
242
+ }
243
+ ```
244
+
245
+ **Adapter approach**: Implement agentera's three hooks as an OpenCode plugin in `.opencode/plugins/agentera.js`:
246
+
247
+ Install-root semantics used by the plugin are contract-bound to `scripts/install_root.py` and `.agentera/install_root_interface_model.yaml`. OpenCode still keeps one temporary adapter-local compatibility exception for older manual `~/.agents/skills/agentera` installs; new install-root behavior should change the shared Module/fixture first, not add more JavaScript-local root identity rules.
248
+
249
+ OpenCode runtime facts are owned by the RuntimeAdapter registry at `references/adapters/runtime-adapter-registry.yaml` and loaded through `scripts/runtime_adapter_registry.py`. This reference describes the OpenCode adapter behavior, but registry-owned values such as event support, artifact-validation claims, config targets, diagnostic labels, and documentation claims must be validated against the registry rather than changed here as an independent source. The install-root Module must keep package manifest registry and package metadata consolidation work outside its scope.
250
+
251
+ Registry parity claims: Blocks invalid reconstructable artifact candidates. Routes exact bare text hej through chat.message to the bundled Agentera dashboard path.
252
+
253
+ 1. **SessionStart** (`event.type === "session.created"`): Observe session creation through the event hook. Session-start context preload remains deferred because no supported model-context injection path is verified for this adapter. Do not attach dead preload code to event observation alone.
254
+
255
+ 2. **PreToolUse** (`tool.execute.before`): When `write` or `edit` args expose a path plus candidate content or exact replacement evidence, validate the candidate through `hooks/validate_artifact.py`. Throw an error to block invalid artifact content before mutation. Sparse payloads and `apply_patch` `patchText` without reconstructed full content are allowed rather than guessed.
256
+
257
+ 3. **Exact bare `hej`** (`chat.message`): If the incoming user message has exactly one meaningful text part and that text is exactly `hej` after removing only OpenCode's CLI-added single trailing newline transport artifact, replace that text with an Agentera routing prompt that preserves the original-message fact and instructs the agent to run `agentera hej` instead of replying with a generic greeting. This is intentionally not a broad greeting detector.
258
+
259
+ 4. **PostToolUse** (`tool.execute.after`): After `write` or `edit`, run the shared artifact validator for warnings. This is advisory because the mutation already happened.
260
+
261
+ 5. **Compaction context** (`experimental.session.compacting`): Before OpenCode compacts a session, append a bounded Agentera project-state summary generated by `agentera hej --format json`. This hook is CLI-first by design and does not read `.agentera` artifacts directly.
262
+
263
+ 6. **Stop** (`event.type === "session.idle"`): Append a runtime-local bookmark entry under the Agentera data directory capturing artifact changes for next-session continuity.
264
+
265
+ **Adapter note**: OpenCode plugins run in-process (JavaScript/TypeScript), not as separate Python scripts. Shared Agentera validators are invoked through `uv run` so their inline script metadata can resolve dependencies consistently:
266
+
267
+ ```javascript
268
+ const result = await $`uv run /path/to/hooks/validate_artifact.py`.quiet()
269
+ ```
270
+
271
+ This keeps the plugin thin while matching the packaged Python script contract.
272
+
273
+ ---
274
+
275
+ ## Section 22: Session Corpus Mapping
276
+
277
+ Profilera mines five canonical record types from host session data. This section maps each record type to OpenCode's data sources.
278
+
279
+ ### memory_entry (Claude Code runtime extension)
280
+
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"`.
282
+
283
+ **OpenCode source**: OpenCode does not have a built-in memory system. The memory_entry extension does not apply.
284
+
285
+ **Gap**: None. memory_entry is not a portable requirement. OpenCode adapters need not implement it.
286
+
287
+ ### instruction_document
288
+
289
+ **Agentera contract**: Global or project-scoped instruction files the host exposes to agents.
290
+
291
+ **OpenCode source**: OpenCode has explicit support for instruction documents at multiple levels:
292
+
293
+ | Source | Scope | Notes |
294
+ |--------|-------|-------|
295
+ | `~/.config/opencode/AGENTS.md` | Global | Personal rules applied across all sessions |
296
+ | `<project>/AGENTS.md` | Project | Project-specific rules, committed to git |
297
+ | `<project>/CLAUDE.md` | Project | Claude Code compatibility (fallback if no AGENTS.md) |
298
+ | `opencode.json` `instructions` | Configurable | Explicit list of paths and glob patterns |
299
+ | Remote URLs in `instructions` | Configurable | Web-hosted instruction files |
300
+
301
+ **Adapter extraction**: Straightforward. Read each instruction source and produce an instruction_document record:
302
+
303
+ ```python
304
+ {
305
+ "source_id": f"opencode:instruction:{scope}:{name}",
306
+ "timestamp": iso_now,
307
+ "project_id": project_id,
308
+ "source_kind": "instruction_document",
309
+ "runtime": "opencode",
310
+ "adapter_version": "1.0.0",
311
+ "doc_type": "agents_md",
312
+ "name": name,
313
+ "content": file_content,
314
+ "scope": scope # "global" or "project"
315
+ }
316
+ ```
317
+
318
+ **Gap**: None. OpenCode has richer instruction document support than Claude Code (remote URLs, glob patterns, explicit config).
319
+
320
+ ### history_prompt
321
+
322
+ **Agentera contract**: Decision-rich prompts from the host's command history.
323
+
324
+ **OpenCode source**: OpenCode stores session data in its internal database. Sessions are accessible via the SDK:
325
+
326
+ ```typescript
327
+ // OpenCode SDK session access
328
+ const sessions = await client.session.list()
329
+ const messages = await client.session.messages({ path: { id: session.id } })
330
+ ```
331
+
332
+ The SDK exposes message history with timestamps, project context, and session metadata.
333
+
334
+ **Adapter extraction**:
335
+
336
+ 1. Enumerate sessions via `opencode session list --format json`
337
+ 2. Export each session via `opencode export [sessionID]`
338
+ 3. Filter for user-originated messages from the export JSON
339
+ 4. Apply decision-pattern regex (same patterns profilera uses for Claude Code history) to classify prompts as `"decision"`, `"correction"`, or `"question"`
340
+ 5. Produce history_prompt records with session and project metadata
341
+
342
+ ```python
343
+ {
344
+ "source_id": f"opencode:history:{session_id}:{message_index}",
345
+ "timestamp": message_timestamp,
346
+ "project_id": project_id,
347
+ "session_id": session_id,
348
+ "source_kind": "history_prompt",
349
+ "runtime": "opencode",
350
+ "adapter_version": "1.0.0",
351
+ "prompt": user_message_text,
352
+ "signal_type": classify_signal(user_message_text)
353
+ }
354
+ ```
355
+
356
+ **Gap**: Reduced. OpenCode provides CLI-based session data access via two mechanisms:
357
+
358
+ 1. `opencode session list --format json`: Lists sessions with metadata (timestamps, project, title).
359
+ 2. `opencode export [sessionID]`: Exports full session data (messages, tool calls, metadata) as JSON.
360
+
361
+ The `opencode export` output is a JSON dump of the session, which can be parsed to extract user prompts, classify signal types, and produce history_prompt records without requiring SDK access. The adapter can shell out to `opencode session list --format json` to enumerate sessions, then `opencode export <id>` for each.
362
+
363
+ The SDK approach remains preferable for programmatic integration (e.g., as an OpenCode plugin), but CLI-based extraction is viable for the initial port. This source family no longer needs to be deferred.
364
+
365
+ ### conversation_turn
366
+
367
+ **Agentera contract**: Normalized user or assistant turns from host conversation sessions.
368
+
369
+ **OpenCode source**: Same session data as history_prompt, but capturing the full user-assistant exchange pairs.
370
+
371
+ **Adapter extraction**:
372
+
373
+ 1. Enumerate sessions via `opencode session list --format json`
374
+ 2. Export each session via `opencode export [sessionID]`
375
+ 3. Extract paired user-assistant turns from the export JSON
376
+ 4. Classify user turns by signal type (decision, correction, question)
377
+ 5. Include preceding_context for turns that respond to assistant proposals
378
+
379
+ ```python
380
+ {
381
+ "source_id": f"opencode:turn:{session_id}:{turn_index}",
382
+ "timestamp": turn_timestamp,
383
+ "project_id": project_id,
384
+ "session_id": session_id,
385
+ "source_kind": "conversation_turn",
386
+ "runtime": "opencode",
387
+ "adapter_version": "1.0.0",
388
+ "actor": "user" or "assistant",
389
+ "content": turn_text,
390
+ "preceding_context": prior_assistant_proposal, # for user turns
391
+ "signal_type": signal_classification
392
+ }
393
+ ```
394
+
395
+ **Gap**: Same as history_prompt: reduced. `opencode export [sessionID]` provides full session JSON including paired user-assistant turns. CLI-based extraction is viable for the initial port.
396
+
397
+ ### project_config_signal
398
+
399
+ **Agentera contract**: Recurring configuration or toolchain patterns associated with a project.
400
+
401
+ **OpenCode source**: OpenCode projects are standard filesystem directories. Config files are accessible via direct file reads.
402
+
403
+ **Adapter extraction**: Identical to Claude Code extraction. Scan the project root for known config types:
404
+
405
+ - `package.json`, `go.mod`, `Cargo.toml`, `pyproject.toml`
406
+ - `.golangci.yml`, `tsconfig.json`, `ruff.toml`
407
+ - `Makefile`, `magefile.go`, `justfile`, `taskfile.yaml`
408
+
409
+ No runtime-specific adaptation needed. The adapter uses the same config type list and extraction logic as the Claude Code adapter.
410
+
411
+ ```python
412
+ {
413
+ "source_id": f"opencode:config:{project_id}:{config_type}",
414
+ "timestamp": iso_now,
415
+ "project_id": project_id,
416
+ "project_path": project_path,
417
+ "source_kind": "project_config_signal",
418
+ "runtime": "opencode",
419
+ "adapter_version": "1.0.0",
420
+ "config_type": config_type,
421
+ "file_path": relative_path,
422
+ "signals": extracted_key_values
423
+ }
424
+ ```
425
+
426
+ **Gap**: None. Filesystem-based extraction is runtime-agnostic.
427
+
428
+ ---
429
+
430
+ ## Source family availability
431
+
432
+ Summary of which corpus families the OpenCode adapter can produce:
433
+
434
+ | Family | Record types | Available? | Mechanism |
435
+ |--------|-------------|------------|-----------|
436
+ | Crystallized decisions | instruction_document | Yes | AGENTS.md files (global and project), instructions config |
437
+ | Decision history | history_prompt | Yes (CLI) | `opencode session list --format json` enumerates sessions; `opencode export [sessionID]` provides full message JSON for prompt extraction |
438
+ | 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 |
440
+
441
+ **Initial port profilera 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
+
443
+ ---
444
+
445
+ ## Installation
446
+
447
+ Install the OpenCode-targeted Agentera suite with the skills installer:
448
+
449
+ ```bash
450
+ npx skills add jgabor/agentera -g -a opencode --skill agentera -y
451
+ ```
452
+
453
+ Do not add `--skill '*'` for OpenCode. The `-a opencode` target selects the supported OpenCode skill surface without selecting every agent. The OpenCode plugin is a separate hook and command adapter; it does not install skills by itself.
454
+
455
+ ### Manual global fallback
456
+
457
+ OpenCode discovers skills at `skills/*/SKILL.md` one level under its search directories. Because Agentera's active skill is nested at `skills/agentera/SKILL.md` within the repo, cloning the whole repo into a search directory would place it two levels deep and OpenCode would not find it. If the installer is unavailable, link the active skill directory directly.
458
+
459
+ ```bash
460
+ mkdir -p ~/.config/opencode/skills
461
+ ln -s ~/git/agentera/skills/agentera ~/.config/opencode/skills/agentera
462
+ ```
463
+
464
+ OpenCode discovers the active skill from `~/.config/opencode/skills/agentera/SKILL.md`.
465
+
466
+ ### Project install
467
+
468
+ ```bash
469
+ mkdir -p .opencode/skills
470
+ ln -s /path/to/agentera/skills/agentera .opencode/skills/agentera
471
+ ```
472
+
473
+ Or use `.agents/skills/` for the same effect (agent-compatible search path).
474
+
475
+ ### Configuration
476
+
477
+ No `opencode.json` configuration is required. Skills are discovered and loaded automatically.
478
+
479
+ Optional: configure skill permissions if you want to gate certain skills:
480
+
481
+ ```json
482
+ {
483
+ "permission": {
484
+ "skill": {
485
+ "*": "allow"
486
+ }
487
+ }
488
+ }
489
+ ```
490
+
491
+ ### Hook plugin (optional)
492
+
493
+ For artifact validation and session continuity, install the agentera hook plugin:
494
+
495
+ ```bash
496
+ cp .opencode/plugins/agentera.js ~/.config/opencode/plugins/
497
+ ```
498
+
499
+ ### Install health and managed surfaces
500
+
501
+ Installer update status and Agentera app validation are separate checks. `npx skills update -g -y` can report a current package while the managed app is still unhealthy, for example when a support file is missing or a skill path is broken. Agentera validation checks the app home and managed app for shared files and references; installer update status only reflects package-manager state.
502
+
503
+ OpenCode repair is ownership-gated. Managed slash commands include `agentera_managed: true` frontmatter, and the command directory stores `.agentera-version`. Repair may overwrite missing or stale managed command files. Same-name command files without that marker are user-owned collisions and must be skipped, not overwritten. Managed skill-path repair follows the same rule: repair Agentera-created OpenCode skill links or directories, preserve user-owned paths, and report skipped collisions.
504
+
505
+ `scripts/setup_doctor.py` is diagnostic-only for OpenCode. It reports the plugin file, `AGENTERA_HOME` or documented default app homes, and invalid managed app roots, but it does not mutate OpenCode config or repair OpenCode skills.
506
+
507
+ ---
508
+
509
+ ## Remaining gaps
510
+
511
+ | Gap | Impact | Mitigation |
512
+ |-----|--------|------------|
513
+ | Sub-agent dispatch lacks built-in worktree isolation | realisera/orkestrera 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 |
515
+ | 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
+ | Python scripts require Python runtime | Hook plugin calls Python via shell | Python is already a prerequisite for agentera scripts |
517
+
518
+ ---
519
+
520
+ ## Validation
521
+
522
+ To verify the adapter is sufficient, check each acceptance criterion from PLAN.md Task 4:
523
+
524
+ 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
+
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.
527
+
528
+ 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
+
530
+ 4. **Every required capability and normalized corpus source family is addressed**: Yes. All six capabilities and all five record types are addressed, with explicit availability status and implementation paths for each.