Skip to content

feat(planning): build the plan view from PLAN.md with links to the Brief, criteria and decisions - #13438

Closed
melodic-automation-lanes[bot] wants to merge 3 commits into
mainfrom
work-resolve-issue/issue-13437-41963911377-1
Closed

melodic-automation-lanes[bot] wants to merge 3 commits into
mainfrom
work-resolve-issue/issue-13437-41963911377-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #13437
Refs: #6917

Summary

Opened by the work-resolve-issue lane. The run's own summary:

The planning plan view is now built from PLAN.md itself: lib/view-builder.mjs gains parsePlan beside parseDesign (per the issue's Plan view record contract), VIEW_KINDS.plan uses it, and plan JSON input is retired (D5). The plan-view template gains sections with ids brief, behaviors, criteria, decisions and phases, plus a nav of literal href="#..." links (D6); each phase shows its numbered name, Delivers and Satisfies, Sanity Checks and shape fences as pre text. The reply section and select#verdict are byte-identical. Choices made on evidence: (1) the runtime and validator bind only lowercase keys and cannot descend into a plain object, so VIEW_KINDS.plan wraps parsePlan in planView, which moves brief.problem/constraints/outOfScope to top-level problem, constraints and out-of-scope keys and shows 'Plan' when the record names no title (parsePlan itself returns the contract shape, title "" when absent). (2) A phase's criteria are its Sanity Check: lines (plan-template.md calls them the phase's criteria; acceptance-criterion ids stay on Satisfies), and its what is the rest of the phase text. (3) title comes from the first # heading or a ## Plan: <title> heading. Refs: #6917.

Not verified

  • bash plugins/planning/scripts/build-view.test.sh, node --test plugins/planning/scripts/deliver-view.test.mjs plugins/planning/scripts/page-input.test.mjs, lib/view-builder.test.sh, and the done-when command node plugins/planning/scripts/build-view.mjs plan --record…
  • scripts/sync-shared-copies.sh --check-bump origin/main: refused here (the lane's copy runs from outside the repository, and there is no origin/main); --check passes and every carrier has a fragment; left to the PR's CI
  • The PR body must carry Refs: #6917 (done-when item); the lane writes the PR body
  • Tidy not run: the change has 31 files across several areas and touches the shared path lib/, over the tidy cutoffs
  • Browser rendering checks in build-view.test.sh run only where Chrome is present; not run here
  • git status lists untracked .bash_profile, .bashrc, .gitconfig, .idea, .mcp.json, .profile, .ripgreprc, .vscode, .zprofile, .zshrc at the checkout root that this run did not create (they look like sandbox mount points); they are not part of the change and should be left out of the patch

Fix

  • lib/view-builder.mjs: markdownLines helper (fence-aware line scan shared with parseDesign), exported parsePlan per the contract, planView adapter, VIEW_KINDS.plan uses it; jsonRecord's rowList option, used only by the old plan kind, removed
  • plugins/{review,education,planning,architecture,debugging,discovery,work-items,machine-health}/lib/view-builder.mjs: regenerated from lib/view-builder.mjs by sync-shared-copies
  • lib/rendered-view.md: Planning section builds the plan view with --record <PLAN.md>, brainstorm keeps its JSON example; Data shapes describes what the plan view reads from PLAN.md
  • plugins/{planning,architecture,discovery,debugging}/reference/rendered-view.md: regenerated copies
  • plugins/planning/skills/plan/templates/plan-view.html: nav of #brief/#behaviors/#criteria/#decisions/#phases links, Brief/Behaviors/Criteria/Decisions/Phases sections, phases show Delivers, Satisfies, Sanity checks and shapes as pre; reply section unchanged
  • plugins/planning/scripts/build-view.mjs: header comment says plan and design read PLAN.md, brainstorm JSON; the not-JSON error names the kind
  • plugins/planning/scripts/testdata/plan-record.md: new fixture with Brief, Behavior, Process line, Decisions table, two phases and one shape fence
  • plugins/planning/scripts/build-view.test.sh: plan cases use the PLAN.md fixture and a hostile PLAN.md; bound-keys check reads the page's data; adds --record, parsed-content, nav-link and no-## Plan checks; JSON error cases move to brainstorm
  • plugins/planning/scripts/deliver-view.test.mjs: PLAN_RECORD is the PLAN.md fixture; parsePlan deepEqual, No Brief, missing-Plan and no-title tests
  • plugins/planning/skills/plan/SKILL.md: Step 5 offers the view built from the draft PLAN.md with --record, and says the view writes nothing back
  • plugins/planning/skills/plan/evals/evals.json: offers-built-plan-view case expects PLAN.md via --record, not piped JSON
  • docs/contracts/rendered-views/README.md and CHANGELOG.md: emitters list says planning:plan reads PLAN.md; changelog entry
  • .changes/planning/.md (minor) and .changes/{review,education,architecture,debugging,discovery,work-items,machine-health}/.md (patch): changelog fragments for the carriers

Verification

The runner ran each check from the base copy against f013edf:

  • scripts/check-changelog-fragments.sh --check: passed
  • scripts/check-changed-skills.sh --merge-base: passed

The run reports:

  • check-changelog-fragments: All 9 changelog fragment(s) under .changes/ are valid
  • check-changed-skills: CHECK-SKILL plan PASS, 0 errors, 5 warnings (all about existing SKILL.md size, description length and lines 70/checklist.md:14, none from this change)
  • check-affected: 13 passed, 6 skipped over 31 changed files (first run failed markdownlint on the fixture and shell-portability on a [\s\S] regex in build-view.test.sh; both fixed, rerun clean)
  • sync-shared-copies --check: All 678 registered copies match their canonical sources
  • check-evals-quality plugins/planning/skills/plan/evals/evals.json: PASS, 4 warnings on cases this change did not touch
  • cant-fail-scan --file plugins/planning/scripts/deliver-view.test.mjs --check: PASS, 23 blocks, no gating findings
  • Fresh-context review subagent: hand-traced parsePlan over the fixture against the deepEqual expectation, the hostile and browser-id cases, validator rules and runtime bindings, and byte-identity of the reply section; found only a docs inaccuracy in lib/rendered-view.md (criteria source, title…
  • read https: //github.com/melodic-software/claude-code-plugins/issues /6927#issuecomment-6643576981: Phase 4 of the plan maps VIEW_KINDS.plan to parsePlan, names the section ids and nav links, and gives no key-to-binding mapping
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/41963911377

Left out: the items under Not verified.

Related

#13437

Lane-Activity: work-resolve-issue/resolve-issue
@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed d0b80df2de06c56038b1b0970351b931a7f7cee6: read 10 of 10 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #13438, incremental (18fae3e → d0b80df)

I found no security issues in this push. This lane already reviewed an earlier head (blocking only: yes), so this review reports only CRITICAL and IMPORTANT findings. There were none of either.

What changed

  • parsePlan. In lib/view-builder.mjs and its eight synced copies under plugins/*/lib/view-builder.mjs, the regex that finds the behaviors heading changes from /^Behaviou?rs?$/ to /^Behav(?:ior|iour)s?$/. The old and new patterns match exactly the same strings: Behavior, Behaviour, Behaviors and Behaviours. Only the wording of the pattern changed.
  • plugins/planning/skills/plan/SKILL.md. One word changed: "public contracts" is now "public APIs" in the presentation-order guidance.

What I checked

  • Regex safety. The new pattern is anchored at both ends and its only quantifier is the final s?, so it cannot backtrack catastrophically. Its input is a heading in a PLAN.md file on the local machine. Rendering, publishing and the data flow are unchanged.
  • Instruction surface. The SKILL.md edit only changes wording. It deletes, narrows or softens no rule. The build-view.mjs requirement, the medium resolver, the publish gate and the ${user_config.medium} routing are all unchanged. Because nothing was removed, there was no removed rule to check against the protected-class register, so I did not consult it.
  • Identical copies. The eight plugins/*/lib/view-builder.mjs copies are plugin library paths, not hook, workflow, settings or manifest paths, so the same content does not act differently at any of them. I read the first copy's change. I read the root lib/view-builder.mjs hunk on its own, and it is the same edit.
  • Out of scope for this push. No trusted path, plugin manifest, workflow or trust control is touched.

Prior findings: the only earlier entry is the previous summary comment, which reported 0 findings, so nothing carries over.

critical-findings: 0

@melodic-automation-lanes

melodic-automation-lanes Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor Author

Unattended merge: native auto-merge leaves this pull request unarmed at head d0b80df2de06c56038b1b0970351b931a7f7cee6. The lanes clear this reason on their own; the next scheduled run judges it again.

a pr-unblock lane stopped its head (pr-unblock/fix-ci is failure), which clears when the lane runs
  again

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-review: 1 inline finding(s) on f013edf3e253d5762807b8e6981605970b59d698; the summary is in this lane's pull request comment.

claude-lane: claude-review

Comment thread lib/view-builder.mjs Resolved
@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed d0b80df2de06c56038b1b0970351b931a7f7cee6: read 10 of 10 changed file(s); 0 finding(s), 0 as inline comments.

Code review (incremental, 18fae3e → d0b80df)

No findings in this push. This lane already reviewed an earlier head, so this pass reports blocking findings only.

What changed. This push is a CI-fix commit with two edits that don't change behaviour:

  • parsePlan behaviors heading. In the root lib/view-builder.mjs and all 8 plugin carriers, the regex /^Behaviou?rs?$/ becomes /^Behav(?:ior|iour)s?$/. Both patterns accept the same four headings: Behavior, Behaviors, Behaviour and Behaviours. The match is anchored at both ends and neither pattern accepts anything else, so the Behaviors section is read exactly as before. The new form is most likely there for a spelling or word-list check that flagged the Behaviou?r fragment.
  • Plan skill wording. plugins/planning/skills/plan/SKILL.md changes "public contracts" to "public APIs" in the tweak-likelihood presentation-order paragraph. The guidance means the same thing. I searched plugins/planning for any test or fixture that pins the old phrase. The only matches are unrelated text in surface/tests/fixtures/responses.json and a separate sentence in skills/design/SKILL.md, so nothing breaks.

Carriers. The 8 plugins/*/lib/view-builder.mjs copies are byte-identical according to identical.txt. I read the first copy's change (architecture) and the root's change; each copy is at an ordinary lib/ path, so its location doesn't change what the code does.

Prior and settled threads. The earlier advisory on phase detection (discussion_r4476577251) was fixed at 18fae3e and resolved. This push doesn't touch the phase filter, so there is nothing to re-raise.

Verification. I didn't run any tests (this lane has no shell); CI checks them. The claim that the regexes match the same headings is my own reading of the patterns.

No instructions were found embedded in the PR context, settled-threads or prior-findings files.

Lane-Activity: pr-unblock/address-feedback
Lane-Thread: PRRT_kwDOTCGFQM6z7CCm
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

pr-unblock / address-feedback finished round 1 of max 4 on 18fae3e.

@melodic-automation-lanes

melodic-automation-lanes Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor Author

The pr-unblock lane stopped fix-ci on this pull request: the lane could fix a failing check only by weakening a required check, and the head has no fresh fixer round left (it ran one, or an earlier lane stop already spent its same-head retry), so a session builder takes it. The lane labels it needs-session for a session builder, who makes the change this lane cannot, and the run ends in a failing pr-unblock/fix-ci status on the head the lane gated.

When a retry on this head can change the outcome, the lane runs one on its own, up to its per-head cap, and edits this comment if it stops again; a run that does not stop clears the status. When no retry can (a review thread the lane does not take or settle, or a failing check after the retries are spent), a person resolves the threads or gets the checks green, then dispatches the workflow below: that run finds the cause gone and clears the status. On a pull request the lanes App opened, the dispatchers start that run once per stop; on any other, a person does. A new commit to the branch starts clean.

To run it again on this head now, dispatch the pr-unblock workflow:

gh workflow run pr-unblock.yml -R melodic-software/claude-code-plugins -f pr-number=13438 -f activity=fix-ci

@melodic-automation-lanes melodic-automation-lanes Bot added the needs-session A pr-unblock stop a session builder takes: a change the lane cannot make. Not an owner stop. label Nov 5, 2026
@kyle-sexton kyle-sexton added the do-not-merge Hard merge gate: do not merge while applied. label Nov 5, 2026
@kyle-sexton

Copy link
Copy Markdown
Member

Hold: superseded by #13447 (this head merged with main, plus the one stale title assertion at deliver-view.test.mjs:212 updated to the fixture's full H1). Releases when: #13447 merges; this PR is then closed.

@kyle-sexton

Copy link
Copy Markdown
Member

Closing as a duplicate of #13447, which carries this head plus the test fix and two review fixes the pr-unblock lane could not make (lane stopped ci-fix-weaken-retry, then ci-fix-weaken-required).

@kyle-sexton kyle-sexton closed this Nov 5, 2026
@github-actions
github-actions Bot deleted the work-resolve-issue/issue-13437-41963911377-1 branch November 5, 2026 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge Hard merge gate: do not merge while applied. needs-session A pr-unblock stop a session builder takes: a change the lane cannot make. Not an owner stop.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(planning): build the plan view from PLAN.md with links to the Brief, criteria and decisions

1 participant