feat(plan): add polyphony plan write-plan verb (Phase 3 P7b foundation) - #83
Merged
Conversation
PolyphonyRequiem
changed the base branch from
sdlc/plan-derive-ancestor-chain
to
main
May 6, 2026 16:18
PolyphonyRequiem
force-pushed
the
sdlc/plan-level-rewrite
branch
from
May 6, 2026 16:18
487833e to
278e277
Compare
Pure file-IO verb that writes the architect's plan markdown to
plans/plan-{item_id}.md. Designed to be called from plan-level.yaml
AFTER `branch ensure-plan` has switched to the plan branch (file
sequencing fixed by P7b rubber-duck pass — see session files).
The verb is intentionally narrow:
- input: --item-id N --content-json '<JSON-encoded markdown>'
- output JSON: {item_id, path, bytes_written, content_sha256, unchanged, error?}
- no git ops, no manifest reads, no PR interaction
content_sha256 lets the workflow do an end-to-end integrity check
between architect output → committed PR artifact (one of the rubber-duck
recommendations to harden inline-string review).
Tests: 11 new in PlanCommandsWritePlanTests.cs (1772 -> 1783 total).
Type-agnostic lint clean. AOT-friendly (PolyphonyJsonContext registered).
Phase 3 P7b is being split per rubber-duck critique into:
- P7b-i: deterministic plan-PR substrate (this PR + 3-4 follow-ups)
- P7b-ii: advisory plan_reviewer agent
- P7b-iii: policy-controlled auto-merge
Critique saved to session files (p7b-rubber-duck-critique.md) for the
next planning conversation.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
PolyphonyRequiem
force-pushed
the
sdlc/plan-level-rewrite
branch
from
May 6, 2026 17:25
278e277 to
c339ce1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 3 — P7b foundation #1 of N
Pure file-IO verb that writes the architect's plan markdown to
plans/plan-{item_id}.md. Stacks on PR #82 (P7a). Workflow rewrite (the originalplan-level.yamlrewrite) is now split into multiple PRs per the rubber-duck critique below.Scope (intentionally tight)
polyphony plan write-plan --item-id N --content-json '<json-encoded markdown>' [--plans-dir plans]PlanWritePlanResult(item_id, path, bytes_written, content_sha256, unchanged, error)content_sha256is included so the workflow can verify end-to-end integrity from architect output → committed PR artifact (one of the rubber-duck recommendations)Why this verb (and not inline pwsh)
Rubber-duck pass on the broader P7b design (saved as
files/p7b-rubber-duck-critique.md) flagged inlineSet-Contentof multi-line markdown as fragile (quoting, encoding, no integrity check). A small verb is testable, AOT-friendly, and gives us the SHA-256 hook for free.What's NOT in this PR
The original P7 design (
plan-level.yamlrewrite) is being split per the duck's recommendation:plan commit-and-push,plan detect-state, fix topr open-plan-prto read manifest fromorigin/feature/{root}, then the actual workflow rewrite without LLM reviewer)plan_revieweragent (LLM posts comments only, per P7-pre identity decision)polyphony policy resolvegate beforemerge-plan-pr)10 blocking issues from the rubber-duck pass are tracked in the critique file for the next planning round.
Testing
Branch name nit
Branch is named
sdlc/plan-level-rewritebut this PR does not yet rewriteplan-level.yaml— that's the eventual P7b consumer flip after all the foundational verbs land. Branch will be reused for follow-up commits as the substrate stack grows; squash-merge here keeps one commit per PR per usual.