Skip to content

Add the v3 audit and cleanup plan bundle - #175

Closed
CaliCastle wants to merge 2 commits into
devfrom
cali/audit-v3-plan-bundle
Closed

Add the v3 audit and cleanup plan bundle#175
CaliCastle wants to merge 2 commits into
devfrom
cali/audit-v3-plan-bundle

Conversation

@CaliCastle

@CaliCastle CaliCastle commented Jul 18, 2026

Copy link
Copy Markdown
Owner

Summary

  • add seven dependency-ordered advisor plans for test consolidation, retired Sanity tooling, unreachable v3 residue, dormant icon and shape switchboards, the Site Profile, the optional Operator Stack, and supported fork documentation
  • preserve the v3 direction: hand-picked direct icon imports remain, the old global icon/shape switching machinery is removed, and no worker cap is added without a reproducing failure
  • define a clone-and-fork contract with exact Site Profile validation, public-only and full-stack profiles, secret-safe checks, personal-content replacement rules, and guarded Cali-specific automation
  • add four motion plans for explicit route state, shared preview-card timing, instant keyboard lightbox actions, and same-frame article-map settlement while preserving pointer and touch behavior
  • reconcile the bundle with the current dev architecture and PRs Smooth article map motion and desktop progress #170 through Refine mobile article map expansion #172, including static/PPR admin security, current Media and Photos routes, zsh-safe profile restoration, keyboard-safe contribution cells, and mid-exit preview reversal

Scope

This PR is plan-only. It does not remove runtime code, alter production behavior, access provider data, or change hosted infrastructure. Every active plan remains TODO until implemented and verified separately.

Verification

  • pnpm test:unit: 107 files passed, 1,007 tests passed
  • bundle validation: all internal links, Markdown fences, inline code spans, zsh shell blocks, per-step Verify gates, base stamps, scope classifications, and index statuses passed
  • git diff --check origin/dev
  • exact changed-path check: 13 plan and index files only
  • independent advisor and motion cold reads completed with no remaining findings

Greptile Summary

This is a plan-only PR adding 13 Markdown files — seven advisor plans covering test consolidation, Sanity tooling retirement, v3 residue removal, design switchboard cleanup, a Site Profile interface, optional Operator Stack gating, and fork documentation, plus four motion plans for explicit route state, interruptible preview cards, and instant keyboard actions in the lightbox and article map. No runtime code, production behavior, or hosted infrastructure is changed.

  • Each advisor plan includes a baseline drift check command, a scoped file inventory, step-by-step actions, per-step Verify gates, and explicit STOP conditions; dependency ordering in the index table matches the stated rationale in the Dependency Notes section.
  • The four motion plans follow the established plans/ format, reference the design-language keyboard-instant rule, and account for the phone pointer sequences accepted in PRs Smooth article map motion and desktop progress #170 and Refine mobile article map expansion #172.
  • Plan 006 (Operator Stack gating) carries the highest execution risk — it touches ~80 files and gates provider initialization — and is correctly marked Risk: HIGH with a hard dependency on the committed Site Profile from plan 005.

Confidence Score: 5/5

Safe to merge — no runtime code, production behavior, or infrastructure is changed; every file is a Markdown plan document.

All 13 changed files are planning documents with no effect on running code. The plans are internally consistent, carry explicit drift checks and STOP conditions, and the dependency ordering in the index matches the stated rationale. The two observations are about plan usability and have no impact on the current codebase.

advisor-plans/006-gate-optional-operator-stack.md warrants careful reading before execution — it is correctly marked Risk: HIGH and gates ~80 files of provider initialization behind the Site Profile.

Important Files Changed

Filename Overview
advisor-plans/README.md New index for advisor plans with dependency table, execution order, confirmed architecture decisions, and rejected-findings audit log; well-structured and internally consistent.
advisor-plans/001-stabilize-unit-test-baseline.md Plan to consolidate PGlite fixture usage in rate-limit tests and remove Vitest subset duplication from Quality CI; scoped to three files with clear verify gates and STOP conditions.
advisor-plans/002-retire-sanity-port-tooling.md Deletion-only plan for three completed Sanity migration scripts and their references in package.json, README, and handoff docs; low risk and well-scoped.
advisor-plans/003-remove-unreachable-v3-residue.md Deletion-only plan removing five unreachable UI modules, one unused cookie export, one unused springs export, and two stale public assets; each candidate verified as having no consumers at the baseline commit.
advisor-plans/004-remove-design-switchboards.md Removes dormant icon-library and shape-radius switching machinery (853 lines) while preserving all current hand-picked direct icon imports; depends on plan 003 to shrink migration surface first.
advisor-plans/005-deepen-site-profile.md Large plan introducing a committed site.config.ts interface to consolidate scattered identity values; explicitly excludes authored content, secrets, and provider config from scope.
advisor-plans/006-gate-optional-operator-stack.md High-risk plan gating the full Operator Stack (AMA, Media, Photos, admin, Clerk, Neon) behind the committed site profile; touches ~80 files and has security implications for public-only forks.
advisor-plans/007-document-and-verify-forks.md Final advisor plan creating docs/forking.md, a read-only template checker, and cleaning up ~18.5 MB of obsolete v2 screenshots; correctly depends on plans 002, 004, 005, and 006.
plans/005-make-route-motion-state-explicit.md Converts the implicit missing-attribute opt-in for View Transitions to an explicit data-route-motion="pointer" value, making the contract fail-closed.
plans/006-make-preview-cards-interruptible.md Replaces CSS keyframe restart-from-zero animations with interruptible Motion transitions and adds one shared 300ms warm window across all preview-card triggers.
plans/007-make-lightbox-keyboard-actions-instant.md Uses event.detail===0 to skip the FLIP opening animation for keyboard-activated lightbox opens, consistent with the design-language instant-keyboard rule.
plans/008-make-article-map-keyboard-actions-instant.md Applies the same keyboard-instant convention to post-toc open/close, separating keyboard path from pointer/touch Motion animations; preserves the phone-island sequence accepted in PRs #170 and #172.
plans/README.md Retires plan 004 (Playwright removed at 932d321) and appends plans 005-008 with recommended execution order and dependency notes.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["001 - Stabilize unit-test baseline\n(Priority: P1, Effort: M)"]
    B["002 - Retire Sanity port tooling\n(Priority: P1, Effort: S)"]
    C["003 - Remove unreachable v3 residue\n(Priority: P1, Effort: S)"]
    D["004 - Remove design switchboards\n(Priority: P1, Effort: M)"]
    E["005 - Deepen Site Profile\n(Priority: P1, Effort: L)"]
    F["006 - Gate optional Operator Stack\n(Priority: P1, Effort: L, Risk: HIGH)"]
    G["007 - Document and verify forks\n(Priority: P1, Effort: M)"]
    M1["plans/005 - Explicit route motion state"]
    M2["plans/006 - Interruptible preview cards"]
    M3["plans/007 - Instant lightbox keyboard"]
    M4["plans/008 - Instant article-map keyboard"]
    C --> D
    E --> F
    B --> G
    D --> G
    E --> G
    F --> G
    A:::independent
    B:::independent
    C:::independent
    E:::independent
    M1:::motion
    M2:::motion
    M3:::motion
    M4:::motion
    classDef independent fill:#d4edda,stroke:#28a745
    classDef motion fill:#cce5ff,stroke:#004085
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A["001 - Stabilize unit-test baseline\n(Priority: P1, Effort: M)"]
    B["002 - Retire Sanity port tooling\n(Priority: P1, Effort: S)"]
    C["003 - Remove unreachable v3 residue\n(Priority: P1, Effort: S)"]
    D["004 - Remove design switchboards\n(Priority: P1, Effort: M)"]
    E["005 - Deepen Site Profile\n(Priority: P1, Effort: L)"]
    F["006 - Gate optional Operator Stack\n(Priority: P1, Effort: L, Risk: HIGH)"]
    G["007 - Document and verify forks\n(Priority: P1, Effort: M)"]
    M1["plans/005 - Explicit route motion state"]
    M2["plans/006 - Interruptible preview cards"]
    M3["plans/007 - Instant lightbox keyboard"]
    M4["plans/008 - Instant article-map keyboard"]
    C --> D
    E --> F
    B --> G
    D --> G
    E --> G
    F --> G
    A:::independent
    B:::independent
    C:::independent
    E:::independent
    M1:::motion
    M2:::motion
    M3:::motion
    M4:::motion
    classDef independent fill:#d4edda,stroke:#28a745
    classDef motion fill:#cce5ff,stroke:#004085
Loading

Fix All in Claude Code Fix All in Codex

Prompt To Fix All With AI
Fix the following 2 code review issues. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 2
advisor-plans/002-retire-sanity-port-tooling.md:5
**`trash` availability assumption**

Plans 002, 003, and 007 all instruct executors to delete files with `trash` rather than `rm`. `trash` (the `trash-cli` / `macos-trash` utility) is not present by default on most Linux CI runners or fresh macOS shells. An executor who follows the instruction literally on a system without it will get a `command not found` error mid-plan. The fallback option (`or a patch`) is mentioned but not explained — `git rm` achieves a safe, reversible deletion that is universally available and leaves a clean diff for review. Consider naming it explicitly, e.g. `` `git rm <file>` or `trash <file>` (requires `trash-cli` / `brew install trash`) ``.

### Issue 2 of 2
advisor-plans/README.md:20-28
**Soft execution ordering for plan 005 not signaled in the table**

The dependency column for plan 005 correctly shows `none`, but the Dependency Notes section says "executing it after the deletion plans keeps its identity inventory and diff smaller." An executor reading only the table would reasonably start plan 005 in parallel with 001–003, producing a larger and noisier diff than intended. Consider adding a parenthetical to the table cell (e.g. `none (run after 003/004 preferred)`) or promoting the recommendation to a `Note` callout directly above the table, so it is visible without scrolling past the dependency notes.

Reviews (1): Last reviewed commit: "docs: reconcile v3 audit plans" | Re-trigger Greptile

Greptile also left 2 inline comments on this PR.

Capture the prioritized cleanup, architecture, fork, and motion work with executable verification gates.

> **Executor instructions**: Follow this plan exactly and update only this
> plan's status row in `advisor-plans/README.md` when done. Delete files with
> `trash` or a patch, never `rm`. Stop on any STOP condition.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 trash availability assumption

Plans 002, 003, and 007 all instruct executors to delete files with trash rather than rm. trash (the trash-cli / macos-trash utility) is not present by default on most Linux CI runners or fresh macOS shells. An executor who follows the instruction literally on a system without it will get a command not found error mid-plan. The fallback option (or a patch) is mentioned but not explained — git rm achieves a safe, reversible deletion that is universally available and leaves a clean diff for review. Consider naming it explicitly, e.g. `git rm <file>` or `trash <file>` (requires `trash-cli` / `brew install trash`).

Prompt To Fix With AI
This is a comment left during a code review.
Path: advisor-plans/002-retire-sanity-port-tooling.md
Line: 5

Comment:
**`trash` availability assumption**

Plans 002, 003, and 007 all instruct executors to delete files with `trash` rather than `rm`. `trash` (the `trash-cli` / `macos-trash` utility) is not present by default on most Linux CI runners or fresh macOS shells. An executor who follows the instruction literally on a system without it will get a `command not found` error mid-plan. The fallback option (`or a patch`) is mentioned but not explained — `git rm` achieves a safe, reversible deletion that is universally available and leaves a clean diff for review. Consider naming it explicitly, e.g. `` `git rm <file>` or `trash <file>` (requires `trash-cli` / `brew install trash`) ``.

How can I resolve this? If you propose a fix, please make it concise.

Fix in Claude Code Fix in Codex

Comment thread advisor-plans/README.md
Comment on lines +20 to +28
| [003](003-remove-unreachable-v3-residue.md) | Remove unreachable v3 modules and artifacts | P1 | S | none | TODO |
| [004](004-remove-design-switchboards.md) | Remove the dormant icon and shape switchboards | P1 | M | 003 | TODO |
| [005](005-deepen-site-profile.md) | Put fork identity behind one Site Profile interface | P1 | L | none | TODO |
| [006](006-gate-optional-operator-stack.md) | Make the Operator Stack optional per site | P1 | L | 005 | TODO |
| [007](007-document-and-verify-forks.md) | Document and verify the supported fork workflow | P1 | M | 002, 004, 005, 006 | TODO |

Status values: `TODO`, `IN PROGRESS`, `DONE`, `BLOCKED: <reason>`, or
`REJECTED: <reason>`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Soft execution ordering for plan 005 not signaled in the table

The dependency column for plan 005 correctly shows none, but the Dependency Notes section says "executing it after the deletion plans keeps its identity inventory and diff smaller." An executor reading only the table would reasonably start plan 005 in parallel with 001–003, producing a larger and noisier diff than intended. Consider adding a parenthetical to the table cell (e.g. none (run after 003/004 preferred)) or promoting the recommendation to a Note callout directly above the table, so it is visible without scrolling past the dependency notes.

Prompt To Fix With AI
This is a comment left during a code review.
Path: advisor-plans/README.md
Line: 20-28

Comment:
**Soft execution ordering for plan 005 not signaled in the table**

The dependency column for plan 005 correctly shows `none`, but the Dependency Notes section says "executing it after the deletion plans keeps its identity inventory and diff smaller." An executor reading only the table would reasonably start plan 005 in parallel with 001–003, producing a larger and noisier diff than intended. Consider adding a parenthetical to the table cell (e.g. `none (run after 003/004 preferred)`) or promoting the recommendation to a `Note` callout directly above the table, so it is visible without scrolling past the dependency notes.

How can I resolve this? If you propose a fix, please make it concise.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Fix in Claude Code Fix in Codex

@CaliCastle

Copy link
Copy Markdown
Owner Author

The plan bundle has moved to GitHub Issues, which is this repository's source of truth for executable work:

All issues are labeled ready-for-agent. Native dependencies preserve the required execution order. Closing this PR unmerged; its branch is retained for history.

@CaliCastle CaliCastle closed this Jul 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant