Files
msd-core/tests/emitted-drift-acks/1700-spike-manifest-idea-scoping.json
Tom Boucher 1259e4b619 fix(#1700): scope spike MANIFEST requirements per idea key (#3014)
* test(#1700): add failing-first regression test for spike MANIFEST.md idea scoping

Pins the deployed-text contract for spike.md's create_manifest step and
spike-wrap-up.md's gather/synthesize/write_skill steps before the fix lands,
so the fix commit demonstrates RED to GREEN.

* test(#1700): add issue ref to allow-test-rule exemption

lint-allow-test-rule-refs.cjs (ADR-456) requires a tracking-issue
reference on the same line as any new allow-test-rule: exemption.

* fix(#1700): scope spike MANIFEST.md Idea/Requirements per idea key

.planning/spikes/MANIFEST.md held one un-keyed ## Idea paragraph and one
flat ## Requirements list, while spike.md's own read path (load_prior_context
step d, frontier mode) assumed the tree holds several unrelated ideas across
campaigns. spike-wrap-up.md then copied that flat Requirements list verbatim
into every generated feature-area reference and the generated spike-findings
skill, so one idea's requirements leaked into another idea's build as
non-negotiable constraints.

Scopes both sides by an explicit idea key:
- spike.md's create_manifest step now writes MANIFEST.md as ## Ideas >
  ### {idea-key} subsections (idea paragraph + its own Requirements list),
  appends a new idea section instead of overwriting an existing one, and
  migrates a pre-fix flat-shape MANIFEST.md in place instead of discarding
  it. The ## Spikes table gains an Idea column. Spike README frontmatter
  carries the idea key.
- spike-wrap-up.md's gather/synthesize/write_skill steps resolve each
  spike's idea key and pull Requirements only from the idea key(s) actually
  represented among the spikes being wrapped.
- sketch.md's MANIFEST.md read (collateral of the same seam) is updated to
  match the new per-idea section shape.
- references/artifact-types.md no longer describes the project-level,
  durable-index MANIFEST.md as "(per-spike)".

Not a docs-vs-workflow conflict: docs/how-to/spike-and-sketch.md already
matches this contract ("all spikes are indexed in MANIFEST.md") and needed
no change; the defect was internal to spike.md (per-idea read assumption,
single-idea write template).

* test(#1700): make idea-frontmatter regex CRLF-safe

CONTRIBUTING.md's cross-platform portability rules (docs/contributing/
cross-platform-portability-rules.md) ban a bare \n literal matched against
fs.readFileSync'd content — Windows checkouts normalize to CRLF and would
silently break the assertion. Use \r?\n instead.

Found during self-review (code-review skill, Standards axis) before this
branch was handed off for verification.

* test(#1700): acknowledge emitted-size growth in spike.md, spike-wrap-up.md, sketch.md

The differential attribution check (tests/emitted-attribution.test.cjs,
ADR-2719) flagged unattributed byte growth in three emitted workflow files.
All three grew as a direct, necessary consequence of the #1700 fix (idea-key
scoping in spike.md's create_manifest, spike-wrap-up.md's gather/synthesize/
write_skill, and the matching one-line update to sketch.md's MANIFEST.md
read) — none of it is incidental prose. Growth stays well under the DEFAULT
tier byte cap (40960) for all three files; PRE_PHASE6 does not apply to
them (only plan-phase.md/execute-phase.md).

* chore(#1700): backfill changeset PR number to 3014

---------

Co-authored-by: sim <sim@local>
2026-08-02 22:31:23 -04:00

9 lines
2.6 KiB
JSON

{
"version": 1,
"paths": {
"spike.md": "#1700: create_manifest step now derives an explicit idea key and restructures the .planning/spikes/MANIFEST.md template from one flat top-level `## Idea` / `## Requirements` pair (single-idea only) to `## Ideas` > `### {idea-key}` subsections, each carrying its own scoped Requirements list — the fix for the leak where one idea's requirements bled into another idea's build via spike-wrap-up.md. Growth is: the idea-key derivation instructions and the expanded MANIFEST.md template (new/existing-idea/pre-#1700-flat-shape-migration branches) in create_manifest; an Idea column added to the `## Spikes` table header everywhere it's referenced; an `idea:` field added to the build_spikes README frontmatter template; the reground step scoping its established-requirements check to the current idea only; the frontier_mode load step and 'Get Alignment and Execute' step describing per-idea sections instead of one flat idea; and two success_criteria bullets updated to call out idea-key scoping. This is the write side of the fix, not incidental prose.",
"spike-wrap-up.md": "#1700: gather/synthesize/write_skill steps now resolve each spike's idea key (from its README `idea:` frontmatter, falling back to the `## Spikes` table's Idea column for pre-#1700 spikes) and scope which Requirements they read and re-emit, so a feature-area reference or the generated spike-findings SKILL.md never pulls in an unrelated idea's requirements — the read/re-emit side of the #1700 fix. Growth is: the idea-key resolution instructions added to the gather step; the synthesize step's Requirements block rewritten to pull ONLY from the owning idea key(s) with an explicit 'never include a requirement from an idea key that has no spike in this group' rule; the write_skill step's <context> and <requirements> blocks scoped to the wrapped idea key(s) instead of 'the whole MANIFEST.md'; and one new success_criteria bullet forbidding blended requirements across ideas.",
"sketch.md": "#1700: sketch.md's build_sketches step (b) reads spikes/MANIFEST.md's Requirements for non-negotiable design constraints; once spike.md restructures that file from one flat Requirements section to per-idea `### {idea-key}` sections (same PR), sketch.md's single-flat-section instruction would silently go stale — collateral of the seam this fix touches, required so sketch.md keeps reading the file correctly rather than a defect introduced by this change. Growth is the one clause distinguishing per-idea sections and instructing the reader to check the Requirements list of the relevant idea key (or all of them if none clearly matches)."
}
}