Skip to content

feat(planning): planning views on the view registries with the shipped Artifact default - #12798

Draft
kyle-sexton wants to merge 4 commits into
mainfrom
feat/12650-planning-view-registry
Draft

kyle-sexton wants to merge 4 commits into
mainfrom
feat/12650-planning-view-registry

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

Closes #12650

Summary

Slice S2 of #12646. The plan, brainstorm and design views now render through one view-kind registry and the medium resolver. Planning ships a private Artifact as its default medium, behind the publish gate. The rendered-views contract records the planning views as the third named Artifact exception.

Fix

  • lib/view-builder.mjs holds the view-kind registry, VIEW_KINDS ({ id, parse, template, tier }), and render(laneId, kind, record). render builds only a kind that the lane registers in lib/view-registry.mjs. The plan and brainstorm shapes moved out of the planning script and into entries. The new design kind reads the ## Design section of PLAN.md; headings inside code fences count as text.

  • lib/view-registry.mjs: the planning lane registers plan, brainstorm and design, and its plugin default is artifact. NO_PAGE names the last step of the fallback chain.

  • plugins/planning/scripts/build-view.mjs --option ... runs four steps:

    1. Resolves the medium.
    2. Runs the publish gate when the medium publishes.
    3. Builds the page.
    4. Hands the page to the medium's registry entry.

    It then prints one JSON line with the delivery, followed by the report line. The skills and reference/rendered-view.md act on publish or page and name no medium value. The legacy build and --connect modes are unchanged.

  • The artifact default is shipped as the lane's plugin default. The medium userConfig default stays auto. A userConfig value counts as the reader's explicit choice (gateExplicit), so an artifact default there would skip the gate's visibility and credential checks. Leaving out --visibility keeps the default local.

  • The resolver CLI's JSON gains page and publishes fields. The session-written views in "Other optional views" can branch on them without naming a medium.

  • Synced copies:

    • view-registry.mjs now sits beside every view-builder.mjs copy: education, architecture, debugging, discovery and machine-health are new.
    • publish-gate.mjs is now copied into planning.
  • Planning evals are updated, and design case 20 is added. The contract gains the third exception paragraph and the design emitter entry. Fragments: planning minor, 10 carriers patch.

Verification

  • node plugins/planning/scripts/build-view.mjs design --record <PLAN.md> exits 0 and writes one design.html. This was run on the epic's real plan record and on a test fixture.
  • plugins/planning/scripts/deliver-view.test.sh (19 tests) includes a fake medium registered only in a fixture registry. It delivers a plan view with no skill edit. The gate keeps the default local for a PRIVATE repository, an unknown visibility and a credential-shaped record; a userConfig artifact publishes; the terminal medium builds no page.
  • All 12 view-related test lane files that scripts/plan-test-lanes.sh --base origin/main selects pass. That covers lib/view-builder.test.sh (render checks, plus an import check of every view-builder copy), lib/view-settings.test.sh, lib/publish-gate.test.sh, each plugin's build-view.test.sh, explain-change, checkup-view and morning-brief-view. plan-test-lanes.sh exits 0 with 0 unmapped.
  • scripts/sync-shared-copies.sh --check and --check-bump origin/main exit 0.
  • validate-cases.py plugins/planning/evals exits 0 with no FAIL. check-evals-quality.sh passes on the three skill eval sets.

Related

🤖 Generated with Claude Code

https://claude.ai/code/session_01VcupojdnckzkRQMdQRVNbt

session: html-plan

kyle-sexton and others added 2 commits November 3, 2026 03:18
…d Artifact default

The plan, brainstorm and design views render through one view-kind
registry in lib/view-builder.mjs, render(laneId, kind, record), and the
planning lane registers all three. A new design kind reads PLAN.md's
## Design section and builds from a checked-in template.

scripts/build-view.mjs --option resolves the medium, runs the publish
gate over a publishing medium, builds the page and hands it to the
medium's registry entry, so the skills name no medium value and print
the report line. A test delivers a plan view through a medium that
exists only in a fixture registry.

The planning lane ships artifact as its plugin default, not as the
userConfig default: a userConfig value counts as the reader's explicit
choice and would skip the gate's visibility and credential checks. The
contract records the planning views as the third Artifact exception.

The resolver CLI adds page and publishes to its JSON so session-written
views branch without naming a medium. view-registry.mjs is synced beside
every view-builder copy, and publish-gate.mjs into planning.

Closes #12650

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VcupojdnckzkRQMdQRVNbt
Regenerate the planning README's options table from the new medium
description, word the design data shape without a spaced code span, and
mark the embedded JavaScript regex in the view-builder test as portable.

Refs #12650

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VcupojdnckzkRQMdQRVNbt
@kyle-sexton kyle-sexton added the do-not-merge Hard merge gate: do not merge while applied. label Nov 3, 2026
kyle-sexton and others added 2 commits November 3, 2026 05:10

This branch has not been deployed

No deployments
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(planning): planning views on the view registries with the shipped Artifact default

1 participant