feat(setup): add OpenCode integration#67
Merged
Merged
Conversation
Add OpenCode as a setup target using its native project and global surfaces. The integration installs a mnemon agent skill, registers the generated guide through opencode.json instructions, and writes a local JavaScript plugin that injects recall context through chat message transforms and compaction guidance through OpenCode's plugin hooks. The setup preserves unrelated OpenCode config, supports eject cleanup for only mnemon-managed files and instructions, and documents the new target in the English and Chinese docs. Validation: go test ./internal/setup; go test ./...; go build -o mnemon .; node --check internal/setup/assets/opencode/mnemon.js; isolated setup/eject smoke test for mnemon setup --target opencode --yes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
mnemon setup --target opencodewith local.opencode/and global~/.config/opencode/support.opencode.jsoninstructions, and write a zero-dependency JS plugin underplugins/mnemon.js.Research
.opencode/skills/<name>/SKILL.mdand~/.config/opencode/skills/<name>/SKILL.md..opencode/plugins/and~/.config/opencode/plugins/.opencode.json/~/.config/opencode/opencode.json.Validation
go test ./internal/setupgo test ./...go build -o mnemon .node --check internal/setup/assets/opencode/mnemon.jsmnemon setup --target opencode --yes