feat(cli): emit rules and commands in OpenCode flat builds
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 68/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- typescript
Research direction
Start with cli/src/contexts/tools/domain/profiles/opencode/profile.ts for OpenCode artifact paths and capabilities, then read cli/src/contexts/tools/domain/formats/opencode-mcp-merge.ts for preservation-safe configuration merging. Run the flat framework build and existing unit, integration, golden, and runtime tests. Done means namespaced rules and commands are discoverable, user instructions and relative links survive, collisions and reruns are safe, and plugins without these artifacts remain byte-identical.
Written by the indexing model from the issue text.
Description
Problem
The flat framework build deliberately skips plugin rules/ and commands/ for every target. Once a plugin contains those canonical artifacts, an OpenCode archive omits them even though OpenCode can consume project rules and commands.
This is separate from direct generation in #788. #788 writes artifacts into a project; this issue distributes canonical plugin artifacts through aidd framework build --flat.
Scope
- Materialize canonical plugin
rules/into namespaced Markdown files and merge their paths intoopencode.jsonoropencode.jsoncinstructions. - Preserve every user-owned
instructionsentry while merging the generated rule paths. - Materialize canonical plugin
commands/into namespaced.opencode/commands/paths. - Prevent cross-plugin filename collisions.
- Preserve idempotence and rewrite relative links for their materialized locations.
- Add focused, golden, and OpenCode runtime coverage.
Acceptance criteria
- A plugin with
rules/produces discoverable OpenCode rules throughinstructions. - Existing user-owned
instructionsentries survive unchanged in JSON and JSONC configuration. - A plugin with
commands/produces discoverable.opencode/commands/output. - Identically named artifacts from two plugins cannot overwrite each other.
- Re-running the same build creates neither duplicate files nor configuration entries.
- Relative links still resolve after materialization.
- A plugin without
rules/orcommands/produces byte-identical output to today. - Unit, integration, golden, and target-runtime smoke tests pass.
Prior art
cli/src/contexts/tools/domain/profiles/opencode/profile.tsowns OpenCode artifact paths and configuration capabilities.cli/src/contexts/tools/domain/formats/opencode-mcp-merge.tsis the preservation-safe configuration merge precedent.
Out of scope
- Kilo flat rules are tracked separately in #868. Kilo command materialization is intentionally excluded here because Kilo requires host-specific flat-build support after #744.
- Direct artifact generation, tracked by #788.
- Hook conversion or hook-plugin generation.
- Dominant language
- TypeScript
- Stars
- 481
- Forks
- 45
- Avg merge
- 14h 36m
- Merged PRs (30d)
- 110
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ai-driven-dev/framework
-
refactor(aidd-orchestrator): the check zone says when to stop, and reviews its axes in one round Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
ai-driven-dev/framework#887 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
ai-driven-dev/framework#873 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
ai-driven-dev/framework#872 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
ai-driven-dev/framework#625 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
ai-driven-dev/framework#467 · 1 comment ·
All issues in ai-driven-dev/framework
Similar issues
-
Browser Waiting for: Product Owner
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
getsentry/sentry-javascript#24577 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
agilepathway/label-checker#640 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
copse-dev/agent-pane#2953 ·
-
agentic-workflows
Difficulty 1/5 Under an hour Newbie friendliness 85/100
githubnext/rig#534 ·
-
automation missing-model model-sync provider:pioneer
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
anomalyco/models.dev#7701 ·