Problem
Kilo flat support was delivered by #744 and PR #745, but buildKiloFlatContract() still marks plugin rules/ as unsupported. A framework archive produced by aidd framework build --target kilo --flat therefore omits canonical plugin Rules even though Kilo can load Markdown Rules referenced from kilo.json[c].instructions.
This is separate from #914, which owns direct Kilo-native generation inside a host project. This issue owns flat archive distribution.
Scope
- Materialize canonical all-files plugin Rules, meaning Rules without
paths, as collision-free, plugin-namespaced Markdown under the Kilo Rules location resolved by the Kilo profile.
- Merge the generated Rule references into the
instructions array of the resolved Kilo project configuration.
- Preserve every pre-existing
instructions value and its relative order. Generated entries are appended in deterministic order.
- Keep repeated builds idempotent: generated files and instruction entries remain stable and are never duplicated.
- Preserve Rule content and rewrite relative links for the materialized location.
- Reject a canonical Rule containing
paths with an explicit build error that identifies the Rule and its unsupported scope. Never silently drop its scope or broaden it into an all-files Rule.
- Cover JSON and JSONC configuration, existing instructions, multiple plugins, repeated builds, an unsupported path-scoped Rule, and a flat archive installed into a clean project.
Configuration preservation is semantic: existing values and instruction ordering are preserved, but JSONC comments and formatting may be reserialized.
Acceptance criteria
Relations
References
Out of scope
Problem
Kilo flat support was delivered by #744 and PR #745, but
buildKiloFlatContract()still marks pluginrules/as unsupported. A framework archive produced byaidd framework build --target kilo --flattherefore omits canonical plugin Rules even though Kilo can load Markdown Rules referenced fromkilo.json[c].instructions.This is separate from #914, which owns direct Kilo-native generation inside a host project. This issue owns flat archive distribution.
Scope
paths, as collision-free, plugin-namespaced Markdown under the Kilo Rules location resolved by the Kilo profile.instructionsarray of the resolved Kilo project configuration.instructionsvalue and its relative order. Generated entries are appended in deterministic order.pathswith an explicit build error that identifies the Rule and its unsupported scope. Never silently drop its scope or broaden it into an all-files Rule.Configuration preservation is semantic: existing values and instruction ordering are preserved, but JSONC comments and formatting may be reserialized.
Acceptance criteria
kilo.json[c].instructions.instructionsvalues remain unchanged and in the same relative order.pathsfails the build with a diagnostic naming the Rule and its unsupported scope; it is not emitted or referenced.Relations
References
Out of scope