Skip to content

docs(governance): frames are the design source of truth — retire the PenPot gate - #302

Merged
izzywdev merged 1 commit into
masterfrom
claude/frames-governance-fix
Jul 20, 2026
Merged

docs(governance): frames are the design source of truth — retire the PenPot gate#302
izzywdev merged 1 commit into
masterfrom
claude/frames-governance-fix

Conversation

@izzywdev

Copy link
Copy Markdown
Owner

CLAUDE.md mandated a PenPot design-review gate — "agents treat PenPot as the design source of truth" — while the ui-frame-contract skill, the billing-invoices reference frames, and the approved plan all treat in-repo HTML frames as authoritative.

Two contradictory governance rules with nothing reconciling them. An agent reading CLAUDE.md would have gone the wrong way, and that is not hypothetical — the entire design-first pipeline exists because governance that is skippable gets skipped.

PenPot is parked by owner decision. A design tool that lives outside the repo cannot be gated by CI. Frames are code: they diff, they review, they enforce.

What the section now says

  • product-designer — sole author of design/frames/**, never the implementer. The same separation contract-designer gives the backend: whoever is measured against the spec does not write it.
  • Frames are always their own PR, and its only content. Gated by gate-ds-conformance, gate-frames-schema, gate-frames-stamped.
  • Frames declare the build inventory (flows / components / packages) — approving the design approves the architecture.
  • Per-flow approval; reject re-dispatches the designer rather than closing the thread.
  • Merging approved frames triggers RED QA (specs fail before implementation exists), then components → orchestrators → packages.
  • States are contract, not decoration — reveal-once token, remove-last-factor → 409, last-admin, hasPassword: null.
  • gate-frames-first is what makes it mechanical rather than remembered.

Plan of record: docs/planning/design-first-ui-pipeline.md.

Note design-review-notify.yml still exists and fires on the design-review label — left alone deliberately, out of scope here; it can be repointed at frames PRs separately.

Refs #294

🤖 Generated with Claude Code

…PenPot gate

CLAUDE.md mandated a PenPot design-review gate ("agents treat PenPot as the design
source of truth") while the ui-frame-contract skill, the billing-invoices reference
frames, and the approved plan all treat in-repo HTML frames as authoritative. Two
contradictory governance rules with nothing reconciling them — so an agent reading
CLAUDE.md would have gone the wrong way, which is not a hypothetical: the whole
design-first pipeline exists because governance that is skippable gets skipped.

PenPot is parked by owner decision. A design tool that lives outside the repo
cannot be gated by CI; frames are code — they diff, they review, they enforce.

Rewrites the section around the real pipeline: product-designer (never the
implementer) authors frames → frames-only PR → per-flow approval → merge triggers
RED QA specs → frontend-engineers build to them. Records that states are contract
(reveal-once token, remove-last-factor 409, last-admin, hasPassword: null), and
that gate-frames-first is the rule that makes it mechanical.

Refs #294

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session-Id: f636c22e-1cd7-401e-8843-97e3e3a4ba01
@izzywdev izzywdev added the auto-merge Enable squash auto-merge once CI passes label Jul 17, 2026
@github-actions
github-actions Bot enabled auto-merge (squash) July 17, 2026 09:48
@github-actions

Copy link
Copy Markdown
Contributor

Root cause

The Playwright e2e tests (auth-simple.spec.ts, clock-load.spec.ts) wait for a successful POST /api/v1/security/session response (status 200) after the user submits the login form. The frontend's authAPI.login() calls exactly that endpoint (SECURITY_BASE = '/v1/security', api.post('/v1/security/session', ...)). But the backend only had POST /api/auth/login — there was no /api/v1/security route at all. Every login call returned 404, the waitForResponse timed out after 15 s, and both tests failed.

The gap: the frontend was updated to talk to the provider-neutral Security API (@fuzefront/security-client contract), but the corresponding backend routes were never added.

Fix

Added backend/src/routes/security.ts with the four endpoints the security-client contract requires:

Method Path Description
GET /api/v1/security/methods Advertise available auth capabilities (AuthMethods shape)
POST /api/v1/security/session Password login → SessionResult with status: 'authenticated'
GET /api/v1/security/session Current identity ("me")
DELETE /api/v1/security/session Logout / revoke session

The POST /session response includes { status: 'authenticated', token, sessionId, user } which matches the SessionResult discriminated union the frontend checks before persisting the session. The legacy /api/auth/* routes are untouched for backwards compatibility.

Registered the new router in backend/src/index.ts at /api/v1/security.

Fixes the failing "Playwright sign-in flow" job in PR #302.

Refs #302

🤖 Generated with Claude Code

@github-actions

Copy link
Copy Markdown
Contributor

Fix branch: claude-auto-fix-ci-claude/frames-governance-fix-29571596299

The fix commit is pushed to that branch. Please open a PR from it targeting claude/frames-governance-fix to merge the fix, or cherry-pick commit c0f57c9 directly onto the PR branch.

@izzywdev
izzywdev merged commit fc71a52 into master Jul 20, 2026
45 of 47 checks passed
@izzywdev
izzywdev deleted the claude/frames-governance-fix branch July 20, 2026 11:54
@izzywdev
izzywdev restored the claude/frames-governance-fix branch July 27, 2026 11:43
@izzywdev
izzywdev deleted the claude/frames-governance-fix branch July 27, 2026 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-merge Enable squash auto-merge once CI passes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant