Maya Verification Guide
This guide documents the stable build, verification, evidence, and release-gate contract for the workspace. Detailed assertion inventories live beside the scripts and evidence fixtures that own them; this document should stay small enough to read before running a release.
Command Roles
pnpm buildbuilds the composition, Claude workspace, Data Lab sample module, protocol, UI, Docusaurus docs site, web, and backend packages.pnpm typecheckbuilds the workspace packages and then runs TypeScript checks for composition, Claude workspace, Data Lab sample module, protocol, UI, web, Docusaurus docs, and backend.pnpm typecheck:allassumes the required package build output already exists.pnpm verifybuilds the workspace packages and then runspnpm verify:built.pnpm verify:builtruns protocol contract checks, package-boundary checks, request-key guards, UI surface parity checks, UI unit, story coverage, token platform, token contract, Storybook build, visual matrix, a11y, bundle, and render gates, evidence safety checks, runtime reliability guards, and verification-document consistency checks against the current built package output.pnpm verify:fullrunspnpm build, web/UI bundle budgets, UI render budgets, and thenpnpm verify:built, so bundle budgets and protocol/UI/evidence parity checks use the same production build.pnpm verify:a11y-keyboardbuilds package/backend prerequisites and runs the keyboard plus structural axe Playwright suite.pnpm verify:a11y-keyboard:builtassumes those prerequisites are already built.pnpm release:gateruns a frozen install, early clean/source-boundary gates, package build and boundary checks, TypeScript checks, web/backend builds, bundle budgets, Playwright Chromium install, built verification, built keyboard/a11y checks, package dry-run, consumer smoke, docs/DX checks, supply-chain checks, and the final git diff plus untracked-file clean check. It intentionally does not runevidence:*capture scripts or visual evidence refresh smokes, so CI cannot refresh committed evidence records.
The command graph is centralized in tools/gate-commands.mjs; package scripts call tools/run-gate.mjs instead of restating long command chains.
Evidence Refresh
pnpm evidence:visualrefreshes the Chat, Projects, Customize, and Settings browser visual smoke evidence (smoke:chat,smoke:projects,smoke:customize:reuse, andsmoke:settings).pnpm evidence:allrunspnpm build, the protocol/action capture scripts, and thenpnpm evidence:visual, preventing stale build artifacts from being captured.pnpm evidence:official-live-shape -- --id <id> --surface <surface> --route <route>writes guarded official browser/CDP shape-only evidence from stdin. The writer preserves endpoint/status/header-name/visible-rect metadata and rejects persisted request bodies, response bodies, header values, browser storage, profile data, and unredacted dynamic challenge tokens.
Regenerated evidence belongs under projects/claude-protocol/protocol-captures/actions or the guarded .sessions locations referenced by the verifiers. Capture scripts must keep credential values, browser profile data, and browser storage out of committed evidence.
Surface Verification
pnpm verify:chat-surfacecompares controlled local Chat create/follow-up browser smoke evidence with the protocol request keys, SSE lifecycle, transcript DOM/layout, responsive viewport matrix, and source-level render guards.pnpm verify:customize-surfaceverifies the standalone Customize routes while reusing the single Projects browser smoke walker for shared Directory interactions.pnpm verify:projects-protocol,pnpm verify:projects-visual,pnpm verify:settings-surface, andpnpm verify:sidebar-surfaceown their corresponding evidence matrices and source guards.pnpm verify:surface-migration-mapvalidates the WCP-014 source-level map from current Claude UI surfaces to contribution descriptors, explicit v0 gaps, and the first safe visual parity milestone.- Chat, Projects, Customize, and Settings responsive visual-smoke checks derive the viewport matrix from
officialResponsiveViewportMatrix.
Coverage details and evidence ids are intentionally not duplicated here. Use projects/claude-protocol/protocol-captures/COVERAGE_MATRIX.md, each action directory's notes.md, and the matching tools/verify-*.mjs script as the source of truth for exact cases.
Evidence Safety
pnpm verify:evidencescans protocol captures, guarded official replication evidence, app sources, capture scripts, and root package scripts for credential-bearing headers, browser profile artifacts, browser storage, raw trace/session identifiers, and copied client identifiers.pnpm verify:evidence-structurevalidates action evidence JSON/NDJSON shape, screenshot provenance metadata, focused network records, screenshot file references, SSE event shape, and safe official/local origin flags.- Screenshot evidence must carry
action.screenshot.path,route,source,origin, andofficialClaudeAi. Local localhost-controlled screenshots useorigin: local-localhost-controlledandofficialClaudeAi: false; official screenshots must opt intoorigin: official-claude-aiandofficialClaudeAi: true.
Evidence verifiers should be updated when a new evidence shape is introduced. The verification guide should only gain durable rules, not one-off case inventories.
Package And Release Boundary
pnpm verify:package-boundarybuilds composition, Claude workspace, Data Lab sample module, protocol, and UI packages and verifies the machine-readable package registry, headless composition boundaries, namespace/conflict fixtures, WCP-010 policy fixture diagnostics, WCP-011 composition golden fixtures, WCP-013 Claude built-in descriptor fixtures, WCP-015/WCP-016 render runtime foundation, coverage validation, and behavior tests, WCP-018 AssistantWorkspace composition rendering, WCP-020 focused Vitest coverage for default Claude route inventory rendering, selector-miss route fallback, and built-in-only path matchers, WCP-019 Claude workspace runtime builder, WCP-021 first-party Data Lab sample module, WCP-022 module conformance checklist and sample-module failure fixtures, Claude built-in route/settings parity, public exports, declaration specifiers, public.d.tsrelease-impact classification including the highest required level, style scoping, asset freshness, and single implementation boundaries.pnpm verify:docs-dxexpands tonode tools/verify-docs-structure.mjs,pnpm verify:surface-migration-map,node tools/verify-docs-api-parity.mjs,node tools/verify-agent-capability-map.mjs, andpnpm verify:docs-site.pnpm pack:dry-runpacks composition/protocol/UI tarballs without installing a temp consumer and writes.tmp/reports/pack-dry-run.json.pnpm verify:package-registrychecks that everyapps/*andprojects/*package is classified intools/workspace-package-registry.mjs, root gates cover registered build/typecheck/package-boundary commands, public ABI snapshots exist where declared, and publishable metadata matches the npm release policy.pnpm smoke:consumerpacks composition/protocol/UI tarballs, installs them into temporary external consumers, runstsc --noEmitand Vite build, verifies duplicate package docs are absent, checks that UI public types and install metadata stay protocol-free while using@maya/assistant-compositionas an explicit peer, compiles the WCP-023 guide consumer without source-path imports, and runs the WCP-025 product-kit consumer throughcreateClaudeWorkspaceRuntimeplus an explicitAssistantWorkspacecomposition/render-runtime path. When run standalone from a clean workspace, runpnpm build:packagesfirst so workspace-private Claude workspace and Data Labdistentrypoints exist. The WCP-023 guide consumer and WCP-025 product-kit consumer are workspace-private package consumers for Claude workspace and Data Lab until their publishability is explicitly opened.- Canonical package docs stay in
.docs. Docs/API parity is enforced bynode tools/verify-docs-api-parity.mjs,pnpm verify:claude-workspace-runtimeguards the WCP-019 product-kit builder boundary,pnpm verify:sample-moduleguards the WCP-021 first-party module happy path,pnpm verify:sample-module:conformanceruns WCP-022 black-box failure fixtures, andpnpm verify:module-conformanceguards the WCP-022 module conformance checklist wiring while invoking the same failure fixtures. The WCP-023 happy path guide lives under.docs/guidesand is validated bypnpm smoke:consumer. Package tarballs intentionally exclude package-rootREADME.md,dist/docs/*, anddocs/*copies so there is no second documentation truth.
CI Policy
.github/workflows/release-gate.yml delegates to pnpm release:gate, uses read-only contents permissions, disables checkout credential persistence, and uploads ignored .tmp/reports plus a11y artifacts with missing files treated as warnings so report upload never masks an earlier gate failure. Required gates must not run evidence capture or committed evidence refresh scripts in CI.