Skip to content

source-control: setup apply writes self-describing header + draft-aid framing (deliver the #913 f6 fold) #1046

Description

@kyle-sexton

Parent

Refs #912 (audit umbrella; finding F6). #913 declared f6 "folded", but PR #925 shipped no setup-skill change — this delivers the fold.

What to build

When /source-control:setup apply writes the team-tracked <repo>/.claude/source-control.md, the file gives a non-plugin teammate no signal about what it is or whether it binds them. Two changes:

  1. Self-describing header — setup apply (team layer) prepends a short comment/preamble: read by the source-control Claude Code plugin (and the guardrails enforcement gate per docs/conventions/commit-convention/); inert and safe to ignore without those plugins.
  2. Draft-aid framing — setup output (and the header) states the file is a drafting aid + CC-layer enforcement input for plugin users, not team-wide enforcement; tool-agnostic enforcement for all committers is a commit-msg hook / CI check (point at feat(guardrails): opt-in git commit-msg hook for tool-agnostic subject enforcement #919's opt-in hook once it lands).

Header must not break the parse contract: lib/resolve-convention-pattern.sh reads first non-empty body line under each ## <key> H2 — a preamble above the first H2 is inert by construction; add a resolver test proving it.

Acceptance criteria

  • setup apply (team layer) writes the header; re-running on an existing file does not duplicate it
  • Setup output states the draft-aid vs enforcement distinction and names the commit-msg/CI path for team-wide enforcement
  • Resolver test: convention file with preamble resolves identically to one without
  • source-control version bump + CHANGELOG entry

Blocked by

None — can start immediately

Metadata

Metadata

Assignees

Labels

priority: mediumReal value, no hard deadline; normal backlog flow.status: readyTriaged, unblocked, and fully specified; eligible to pick up.

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions