Repository navigation
[Air #1900] feat: porch skip-phase — drop one plan phase after implement starts - #1908
Merged
Merged
Conversation
…nt starts Plan phases are snapshotted into status.yaml once, on entering implement, so a phase the owner drops from an approved plan stayed pending forever and review was unreachable. - New plan-phase status `skipped` (with skip_reason / skipped_at on the phase). - isPlanPhaseSettled (complete | skipped) drives getCurrentPlanPhase, allPlanPhasesComplete and advancePlanPhase; advancePlanPhase now steps over a skipped phase instead of blindly marking phaseIndex + 1 in_progress. - `porch skip-phase <id> <plan-phase> --reason "..." --a-human-explicitly-approved-this`: refuses without the human flag, without a reason, outside a per_plan_phase phase, and on unknown/complete/already-skipped phases. Skipping the last unsettled phase moves to review. - porch status shows skipped phases with their reason; Tower overview counts them as settled. - Porch skill docs (all four copies) document the command. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts: # .claude/skills/porch/SKILL.md # .codex/skills/porch/SKILL.md # codev-skeleton/.claude/skills/porch/SKILL.md # codev-skeleton/.codex/skills/porch/SKILL.md # packages/codev/src/commands/porch/index.ts
…rview test) - skipPlanPhase hands in_progress forward only, symmetric with advancePlanPhase. - overview progress test: a skipped plan phase counts as settled. Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Refuse skipping the last phase when the protocol has no 'review' phase. - Skipping a pending current phase hands in_progress forward. - porch status banner no longer names a skipped phase as "next". - CLI reports the missing human flag before a missing reason. - Skill doc: run skip-phase from the builder's worktree (porch pushes status.yaml). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
Author
|
Thank you, this fits porch's conventions well, and loading the real SPIR protocol.json in the tests (which caught the implement loop) was the right instinct. Independent integration reviews: codex REQUEST_CHANGES, claude APPROVE with follow-ups. I would like these folded in before it goes to the owner:
On the hard-coded Please keep to targeted tests while iterating and do not run the local e2e suite. |
- porch status keeps listing skipped plan phases (with reason) after implement. - skip-phase prints a refresh notice when it crosses a declared context-refresh boundary (enter:review / plan-phase:<next>); it cannot emit the task itself. - getNextPlanPhase is skip-aware; one nextUnsettledIndex helper for all three navigation sites; status banner uses it. - Builder card (n/m) and overview progress both leave skipped phases out. - Drop unused isPlanPhaseComplete import; skip-phase in arch.md's porch list; skill says the builder runs it after the architect relays the decision. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Summary
Porch copies the plan's phases into
status.yamlonce, on enteringimplement, and never re-reads them. A phase the owner drops from an approved plan therefore stays pending forever, and review is unreachable. This addsporch skip-phaseto drop one unbuilt phase from state, record why, and advance.Closes #1900
What Changed
skipped. The reason and time are stored on the phase itself (skip_reason,skipped_at) so they sit next to the phase they explain.isPlanPhaseSettled()(completeorskipped) now drivesgetCurrentPlanPhase,allPlanPhasesCompleteandadvancePlanPhase.porch skip-phase <id> <plan-phase> --reason "..." --a-human-explicitly-approved-this(commands/porch/index.ts):per_plan_phasephase, and on unknown, complete or already-skipped phases.iterationandbuild_complete, since that build/verify cycle belonged to the dropped phase.review.porch statusshows⊘ phase_3: UI (skipped: <reason>), during implement and after it, so the skip stays visible once the project is in review.(n/m)and Tower overview progress both leave skipped phases out: a skipped phase is dropped from the plan.enter:review, orplan-phase:<next>),skip-phaseprints that a refresh is due (/builder-refresh, thenporch next). It does not record the boundary; see Key Decisions..claude/.codex× instance/skeleton). Shipped-skill hashes regenerated.Key Decisions
The refresh is announced, not recorded. Porch can only emit a refresh task from
porch next, at the transition. Ifskip-phaserecorded the boundary, it would count as consumed with no task ever emitted, and the next normal-pathporch nextwould acknowledge it, silently swallowing the refresh. Emitting it properly needs new pending-refresh state plus a hook innext(), which would change Spec 1470's transition-keyed, at-most-once design.The hardcoded
'review'stays, for the architect to file. The schema makeson_all_phases_completeoptional with no default, and thenext.test.tsfixtures omit it. Reading it means either inventing a default or throwing on legacy protocols, which is a design call rather than a few lines.Option 1 only (skip-phase); no re-sync command. The issue said option 1 covers the reported case. A re-sync would need reconcile rules for reordered and renamed phases, and would still need the human gate because it also changes an approved plan.
Fixed a latent
advancePlanPhasebug. It markedphaseIndex + 1in_progress without checking it, which would bring a skipped middle phase back. It now steps to the next unsettled phase.Skipping the last phase targets
'review'literally, matchinghandleVerifyApproved.normalizePhasemaps a per_plan_phase phase'stransition.on_complete(implement itself) tonext, sogetNextPhase('implement')loops back to implement. A comment marks the two sites to change together.No context-refresh boundary fires on a skip. It is a manual command, not a
porch nexttransition, and a missed refresh costs only context (Spec 1470's asymmetric-cost rule).Test Plan
porch/__tests__/skip-phase-1900.test.ts, 15 tests. Covered:codev-skeleton/protocols/spir/protocol.json. A hand-written fixture withnext: 'review'had hidden the review-transition bug above.skip-phase-1900,plan,overview,skill-refresh,bugfix-1902-subcommand-help) 281/281;porch skip-phase --helplists the command. CI on this PR runs the full suite (no extra local full run, given the owner's machine-load concern).bin/porch.js: a throwaway SPIR project (git repo with a bareorigin), phases 1–2 complete and phase 3 in progress.implement → review, committed and pushed by porch.porch nextthen emitted the review-phase tasks.porch statusrendered the skipped phase with its reason.Flaky Tests
No tests were skipped (owner ruling: flaky pre-existing tests are reported and left running). Seen under machine load during porch's full-suite check:
packages/codev/src/__tests__/bootstrap-docs.test.tsfailed in one run (93s, load average ~20).packages/codev/src/__tests__/bugfix-1113-integration-base.test.tsfailed in the same run (32s).Both pass alone (65/65) and passed in the other full runs. Neither touches porch.
CMAP
Round 1 (gemini/agy lane skipped: broken for
--typereviews):Both had the same blocking cause: the branch was 27 commits behind main and conflicted in
porch/index.tsand all four porch SKILL.md copies. Both judged the implementation itself sound.printHelp(), so theskip-phasehelp lines were re-added there.skipPlanPhasesearched from index 0,advancePlanPhasefrom the current phase → Addressed. Both now handin_progressforward only.--reasongets folded by yaml → Addressed in docs. The skill doc asks for one short line.enter:reviewcontext refresh on skip → Rebutted. Porch fires refreshes atporch nexttransitions, and builders must not invoke/builder-refreshon their own.skip-phaseis run by a human, so there is no builder turn to hand a refresh task to.on_all_phases_completethroughnormalizePhaseso neither site hardcodes'review'→ N/A here. Both reviewers called it out of AIR scope, and it would touch the workinghandleVerifyApprovedrefresh path. The coupling comment marks both sites.Round 2, on the merged branch:
Claude's non-blocking polish was fixed in place:
reviewphase. Writing a phasenextwould read as "protocol complete" was worse than an error.in_progressforward too.porch status"DO NOT start " banner no longer names a skipped phase.porch skip-phase <id> <phase>reports the missing human flag before the missing reason.status.yamlin whichever checkout it runs from.Not done:
--reason(the doc asks for one line, and claude traced that yaml folding is harmless to Tower's parser).Architect integration review
codex = REQUEST_CHANGES, claude = APPROVE. Fold-ins:
enter:reviewandplan-phase:<next>cases.getNextPlanPhase: now skip-aware. OnenextUnsettledIndexhelper servesgetNextPlanPhase,advancePlanPhaseandskipPlanPhase; the status banner uses it. Addressed.overview.test.tsandBuilderCard.test.tsx.isPlanPhaseCompleteimport; addedskip-phasetoarch.md's porch command list; the skill says the builder runs it after the architect relays the human's decision. Addressed.Targeted tests only, no local e2e:
BuilderCard: 13/13Review Notes
advancePlanPhase(plan.ts). Its behavior changed for any phase list that contains a skipped phase; it is unchanged otherwise, and the existing tests still pass.skip-phaseis human-only, likeapprove. The skill doc says builders must not run it on their own.