Repository navigation
PHAX: A plan's own approval is never ground change - #121
Merged
lbdremy merged 4 commits intoOct 6, 2026
Merged
Conversation
Approving a plan commits two files after the recorded baseline: the plan's own frontmatter and its own record file docs/plans/approvals/<plan>.json. A plan whose footprint named either one read its own approval commit as ground-changed and was stale at once. computeStaleness now takes the plan's path and removes two paths from the changed files before intersecting them with the footprint: the plan's own path and its own record file (approvalRecordPathFor). The plan's content is still judged by self-changed through the fingerprint. Another artifact's record and the plan's own sidecar are still ground evidence when the footprint names them. The baseline, the record format, the transition and the staleness reasons are unchanged. Covered by a unit table in the lineage tests and a real-git integration test: a plan that names its own path and record is fresh right after approve, and stale with ground-changed once another footprint file changes. --- Run-Id: a-plan-s-own-approval-is-never-ground-change-1791288092809 Short-Name: a-plan-s-own-approval-is-never-ground-change Phase-Id: phase-01 Phase-Title: Exclude the plan's own path and record from ground change Model: claude-opus-5-5 Effort: medium Worktree: /Users/remyloubradou/.phax/worktrees/phax.a-plan-s-own-approval-is-never-ground-change/phase-01 Session-Id: ea160315-df7e-4379-b5a5-dfe65b84471c Gate-Log: /Users/remyloubradou/.phax/runs/phax.a-plan-s-own-approval-is-never-ground-change/phase-01/checks-attempt-01.log
Remove the README known issue "A plan is stale right after its approval": a plan's own path and its own approval record file are no longer ground-change evidence. In NEXT_STEPS.md, tick the Small follow-ups item about a plan stale at its own approval. It was fixed by approval-record-files, which removed the shared ledger, and by own-approval-ground, which excludes the plan's own path and record. Close the Road to 1.0.0 happy-path defect item now that both happy-path defects are fixed, and drop the abandoned approval-ground from the drafts waiting on the author. --- Run-Id: a-plan-s-own-approval-is-never-ground-change-1791288092809 Short-Name: a-plan-s-own-approval-is-never-ground-change Phase-Id: phase-02 Phase-Title: Retire the known issue and the backlog items Model: claude-sonnet-5-5 Effort: low Worktree: /Users/remyloubradou/.phax/worktrees/phax.a-plan-s-own-approval-is-never-ground-change/phase-02 Session-Id: d5c9935b-6488-49bf-8734-6ab5419a2e1e Gate-Log: /Users/remyloubradou/.phax/runs/phax.a-plan-s-own-approval-is-never-ground-change/phase-02/checks-attempt-01.log
Transitions docs/plans/2610060955-own-approval-ground-plan.md to Completed (complete).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01631MJFtTysHkTWA6647ARp
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.
PHAX Run Review Handoff
Generated by PHAX.
Run Review Handoff
Run summary
phax/a-plan-s-own-approval-is-never-ground-change--phase-02Global File Reconciliation
Run: phax.a-plan-s-own-approval-is-never-ground-change
Global unplanned changes
None.
Global missing planned changes
None.
Global review attention points
No attention points.
Deviations not explained in any handoff
None.
Plan compliance review
Plan-compliance review
Verdict
conformant — both phases delivered what the plan specified, with no file deviations.
Per-phase findings
phase-01 — Exclude the plan's own path and record from ground change
ComputeStalenessInput.planPath(required) exists insrc/domain/artifact/lineage.ts.computeStalenessderives the record path viaapprovalRecordPathForand excludes the plan's own path plus the record (null-safe for loose plans).src/app/planStaleness.tspassesplanPathtocomputeStaleness.run.ts.computeStalenessForPlansignature is unchanged.fix(staleness): a plan's own approval is never ground change, which matches the planned subject.phase-02 — Retire the known issue and the backlog items
approval-groundremoved from the drafts line.docs: a plan is no longer stale at its own approval, which matches the plan.Unplanned-change ledger
None. The reconciliation shows all six files as matched.
Unmet-promise ledger
None found.
Attention points
approval-groundin historical text (lines ~165–187). This is consistent with "keep the item's history text".own-approval-groundas "Draft" in the kept history text. The plan is now complete, so this is a minor staleness in prose the plan said to keep.Phase details
phase-01 — Exclude the plan's own path and record from ground change
File reconciliation
PHAX File Reconciliation
Planned to edit
Summary: No deviations from the planned file lists.
Phase handoff
What was delivered
ComputeStalenessInputinsrc/domain/artifact/lineage.tshas a new requiredplanPath: string(repo-relative path of the plan being judged).computeStalenessremoves the plan's own path andapprovalRecordPathFor("plan", planPath)(when not null) fromchangedFilesSinceBaselinebefore the footprint intersection.ground-changedevidence lists only the remaining files.computeStalenessForPlaninsrc/app/planStaleness.tspassesplanPathin all threecomputeStalenesscalls. Its signature and error channel are unchanged.tests/unit/artifact/lineage.test.ts(describe "computeStaleness: a plan's own approval is never ground change"), cases (a)–(g) as planned. Every existingcomputeStalenesscall now passesplanPath: JUDGED_PLAN.tests/integration/approvalRecordGround.test.ts, with two tests: fresh right after approve; stale withground-changed[src/feature/pi.ts]after a later commit.Key decisions and why
self-changedandspec-changedlogic and evidence order are unchanged.approvalRecordPathForreturns null) excludes only its own path.Exact locations (file paths and exported names)
src/domain/artifact/lineage.ts:ComputeStalenessInput.planPath,computeStalenesssrc/domain/artifact/approvalRecordFile.ts:approvalRecordPathFor(imported, unchanged)src/app/planStaleness.ts:computeStalenessForPlan(signature unchanged)What the next phase needs to know
src/cli/commands/run.ts,computePlanStaleness, the CLI docs, the record schema andSTALENESS_REASONSwere not touched.baseline, because its expected verdict (fresh) carries none.ground-changed.phase-02 — Retire the known issue and the backlog items
File reconciliation
PHAX File Reconciliation
Planned to edit
Summary: No deviations from the planned file lists.
Phase handoff
What was delivered
approval-record-files,own-approval-ground;approval-groundabandoned).approval-groundremoved from the drafts waiting on the author.Key decisions and why
Exact locations (file paths and exported names)
What the next phase needs to know
approvals.jsonor a record file out of a plan's lists.phax-clionly describes record files. No skill file was edited.phax.usage.kdl,docs/cli/reference.md,src/cli/cliDocs.ts) and archived artifacts were not touched.