Skip to content

Add scaffoldingToStrip to pin the dod.md pr-ready strip - #2043

Open
lore-agent[bot] wants to merge 4 commits into
mainfrom
lore/implementation-loop/issue-1987
Open

lore-agent[bot] wants to merge 4 commits into
mainfrom
lore/implementation-loop/issue-1987

Conversation

@lore-agent

@lore-agent lore-agent Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

.lore/dod.md is scaffolding that each implementation-loop pod leaves on the branch for the next pod to read. Before #1914 squash-merged it onto main, the only thing standing between the file and a reviewer was an agent prompt's git rm .lore/dod.md in the pr-ready recipe — a discretionary act that #1914's pod skipped. Every implementation-loop branch opened since then hits an add/add conflict when it merges main.

The fix lives in markPrReady (the deterministic Floor-side step that updates the PR body and un-drafts the PR), not in the agent prompt. That step already imports its pure helpers from apps/floor/src/work/assembly-run/spec-pr.ts, so the strip decision belongs there alongside readyPrBody and decideMarkReady. This branch adds the pure half: scaffoldingToStrip(branchFiles) filters a branch's file list down to the implementation-loop scaffolding that must never reach a reviewer — today just .lore/dod.md, expressed as the SCAFFOLDING_PATHS constant so future scaffolding can be added in one place.

The acceptance test in spec-pr.test.ts pins the contract: given a branch file list that includes .lore/dod.md alongside real changes, scaffoldingToStrip returns only .lore/dod.md. The test is appended after the last existing describe block and uses a dynamic await import("./spec-pr.js") inside the it() so no new static import shifts the file's existing line numbers (48 ESLint errors from stale spec anchors was the earlier failure mode here, documented in the dod/1987 memory). The spec statement in specs/implementation-loop/spec.md at the FR6 scaffolding line now carries a traceability link to that test at L540.

The wiring — calling scaffoldingToStrip from markPrReady and deleting the returned paths via a new branch-delete port op — is the remaining facet. commitFile today only creates or updates; a delete op does not exist yet. That is the next pod's job; this branch gives it a tested, exported entry point to wire against.

The strategy in specs/implementation-loop/spec.md has not changed; the prose on the FR6 scaffolding statement still describes the agent's final commit rather than the deterministic strip. That amendment is also deferred to the next pod, which will have concrete code to describe.

Refs #1987
Lore-Task: 0640f936-5df4-492b-aa9d-4aa199e4d328

@github-actions

Copy link
Copy Markdown

🔍 Lore Spec Impact — advisory

This PR touches 9 statement(s) across 2 spec(s), and changes the validating tests alongside every one of them.

Weaker signals (9) — linked by a spec, not proven by a test run

Feature Specification: Dark Factory Mode · 2 statement(s)

specs/6-dark-factory/spec.md

FR6 — Assembly line identity
✓ this PR also changes the tests that validate it

FR6.48 (added 2026-08-18) A push that delivered NOTHING must fail its line, not park it. GitHub refusing the PR w…

validated by apps/floor/src/work/assembly-run/spec-pr.test.ts:494
via changed file apps/floor/src/work/assembly-run/spec-pr.test.ts

FR6 — Assembly line identity
✓ this PR also changes the tests that validate it

FR6.33 (added 2026-08-13) The PR a push node produced MUST be recorded on its assembly line. Nothing did: the p…

validated by apps/floor/src/work/assembly-run/spec-pr.test.ts:494
via changed file apps/floor/src/work/assembly-run/spec-pr.test.ts

Feature Specification: Implementation Loop · 7 statement(s)

specs/implementation-loop/spec.md

FR4 — Waiting on the pull request
✓ this PR also changes the tests that validate it

The run's PR leaves draft exactly when the step that just succeeded hands off to the wait, and the flip is Floor-side b…

validated by apps/floor/src/work/assembly-run/spec-pr.test.ts:494
via changed file apps/floor/src/work/assembly-run/spec-pr.test.ts

FR14 — What a pod needs to hand work on
✓ this PR also changes the tests that validate it

A line's PR CLOSES its ticket rather than referencing it, and carries the Lore-Task: trailer — except on a task-less …

validated by apps/floor/src/work/assembly-run/spec-pr.test.ts:494
via changed file apps/floor/src/work/assembly-run/spec-pr.test.ts

FR14 — What a pod needs to hand work on
✓ this PR also changes the tests that validate it

The close is conditional on COVERAGE (amended 2026-09-03, #1745): when the pr-ready node judges the branch resolves…

validated by apps/floor/src/work/assembly-run/spec-pr.test.ts:494
via changed file apps/floor/src/work/assembly-run/spec-pr.test.ts

FR14 — What a pod needs to hand work on
✓ this PR also changes the tests that validate it

The ready flip RECOMPOSES the body it rewrites: the pr-ready node's prose plus the same footer the draft carried. `pull…

validated by apps/floor/src/work/assembly-run/spec-pr.test.ts:494
via changed file apps/floor/src/work/assembly-run/spec-pr.test.ts

FR14 — What a pod needs to hand work on
✓ this PR also changes the tests that validate it

A pull request is TITLED after its work, never after its branch (amended 2026-09-03, #1756). Every backlog PR was cal…

validated by apps/floor/src/work/assembly-run/spec-pr.test.ts:494
via changed file apps/floor/src/work/assembly-run/spec-pr.test.ts

FR14 — What a pod needs to hand work on
✓ this PR also changes the tests that validate it

The ready flip RENAMES the pull request as well as rewriting its body: the pr-ready node has read the finished branch…

validated by apps/floor/src/work/assembly-run/spec-pr.test.ts:494
via changed file apps/floor/src/work/assembly-run/spec-pr.test.ts

FR12 — A line can hold its pull request in draft
✓ this PR also changes the tests that validate it

Whether a line's PR opens as a draft is read off the RUN, never off the blueprint name, so the Floor stays domain-free …

validated by apps/floor/src/work/assembly-run/spec-pr.test.ts:494
via changed file apps/floor/src/work/assembly-run/spec-pr.test.ts

1 changed statement(s) had no validating test, so no coverage broke. 1 new statement(s) have no test link yet.

Deterministic · graph @ cbc805d (projected 2026-09-12) · 1 file(s) skipped: changed since the graph last saw them, so their line numbers no longer line up · no tests run by this check

Lore Agent and others added 2 commits September 12, 2026 22:16
Exports scaffoldingToStrip(branchFiles) from spec-pr.ts so the
deterministic pr-ready step can identify and delete .lore/dod.md
from the branch before un-drafting the PR, whatever the agent pod did.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@lore-agent lore-agent Bot changed the title A run's .lore/dod.md leaked onto main with #1914 Add scaffoldingToStrip to pin the dod.md pr-ready strip Sep 12, 2026
@lore-agent
lore-agent Bot marked this pull request as ready for review September 12, 2026 22:33
@lore-agent

lore-agent Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor Author

Spec anchors landing nowhere (deterministic check at the ready flip)

These #Lnn links in this branch's changed markdown do not resolve to a
citable line on the branch head. A link onto a blank or comment line is a
broken claim — repoint it at the assertion it validates.

  • specs/implementation-loop/spec.mdlibs/assembly-lines/src/implementation-loop-line.test.ts#L83 — blank line

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants