diff --git a/AGENTS.md b/AGENTS.md index 2e577d8..af0d9ed 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -5,6 +5,8 @@ - This repository is `open-proofline/web-client`. - This is the Proofline web client only. The current backend source of truth is `open-proofline/server`. +- The project-level public governance, political alignment, public voice, and + reusable README baseline source of truth is `open-proofline/website`. - Do not implement backend features here. - Do not add browser decryption unless explicitly scoped and threat-modeled. - Do not add recording or capture behavior here. @@ -38,6 +40,17 @@ ## Commands +For documentation or reusable-prompt-only changes: + +```bash +npx prettier --check \ + README.md AGENTS.md SECURITY.md CHANGELOG.md \ + docs/*.md codex/*.md codex/prompts/*.md +git diff --check +``` + +For frontend source, route, browser-flow, auth, API-client, or behavior changes: + ```bash npm run typecheck npm run lint @@ -56,3 +69,10 @@ Check that changes remain frontend-only, do not overpromise production status, do not introduce browser decryption or key unwrapping, keep token persistence explicit and reviewable, preserve accessible loading/error/empty states, and keep server facts tied back to `open-proofline/server`. + +When changes touch README structure, public voice, governance, +cooperative/public-good framing, political alignment, funding posture, or +source-of-truth mapping, check the current `open-proofline/website` README, +`docs/governance-and-political-alignment.md`, and +`docs/repository-readme-baseline.md` instead of rewriting those project-level +claims here. diff --git a/CHANGELOG.md b/CHANGELOG.md index 80db715..d9682d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ ## Unreleased +- Refreshed README, documentation, and reusable Codex workflow guidance to + consume the website repository's governance, public voice, source-of-truth + map, and README baseline while preserving web-client-specific boundaries. +- Clarified that server-supported account second-factor routes remain outside + the current web-client UI and API-client method surface. - Documented end-user web-client product design direction for user-facing language, trusted-contact invite/accept flows, viewer-link UX, future viewer map/location behavior, future browser capture framing, and product-design diff --git a/README.md b/README.md index 85bd164..4482fc6 100644 --- a/README.md +++ b/README.md @@ -1,42 +1,131 @@ # Proofline Web Client -> This is an experimental Proofline web client prototype. It does not implement recording, browser decryption, trusted-contact decryption, key escrow, playable media export, emergency dispatch, or production safety workflows. -> -> Users or trusted contacts remain responsible for contacting emergency services. +
-Proofline Web Client is the experimental React account and incident-review client -for the planned `open-proofline/web-client` repository. It is a frontend-only -prototype for authenticated account/session state, owned incident metadata, -incident detail review, stream/chunk metadata, contact public-key metadata, -sharing-grant metadata, and wrapped-key metadata. +Proofline is experimental public-interest open-source privacy and evidence +infrastructure. This repository contains the React web client and account portal +prototype for authenticated account flows, incident metadata review, contact and +sharing metadata, wrapped-key metadata review, and conservative browser session +handling. -The current backend source of truth remains -[`open-proofline/server`](https://github.com/open-proofline/server). This repo -must not make independent claims about backend behavior when the server docs -disagree or have moved. +Proofline is not an emergency service, emergency dispatch system, +emergency-services integration, staffed response center, or guaranteed +real-time response system. Users and trusted contacts remain responsible for +contacting emergency services. -End-user product language and interaction direction are documented in -[End-User Web Client Design](docs/end-user-web-client-design.md). That document -defines how the prototype should evolve from technical metadata review toward a -normal user-facing account, incident review, trusted-contact, viewer-link, and -future fallback capture experience without changing current runtime behavior. +## Current Status -## Stack +This repository is experimental and maintainer-led. It is not production-ready +emergency infrastructure, a production account portal, or production public API +deployment approval. + +Current web-client status: - Vite, React, and TypeScript -- TanStack Router -- TanStack Query -- Zod -- Tailwind CSS with the Vite Tailwind plugin -- Tailwind Catalyst component sources used inside this app -- Vitest, Testing Library, MSW, and Playwright +- TanStack Router route definitions under `src/routes/` +- TanStack Query for server state +- Zod schemas near the API client under `src/api/` +- auth/session code under `src/auth/` +- app-specific components under `src/components/proofline/` +- Tailwind CSS with Catalyst component source used inside this app +- prototype mock mode by default +- live mode for reviewed local backend testing +- explicit bearer-token and browser-cookie auth client modes +- frontend CI for dependency audit, typecheck, lint, unit tests, build, and + Playwright smoke tests -## Setup +## What This Repository Is -```bash -npm install -cp .env.example .env -``` +`open-proofline/web-client` is the frontend account and incident-review +prototype for Proofline. + +It currently includes: + +- login/logout prototype flow +- public registration form flow against the current server registration + contract +- browser email-verification route that reads a URL fragment token and clears it + from the address bar +- authenticated app shell +- account profile and password-change UI +- memory-first bearer session state, with optional local-storage persistence + for local development only +- explicit browser-cookie auth mode with in-memory CSRF token handling +- incident list UI backed by prototype mock data in mock mode and authenticated + owner-scoped `GET /v1/incidents` responses in live mode +- incident detail, stream, chunk, contact public-key, sharing-grant, and + wrapped-key metadata review +- owner incident deletion status and request UI +- wrapped-key delivery revocation UI for account-owned records +- safe loading, empty, and error states +- visible experimental and emergency-reliance warnings + +Current screens still expose some technical metadata. Future user-facing work +should follow [End-User Web Client Design](docs/end-user-web-client-design.md): +lead with human status, next actions, access state, and safety boundaries, and +move technical details behind advanced or developer-focused disclosure. + +## What This Repository Is Not + +This repository is not: + +- the Go backend +- the static public website +- an iOS or Android app +- a protocol implementation +- a production recording client +- an emergency service, emergency dispatch system, or staffed response center +- a notification delivery system +- a decryption service +- key escrow +- a hosted-account billing system +- a public admin/operator surface +- production public `/v1` deployment approval +- a standalone Catalyst, Tailwind, or UI component kit + +Do not add backend behavior, API behavior changes, recording/capture, +notification delivery, hosted-account billing, payment-gated access, browser or +backend decryption, trusted-contact decryption, raw key storage, key escrow, +playable export, public admin/operator surfaces, mobile-client behavior, or +protocol behavior here unless the maintainer explicitly changes the repository +strategy. + +## Source-Of-Truth Map + +Use the right source for the claim: + +| Topic | Read | +| ----------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Web-client behavior, prototype limits, local development, and validation | This repository: `README.md`, `AGENTS.md`, `SECURITY.md`, and [docs/](docs/README.md) | +| End-user web-client product direction | [docs/end-user-web-client-design.md](docs/end-user-web-client-design.md) | +| API client behavior and route assumptions | [docs/api-client.md](docs/api-client.md), then verify backend facts against `open-proofline/server` | +| Backend behavior, deployment, API, auth, registration, billing placeholders, and security facts | [`open-proofline/server`](https://github.com/open-proofline/server) | +| Public web-client deployment boundary | [`open-proofline/server/docs/public-web-client-deployment-boundary.md`](https://github.com/open-proofline/server/blob/develop/docs/public-web-client-deployment-boundary.md) | +| Project public website and public framing | [`open-proofline/website`](https://github.com/open-proofline/website) | +| Governance, political alignment, and public-good posture | [`open-proofline/website/docs/governance-and-political-alignment.md`](https://github.com/open-proofline/website/blob/main/docs/governance-and-political-alignment.md) | +| Reusable Proofline README structure and public voice | [`open-proofline/website/docs/repository-readme-baseline.md`](https://github.com/open-proofline/website/blob/main/docs/repository-readme-baseline.md) | +| Organization-level overview | [`open-proofline/.github`](https://github.com/open-proofline/.github) | + +Keep repository-specific facts in the repository that owns them. Keep +project-wide governance posture in the website repository. + +## Current, Prototype, Planned, And Not Implemented + +| Category | Web-client boundary | +| -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Current in this repo | Login/logout, registration form, email verification route, account overview, account password change, incident list/detail metadata review, contact public-key metadata management, sharing-grant metadata management, wrapped-key metadata review and revocation, owner deletion request UI, mock mode, bearer and cookie auth client modes. | +| Prototype/mock only | Sample account and incident records for local testing. Mock mode does not create accounts, send email, verify real tokens, model billing, prove server behavior, or approve public deployment. | +| Server-supported facts to verify | Current `open-proofline/server` docs cover local account sessions, configurable registration, email verification, browser-cookie auth and CSRF when enabled, account second-factor setup and per-session verification routes, owner-scoped incident list/detail routes, contact public-key metadata, owner-scoped sharing grants, wrapped-key metadata, viewer-token create/revoke routes, encrypted bundle downloads, and public deployment review boundaries. | +| Planned or design-only | End-user language cleanup, account second-factor setup UX, invite/accept trusted-contact flows, automatic client-managed contact key creation, durable viewer-link management, web-client no-account viewer, browser capture fallback, payment-backed hosted account lifecycle, notification delivery, and trusted-contact account access. | +| Not implemented and not implied | Production readiness, emergency dispatch, emergency-services integration, guaranteed response, staffed response center, production browser recording, production mobile capture, trusted-contact notifications, live context sharing, backend decryption, browser decryption, trusted-contact decryption, raw server-held media keys, key escrow, hosted-account billing as live behavior, public production admin/operator surfaces, legal admissibility, or legal reliability. | + +## API And Session Boundary By default the app runs in prototype mock mode: @@ -58,286 +147,122 @@ For reviewed local browser-cookie auth testing, also set: VITE_PROOFLINE_AUTH_MODE=cookie ``` -## Development +Bearer session tokens are kept in memory by default. The optional +`VITE_PROOFLINE_SESSION_STORAGE=localStorage` adapter is for local development +only and must not be treated as production browser credential storage. -```bash -npm run dev -npm run typecheck -npm run lint -npm run test -npm run build -npm run test:e2e -``` +Cookie-mode sessions do not store bearer tokens in the web client; the browser +session cookie is HttpOnly and managed by the server. Cookie mode sends +`credentials: "include"` only for cookie-authenticated requests and attaches the +server-provided CSRF header to unsafe requests. Bearer and cookie credentials +must not be mixed. -Formatting: +Public registration is controlled by `open-proofline/server`, not this +frontend. `disabled` and `admin_only` reject public registration, `open` creates +a pending email-verification account, and `paid` remains a fail-closed +placeholder that does not create checkout sessions, subscriptions, active +accounts, or billing webhooks. -```bash -npm run format -npm run format:check -``` +Email verification links carry a raw verification token in the URL fragment. +The web client submits that token in the verification request body and clears +the fragment. Raw verification tokens must not be logged, persisted, +screenshotted, copied into issue drafts, or sent to analytics. -## Product Scope +## Public Deployment Boundary -Proofline Web Client is the experimental React account portal and incident-review client for Proofline. +A static web client is not production-ready just because it can be hosted. +Public deployment requires reviewed backend and infrastructure work, including +route exposure, credentialed CORS, CSRF, cookie settings, cache policy, TLS, +edge abuse controls, logging redaction, and private-admin route exclusion. -The intended product model is a publicly hosted Proofline service where users -can create paid accounts once the backend, deployment, billing, abuse controls, -and operational hardening are ready. The server now documents public -self-registration modes, but registration is backend-configured and disabled by -default. Open self-registration requires reviewed server configuration and email -verification before login; paid registration remains a fail-closed placeholder, -not billing. +The current public web-client deployment boundary is documented in +[`open-proofline/server/docs/public-web-client-deployment-boundary.md`](https://github.com/open-proofline/server/blob/develop/docs/public-web-client-deployment-boundary.md). +Static-host browser header guidance in +[Browser Security Headers](docs/browser-security-headers.md) is a +deployment-review starting point, not production approval or broad public `/v1` +approval. -The web client is responsible for the user-facing account portal, -authenticated incident review, future trusted-contact access flows, future -viewer-link owner controls, and the future no-account viewer experience. It is -not the admin dashboard, recording client, mobile app, backend, or protocol -repository. +## Catalyst And Tailwind -Current prototype screens still expose technical metadata concepts such as -streams, chunks, contact public keys, sharing grants, and wrapped-key records. -Future user-facing work should follow the end-user design document: lead with -plain product language, show human status and next actions first, and move -technical details behind advanced or developer-focused disclosure. +Catalyst-derived component source files are used as part of this application. +They must not be extracted, packaged, published, or redistributed as a +standalone UI kit, template, starter, package, or design asset set. -## Current Scope +The copied Catalyst files remain governed by the Tailwind Plus License preserved +in `src/components/catalyst/LICENSE.md`. -The current bootstrap includes: +## Security Reporting -- login/logout prototype flow -- public registration form flow against the server registration contract -- browser email-verification route that clears verification URL fragments -- authenticated app shell -- conservative session state with memory-first token storage -- optional local-storage session persistence for local development only -- explicit bearer-token and browser-cookie auth client modes -- incident list UI backed by mock data in prototype mode and authenticated - owner-scoped `GET /v1/incidents` responses in live mode -- incident detail metadata UI -- stream and chunk metadata review -- contact public-key metadata views and account-level management -- sharing-grant metadata views and incident-scoped management -- wrapped-key metadata views and delivery revocation -- owner incident deletion status and request UI -- safe loading, empty, and error states -- visible prototype and emergency-reliance warnings -- frontend CI for typecheck, lint, unit tests, build, and Playwright smoke tests +Do not report security vulnerabilities through public GitHub issues. Use GitHub +private vulnerability reporting where available, and follow +[SECURITY.md](SECURITY.md). -## Planned Account Portal Scope - -Planned account portal work includes: - -- public landing and pricing/account-entry pages -- payment-gated account creation -- login/logout -- session status and session revocation flows -- account billing status display -- subscription/payment status handling -- clear account-disabled, payment-required, expired-session, unauthorized, and forbidden states -- browser-safe API error handling -- browser token-storage review and hardening -- deployment review for browser-cookie auth, credentialed CORS, and exact - reviewed origins +Do not publish real secrets, raw session tokens, browser session cookies, CSRF +tokens, raw viewer tokens, token-bearing viewer links, Authorization headers, +request bodies, uploaded bytes, plaintext, raw keys, raw media keys, contact +private keys, wrapped-key ciphertext, verification credentials, stored paths, +object keys, private deployment details, exploit details, or user safety data. -Payment-gated registration must be implemented as a backend-supported account -lifecycle, not just a frontend form. The current server paid-registration mode -returns a fail-closed placeholder error and does not create checkout sessions, -subscriptions, active accounts, or billing webhooks. The web client may present -billing UI only after the backend provides reviewed routes and state transitions -for payment confirmation, subscription status, and disabled/unpaid account -behavior. - -## Planned Incident Review Scope - -Planned authenticated incident-review work includes: - -- live owned-incident listing in the client against the current server route -- incident detail review -- end-user incident review language that foregrounds status, latest update, - upload state, shared access state, evidence protection, and next actions -- stream and chunk metadata review behind advanced or technical details -- viewer-token creation and revocation UI -- encrypted bundle download affordances with clear warnings -- mode, capture-profile, escalation-policy, sharing-state, deletion-state, and retention metadata display -- safe empty/error/loading states for all incident views - -The web client must not expose private admin/operator behavior or route `/v1/admin/...` functionality from a public edge. - -## Planned Sharing And Contact Scope - -Planned sharing/contact work includes: - -- trusted-contact access design, once separately scoped and threat-modeled -- invite/accept trusted-contact flows that avoid manual public-key handling as - the primary user experience -- automatic client-managed key creation and public-key publication after the - backend, client, and key-custody design support it - -Sharing metadata support does not imply browser decryption, trusted-contact decryption, raw key access, key escrow, or playable export. Wrapped-key revocation stops future delivery only and cannot claw back material an authorized actor may already have received. - -## Future Trusted-Contact Scope - -Future trusted-contact work may include: - -- trusted-contact account access -- trusted-contact incident access views -- grant-aware incident metadata review -- wrapped-key metadata delivery to authorized trusted contacts -- careful UX for emergency and non-emergency access states - -Trusted-contact flows must be designed and reviewed before implementation. They must not imply emergency-services integration or guaranteed emergency response. - -## Future Browser Recording Scope - -This repository does not currently implement recording or capture behavior. - -A future browser-based recording prototype may be added as a separately scoped -fallback and secondary capture method for desktop/browser use cases. Possible -capture modes may include: - -- microphone-only recording -- camera and microphone recording -- screen, window, or tab recording -- screen capture with microphone audio - -Browser recording must be treated as experimental. It must not be presented as -a replacement for native iOS or Android recording clients, and it must not be -described as reliable emergency capture or guaranteed background recording. - -Before implementation, browser recording must be separately designed, documented, threat-modeled, and tested. The design must cover: - -- browser permission prompts and explicit user consent -- browser and operating-system compatibility limits -- screen, camera, microphone, and system-audio support differences -- tab close, browser crash, sleep, permission loss, and background reliability limits -- local encrypted staging before upload -- chunking behavior -- upload retry and idempotency behavior -- user-visible recording state -- safe failure states -- privacy and safety wording -- browser token-storage and XSS implications - -If implemented, browser recording must preserve these boundaries: - -- no backend decryption -- no browser decryption unless separately scoped -- no raw server-held media keys -- no key escrow -- no break-glass access -- no playable media export unless separately scoped -- no emergency-services integration -- no claim of production readiness or emergency reliability - -Browser recording is intended for possible desktop/browser interaction records, meetings, calls, evidence notes, or other non-mobile capture contexts. Native platform clients remain the intended direction for safety-critical mobile recording and stronger lifecycle reliability. - -## Explicit Non-Goals - -This repository must not implement: +Backend security issues may belong in +[`open-proofline/server`](https://github.com/open-proofline/server). Public +website framing or governance issues may belong in +[`open-proofline/website`](https://github.com/open-proofline/website). -- production mobile-client behavior -- browser decryption -- backend decryption -- trusted-contact decryption -- raw media-key handling -- raw server-held keys -- key escrow -- break-glass key access -- playable media export -- emergency dispatch -- push, SMS, or Messenger notifications -- OAuth or JWT unless explicitly scoped later -- public admin dashboards -- backend implementation -- protocol repository behavior -- production safety workflows - -Users and trusted contacts remain responsible for contacting emergency services. +## Local Development -## Public Deployment Boundary +Install dependencies: + +```bash +npm install +``` -The web client may be designed for a future public Proofline service, but this repository must not claim production readiness. - -Public deployment requires separate backend and infrastructure work, including: - -- TLS and edge hardening -- public API exposure review -- admin/operator route exclusion from public edges -- payment-gated account creation -- abuse controls and rate limiting -- browser credential-storage review -- credentialed CORS and CSRF review for any browser-cookie auth mode -- CSP/XSS and browser security-header review -- logging and error-redaction review -- backup/restore and deletion/retention operational review -- monitoring and incident response planning - -Until those requirements are implemented and reviewed, the web client remains an experimental prototype. - -Static hosting header guidance is documented in -[Browser Security Headers](docs/browser-security-headers.md), but those headers -do not imply production readiness or public `/v1` API readiness. - -## API Boundary - -The server currently confirms bearer session auth, browser-cookie auth routes, -`POST /v1/auth/register`, `POST /v1/auth/email/verify`, `GET /v1/account`, -`POST /v1/account/password`, owner-scoped incident list/detail routes, -viewer-token create/revoke routes, contact public-key routes, sharing-grant -routes, and wrapped-key routes. Current `open-proofline/server` documents -authenticated `GET /v1/incidents`, and this client parses that response shape -in live mode. Mock mode uses prototype incident records only and must not be -treated as backend truth. - -Authenticated users can open the account profile route to review safe account -metadata and change their password through `POST /v1/account/password`. The -server keeps the active session usable after a successful password change and -revokes other sessions for the account. - -Public registration is controlled by the server's -`SAFE_ACCOUNT_REGISTRATION_MODE`. `disabled` and `admin_only` reject public -registration with `registration_disabled`; `open` creates a -`pending_email_verification` account and sends a verification link before login -is allowed; `paid` returns `registration_payment_unavailable` and does not -perform billing or create an active account. Registration and email verification -do not create browser sessions. +Start the Vite development server: -Email verification links carry a raw verification token in the URL fragment. -The web client reads that secret-bearing fragment, submits the token in the -verification request body, and clears the fragment from the address bar. Raw -verification tokens must not be logged, persisted, screenshotted, copied into -issue drafts, or sent to analytics. - -Viewer-token create/revoke UI is documented as a design boundary in -[Viewer Token UI Design](docs/viewer-token-ui-design.md). The intended -web-client viewer will replace the current server-rendered incident viewer -while preserving the same viewer-token system for no-account, read-only access -to unencrypted incident data. That path is separate from future notification -delivery and trusted-contact account/key flows. - -The client must not log session tokens, Authorization headers, request bodies, -uploaded bytes, plaintext, raw keys, raw media keys, contact private keys, -wrapped-key ciphertext, verification credentials, object keys, stored paths, -private deployment details, or user safety data. - -## Session Storage - -Bearer session tokens are kept in memory by default. A local-storage adapter -exists for developer convenience only behind -`VITE_PROOFLINE_SESSION_STORAGE=localStorage`. Browser token persistence must -be reviewed before any production use. Cookie-mode sessions do not store bearer -tokens; the browser session cookie is HttpOnly and managed by the server. +```bash +npm run dev +``` -## Catalyst And Tailwind +Run the full frontend validation stack: + +```bash +npm run typecheck +npm run lint +npm run test +npm run build +npm run test:e2e +git diff --check +``` + +For documentation and reusable-prompt-only changes, use the lighter validation +from the Codex docs workflows: + +```bash +npx prettier --check \ + README.md AGENTS.md SECURITY.md CHANGELOG.md \ + docs/*.md codex/*.md codex/prompts/*.md +git diff --check +``` + +Run Playwright when route, browser flow, auth, UI behavior, or visible page +copy changes. Do not claim validation passed unless the command actually ran. + +## Governance And Public-Good Posture + +Proofline is intended to grow as public-good open-source infrastructure. The +planned long-term direction is a non-distributing cooperative or similar +mission-locked structure aligned with cooperative and libertarian socialist +principles. Pay should be for defined labour, not ownership extraction. + +Read the canonical project posture in +[`open-proofline/website/docs/governance-and-political-alignment.md`](https://github.com/open-proofline/website/blob/main/docs/governance-and-political-alignment.md). + +The reusable Proofline README baseline and public voice guidance live in +[`open-proofline/website/docs/repository-readme-baseline.md`](https://github.com/open-proofline/website/blob/main/docs/repository-readme-baseline.md). -Catalyst-derived component source files are used as part of this application, -not redistributed as a standalone UI kit, template, starter, package, or design -asset set. The copied Catalyst files remain governed by the Tailwind Plus -License preserved in `src/components/catalyst/LICENSE.md`. +Donations and contributions do not create accounts, unlock features, provide +support priority, or provide emergency assistance. -## Security Status +## License -This repo is not production-ready. It has no production account portal, no -public API hardening, no browser decryption design, no recording client, and no -emergency-services integration. Treat the server docs and security model as the -source of truth for current backend behavior. +Proofline Web Client is licensed under the +[GNU Affero General Public License v3.0 only](LICENSE). diff --git a/SECURITY.md b/SECURITY.md index c91cd5b..dc52ef8 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -2,10 +2,16 @@ Proofline Web Client is experimental and not production-ready. +Do not report security vulnerabilities through public GitHub issues. Use GitHub +private vulnerability reporting where available, and keep sensitive details out +of public issues, PRs, docs, prompts, screenshots, logs, and examples. + Do not report real secrets, raw session tokens, browser session cookies, CSRF tokens, raw viewer tokens, token-bearing viewer links, Authorization headers, -request bodies, plaintext, raw keys, wrapped-key ciphertext, verification -credentials, private deployment details, or user safety data in public issues. +request bodies, uploaded bytes, plaintext, raw keys, raw media keys, contact +private keys, wrapped-key ciphertext, verification credentials, stored paths, +object keys, private deployment details, exploit details, or user safety data in +public issues. Backend security issues may belong in [`open-proofline/server`](https://github.com/open-proofline/server). Web-client @@ -13,6 +19,10 @@ issues involving XSS, dependency risk, browser token handling, local storage, browser-cookie auth, CSRF handling, credentialed CORS, or UI disclosure should be handled carefully and without public sensitive details. +Project-wide governance, public-good posture, and public voice belong in +[`open-proofline/website`](https://github.com/open-proofline/website). They are +not a substitute for component-specific security review. + This repo does not implement recording, browser decryption, backend decryption, trusted-contact decryption, key escrow, playable media export, emergency dispatch, or production safety workflows. diff --git a/codex/README.md b/codex/README.md index e9e38f0..d9b3c4f 100644 --- a/codex/README.md +++ b/codex/README.md @@ -6,6 +6,16 @@ The web-client repository is frontend-only. `open-proofline/server` remains the source of truth for current backend behavior, routes, security model, and deployment constraints. +`open-proofline/website` is the project-level source for Proofline public +governance posture, political alignment, cooperative/public-good framing, +public voice, reusable README structure, and source-of-truth mapping. When a +task touches those areas, inspect the current website README, +`docs/governance-and-political-alignment.md`, and +`docs/repository-readme-baseline.md` before editing this repo. + +Codex output is maintainer-reviewed work. It is not an audit, certification, +security review, legal review, or endorsement by OpenAI. + ## Prompts - `00-project-context-check.md`: read repo context before changes @@ -29,6 +39,17 @@ deployment constraints. ## Standard Validation +For documentation or reusable-prompt-only changes: + +```bash +npx prettier --check \ + README.md AGENTS.md SECURITY.md CHANGELOG.md \ + docs/*.md codex/*.md codex/prompts/*.md +git diff --check +``` + +For frontend source, route, browser-flow, auth, API-client, or behavior changes: + ```bash npm run typecheck npm run lint diff --git a/codex/prompts/00-project-context-check.md b/codex/prompts/00-project-context-check.md index ec5cd28..e099219 100644 --- a/codex/prompts/00-project-context-check.md +++ b/codex/prompts/00-project-context-check.md @@ -14,19 +14,29 @@ Read relevant local files first: - `CHANGELOG.md` - `docs/README.md` - relevant `docs/` files +- `codex/README.md` +- relevant `codex/prompts/` files +- `package.json` - relevant source, route, API, auth, and test files - relevant issue or PR For backend facts, treat `open-proofline/server` as the external source of truth. Do not turn server planning docs into web-client implementation claims. +For governance, political alignment, public-good framing, public voice, +repository README structure, and source-of-truth mapping, treat +`open-proofline/website` as the external source of truth. Inspect its current +README, `docs/governance-and-political-alignment.md`, and +`docs/repository-readme-baseline.md` when those topics are involved. + ## Output Return: 1. current web-client scope 2. current frontend surfaces -3. backend assumptions that need server-doc confirmation +3. source-of-truth inputs checked, including backend or website docs when + relevant 4. security boundaries and non-goals 5. likely affected files 6. files or areas that must not change diff --git a/codex/prompts/05-codex-change-control.md b/codex/prompts/05-codex-change-control.md index b7113d9..6c54e28 100644 --- a/codex/prompts/05-codex-change-control.md +++ b/codex/prompts/05-codex-change-control.md @@ -14,16 +14,31 @@ Do **not** change code or docs unless explicitly asked. OAuth, JWT, push/SMS/Messenger notifications, public admin dashboards, mobile client code, or protocol repository behavior unless explicitly scoped. - Do not log raw tokens, Authorization headers, request bodies, plaintext, raw - keys, raw media keys, wrapped-key ciphertext, private deployment details, or - user safety data. + keys, raw media keys, wrapped-key ciphertext, verification credentials, + stored paths, object keys, private deployment details, or user safety data. - Preserve Tailwind Catalyst licensing boundaries. - Treat `open-proofline/server` as backend source of truth. +- Treat `open-proofline/website` as source of truth for public governance, + political alignment, cooperative/public-good posture, public voice, reusable + README structure, and source-of-truth mapping. ## Check Assess whether the task has a clear goal, affected files, validation commands, out-of-scope items, and a clean enough working tree. +For documentation or reusable-prompt-only tasks, prefer: + +```bash +npx prettier --check \ + README.md AGENTS.md SECURITY.md CHANGELOG.md \ + docs/*.md codex/*.md codex/prompts/*.md +git diff --check +``` + +For frontend behavior, route, auth, API-client, or browser-flow changes, use +the full web-client validation stack. + Return one of: - `Ready` diff --git a/codex/prompts/10-frontend-readability-maintenance.md b/codex/prompts/10-frontend-readability-maintenance.md index 47b6475..4f3f2f3 100644 --- a/codex/prompts/10-frontend-readability-maintenance.md +++ b/codex/prompts/10-frontend-readability-maintenance.md @@ -12,7 +12,10 @@ Improve frontend readability without changing product scope. - accessible form labels, validation, and disabled states - explicit loading, error, and empty states - no clever abstractions before they are needed -- no secret logging +- no secret logging, including raw tokens, browser session cookies, CSRF tokens, + Authorization headers, request bodies, verification credentials, paths, + object keys, plaintext, raw keys, wrapped-key ciphertext, private deployment + details, or user safety data - no browser decryption, key unwrapping, or key-handling changes - no production-readiness claims @@ -33,6 +36,7 @@ npm run typecheck npm run lint npm run test npm run build +git diff --check ``` Run Playwright only when route/browser flows change: diff --git a/codex/prompts/20-code-review.md b/codex/prompts/20-code-review.md index b3799f5..43ae56d 100644 --- a/codex/prompts/20-code-review.md +++ b/codex/prompts/20-code-review.md @@ -13,8 +13,10 @@ Do **not** add features unless needed to fix a bug. - auth/session token handling - local-storage use and warnings - accessible forms and states -- no raw token, Authorization header, request body, plaintext, key, wrapped-key - ciphertext, private deployment detail, or user safety data logging +- no raw token, browser session cookie, CSRF token, Authorization header, + request body, uploaded byte, plaintext, raw key, raw media key, contact + private key, wrapped-key ciphertext, verification credential, stored path, + object key, private deployment detail, or user safety data logging - no browser decryption or key unwrapping - no recording/capture behavior - no production-readiness claims @@ -34,4 +36,5 @@ npm run lint npm run test npm run build npm run test:e2e +git diff --check ``` diff --git a/codex/prompts/30-security-review.md b/codex/prompts/30-security-review.md index 79d0adf..2f9e0bc 100644 --- a/codex/prompts/30-security-review.md +++ b/codex/prompts/30-security-review.md @@ -15,9 +15,11 @@ public docs or issue drafts. - CSP and security-header deployment expectations - route assumptions that might expose private `/v1` or admin routes - public UI wording around emergency reliance -- no logging of raw tokens, Authorization headers, request bodies, plaintext, - raw keys, wrapped-key ciphertext, private deployment details, or user safety - data +- no logging of raw tokens, browser session cookies, CSRF tokens, + Authorization headers, request bodies, uploaded bytes, plaintext, raw keys, + raw media keys, contact private keys, wrapped-key ciphertext, verification + credentials, stored paths, object keys, private deployment details, or user + safety data - no browser decryption, key unwrapping, key escrow, recording, playable export, or emergency dispatch added incidentally - Catalyst licensing and redistribution boundaries @@ -34,6 +36,7 @@ npm run typecheck npm run lint npm run test npm run build +git diff --check ``` Run `npm run test:e2e` when browser flows changed. diff --git a/codex/prompts/40-documentation-update.md b/codex/prompts/40-documentation-update.md index 4f2493f..9687009 100644 --- a/codex/prompts/40-documentation-update.md +++ b/codex/prompts/40-documentation-update.md @@ -12,6 +12,9 @@ production readiness. - `SECURITY.md` - `CHANGELOG.md` - `docs/README.md` +- `docs/end-user-web-client-design.md` +- `docs/browser-security-headers.md` +- `docs/viewer-token-ui-design.md` - `docs/architecture.md` - `docs/api-client.md` - `docs/security-model.md` @@ -19,10 +22,15 @@ production readiness. - `docs/development.md` - `codex/README.md` - `codex/prompts/*.md` +- current `open-proofline/website` README and source docs when public voice, + governance, source-of-truth mapping, or README baseline is involved ## Constraints - Keep `open-proofline/server` as backend source of truth. +- Keep `open-proofline/website` as the source for public governance, + political alignment, cooperative/public-good posture, public voice, reusable + README structure, and source-of-truth mapping. - Do not describe unimplemented backend routes as confirmed. - Do not imply recording, browser decryption, trusted-contact decryption, key escrow, playable export, emergency dispatch, OAuth, JWT, or production safety @@ -36,8 +44,11 @@ production readiness. If only Markdown changed: ```bash -git diff --stat -git diff -- README.md AGENTS.md SECURITY.md CHANGELOG.md docs codex +npx prettier --check \ + README.md AGENTS.md SECURITY.md CHANGELOG.md \ + docs/*.md codex/*.md codex/prompts/*.md +git diff --check ``` -Run frontend validation only if code changed. +Run frontend validation only if source, route, browser-flow, auth, API-client, +or behavior changed. diff --git a/codex/prompts/45-documentation-and-prompt-review.md b/codex/prompts/45-documentation-and-prompt-review.md index 1c51ae8..4031ea8 100644 --- a/codex/prompts/45-documentation-and-prompt-review.md +++ b/codex/prompts/45-documentation-and-prompt-review.md @@ -40,6 +40,14 @@ Start with current source-of-truth files: - Catalyst/Tailwind Plus license and provenance files: - `src/components/catalyst/README.md` - `src/components/catalyst/LICENSE.md` +- current project-level source documents from `open-proofline/website`, when + governance, political alignment, public-good framing, public voice, funding + posture, source mapping, or README structure is involved: + - `README.md` + - `docs/governance-and-political-alignment.md` + - `docs/repository-readme-baseline.md` + - `codex/README.md` + - relevant `codex/prompts/` Use source and test files to verify UI, API-client, route, auth/session, and documentation claims: @@ -59,6 +67,11 @@ For backend behavior, routes, deployment, and server security claims, inspect the current `open-proofline/server` source documents instead of relying on web-client assumptions. +For governance, political alignment, public-good framing, public voice, +repository README structure, and source-of-truth mapping, inspect the current +`open-proofline/website` source documents instead of duplicating project-level +claims here. + Do not rely on stale assumptions from this prompt when current docs or source code disagree. @@ -72,6 +85,7 @@ Review: - all reusable Codex prompt files - all public-facing project claims - source-of-truth alignment +- public voice and reusable README baseline alignment - technical accuracy - linguistic coherence - readability and approachability @@ -109,6 +123,8 @@ Check source-of-truth consistency: - Do docs agree with current `README.md`, `AGENTS.md`, `SECURITY.md`, and source docs? - Do backend claims match the current `open-proofline/server` docs? +- Do public-governance, political-alignment, public-good, public-voice, and + README-baseline claims match the current `open-proofline/website` docs? - Do Codex prompts agree with current repo rules? - Are public claims supported by implementation or source docs? @@ -146,6 +162,9 @@ Check readability and approachability: - Are public-facing docs understandable without internal context? - Are technical docs precise without being needlessly dense? - Is wording direct, humane, and clear? +- Does public-facing wording follow the website public voice without putting + jokes in emergency, security, implementation-status, encryption, decryption, + key-custody, or vulnerability-reporting sections? - Are acronyms and project-specific terms explained where needed? - Are there sections that sound like internal notes, legal fog, or startup hype? @@ -227,11 +246,16 @@ In edit mode: For docs-only edits, run: ```bash +npx prettier --check \ + README.md AGENTS.md SECURITY.md CHANGELOG.md \ + docs/*.md codex/*.md codex/prompts/*.md git diff --check -npm run format:check ``` -Run `npm run format:check` only if it is available and applicable. +Use the docs/prompt Prettier command above for docs-only review work so +unrelated source formatting drift does not block the docs report. Run +`npm run format:check` only when a repo-wide formatting check is explicitly +requested or applicable. If code changed because the maintainer explicitly scoped that work, run: diff --git a/codex/prompts/50-web-security-header-review.md b/codex/prompts/50-web-security-header-review.md index e6d603e..3d3fd3d 100644 --- a/codex/prompts/50-web-security-header-review.md +++ b/codex/prompts/50-web-security-header-review.md @@ -27,6 +27,15 @@ Document deployment expectations rather than claiming production hardening. ## Validation +For documentation-only header guidance changes: + +```bash +npx prettier --check \ + README.md AGENTS.md SECURITY.md CHANGELOG.md \ + docs/*.md codex/*.md codex/prompts/*.md +git diff --check +``` + Run frontend validation if config or browser behavior changes: ```bash diff --git a/codex/prompts/70-work-on-github-issue.md b/codex/prompts/70-work-on-github-issue.md index 98b9306..7210376 100644 --- a/codex/prompts/70-work-on-github-issue.md +++ b/codex/prompts/70-work-on-github-issue.md @@ -14,6 +14,9 @@ Target base branch: `