Repository navigation
Description
Refs #6594. Slice 2 of 4. Blocked by #9801 (slice 1, the owner doc). Runs in parallel with slice 4.
Problem
No shared setup writer can tell a team-chosen value from an inherited default, so when a plugin changes a recommended default, apply cannot know whether to update the stored value (#6594 Problem 5). lib/setup-apply.mjs on origin/main validates and writes <home>/<plugin>.yaml but records neither the plugin version the file was written against nor a per-value source. Only developer-experience records provenance, and only for its prose file (plugins/developer-experience/skills/setup/reference/conventions-file.md, written_against front matter and per-section source=chosen|default markers).
Fix
In lib/setup-apply.mjs (and the generated per-plugin copies through scripts/sync-shared-copies.sh):
- Write a top-level
written_against: <plugin>@<version>when the writer writes the file, read from the plugin's.claude-plugin/plugin.json. - Record per key whether the team chose it or it was inherited, in a separate top-level
provenance:map (<key>: chosenfor a value the operator set or confirmed,<key>: defaultfor one filled at the plugin default). Values stay flat where they are today, so no existing reader (lib/config-cascade.mjs,lib/parse-concern-value.sh,scripts/check-convention-yaml.sh, the plugins' JSON Schemas) changes what it parses; allow the two new top-level keys where the writer validates. Keep reading a file without provenance (treat its values aschosen, report INFO once). --check: list eachdefaultvalue whose plugin default changed sincewritten_against(INFO), and eachchosenvalue whose default changed, with the old and new default (WARN, never rewritten).- Writing with
--yes: updatedefaultvalues to the new plugin default and print each change; never change achosenvalue. - Document the shape in the
## Provenancesection ofdocs/conventions/setup-lifecycle/README.md.
Prose files keep developer-experience's per-section markers; this slice does not change them.
Done when
-
bash lib/setup-apply.test.shexits 0, with new cases for:written_againstwritten on create; adefaultvalue updated after a default change; achosenvalue kept and reported WARN with old and new defaults; a file without provenance read with one INFO line -
bash scripts/sync-shared-copies.sh --checkexits 0 -
bash lib/config-cascade.test.shandbash lib/parse-concern-value.test.shexit 0, with one new case each reading a file that carrieswritten_againstandprovenance:and returning the same value as the file without them -
grep -c 'written_against' docs/conventions/setup-lifecycle/README.mdprints 1 or more -
ci-statusis green on the PR head
Activity
github-actions commentedon Oct 24, 2026
The triage sweep dispatched intake triage for this issue (attempt 2 of 2).
github-actions commentedon Oct 24, 2026
Proposed work class: work-class: scoped
Basis: automated intake triage; the lanes App applied this class.
Size: Medium
Complexity: Medium
Uncertainty: Known
Flags: none
Blocked by: none
#9809 (comment)
The issue asks the shared setup writer to record
written_againstand per-key provenance. The recorded decision above settles the open questions, so nothing further is needed from you. Blocker #9801 is closed. No duplicates found.Automated triage, applied by the lanes App.
melodic-automation-lanes commentedon Oct 24, 2026
Not admitted to the issue lane: a Feature needs an open parent issue a listed human filed that awaits no decision. Admission takes the issue once each of those is met, when intake triages it again (
.github/actions/resolve-config/admission-rules.json).7 remaining items
kyle-sexton commentedon Oct 31, 2026
Decision recorded.
The parent, #6594, is open, filed by a listed human, and carries no hold label, so the Feature parent rule (
.github/scripts/intake-triage/admit.mjs:1000-1007) no longer parks this issue, and its blocker #9801 is closed.lib/setup-apply.mjson origin/main has neitherwritten_againstnorprovenance. The lifecycle doc moved todocs/contracts/setup-lifecycle/README.md, so this record replaces the body's grep ofdocs/conventions/setup-lifecycle/README.mdwith the one below. Agents decided this on evidence under standing direction §1.Done when
bash lib/setup-apply.test.shexits 0, with new cases for:written_againstwritten on create; adefaultvalue updated after a default change; achosenvalue kept and reported WARN with old and new defaults; a file without provenance read with one INFO line. Check: the PR's CI runs it.bash scripts/sync-shared-copies.sh --checkexits 0.bash lib/config-cascade.test.shandbash lib/parse-concern-value.test.shexit 0, with one new case each reading a file that carrieswritten_againstandprovenance:and returning the same value as the file without them. Check: the PR's CI runs it.grep -c 'written_against' docs/contracts/setup-lifecycle/README.mdprints 1 or more.github-actions commentedon Oct 31, 2026
github-actions commentedon Oct 31, 2026
test(lib): compare whole files on unchanged-file assertions