Done
Milestone
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 feat(cli): emit rules in Kilo flat builds #868. Kilo command materialization is intentionally excluded here because Kilo requires host-specific flat-build support after feat(cli): add Kilo Code support #744.
- Direct artifact generation, tracked by feat(aidd-context): add Kilo support and correct OpenCode rule guidance #788.
- Hook conversion or hook-plugin generation.
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
- StatusShow more project fieldsDone
Activity
blafourcade commentedon Sep 14, 2026
Thanks for preserving the original YAGNI decision and for separating direct generation from archive emission.
The OpenCode part is independently actionable now. The Kilo part is not: it depends on #744 delivering the Kilo profile and its flat build contract. Keeping both in one issue makes the Kilo acceptance criteria conditional and leaves the delivery status ambiguous.
We will split the work into an OpenCode-only issue and a Kilo follow-up linked to #744. The OpenCode issue will own rules, commands, safe JSON/JSONC instruction merging, namespacing, idempotence, relative links, and runtime coverage. The Kilo issue will reuse that shape only after Kilo flat support is delivered and verified.
Until that split is made, this issue should not be treated as a Kilo delivery commitment.
[-]feat(cli): emit rules and commands in OpenCode and Kilo flat builds[/-][+]feat(cli): emit rules and commands in OpenCode flat builds[/+]blafourcade commentedon Sep 14, 2026
Kilo supports Markdown workflows in
.kilo/commands/. This remains an OpenCode-only distribution issue: Kilo needs its own host-specific flat-build work, not an exclusion based on an unsupported command surface.Update — 2026-09-23
rulesandcommandsas unsupported.instructions; user-owned entries can still be replaced.Decision: keep this issue as
Feature · Todo; priorityHighbecause flat builds silently omit two supported artifact families and can replace user-ownedinstructions.blafourcade commentedon Nov 26, 2026
Delivered on
next: #1377 builds OpenCode rules in flat builds (listed throughinstructions, the user's own entries kept), #1390 builds OpenCode commands in flat builds (namespaced under.opencode/commands/, through the install's placement owner). Probed on OpenCode 1.19.3.