Source architecture reference

PgDog fork: system architecture

Fork of PgDog (https://github.com/pgdogdev/pgdog), reusing the PostgreSQL proxy to add an LLM agent layer. PgDog is the current runtime; the LLM agent and the EKS audit deployment are planned. This reference covers implemented components, database traffic, repository quality gates and documentation publishing.

SYSTEM / ARCHREV 1f3b763147a0COMPILED FROM MODEL
3product components
7tooling components
8relationships
8data flows

01 System context

.agent/project-model/

Fork of PgDog (https://github.com/pgdogdev/pgdog), reusing the PostgreSQL proxy to add an LLM agent layer. PgDog is the current runtime; the LLM agent and the EKS audit deployment are planned. This reference covers implemented components, database traffic, repository quality gates and documentation publishing.

Source of truth

Components and diagrams represent the declared current model. Planned work is labelled in the scope and focused documents; no deployment or feature is inferred from a diagram.

02 Component diagrams

relationships.toml
Product runtime PostgreSQL Client client client-process PgDog Proxy rust-service proxy-process PostgreSQL database database-process
Product runtime. Arrows show relationships declared in the canonical model; details follow below.
Repository development and verification CI Wrappers automation hosted-ci Documentation Generator generator local-repository Canonical Agent Core policy-and-skills local-repository Agent Runtime python-cli local-repository Project Memory local-storage local-repository Cross-Review Engine orchestrator local-repository Provider Adapters adapter provider-cli-process
Repository development and verification. Arrows show relationships declared in the canonical model; details follow below.
  • ci-wrappers → runtimeinvokes repository-owned gates
  • sql-client → pgdog-proxyauthenticates and sends PostgreSQL protocol messages
  • canonical-core → runtimedefines policy and command contracts
  • docs-generator → canonical-corereads canonical model and focused documentation
  • pgdog-proxy → postgresqlopens backend connections and forwards queries
  • review-engine → provider-adaptersruns approved packages inside an OS read sandbox
  • runtime → project-memoryvalidates lifecycle and privacy rules
  • runtime → review-enginestarts fail-closed review operations

03 Component responsibilities

components.toml

PgDog Proxy

pgdog-proxyrust-service

Contains the application workspace at applications/pgdog/ and implements PostgreSQL protocol handling, authentication, pooling, routing, and SQL execution forwarding. Existing upstream behavior; no production deployment configured by this import.

Boundary: proxy-process

PostgreSQL

postgresqldatabase

Executes forwarded queries. Verification uses isolated PostgreSQL 18 fixtures; production infrastructure is outside this repository setup.

Boundary: database-process

PostgreSQL Client

sql-clientclient

Sends PostgreSQL protocol messages and credentials; integration tests use synthetic users and data.

Boundary: client-process

Canonical Agent Core

canonical-corepolicy-and-skills

Defines provider-neutral policy, 21 core skills and four task-routed UX/UI skills, schemas, artifact templates, and lifecycle contracts. UX/UI references are read per phase and retain source notices; no external skill runtime is installed.

Boundary: local-repository

CI Wrappers

ci-wrappersautomation

Invokes repository-owned quality gates on pull requests or manual runs; publishes only the generated architecture HTML through manual GitHub Pages deployment from main.

Boundary: hosted-ci

Documentation Generator

docs-generatorgenerator

Validates the canonical project model and generates deterministic architecture views.

Boundary: local-repository

Project Memory

project-memorylocal-storage

Stores private candidates locally; retrieves fresh canonical summaries with ranked top-k and bounded context.

Boundary: local-repository

Provider Adapters

provider-adaptersadapter

Shares generated skills across Claude, Codex, and Gemini via agy; runs bounded review packages inside a fail-closed OS read sandbox. AGY pins a Gemini model, validates terminal schema output, and uses disposable API-key-mode settings without host profiles.

Boundary: provider-cli-process

Cross-Review Engine

review-engineorchestrator

Builds budgeted review packages with proven generated-copy deduplication, verified unchanged-rename path tables and full Git change binding. Recomputes blob/mode proofs before egress; changed sensitive files stay blocked. Enforces reviewer independence and validates findings.

Boundary: local-repository

Agent Runtime

runtimepython-cli

Runs configuration, evidence, workflow, documentation, review, security, and release commands.

Boundary: local-repository

04 Data & trust boundaries

data-flows.toml

Sensitive categories: database-credentials, project-source, query-results, review-package, sql-query. Declared categories: configuration, database-credentials, evidence-metadata, memory-record, project-source, query-results, review-package, sql-query.

backend-query

pgdog-proxy → postgresql

database-credentials, sql-query

proxy-to-database

backend-results

postgresql → pgdog-proxy

query-results

database-to-proxy

ci-evidence

ci-wrappers → runtime

configuration, evidence-metadata

hosted-ci-to-repository

client-query

sql-client → pgdog-proxy

database-credentials, sql-query

client-to-proxy

client-results

pgdog-proxy → sql-client

query-results

proxy-to-client

documentation-model

canonical-core → docs-generator

configuration

local-repository

memory-checkpoint

runtime → project-memory

memory-record

local-private-storage

review-egress

review-engine → provider-adapters

project-source, review-package

local-to-provider-process

05 Deployment environments

environments.toml

GitHub Actions

github-actions

Pull-request or manual validation only; publishing is manual. GitHub-hosted Ubuntu 24.04 Rust/unit/integration CI and template runtime tests. Independent review needs approved local evidence; upstream-only Codecov and Bencher credentials are not required.

GitHub Pages

github-pages

Public static architecture reference at https://devfun2026.github.io/fork-pgdog/. The architecture-pages workflow validates on PRs and publishes only after manual dispatch from main. It uploads only index.html and .nojekyll, not repository files or local evidence. First publication requires Actions-based Pages setup and a protected github-pages environment. This host has no database access or LLM runtime.

GitLab CI

gitlab-ci

Merge-request or manual web pipelines only. Python 3.11 jobs invoke the same runtime commands and retain redacted failure evidence.

Local developer environment

local

macOS with sandbox-exec or Linux/WSL with Bubblewrap, Python 3.11+, and optional authenticated provider CLIs.

06 Focused architecture documents

docs/architecture
Components

Component responsibilities

PgDog source

The upstream proxy is in applications/pgdog/pgdog/src/:

  • frontend/: receives client sessions and coordinates query execution.
  • backend/: manages backend pools and PostgreSQL server connections.
  • auth/ and config/: authentication and configuration handling.
  • net/: PostgreSQL wire messages and network primitives.
  • admin/, api/ and stats/: administration and observability interfaces.
  • plugin/: upstream plugin integration.

Related workspace crates hold shared configuration, statistics, PostgreSQL types and plugin interfaces. Existing features are documented in README.md and upstream documentation at https://docs.pgdog.dev/.

Repository tooling

The Python runtime keeps configuration, path handling, process execution, verification evidence and independent review boundaries explicit. Evidence is bound to Git identities. The documentation generator escapes model and Markdown content into a standalone HTML file; it does not read .agent/.memory/ or publish local .agent/.runs/ evidence.

The coding-agent tooling is distinct from the planned product LLM agent. The latter has no implemented component or API contract yet.

Containers

Containers and major units

Product runtime

  • PgDog proxy: Rust Cargo workspace under applications/pgdog/; its executable handles PostgreSQL connections, authentication, pooling and query forwarding.
  • PostgreSQL backends: external database servers, including primaries, replicas or shards depending on pgdog.toml. They execute SQL and return results.
  • PostgreSQL clients: psql, application drivers or other compatible clients.
  • Local Docker demo: applications/pgdog/docker-compose.yml starts the upstream PgDog image and three PostgreSQL shards. It does not run a fork-specific LLM agent. The fork image is built separately from applications/pgdog/Dockerfile.

Development and documentation

  • Canonical core: .agent/ policies, skills, schemas, templates and project model.
  • Runtime: Python 3.11 standard-library CLI invoked through scripts/agent.
  • Review engine and provider adapters: approved, bounded source review packages and validated independent findings, outside the database query path.
  • Project Memory: private local candidates and reviewed project records.
  • Documentation generator: canonical TOML and focused Markdown are rendered into system-summary.md and the self-contained system.html.
  • CI wrappers: pull-request or manual validation; publishing is manual.

The planned LLM agent is not yet a runtime process or container in this model.

Data Flows

Data flows and trust boundaries

Database traffic

  1. A client sends PostgreSQL startup/authentication messages and SQL to PgDog.
  2. PgDog authenticates the client, selects a pool and routes the query to a configured PostgreSQL backend.
  3. Backend credentials and SQL cross the proxy-to-database boundary.
  4. PostgreSQL results return through PgDog to the client.

The model declares SQL queries, database credentials and query results as sensitive data. Pooling and query routing are existing upstream behavior. An end-to-end per-member audit trail for the intended deployment has not been implemented or validated as part of this repository setup.

Development traffic

  1. Canonical configuration and project-model data enter the local runtime.
  2. Verification writes commit-bound metadata under .agent/.runs/.
  3. Private memory candidates can be reviewed before promotion into records.
  4. Review packages pass containment, deny rules, size limits, redaction and exact manifest approval before provider egress.
  5. Provider findings return as untrusted structured data for adjudication.

These source-review calls are development operations. They do not send live PostgreSQL query traffic to the planned LLM agent. That future boundary requires its own authorization, data minimization and audit design.

Deployment

Deployment and operation

Current local setup

Build the Rust workspace from the repository root:

./scripts/pgdog cargo build --locked --workspace

Run the upstream Docker demo:

docker compose -f applications/pgdog/docker-compose.yml up

Build this fork's container using the repository root as its build context:

docker build -f applications/pgdog/Dockerfile -t pgdog .

Configuration and client connection examples are in README.md. The Docker demo contains synthetic credentials and data for local evaluation.

Production work still to be designed

The intended deployment is an EKS-hosted proxy reached through a load balancer restricted to company IPs, with PostgreSQL in a private subnet and Vault dynamic credentials. This repository setup has not provisioned that infrastructure or established production query-audit coverage. Upstream Helm and Terraform links in README.md describe upstream deployment options.

The LLM agent is planned; this overview does not declare an LLM runtime, model provider, database access policy or production deployment for it.

Repository tooling and documentation

scripts/agent runs from the checkout on macOS, Linux or WSL. Hosted CI uses the same local gates. Validation runs for pull requests or manual dispatch, and publishing is manual.

The architecture page is generated from .agent/project-model/ and focused docs:

./scripts/agent docs build
./scripts/agent docs check

system.html is a self-contained file with local styles, search and navigation. It works offline without a CDN, external JavaScript, database connection or LLM provider. The embedded security documents cover repository tooling and must be extended before using them as a production PgDog/LLM security assessment.

Architecture Pages publication

The Architecture Pages workflow builds a static document from this model. Pull requests validate it with read-only repository permissions. Only a manual workflow_dispatch on main can run the deployment job, which has Pages and OIDC permissions and uses the github-pages environment. The uploaded directory contains only generated index.html and .nojekyll; no source, credentials, private memory or local review evidence is exported.

The public URL is intended to be https://devfun2026.github.io/fork-pgdog/. Repository Pages settings and the first deployment are external setup steps. Publishing this document does not deploy the PostgreSQL proxy or LLM agent.

System Context

System context

Source and purpose

This repository forks PgDog from https://github.com/pgdogdev/pgdog. The PostgreSQL proxy and its existing features belong to upstream PgDog and its contributors. The fork's product goal is to add an LLM agent layer on top of that proxy. The upstream source is under applications/pgdog/; README.md is the main usage guide. Import history and license attribution are recorded in docs/import/PGDOG_IMPORT.md and THIRD_PARTY_NOTICES.md.

Current runtime

PostgreSQL client -> PgDog proxy -> PostgreSQL primary / replicas / shards

Clients use the PostgreSQL wire protocol. PgDog authenticates connections, maintains backend connection pools, parses and routes queries, and returns PostgreSQL results. The source includes backend authentication integrations such as Vault dynamic credentials; production Vault policies and EKS resources have not been configured by this repository work.

The repository also contains a Python coding-agent runtime for verification, independent review, documentation and local development memory. This tooling runs during development and CI; it is not on the PostgreSQL query path.

Planned LLM agent

The LLM agent is not implemented or deployed. Its interfaces, query access, provider choice, authorization and handling of database data still require a separate approved design. No SQL, credentials or query results are currently sent to an LLM by a runtime agent in this fork.

The intended EKS proxy deployment, company-IP-restricted load balancer and member query auditing are future deployment/product work. The current diagrams and component model describe implemented code and repository tooling, not a claim that this production architecture is running.

07 Interfaces and contracts

docs/architecture
Contracts

Interfaces and contracts

  • .agent/config.toml is the versioned project configuration. Commands are argument arrays and never shell strings.
  • .agent/project-model/*.toml is the canonical architecture model used to generate the system views.
  • .agent/schemas/*.json defines provider findings, evidence, memory, and documentation-impact payloads.
  • .agent/.runs/ contains local, commit-bound gate artifacts; it is evidence, not project source.
  • Review packages contain only the approved diff, manifest, policy, requirements, verification summary, schema, and explicit context files.
  • .agent/memory/records/ contains reviewed, versioned memory. Private candidates and indexes remain local.
  • Memory retrieval ranks partial Unicode lexical matches with title/component weights; startup selects architecture, constraints, decisions and workflow records. Default retrieval is top-5 and bounded by 4,000 characters / 1,200 estimated tokens, excluding private and stale records.
  • Review manifests bind the full scope and full Git diff hash plus the projected diff. Only native skill copies equal in blob and mode to a changed canonical file at both endpoints are omitted. Every resume/merge recomputes proof; generated HTML and divergent copies remain visible.
  • Context profiles light/standard/deep bound retrieval and review payload estimates; see docs/context-efficiency.md. Estimates are UTF-8 bytes divided by three, rounded up, not provider billing. Oversized reviews fail before provider execution.
  • Planning tiers do not change merge/release gates or authorize state transitions. Content-only policy/security changes still require full impact review.
  • workflow guide --task interface recommends the relevant UX/UI phase under standard context; it does not load every skill or change gates. Four provider-neutral UX/UI skills extend the 21 core skills. Their local references and artifact templates link evidence, journey/state IDs, design master/page deltas, implementation and review coverage. See docs/ux-ui.md.
  • Adapted UX/UI documentation is pinned and attributed in .agent/sources/UX_UI_AUDIT.md; native projections retain local licenses. No upstream installer, binary, database, remote guideline loader or hook is part of this extension. Missing research or browser evidence stays unverified; local UX review never supplies cross-provider independence or accessibility certification.

All consumers fail closed on unknown configuration, malformed payloads, stale hashes, provider identity collisions, or artifacts bound to another Git state.

08 Architecture decision records

docs/decisions
0001 Provider Neutral Agent Root

Context

Claude Code, Gemini CLI, and Codex use different native instruction and skill locations. Maintaining separate authoritative content would create policy, workflow, memory, and security drift.

Decision drivers

  • One reviewable source of truth must govern every supported provider.
  • Native provider discovery must still work without copying policy by hand.
  • Generated files must be reproducible and drift-detectable.
  • Local memory and review runs must remain private runtime state.

Considered options

Maintain each provider root independently

This is simple initially, but duplicates policy and makes cross-provider parity dependent on manual synchronization.

Use one provider's native root as canonical

This reduces duplication but gives one provider special authority and leaks its conventions into the other adapters.

Use .agent/ as a provider-neutral canonical root

Canonical policies, skills, schemas, workflows, templates, project model, and runtime live under .agent/. Generated .agents/, .claude/, .gemini/, AGENTS.md, CLAUDE.md, and GEMINI.md remain thin native adapters.

Decision

Use .agent/ as the only authoritative agent-project root. Generate and verify provider-native adapters from it. Store private SQLite memory and review runs in ignored .agent/.memory/ and .agent/.runs/ directories.

Rationale

The neutral root gives every provider the same reviewed contracts while keeping native discovery ergonomic. Deterministic generation and manifest checks turn adapter parity into a machine-verifiable invariant.

Consequences

  • Canonical behavior changes must start in .agent/.
  • Direct edits to generated adapters are rejected as drift.
  • Provider-specific capabilities stay in runtime adapters, not policy content.
  • Template users must keep .agent/.memory/ and .agent/.runs/ untracked.

Risks and mitigations

  • A generator defect could affect every provider; golden tests and adapter drift checks mitigate this.
  • Provider CLI changes can break an adapter; capability probes and fail-closed real-CLI smoke tests surface the incompatibility.
  • Generated roots may look authoritative; headers and AGENTS.md state the authority order explicitly.

Follow-up

  • Run ./scripts/agent adapters check and ./scripts/agent docs check in CI.
  • Record provider versions and real-CLI limitations in acceptance evidence.
  • Supersede this ADR if the canonical root or generation strategy changes.

Evidence

  • docs/superpowers/specs/2026-09-21-agent-project-template-design.md
  • docs/superpowers/plans/2026-09-21-agent-project-template.md
  • .agent/tests/test_adapters.py
  • .agent/tests/test_acceptance.py
  • docs/security/threat-model.md
0002 Antigravity Gemini Adapter

Context

The owner requested migration from Gemini CLI to agy. Antigravity supports multiple model families, a different headless output contract, shared .agents/skills, and PreInvocation/Stop lifecycle hooks.

Decision

Keep the canonical .agent/ architecture and gemini model-family identity. Change its executable/flags/parser to AGY; pin a Gemini model and reject other families. Share the Codex native skill tree instead of retaining a redundant legacy Gemini tree. Retire only unchanged manifest-owned outputs.

Preserve the outer OS sandbox and exact-manifest egress approval. Plan mode is not read-only enforcement. Automated review uses disposable API-key settings, not the user's OAuth profile/keyring. Hooks inject bounded data only at initial invocation and never force a new turn or persist raw transcripts.

Alternatives and consequences

A bare command rename would retain incompatible flags, hooks and output validation. Renaming the provider family to agy would obscure model identity and require unnecessary historical-data migration. Importing the host profile would expand credential/plugin exposure; that remains out of scope.

Interactive account login and automated API-key authentication are distinct. Model entitlement and authenticated execution need a real smoke test; missing credentials/capabilities never count as completed review. Historical Gemini CLI evidence remains historical. This ADR updates native layout details in ADR-0001 without replacing its canonical-root decision.

Evidence

  • docs/antigravity.md
  • docs/superpowers/plans/2026-09-22-antigravity-migration.md
  • .agent/tests/test_antigravity.py
  • .agent/tests/test_acceptance.py

09 Security model and controls

docs/security
Data Classification

Data Classification

DataClassificationStorageEgress rule
Canonical policies and public docsPublic or internalGitAllowed by repository policy
Product source and diffsInternalGit and approved review packageExact manifest approval required
Canonical Project MemoryInternalGit Markdown recordsSame review-package policy as source
Local candidates and run artifactsInternal or sensitive.agent/.memory/, .agent/.runs/Denied by default
Credentials, private blocks, personal dataSecret or sensitiveApproved external secret/data storeNever auto-injected or exported

Projects must classify their own user and business data before enabling review egress or memory capture.

Residual Risks

Residual Risks

  • AI-generated and AI-reviewed changes may contain defects not detected by the selected evidence or reviewer.
  • Local plaintext memory and review artifacts rely on operating-system account isolation and disk protections.
  • Provider CLI behavior and privacy terms are outside this repository; approval confirms package contents, not provider guarantees.
  • Optional ecosystem scanners can be unavailable. They are reported as not configured and become blocking when project policy marks them required.
  • The template cannot validate an adopting project's production identity, network, data-retention, backup, or disaster-recovery controls.

Owners must reassess these risks when exposure, credentials, sensitive data, trust boundaries, dependencies, infrastructure, or recovery design changes.

Security Controls

Security Controls

The runtime provides immutable configuration, argument-array process execution, path containment, symlink rejection, atomic owner-only writes, output limits, secret and private-block redaction, manifest-bound review packages, structured provider output validation, evidence checksums, progressive gates, and reviewed memory promotion.

Controls are verified by repository tests and gate evidence. OWASP ASVS, SAMM, and threat-modeling materials are requirement references only; this template does not claim certification or full coverage of any framework.

Reference mapping

Template requirementReference baselineUse
Technical application controlsOWASP ASVS 5.0.0Select applicable, version-qualified requirement IDs for the adopting project
Secure lifecycle and governanceOWASP SAMM 2.0Assess and improve practices; not a release certificate
Assets, actors, flows, boundaries, threats, mitigations, reviewOWASP Threat Modeling Cheat Sheet, reviewed 2026-09-21Method guidance; project evidence remains authoritative

References: https://owasp.org/projects/asvs, https://owaspsamm.org/model/, and https://cheatsheetseries.owasp.org/cheatsheets/Threat_Modeling_Cheat_Sheet.html.

Threat Model

Threat Model

Scope

This model covers the template runtime, canonical policy and skills, local Project Memory, generated documentation, review packages, provider CLI processes, and CI wrappers. Product repositories created from the template must replace or extend this model for their own assets and deployment.

Assets and actors

Assets include repository source, Git history, configuration, provider prompts, review evidence, canonical memory, private local memory, credentials available to the host, and release artifacts. Actors include the project owner, coding agents, independent reviewer providers, local provider CLIs, hosted CI runners, dependencies, and an attacker able to contribute untrusted repository content.

Trust boundaries and data flows

  • The repository boundary separates versioned policy from the host filesystem.
  • .agent/.memory/ and .agent/.runs/ are private local plaintext stores.
  • Review packages cross from the local repository to a selected provider CLI only after a manifest preview and exact-hash approval.
  • Provider output crosses back as untrusted structured data and is validated.
  • CI runners execute the same repository runtime in a separate hosted boundary.

Threats and controls

  • Prompt injection in source or memory: content is treated as data; memory cannot override policy; review providers receive a fixed policy.
  • Command injection: commands are argument arrays executed with shell=False.
  • Path traversal and symlink escape: repository containment is checked before reads or writes.
  • Secret leakage: deny rules, bounded packages, redaction, private blocks, and manifest approval run before provider invocation.
  • Review-package tampering: the manifest binds diff, context, requirements, verification, policy, and schema; checksums are revalidated on resume.
  • Hidden generated changes: deduplication compares regular-file modes and Git blobs at both base/head, only against a changed canonical source. Full scope and full-diff hash remain bound and projection is recomputed before execution and merge. Divergence, unsupported file modes, and unproven copies are reviewed.
  • Context exhaustion: bounded ranked memory and estimated-token review caps reduce payloads; review overflow blocks rather than silently omitting changes. Token estimates exclude provider-internal prompts, repeated reads and output.
  • Untrusted memory import: imported records remain candidates until reviewed.
  • Supply-chain compromise: license, dependency, and provenance checks are release inputs, while unsupported checks remain explicitly unverified.

Residual risks

Antigravity migration delta

AGY can select Claude as well as Gemini: the Gemini adapter pins/validates a Gemini model to preserve cross-provider identity. Its JSON parser requires a successful terminal status and schema-validated findings, rejecting conflicting response fields. Plan mode is advisory; the OS sandbox remains the read/write boundary. A canonicalized disposable HOME fixes macOS temporary-path aliases without granting new host directories. Only minimal API-key-mode settings are created there; no host profile, plugin config or OAuth token store is imported. The provider environment is reduced to GEMINI_API_KEY plus common runtime variables. API-key backend/model compatibility still needs live verification.

Native migration deletes only unchanged manifest-owned retired outputs and blocks path escapes/symlinks. AGY hooks consume only bounded invocation metadata, never follow transcript paths, and inject memory as data. Stop does not restart the agent or persist learning without review. Hook UI visibility is best effort.

Provider and scanner defects can miss vulnerabilities. Local plaintext depends on host permissions and full-disk security. A compromised maintainer or CI credential can bypass repository process. Real product runtime and deployment remain outside this template-only assessment.

10 Operations, observability, and recovery

docs/operations
Observability

Observability

The template records deterministic command evidence, review manifests and checksums, provider audit events, documentation-impact decisions, security scope, adjudication dispositions, and release-gate results.

Operators should monitor:

  • command exit codes, timeouts, tool versions, commit IDs, and worktree diff hashes;
  • provider capability, authentication, review status, reviewer independence, and package checksum;
  • memory health, stale records, rejected private content, and index rebuilds;
  • documentation drift and architecture-model validation;
  • required scanner status, unverified areas, and residual risks.

Local .agent/.runs/ artifacts may be discarded and regenerated. Versioned source, canonical memory, architecture documents, and ADRs are durable project history.

Runbooks

Operations and recovery runbooks

Start or resume work

  1. Run ./scripts/agent doctor --json --providers.
  2. Run ./scripts/agent memory bootstrap --query "current task".
  3. Inspect ./scripts/agent workflow status --json and the current Git status.

Review recovery

If a provider times out or is unauthenticated, preserve the review package, fix the provider session, then rerun with the same package path and approved manifest checksum. Never convert a provider failure into approval.

Documentation recovery

Run ./scripts/agent docs build, inspect the generated summary and HTML, then run ./scripts/agent docs check after committing the intended change.

Memory recovery

Use memory doctor and memory rebuild-index. Canonical Markdown records remain the recovery source; SQLite is a disposable index. Export/import is checksum-validated and transactional.

Release rollback

Stop the release when any gate is blocked or incomplete. Preserve evidence, restore the last known-good release reference, follow project-specific data rollback instructions, and record residual risk before retrying.

Architecture Pages publication and recovery

After the reviewed change is merged, enable GitHub Actions as the repository's Pages source and allow only main in the github-pages deployment environment. Run gh workflow run architecture-pages.yml --ref main, inspect the build/deploy run, then verify the public site before setting it as the repository homepage. A PR or a push never deploys this site. A manual run from another branch fails.

If a publication fails, retain the last successful deployment, inspect the Actions logs and fix the source/model or Pages settings. Rebuild with the same canonical generator. Restore a previous page through a reviewed source revert and a new manual dispatch from main; do not publish unreviewed branch content.

11 Requirement traceability

docs
Traceability

Requirement traceability

RequirementCanonical implementationPrimary evidence
Provider-neutral workflow.agent/workflows/, generated provider adaptersadapter drift check
Independent cross-provider reviewreview package, provider adapters, orchestratormanifest-bound review and adjudication artifacts
Architecture documentationproject model and documentation generatordeterministic system-summary.md and system.html
Security reviewsecurity profile, threat model, scanner statusscope-bound security assessment and release gate
Progressive project memoryprivate checkpoint, reviewed promotion, canonical recordsmemory tests, checksums, stale-record filtering
Project starter lifecycleinit, workflow state, quick/merge/release gatesclean-fixture acceptance and CI workflows
UX-01–02, task-routed UX/UI and traceable artifactsfour .agent/skills/ UX/UI contracts, references and assets; interface guiderouting tests and technique trials in docs/reviews/ux-ui-skills.md
UX-03–05, source boundaries and portable delivery.agent/sources/UX_UI_AUDIT.md, local licenses, generated native resourcessource/license metadata checks, adapter equality tests and scoped trial limitations

The acceptance report must distinguish deterministic local evidence, real provider evidence, and hosted-CI evidence. Missing external evidence remains pending; it is never inferred from local tests.

12 Governance & source

documentation-sync

Generated from canonical TOML and focused Markdown using ./scripts/agent docs build. Check drift with ./scripts/agent docs check.

Review evidence stays local under .agent/.runs/. This page contains documentation, not live query data or a production security certification.