mirror of
https://github.com/niels-emmer/myace.git
synced 2026-09-14 07:36:39 +02:00
[PR #72] [MERGED] fix: opencode adapter emitted JSON instead of OpenCode's real Markdown format #73
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
github-mirrors/myace#73
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/niels-emmer/myace/pull/72
Author: @niels-emmer
Created: 8/12/2026
Status: ✅ Merged
Merged: 8/12/2026
Merged by: @niels-emmer
Base:
main← Head:fix/opencode-adapter-markdown-format📝 Commits (1)
dc0d3c0fix: opencode adapter emitted JSON instead of OpenCode's real Markdown format📊 Changes
7 files changed (+409 additions, -86 deletions)
View changed files
📝
README.md(+3 -2)📝
backend/app/adapters/opencode.py(+105 -57)📝
backend/app/services/scanner.py(+8 -3)📝
backend/tests/test_adapters.py(+123 -8)📝
cli/myace_cli/adapters/opencode.py(+72 -13)📝
cli/myace_cli/scanner.py(+8 -3)➕
cli/tests/test_opencode_adapter.py(+90 -0)📄 Description
Summary
User-reported: compiling a profile to the
opencodetarget only produced JSON files (.opencode/skills/*.json,.opencode/agents/*.json), but real OpenCode installations use Markdown for everything exceptopencode.json. Verified directly against https://opencode.ai/docs (agents/skills/commands/config/rules pages) before touching any code.Real OpenCode format, confirmed:
.opencode/skills/<name>/SKILL.mdname,description(+ optionallicense,compatibility,metadata).opencode/agents/<name>.mddescription(+ optionalmode,model,temperature,permission).opencode/commands/<name>.mddescription(+ optionalagent,model,subtask)AGENTS.md(root)opencode.json(root, one merged file)Fixed both copies (
backend/app/adapters/opencode.pyand its CLI mirrorcli/myace_cli/adapters/opencode.py, kept in sync per repo convention) to emit exactly this shape instead of JSON everywhere. Notable design choice: skill frontmatter only uses OpenCode's actually-recognized fields at the top level (name/description/compatibility) —version/priority/tags(MyACE's own canonical bookkeeping, not part of OpenCode's schema) go under the explicitly free-formmetadatafield instead of being invented as top-level keys that a stricter parser might reject.Bonus fix: also updated
scanner.py's_parse_skill_file(backend + CLI) to read thatmetadatafallback, so a profile compiled to OpenCode now round-trips cleanly back through the scanner — verified with a new test that compiles a skill and re-scans the output, confirming version/priority/tags survive the round trip.Also fixed two README mentions of the old (wrong) format description.
Test plan
TestOpenCodeAdapterinbackend/tests/test_adapters.py— skill/agent/command markdown+frontmatter shape, model_config merging into oneopencode.json, and a scanner round-trip test.cli/tests/test_opencode_adapter.py(previously zero coverage on the CLI-side adapter) mirroring the same cases.ruff checkclean on all changed files.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.