diff --git a/.agent-runs/b2-phase2-rehearsal.md b/.agent-runs/b2-phase2-rehearsal.md index 9ddff13..8a121ba 100644 --- a/.agent-runs/b2-phase2-rehearsal.md +++ b/.agent-runs/b2-phase2-rehearsal.md @@ -1,4 +1,4 @@ -# CivicRecords AI B2 Phase 2 Rehearsal +# CivicSunshine B2 Phase 2 Rehearsal Date: 2026-05-11 Branch: master diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index c7363f5..4d36b4c 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,6 +1,6 @@ --- name: Bug report -about: Report a defect in CivicRecords AI +about: Report a defect in CivicSunshine title: "[bug] " labels: ["bug"] --- @@ -20,7 +20,7 @@ labels: ["bug"] **Environment** -- CivicRecords AI version (`docker compose run --rm api python -c "import app; print(app.__version__)"` or check the admin UI footer): +- CivicSunshine version (`docker compose run --rm api python -c "import app; print(app.__version__)"` or check the admin UI footer): - Deployment: Docker Compose / installer / dev clone - OS: Windows / macOS / Linux (specify version) - Browser (if frontend issue): diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 9ca0dc9..fcf354a 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,6 +1,6 @@ --- name: Feature request -about: Suggest an enhancement to CivicRecords AI +about: Suggest an enhancement to CivicSunshine title: "[feat] " labels: ["enhancement"] --- diff --git a/.github/release-notes-preamble.md b/.github/release-notes-preamble.md index 7a3f00b..639ecad 100644 --- a/.github/release-notes-preamble.md +++ b/.github/release-notes-preamble.md @@ -1,6 +1,6 @@ ## About this release -CivicRecords AI is an open-source, locally-hosted AI system for municipal open-records request processing. Every deployment is a sovereign instance owned by the city — no cloud, no telemetry, no outbound data transfer. +CivicSunshine is an open-source, locally-hosted AI system for municipal open-records request processing. Every deployment is a sovereign instance owned by the city — no cloud, no telemetry, no outbound data transfer. **Windows installer is UNSIGNED by design.** On first run, Windows SmartScreen will show "Windows protected your PC — Unknown publisher." To proceed: click **More info** → **Run anyway**, then confirm UAC. See [installer/windows/README.md](../blob/master/installer/windows/README.md) for the full remediation walkthrough. @@ -14,7 +14,7 @@ notes and then verify the installer checksum sidecar plus package checksums. ## Downloads -- **Windows double-click installer:** `CivicRecordsAI--Setup.exe` (bundled with `.sha256` checksum sidecar for `Get-FileHash` verification). +- **Windows double-click installer:** `CivicSunshine--Setup.exe` (bundled with `.sha256` checksum sidecar for `Get-FileHash` verification). - **Python package assets:** `civicrecords_ai--py3-none-any.whl`, `civicrecords_ai-.tar.gz`, and `SHA256SUMS.txt` for direct-pip release URL consumers. - **Linux / macOS guided-script install:** clone the repo at this tag and run `./install.sh` — see [README.md](../blob/master/README.md) and [USER-MANUAL.md](../blob/master/USER-MANUAL.md) for prerequisites and a step-by-step walkthrough. diff --git a/.github/release-notes-v15-template.md b/.github/release-notes-v15-template.md index b232f97..99cc32a 100644 --- a/.github/release-notes-v15-template.md +++ b/.github/release-notes-v15-template.md @@ -7,7 +7,7 @@ cosign verify-blob release-attestation.json \ --certificate-identity "https://github.com/${REPO}/.github/workflows/release.yml@refs/tags/${TAG}" \ --certificate-oidc-issuer https://token.actions.githubusercontent.com -sha256sum -c CivicRecordsAI-${VERSION}-Setup.exe.sha256 +sha256sum -c CivicSunshine-${VERSION}-Setup.exe.sha256 sha256sum -c SHA256SUMS.txt python scripts/verify-release-provenance.py "${TAG}" \ --repo "${REPO}" \ diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9d9fea5..451db0e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -# CivicRecords AI — release-on-tag workflow (T5E). +# CivicSunshine — release-on-tag workflow (T5E). # # UNSIGNED BY DESIGN. Scott locked T5E signing posture = α (unsigned) # on 2026-04-22. This workflow contains no code-signing steps and @@ -6,8 +6,8 @@ # without changing the structure. # # Adapted from patentforgelocal/.github/workflows/release.yml (Inno Setup -# + choco + bash build driver shape). CivicRecords-specific deltas: -# - No Go/Node/Python build steps (CivicRecords runs in Docker; the +# + choco + bash build driver shape). CivicSunshine-specific deltas: +# - No Go/Node/Python build steps (CivicSunshine runs in Docker; the # installer bundles source, not compiled binaries). # - Windows-only for now; mac/Linux stay on the existing guided-script # install path. Cross-platform parity is documented as follow-on. @@ -89,7 +89,7 @@ jobs: expected = "${VERSION}" print(f"app.config.APP_VERSION={APP_VERSION}") if APP_VERSION != expected: - raise SystemExit(f"Expected CivicRecords AI {expected}, got {APP_VERSION}") + raise SystemExit(f"Expected CivicSunshine {expected}, got {APP_VERSION}") print(f"civiccore dependency import ok: {ingest_file.__name__}, {OllamaProvider.__name__}") PY @@ -241,7 +241,7 @@ jobs: # the build driver used. If this file is missing, the build # driver did not produce what the .iss OutputBaseFilename claims, # and that is the defect — not a workflow config issue. - ART="build/CivicRecordsAI-${CIVICRECORDS_VERSION}-Setup.exe" + ART="build/CivicSunshine-${CIVICRECORDS_VERSION}-Setup.exe" if [ ! -f "$ART" ]; then echo "ERROR: expected installer artifact not found: $ART" echo "Contents of build/:" @@ -377,12 +377,12 @@ jobs: gh release create "${{ github.ref_name }}" \ --draft \ --generate-notes \ - --title "CivicRecords AI ${{ github.ref_name }}" \ + --title "CivicSunshine ${{ github.ref_name }}" \ --notes-file release-notes.md || \ gh release create "${{ github.ref_name }}" \ --draft \ --generate-notes \ - --title "CivicRecords AI ${{ github.ref_name }}" \ + --title "CivicSunshine ${{ github.ref_name }}" \ --notes-file release-notes.md - name: Upload release assets @@ -395,8 +395,8 @@ jobs: # actions/download-artifact@v8, not at the top of the artifact # directory. Locate via `find` so this step is robust to either # layout and produces an actionable error if nothing matches. - EXE=$(find artifacts -name 'CivicRecordsAI-*-Setup.exe' -type f | head -1) - SHA=$(find artifacts -name 'CivicRecordsAI-*-Setup.exe.sha256' -type f | head -1) + EXE=$(find artifacts -name 'CivicSunshine-*-Setup.exe' -type f | head -1) + SHA=$(find artifacts -name 'CivicSunshine-*-Setup.exe.sha256' -type f | head -1) WHEEL=$(find artifacts -name 'civicrecords_ai-*-py3-none-any.whl' -type f | head -1) SDIST=$(find artifacts -name 'civicrecords_ai-*.tar.gz' -type f | head -1) SUMS=$(find artifacts -name 'SHA256SUMS.txt' -type f | head -1) @@ -480,7 +480,7 @@ jobs: VERSION="${GITHUB_REF_NAME#v}" WHEEL="$(find .cleanroom-assets -name 'civicrecords_ai-*-py3-none-any.whl' -type f | head -1)" if [ -z "$WHEEL" ]; then - echo "::error::No CivicRecords AI wheel downloaded from draft release." + echo "::error::No CivicSunshine wheel downloaded from draft release." exit 1 fi echo "Cleanroom wheel asset: ${WHEEL}" @@ -499,7 +499,7 @@ jobs: expected = "${VERSION}" print(f"app.config.APP_VERSION={APP_VERSION}") if APP_VERSION != expected: - raise SystemExit(f"Expected CivicRecords AI {expected}, got {APP_VERSION}") + raise SystemExit(f"Expected CivicSunshine {expected}, got {APP_VERSION}") print(f"civiccore dependency import ok: {ingest_file.__name__}, {OllamaProvider.__name__}") PY diff --git a/AGENTS.md b/AGENTS.md index fdc197f..4092640 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,4 +1,4 @@ -# CivicRecords AI — Development Standards +# CivicSunshine — Development Standards ## Current Governance Override - Agent Pipeline For Codex @@ -9,7 +9,7 @@ gates when a run is active. Before any push, release, or tag, run the relevant repository gates directly and record the evidence in the active pipeline run when one exists. For -CivicRecords AI, that normally includes recovery gates, release gates, +CivicSunshine, that normally includes recovery gates, release gates, secret-scan/provenance checks, backend tests, frontend tests, Docker/runtime proofs for install surfaces, and docs truth checks that match the changed surface. @@ -21,7 +21,7 @@ the pipeline stop controls. ## Historical Retired Rule 0 — CODER-UI-QA-TEST SKILL (superseded) -This retained historical section is superseded by Agent Pipeline for Codex above. Do not load or require the retired `coder-ui-qa-test` skill for current CivicRecords AI work. +This retained historical section is superseded by Agent Pipeline for Codex above. Do not load or require the retired `coder-ui-qa-test` skill for current CivicSunshine work. ## Hard Rule 1 — AUDITOR PROTOCOL (non-negotiable, no exceptions) diff --git a/CHANGELOG.md b/CHANGELOG.md index e02a8f4..421d9c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed +- Renamed the module's public name from CivicRecords AI to **CivicSunshine** + (sunshine laws being exactly this module's domain), avoiding confusion with + an unrelated commercial records-request product marketed as + CivicRecordsOnline. Brand-layer rename: repository (now + `CivicSuite/civicsunshine`, old URLs redirect), display names, docs, manuals, + compliance templates, installer title, and the installer artifact naming + contract (`.iss` + release workflow + release-notes templates move together; + the next release produces `CivicSunshine--Setup.exe`). Machine + identifiers (package/module ids, env vars, lowercase `civicrecords` URL + slugs) are unchanged in this pass, so existing installs and the suite + installer are unaffected. Historical records (dated audits, QA reports, + reconciliations, handoffs, prior CHANGELOG entries, published release + assets) keep the name they shipped under. + ### Security - Enforced first-login password rotation for the initial administrator account: the startup-created admin is marked `must_change_password`, staff/admin diff --git a/CLAUDE.md b/CLAUDE.md index cfcc473..e710176 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,4 +1,4 @@ -# CivicRecords AI — Development Standards +# CivicSunshine — Development Standards ## Hard Rule 0 — CODER-UI-QA-TEST SKILL (load on every coding session, no exceptions) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d688dfc..3319044 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,6 @@ -# Contributing to CivicRecords AI +# Contributing to CivicSunshine -Thank you for your interest in contributing to CivicRecords AI. This project helps American cities respond to open records requests using AI-powered document search — contributions that improve accuracy, coverage, or usability directly benefit municipal transparency. +Thank you for your interest in contributing to CivicSunshine. This project helps American cities respond to open records requests using AI-powered document search — contributions that improve accuracy, coverage, or usability directly benefit municipal transparency. ## Development Setup diff --git a/HANDOFF.md b/HANDOFF.md index 6f78e53..e13a66f 100644 --- a/HANDOFF.md +++ b/HANDOFF.md @@ -1,4 +1,4 @@ -# CivicRecords AI — Auditor Session Handoff +# CivicSunshine — Auditor Session Handoff **Date:** 2026-04-17 **Status:** Previous auditor session failed. New session starting with a reorientation prompt. Prior auditor did not apply the `coder-ui-qa-test` skill despite it being available from session start. diff --git a/LICENSE b/LICENSE index 3b285b5..9a0199c 100644 --- a/LICENSE +++ b/LICENSE @@ -83,7 +83,7 @@ obligations consistent with this License. END OF TERMS AND CONDITIONS -Copyright 2026 CivicRecords AI Contributors +Copyright 2026 CivicSunshine Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/README.md b/README.md index f2e531f..c691fea 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,18 @@ -# CivicRecords AI +# CivicSunshine + +> Formerly published as "CivicRecords AI"; renamed 2026-07. Package and service identifiers are unchanged. **Open-source, locally-hosted AI that helps American cities respond to open records requests.** -> **Release train notice (2026-05-24).** CivicRecords AI v1.7.3 adds wheel and sdist release assets for direct-pip consumers. No functional behavior changes; the city-core installer continues to vendor source, and the runtime remains pinned to the published CivicCore v1.2.0 shared-ingestion release wheel. The older `v1.4.10` tag remains available as historical source only and must not be promoted as an attested baseline. +> **Release train notice (2026-05-24).** CivicSunshine v1.7.3 adds wheel and sdist release assets for direct-pip consumers. No functional behavior changes; the city-core installer continues to vendor source, and the runtime remains pinned to the published CivicCore v1.2.0 shared-ingestion release wheel. The older `v1.4.10` tag remains available as historical source only and must not be promoted as an attested baseline. -CivicRecords AI runs entirely on a single machine inside your city's network — no cloud subscriptions, no vendor lock-in, no resident data leaving the building. It ingests your city's documents, makes them searchable with AI-powered natural language queries, detects potential exemptions, and manages the full request lifecycle from intake to response. +CivicSunshine runs entirely on a single machine inside your city's network — no cloud subscriptions, no vendor lock-in, no resident data leaving the building. It ingests your city's documents, makes them searchable with AI-powered natural language queries, detects potential exemptions, and manages the full request lifecycle from intake to response. ## Why This Exists Every city in America processes open records requests (FOIA, CORA, and state equivalents). Staff manually search file shares, email archives, and databases — then review every document for exemptions before release. It's slow, error-prone, and a growing burden as request volumes increase. -No open-source tool exists for the **responder side** of open records at the municipal level. CivicRecords AI fills that gap. +No open-source tool exists for the **responder side** of open records at the municipal level. CivicSunshine fills that gap. ## Key Features @@ -27,7 +29,7 @@ No open-source tool exists for the **responder side** of open records at the mun - **Notification Service** — Template-based notification system with SMTP email delivery via Celery beat (60s interval). Configure SMTP_HOST, SMTP_PORT, SMTP_USERNAME, SMTP_PASSWORD in .env to enable. Notification dispatch into status transitions pending - **Compliance by Design** — Hash-chained audit logs, human-in-the-loop enforcement, AI content labeling, data sovereignty verification. Designed for Colorado CAIA and 50-state regulatory compliance. CJIS compliance gate for public safety connectors - **Civic Design System** — Professional UI built with shadcn/ui and civic blue design tokens. Responsive shell: fixed 240px sidebar at ≥768px, hamburger-driven slide-in drawer below that (with focus trap, ESC close, overlay dim, auto-close on route change). WCAG 2.2 AA targeted (44px touch targets, skip-to-content link, icon+color status badges, programmatic label→input associations on admin forms, `role="alert"` validation errors with actionable copy — full third-party accessibility audit still pending) -- **Federation-Ready** — REST API with service accounts enables future cross-jurisdiction record discovery between CivicRecords AI instances +- **Federation-Ready** — REST API with service accounts enables future cross-jurisdiction record discovery between CivicSunshine instances ## Quick Start @@ -59,18 +61,18 @@ Any computer with a modern web browser. Clerks open the server's URL — **`http > **Install paths.** Two options ship today: > -> 1. **Windows double-click installer (T5E, UNSIGNED).** A signed build is a future release — this one is not. The unsigned installer is published on every release tag at `releases/download//CivicRecordsAI--Setup.exe` along with a SHA-256 checksum for independent verification. On first run Windows SmartScreen shows **"Windows protected your PC — Unknown publisher."** This is expected. Click **More info → Run anyway** to proceed. See [installer/windows/README.md](installer/windows/README.md) for the full SmartScreen walkthrough and checksum-verify steps. The installer bundles the repo snapshot, runs a prereq check (Docker Desktop, WSL 2 + Virtual Machine Platform, 32 GB RAM floor, optional host Ollama), then runs `install.ps1` (via `installer\windows\launch-install.ps1`). `install.ps1` **auto-pulls `nomic-embed-text` and auto-pulls the Gemma 4 tag you select in the picker** (default `gemma4:e4b`) — expect several minutes on first run — and seeds the T5B baseline datasets. +> 1. **Windows double-click installer (T5E, UNSIGNED).** A signed build is a future release — this one is not. The unsigned installer is published on every release tag at `releases/download//CivicSunshine--Setup.exe` along with a SHA-256 checksum for independent verification. On first run Windows SmartScreen shows **"Windows protected your PC — Unknown publisher."** This is expected. Click **More info → Run anyway** to proceed. See [installer/windows/README.md](installer/windows/README.md) for the full SmartScreen walkthrough and checksum-verify steps. The installer bundles the repo snapshot, runs a prereq check (Docker Desktop, WSL 2 + Virtual Machine Platform, 32 GB RAM floor, optional host Ollama), then runs `install.ps1` (via `installer\windows\launch-install.ps1`). `install.ps1` **auto-pulls `nomic-embed-text` and auto-pulls the Gemma 4 tag you select in the picker** (default `gemma4:e4b`) — expect several minutes on first run — and seeds the T5B baseline datasets. > > 2. **Script-based install (Linux / macOS — not lifecycle-certified — and Windows if you prefer CLI).** Windows-only currently; macOS support pending lifecycle certification. The scripts below configure and start the Docker Compose stack on macOS and Linux as a non-certified path, and on Windows as a CLI alternative. They do **not** install Docker, WSL, or any other system prerequisites — those must already be present. `install.ps1` / `install.sh` both ship the 4-model Gemma 4 picker, auto-pull the selected LLM plus `nomic-embed-text`, and auto-seed the baseline datasets on first boot. > > **Two shortcuts, two flows.** The Windows installer creates **separate** Start Menu entries for the two operations — don't confuse them: > -> - **Start CivicRecords AI** → daily start. Runs `docker compose up -d` and opens `http://localhost:8080/`. Does **not** run the prereq check, does **not** invoke `install.ps1`, does **not** pull any model, does **not** re-seed data. The Desktop shortcut (if you opted in) mirrors this daily-start behavior. -> - **Install or Repair CivicRecords AI** → full bootstrap/repair. Runs the prereq check, then `install.ps1` (which may show the picker and pull models). Use this for first-run setup (the installer fires it automatically for you the first time), when you want to switch LLMs, or to repair a broken stack. +> - **Start CivicSunshine** → daily start. Runs `docker compose up -d` and opens `http://localhost:8080/`. Does **not** run the prereq check, does **not** invoke `install.ps1`, does **not** pull any model, does **not** re-seed data. The Desktop shortcut (if you opted in) mirrors this daily-start behavior. +> - **Install or Repair CivicSunshine** → full bootstrap/repair. Runs the prereq check, then `install.ps1` (which may show the picker and pull models). Use this for first-run setup (the installer fires it automatically for you the first time), when you want to switch LLMs, or to repair a broken stack. > > **Docker Desktop and WSL 2** must be installed and running before either path; the installer detects their absence and prints concrete remediation, but does not install them for you. -For the CivicSuite starter-set package, run `python scripts/check_starter_set_integration.py --umbrella-root ..\civicsuite --require-archives` from this repo to verify that CivicCore installs first, CivicRecords AI and CivicClerk are selectable, package workflow proof is required, and Linux/Windows starter-set archives exist. +For the CivicSuite starter-set package, run `python scripts/check_starter_set_integration.py --umbrella-root ..\civicsuite --require-archives` from this repo to verify that CivicCore installs first, CivicSunshine and CivicClerk are selectable, package workflow proof is required, and Linux/Windows starter-set archives exist. **Windows:** ```powershell @@ -96,13 +98,13 @@ bash install.sh ### Phase 1 migration layer -CivicRecords AI backend installs `civiccore` (the shared CivicSuite schema + migration runtime) as a dependency. The current release line is pinned to the published CivicCore v1.2.0 wheel so Records-AI consumes the shared document-ingestion pipeline from a release artifact. Records-specific Celery tasks, scheduler wiring, connector sync, and datasource routes remain local; parsing, chunking, local Ollama embeddings, and pgvector document/chunk writes come from `civiccore.ingest`. Earlier interim branches used a commit archive while CivicCore v1.2.0 was unreleased; v1.7.2 returned to the versioned release-asset dependency pattern, and v1.7.3 adds direct-pip wheel and sdist assets without changing runtime behavior. +CivicSunshine backend installs `civiccore` (the shared CivicSuite schema + migration runtime) as a dependency. The current release line is pinned to the published CivicCore v1.2.0 wheel so Records-AI consumes the shared document-ingestion pipeline from a release artifact. Records-specific Celery tasks, scheduler wiring, connector sync, and datasource routes remain local; parsing, chunking, local Ollama embeddings, and pgvector document/chunk writes come from `civiccore.ingest`. Earlier interim branches used a commit archive while CivicCore v1.2.0 was unreleased; v1.7.2 returned to the versioned release-asset dependency pattern, and v1.7.3 adds direct-pip wheel and sdist assets without changing runtime behavior. Migrations run in two layers: `civiccore` first (creates/updates the 16 shared tables), then this repo's Alembic chain on top. See [ADR-0003](https://github.com/CivicSuite/civicsuite/blob/main/docs/architecture/ADR-0003-civiccore-alembic-baseline-strategy.md) for the full gate contract. ### Release provenance -CivicRecords AI now wires release preflight to CivicCore's canonical +CivicSunshine now wires release preflight to CivicCore's canonical `civiccore.release_provenance` helper. This matters because GitHub release pages can show the target commit as "Verified" even when the release tag is lightweight or unsigned. Treat that badge as a commit signal only; the actual @@ -210,7 +212,7 @@ All platforms use identical Docker containers — the application runs in Linux ## Data Sovereignty -CivicRecords AI is designed for environments where resident data must never leave the network: +CivicSunshine is designed for environments where resident data must never leave the network: - Runs entirely on local hardware — no cloud dependencies - No telemetry, analytics, or crash reporting diff --git a/README.txt b/README.txt index 50bec3f..4fb6e8e 100644 --- a/README.txt +++ b/README.txt @@ -1,16 +1,18 @@ -# CivicRecords AI +# CivicSunshine + +> Formerly published as "CivicRecords AI"; renamed 2026-07. Package and service identifiers are unchanged. **Open-source, locally-hosted AI that helps American cities respond to open records requests.** -> **Release train notice (2026-05-24).** CivicRecords AI v1.7.3 adds wheel and sdist release assets for direct-pip consumers. No functional behavior changes; the city-core installer continues to vendor source, and the runtime remains pinned to the published CivicCore v1.2.0 shared-ingestion release wheel. The older `v1.4.10` tag remains available as historical source only and must not be promoted as an attested baseline. +> **Release train notice (2026-05-24).** CivicSunshine v1.7.3 adds wheel and sdist release assets for direct-pip consumers. No functional behavior changes; the city-core installer continues to vendor source, and the runtime remains pinned to the published CivicCore v1.2.0 shared-ingestion release wheel. The older `v1.4.10` tag remains available as historical source only and must not be promoted as an attested baseline. -CivicRecords AI runs entirely on a single machine inside your city's network — no cloud subscriptions, no vendor lock-in, no resident data leaving the building. It ingests your city's documents, makes them searchable with AI-powered natural language queries, detects potential exemptions, and manages the full request lifecycle from intake to response. +CivicSunshine runs entirely on a single machine inside your city's network — no cloud subscriptions, no vendor lock-in, no resident data leaving the building. It ingests your city's documents, makes them searchable with AI-powered natural language queries, detects potential exemptions, and manages the full request lifecycle from intake to response. ## Why This Exists Every city in America processes open records requests (FOIA, CORA, and state equivalents). Staff manually search file shares, email archives, and databases — then review every document for exemptions before release. It's slow, error-prone, and a growing burden as request volumes increase. -No open-source tool exists for the **responder side** of open records at the municipal level. CivicRecords AI fills that gap. +No open-source tool exists for the **responder side** of open records at the municipal level. CivicSunshine fills that gap. ## Key Features @@ -27,7 +29,7 @@ No open-source tool exists for the **responder side** of open records at the mun - **Notification Service** — Template-based notification system with SMTP email delivery via Celery beat (60s interval). Configure SMTP_HOST, SMTP_PORT, SMTP_USERNAME, SMTP_PASSWORD in .env to enable. Notification dispatch into status transitions pending - **Compliance by Design** — Hash-chained audit logs, human-in-the-loop enforcement, AI content labeling, data sovereignty verification. Designed for Colorado CAIA and 50-state regulatory compliance. CJIS compliance gate for public safety connectors - **Civic Design System** — Professional UI built with shadcn/ui and civic blue design tokens. Responsive shell: fixed 240px sidebar at ≥768px, hamburger-driven slide-in drawer below that (with focus trap, ESC close, overlay dim, auto-close on route change). WCAG 2.2 AA targeted (44px touch targets, skip-to-content link, icon+color status badges, programmatic label→input associations on admin forms, `role="alert"` validation errors with actionable copy — full third-party accessibility audit still pending) -- **Federation-Ready** — REST API with service accounts enables future cross-jurisdiction record discovery between CivicRecords AI instances +- **Federation-Ready** — REST API with service accounts enables future cross-jurisdiction record discovery between CivicSunshine instances ## Quick Start @@ -59,18 +61,18 @@ Any computer with a modern web browser. Clerks open the server's URL — **`http > **Install paths.** Two options ship today: > -> 1. **Windows double-click installer (T5E, UNSIGNED).** A signed build is a future release — this one is not. The unsigned installer is published on every release tag at `releases/download//CivicRecordsAI--Setup.exe` along with a SHA-256 checksum for independent verification. On first run Windows SmartScreen shows **"Windows protected your PC — Unknown publisher."** This is expected. Click **More info → Run anyway** to proceed. See [installer/windows/README.md](installer/windows/README.md) for the full SmartScreen walkthrough and checksum-verify steps. The installer bundles the repo snapshot, runs a prereq check (Docker Desktop, WSL 2 + Virtual Machine Platform, 32 GB RAM floor, optional host Ollama), then runs `install.ps1` (via `installer\windows\launch-install.ps1`). `install.ps1` **auto-pulls `nomic-embed-text` and auto-pulls the Gemma 4 tag you select in the picker** (default `gemma4:e4b`) — expect several minutes on first run — and seeds the T5B baseline datasets. +> 1. **Windows double-click installer (T5E, UNSIGNED).** A signed build is a future release — this one is not. The unsigned installer is published on every release tag at `releases/download//CivicSunshine--Setup.exe` along with a SHA-256 checksum for independent verification. On first run Windows SmartScreen shows **"Windows protected your PC — Unknown publisher."** This is expected. Click **More info → Run anyway** to proceed. See [installer/windows/README.md](installer/windows/README.md) for the full SmartScreen walkthrough and checksum-verify steps. The installer bundles the repo snapshot, runs a prereq check (Docker Desktop, WSL 2 + Virtual Machine Platform, 32 GB RAM floor, optional host Ollama), then runs `install.ps1` (via `installer\windows\launch-install.ps1`). `install.ps1` **auto-pulls `nomic-embed-text` and auto-pulls the Gemma 4 tag you select in the picker** (default `gemma4:e4b`) — expect several minutes on first run — and seeds the T5B baseline datasets. > > 2. **Script-based install (Linux / macOS — not lifecycle-certified — and Windows if you prefer CLI).** Windows-only currently; macOS support pending lifecycle certification. The scripts below configure and start the Docker Compose stack on macOS and Linux as a non-certified path, and on Windows as a CLI alternative. They do **not** install Docker, WSL, or any other system prerequisites — those must already be present. `install.ps1` / `install.sh` both ship the 4-model Gemma 4 picker, auto-pull the selected LLM plus `nomic-embed-text`, and auto-seed the baseline datasets on first boot. > > **Two shortcuts, two flows.** The Windows installer creates **separate** Start Menu entries for the two operations — don't confuse them: > -> - **Start CivicRecords AI** → daily start. Runs `docker compose up -d` and opens `http://localhost:8080/`. Does **not** run the prereq check, does **not** invoke `install.ps1`, does **not** pull any model, does **not** re-seed data. The Desktop shortcut (if you opted in) mirrors this daily-start behavior. -> - **Install or Repair CivicRecords AI** → full bootstrap/repair. Runs the prereq check, then `install.ps1` (which may show the picker and pull models). Use this for first-run setup (the installer fires it automatically for you the first time), when you want to switch LLMs, or to repair a broken stack. +> - **Start CivicSunshine** → daily start. Runs `docker compose up -d` and opens `http://localhost:8080/`. Does **not** run the prereq check, does **not** invoke `install.ps1`, does **not** pull any model, does **not** re-seed data. The Desktop shortcut (if you opted in) mirrors this daily-start behavior. +> - **Install or Repair CivicSunshine** → full bootstrap/repair. Runs the prereq check, then `install.ps1` (which may show the picker and pull models). Use this for first-run setup (the installer fires it automatically for you the first time), when you want to switch LLMs, or to repair a broken stack. > > **Docker Desktop and WSL 2** must be installed and running before either path; the installer detects their absence and prints concrete remediation, but does not install them for you. -For the CivicSuite starter-set package, run `python scripts/check_starter_set_integration.py --umbrella-root ..\civicsuite --require-archives` from this repo to verify that CivicCore installs first, CivicRecords AI and CivicClerk are selectable, package workflow proof is required, and Linux/Windows starter-set archives exist. +For the CivicSuite starter-set package, run `python scripts/check_starter_set_integration.py --umbrella-root ..\civicsuite --require-archives` from this repo to verify that CivicCore installs first, CivicSunshine and CivicClerk are selectable, package workflow proof is required, and Linux/Windows starter-set archives exist. **Windows:** ```powershell @@ -96,13 +98,13 @@ bash install.sh ### Phase 1 migration layer -CivicRecords AI backend installs `civiccore` (the shared CivicSuite schema + migration runtime) as a dependency. The current release line is pinned to the published CivicCore v1.2.0 wheel so Records-AI consumes the shared document-ingestion pipeline from a release artifact. Records-specific Celery tasks, scheduler wiring, connector sync, and datasource routes remain local; parsing, chunking, local Ollama embeddings, and pgvector document/chunk writes come from `civiccore.ingest`. Earlier interim branches used a commit archive while CivicCore v1.2.0 was unreleased; v1.7.2 returned to the versioned release-asset dependency pattern, and v1.7.3 adds direct-pip wheel and sdist assets without changing runtime behavior. +CivicSunshine backend installs `civiccore` (the shared CivicSuite schema + migration runtime) as a dependency. The current release line is pinned to the published CivicCore v1.2.0 wheel so Records-AI consumes the shared document-ingestion pipeline from a release artifact. Records-specific Celery tasks, scheduler wiring, connector sync, and datasource routes remain local; parsing, chunking, local Ollama embeddings, and pgvector document/chunk writes come from `civiccore.ingest`. Earlier interim branches used a commit archive while CivicCore v1.2.0 was unreleased; v1.7.2 returned to the versioned release-asset dependency pattern, and v1.7.3 adds direct-pip wheel and sdist assets without changing runtime behavior. Migrations run in two layers: `civiccore` first (creates/updates the 16 shared tables), then this repo's Alembic chain on top. See [ADR-0003](https://github.com/CivicSuite/civicsuite/blob/main/docs/architecture/ADR-0003-civiccore-alembic-baseline-strategy.md) for the full gate contract. ### Release provenance -CivicRecords AI now wires release preflight to CivicCore's canonical +CivicSunshine now wires release preflight to CivicCore's canonical `civiccore.release_provenance` helper. This matters because GitHub release pages can show the target commit as "Verified" even when the release tag is lightweight or unsigned. Treat that badge as a commit signal only; the actual @@ -203,7 +205,7 @@ All platforms use identical Docker containers — the application runs in Linux ## Data Sovereignty -CivicRecords AI is designed for environments where resident data must never leave the network: +CivicSunshine is designed for environments where resident data must never leave the network: - Runs entirely on local hardware — no cloud dependencies - No telemetry, analytics, or crash reporting diff --git a/SUPPORT.md b/SUPPORT.md index c1d424f..ba7ea95 100644 --- a/SUPPORT.md +++ b/SUPPORT.md @@ -1,6 +1,6 @@ # Support -CivicRecords AI is an open-source, locally-hosted FOIA / public-records management system. Support is community-driven via GitHub. +CivicSunshine is an open-source, locally-hosted FOIA / public-records management system. Support is community-driven via GitHub. ## Where to ask diff --git a/USER-MANUAL.md b/USER-MANUAL.md index 300f1c8..7995114 100644 --- a/USER-MANUAL.md +++ b/USER-MANUAL.md @@ -1,8 +1,8 @@ -# CivicRecords AI — User Manual +# CivicSunshine — User Manual **Version 1.7.3 - May 2026** -> **Release train notice (2026-05-24).** CivicRecords AI v1.7.3 is a release-asset convention bring-up that adds wheel and sdist release assets for direct-pip consumers. No functional behavior changes; the city-core installer continues to vendor source, and the runtime remains pinned to the published CivicCore v1.2.0 shared-ingestion release wheel. The older `v1.4.10` tag remains available as historical pre-gate, provisional source only and must not be promoted as an attested baseline. +> **Release train notice (2026-05-24).** CivicSunshine v1.7.3 is a release-asset convention bring-up that adds wheel and sdist release assets for direct-pip consumers. No functional behavior changes; the city-core installer continues to vendor source, and the runtime remains pinned to the published CivicCore v1.2.0 shared-ingestion release wheel. The older `v1.4.10` tag remains available as historical pre-gate, provisional source only and must not be promoted as an attested baseline. --- @@ -19,13 +19,13 @@ --- -## A.1 What Is CivicRecords AI? +## A.1 What Is CivicSunshine? -CivicRecords AI is a tool your city uses to respond to public records requests — the formal requests that residents, journalists, and attorneys submit asking for government documents. +CivicSunshine is a tool your city uses to respond to public records requests — the formal requests that residents, journalists, and attorneys submit asking for government documents. Before this tool, staff had to search through file shares, email archives, and multiple databases by hand, then review every document one by one to check for sensitive information. That process could take hours or days for a single request. -CivicRecords AI automates the searching, surfaces the most relevant documents, flags information that may be legally protected, and tracks every request from start to finish. +CivicSunshine automates the searching, surfaces the most relevant documents, flags information that may be legally protected, and tracks every request from start to finish. **What you can do with it:** - Search across all your city's connected documents using plain English questions @@ -182,7 +182,7 @@ All decisions are recorded with a timestamp and your name. ## A.7 Response Letters -CivicRecords AI can draft a response letter for each request. +CivicSunshine can draft a response letter for each request. 1. Open a request in **Drafting** status. 2. Click **Generate Draft Letter**. @@ -232,9 +232,9 @@ This means the system lost connection to that data source after repeated failure | **Exemption** | A legal reason why certain information does not have to be released. Examples: Social Security numbers, active criminal investigation details, attorney-client communications. | | **PII** | Personal Identifiable Information — data that could identify a specific person, like a Social Security number or home address. | | **Responsive document** | A document that directly answers what the requester asked for. | -| **Data source** | A connected system that CivicRecords AI can search — a file folder, database, or web API. | +| **Data source** | A connected system that CivicSunshine can search — a file folder, database, or web API. | | **Ingestion / Sync** | The process of reading documents from a data source and making them searchable. | -| **Redaction** | Blacking out exempt information before releasing a document. CivicRecords AI flags candidates; staff perform the actual redaction. | +| **Redaction** | Blacking out exempt information before releasing a document. CivicSunshine flags candidates; staff perform the actual redaction. | | **Audit log** | A permanent, tamper-evident record of every action taken in the system. Required for legal compliance. | | **Circuit breaker** | A safety feature that pauses syncing from a data source if it fails repeatedly, preventing runaway errors. | | **AI Summary** | A short paragraph generated by the AI describing what a document contains. Used to quickly assess relevance — not a legal summary. | @@ -245,7 +245,7 @@ This means the system lost connection to that data source after repeated failure # Section B — Technical Reference -*For IT administrators, system integrators, and power users who install, configure, and maintain CivicRecords AI.* +*For IT administrators, system integrators, and power users who install, configure, and maintain CivicSunshine.* --- @@ -273,7 +273,7 @@ There are two supported install paths. Pick the one that matches your platform a > **Install paths currently shipped:** > -> 1. **Windows double-click installer (T5E, UNSIGNED).** A real `.exe` installer built with Inno Setup 6.x is produced on every `v*` tag and published to GitHub Releases as `CivicRecordsAI--Setup.exe`. **It is unsigned by design for this release** (Scott-locked B3=α posture) — Windows SmartScreen will show "Windows protected your PC — Unknown publisher." on first run. Click **More info → Run anyway** to proceed. A SHA-256 checksum is published alongside each release asset for independent verification. The installer bundles the repo snapshot, runs a prerequisite check (Docker Desktop, WSL 2 + Virtual Machine Platform, 32 GB RAM floor, optional host Ollama), then runs `install.ps1` through `launch-install.ps1`. See [`installer/windows/README.md`](installer/windows/README.md) for the full SmartScreen walkthrough, the split Start/Install shortcut model, and checksum-verify steps. +> 1. **Windows double-click installer (T5E, UNSIGNED).** A real `.exe` installer built with Inno Setup 6.x is produced on every `v*` tag and published to GitHub Releases as `CivicSunshine--Setup.exe`. **It is unsigned by design for this release** (Scott-locked B3=α posture) — Windows SmartScreen will show "Windows protected your PC — Unknown publisher." on first run. Click **More info → Run anyway** to proceed. A SHA-256 checksum is published alongside each release asset for independent verification. The installer bundles the repo snapshot, runs a prerequisite check (Docker Desktop, WSL 2 + Virtual Machine Platform, 32 GB RAM floor, optional host Ollama), then runs `install.ps1` through `launch-install.ps1`. See [`installer/windows/README.md`](installer/windows/README.md) for the full SmartScreen walkthrough, the split Start/Install shortcut model, and checksum-verify steps. > 2. **Script-based install (macOS / Linux — not lifecycle-certified — and Windows if you prefer CLI).** Windows-only currently; macOS support pending lifecycle certification. The scripts below configure and launch the Docker Compose stack on macOS and Linux as a non-certified path, and on Windows as a CLI alternative. They do **not** install Docker Desktop, Docker Engine, WSL, or any other system prerequisite — those must be present before the scripts run. If Docker is not installed, the scripts fail with a clear error and you must install Docker manually before retrying. > > **Cross-platform parity:** Windows-only currently; macOS support pending lifecycle certification. No native installer ships for macOS or Linux — that parity is explicit follow-on work and is not scheduled. macOS and Linux operators use the script path below, which is not lifecycle-certified. @@ -285,7 +285,7 @@ There are two supported install paths. Pick the one that matches your platform a 2. Ensure Docker is running (you should see the Docker icon in your taskbar/menu bar, or `docker info` returns without error). 3. Confirm system requirements: 8+ CPU cores, 32 GB RAM, 50 GB free disk. -**Windows (double-click installer):** Download `CivicRecordsAI--Setup.exe` from the [GitHub Releases page](https://github.com/CivicSuite/civicrecords-ai/releases) for the tag you want, double-click it, acknowledge the SmartScreen "Unknown publisher" prompt (expected — see above), and follow the installer prompts. On first launch the installer automatically runs the full bootstrap (prereq check → model pull → first-boot seed). +**Windows (double-click installer):** Download `CivicSunshine--Setup.exe` from the [GitHub Releases page](https://github.com/CivicSuite/civicrecords-ai/releases) for the tag you want, double-click it, acknowledge the SmartScreen "Unknown publisher" prompt (expected — see above), and follow the installer prompts. On first launch the installer automatically runs the full bootstrap (prereq check → model pull → first-boot seed). **Windows (script path):** ```powershell @@ -337,7 +337,7 @@ All configuration lives in `.env` in the repo root. Never commit this file. ### B.3.1 Secrets Handling -CivicRecords AI v1.6.0 and later stores the JWT signing secret and first-admin password +CivicSunshine v1.6.0 and later stores the JWT signing secret and first-admin password in files instead of container environment variables. On Linux and macOS, `install.sh` writes `./data/secrets/jwt_secret` and `./data/secrets/first_admin_password` with `0400` permissions. Docker Compose @@ -354,7 +354,7 @@ docker exec env | grep -E "JWT_SECRET|FIRST_ADMIN_PASSWO The command should return no lines. The first administrator password is for first login only. After a fresh -install, CivicRecords AI allows the administrator to open the account endpoint +install, CivicSunshine allows the administrator to open the account endpoint needed to change the password, but staff/admin screens remain locked until the password has been rotated. The screen message tells the operator to open account settings and change the initial administrator password before continuing. @@ -377,7 +377,7 @@ Desktop deployments. ## B.3.2 Portal Mode (Private vs. Public) -CivicRecords AI can run in one of two modes. You pick the mode when you install, and you can change it later by editing `.env` and restarting the stack. **If you do nothing, the system runs in private mode** — the same behavior CivicRecords AI has always had. +CivicSunshine can run in one of two modes. You pick the mode when you install, and you can change it later by editing `.env` and restarting the stack. **If you do nothing, the system runs in private mode** — the same behavior CivicSunshine has always had. ### What each mode does @@ -401,7 +401,7 @@ A resident must create an account and sign in before they can submit a request. The installer will ask you which mode to run in. -**On Windows** (running `install.ps1` or the Start-Menu "Install or Repair CivicRecords AI" shortcut): +**On Windows** (running `install.ps1` or the Start-Menu "Install or Repair CivicSunshine" shortcut): ``` Portal mode — private (staff-only) or public (adds minimal resident surface)? @@ -420,9 +420,9 @@ Press Enter to accept the default (`private`), or type `public` and press Enter. ### Changing the mode after installation -You can switch modes at any time without reinstalling. You will need access to the server where CivicRecords AI is running and permission to restart the Docker stack. +You can switch modes at any time without reinstalling. You will need access to the server where CivicSunshine is running and permission to restart the Docker stack. -1. Open `.env` in the CivicRecords AI install folder (the same folder that has `docker-compose.yml`). +1. Open `.env` in the CivicSunshine install folder (the same folder that has `docker-compose.yml`). 2. Find the line that reads `PORTAL_MODE=private` (or add it if it is missing). 3. Change it to `PORTAL_MODE=public` — or the reverse, if you are switching back to private. 4. Save the file. @@ -442,15 +442,15 @@ If the site does not come up the way you expect, the most common cause is a typo ### Glossary -- **`.env`** — A plain-text configuration file in the CivicRecords AI install folder that holds settings like database passwords, mail server settings, and now `PORTAL_MODE`. Never share this file with anyone outside your IT team. -- **Docker stack** — The collection of running services (database, API, frontend, etc.) that make up CivicRecords AI. +- **`.env`** — A plain-text configuration file in the CivicSunshine install folder that holds settings like database passwords, mail server settings, and now `PORTAL_MODE`. Never share this file with anyone outside your IT team. +- **Docker stack** — The collection of running services (database, API, frontend, etc.) that make up CivicSunshine. - **Resident account** — A user account with the "public" role. Can submit requests but cannot view other people's requests or use any staff tools. --- ## B.3.3 Encryption Key for Connector Credentials (ENG-001 / Tier 6) -CivicRecords AI encrypts the credentials you enter for each connected data source — API keys, bearer tokens, OAuth2 client secrets, Basic-auth passwords, and database connection strings — before writing them to PostgreSQL. The encryption is driven by a single environment variable, `ENCRYPTION_KEY`. +CivicSunshine encrypts the credentials you enter for each connected data source — API keys, bearer tokens, OAuth2 client secrets, Basic-auth passwords, and database connection strings — before writing them to PostgreSQL. The encryption is driven by a single environment variable, `ENCRYPTION_KEY`. ### What the key protects @@ -532,7 +532,7 @@ docker compose restart worker ## B.5 Connector Types and Configuration -CivicRecords AI uses a standardized connector framework. Each connector must implement: `authenticate()`, `discover()`, `fetch()`, and `health_check()`. +CivicSunshine uses a standardized connector framework. Each connector must implement: `authenticate()`, `discover()`, `fetch()`, and `health_check()`. ### B.5.0 Adding a Data Source (Wizard Walkthrough) @@ -766,7 +766,7 @@ curl http://localhost:8000/datasources \ ## B.9 Model Registry -CivicRecords AI uses two model types: +CivicSunshine uses two model types: | Type | Default | Notes | |---|---|---| @@ -874,7 +874,7 @@ docker compose exec api alembic upgrade head # Rerun migrations ## C.1 System Overview -CivicRecords AI runs as seven Docker Compose services communicating over an internal Docker network. All data stays on the host machine — no external dependencies after initial setup. +CivicSunshine runs as seven Docker Compose services communicating over an internal Docker network. All data stays on the host machine — no external dependencies after initial setup. ```mermaid graph TB @@ -1307,4 +1307,4 @@ docker compose exec api python -m app.audit.verify_chain --- -*End of User Manual — CivicRecords AI v1.1+ · April 2026* +*End of User Manual — CivicSunshine v1.1+ · April 2026* diff --git a/USER-MANUAL.txt b/USER-MANUAL.txt index eef7c95..f7c5517 100644 --- a/USER-MANUAL.txt +++ b/USER-MANUAL.txt @@ -1,8 +1,8 @@ -# CivicRecords AI — User Manual +# CivicSunshine — User Manual **Version 1.7.3 - May 2026** -> **Release train notice (2026-05-24).** CivicRecords AI v1.7.3 is a release-asset convention bring-up that adds wheel and sdist release assets for direct-pip consumers. No functional behavior changes; the city-core installer continues to vendor source, and the runtime remains pinned to the published CivicCore v1.2.0 shared-ingestion release wheel. The older `v1.4.10` tag remains available as historical pre-gate, provisional source only and must not be promoted as an attested baseline. +> **Release train notice (2026-05-24).** CivicSunshine v1.7.3 is a release-asset convention bring-up that adds wheel and sdist release assets for direct-pip consumers. No functional behavior changes; the city-core installer continues to vendor source, and the runtime remains pinned to the published CivicCore v1.2.0 shared-ingestion release wheel. The older `v1.4.10` tag remains available as historical pre-gate, provisional source only and must not be promoted as an attested baseline. --- @@ -19,13 +19,13 @@ --- -## A.1 What Is CivicRecords AI? +## A.1 What Is CivicSunshine? -CivicRecords AI is a tool your city uses to respond to public records requests — the formal requests that residents, journalists, and attorneys submit asking for government documents. +CivicSunshine is a tool your city uses to respond to public records requests — the formal requests that residents, journalists, and attorneys submit asking for government documents. Before this tool, staff had to search through file shares, email archives, and multiple databases by hand, then review every document one by one to check for sensitive information. That process could take hours or days for a single request. -CivicRecords AI automates the searching, surfaces the most relevant documents, flags information that may be legally protected, and tracks every request from start to finish. +CivicSunshine automates the searching, surfaces the most relevant documents, flags information that may be legally protected, and tracks every request from start to finish. **What you can do with it:** - Search across all your city's connected documents using plain English questions @@ -182,7 +182,7 @@ All decisions are recorded with a timestamp and your name. ## A.7 Response Letters -CivicRecords AI can draft a response letter for each request. +CivicSunshine can draft a response letter for each request. 1. Open a request in **Drafting** status. 2. Click **Generate Draft Letter**. @@ -232,9 +232,9 @@ This means the system lost connection to that data source after repeated failure | **Exemption** | A legal reason why certain information does not have to be released. Examples: Social Security numbers, active criminal investigation details, attorney-client communications. | | **PII** | Personal Identifiable Information — data that could identify a specific person, like a Social Security number or home address. | | **Responsive document** | A document that directly answers what the requester asked for. | -| **Data source** | A connected system that CivicRecords AI can search — a file folder, database, or web API. | +| **Data source** | A connected system that CivicSunshine can search — a file folder, database, or web API. | | **Ingestion / Sync** | The process of reading documents from a data source and making them searchable. | -| **Redaction** | Blacking out exempt information before releasing a document. CivicRecords AI flags candidates; staff perform the actual redaction. | +| **Redaction** | Blacking out exempt information before releasing a document. CivicSunshine flags candidates; staff perform the actual redaction. | | **Audit log** | A permanent, tamper-evident record of every action taken in the system. Required for legal compliance. | | **Circuit breaker** | A safety feature that pauses syncing from a data source if it fails repeatedly, preventing runaway errors. | | **AI Summary** | A short paragraph generated by the AI describing what a document contains. Used to quickly assess relevance — not a legal summary. | @@ -245,7 +245,7 @@ This means the system lost connection to that data source after repeated failure # Section B — Technical Reference -*For IT administrators, system integrators, and power users who install, configure, and maintain CivicRecords AI.* +*For IT administrators, system integrators, and power users who install, configure, and maintain CivicSunshine.* --- @@ -273,7 +273,7 @@ There are two supported install paths. Pick the one that matches your platform a > **Install paths currently shipped:** > -> 1. **Windows double-click installer (T5E, UNSIGNED).** A real `.exe` installer built with Inno Setup 6.x is produced on every `v*` tag and published to GitHub Releases as `CivicRecordsAI--Setup.exe`. **It is unsigned by design for this release** (Scott-locked B3=α posture) — Windows SmartScreen will show "Windows protected your PC — Unknown publisher." on first run. Click **More info → Run anyway** to proceed. A SHA-256 checksum is published alongside each release asset for independent verification. The installer bundles the repo snapshot, runs a prerequisite check (Docker Desktop, WSL 2 + Virtual Machine Platform, 32 GB RAM floor, optional host Ollama), then runs `install.ps1` through `launch-install.ps1`. See [`installer/windows/README.md`](installer/windows/README.md) for the full SmartScreen walkthrough, the split Start/Install shortcut model, and checksum-verify steps. +> 1. **Windows double-click installer (T5E, UNSIGNED).** A real `.exe` installer built with Inno Setup 6.x is produced on every `v*` tag and published to GitHub Releases as `CivicSunshine--Setup.exe`. **It is unsigned by design for this release** (Scott-locked B3=α posture) — Windows SmartScreen will show "Windows protected your PC — Unknown publisher." on first run. Click **More info → Run anyway** to proceed. A SHA-256 checksum is published alongside each release asset for independent verification. The installer bundles the repo snapshot, runs a prerequisite check (Docker Desktop, WSL 2 + Virtual Machine Platform, 32 GB RAM floor, optional host Ollama), then runs `install.ps1` through `launch-install.ps1`. See [`installer/windows/README.md`](installer/windows/README.md) for the full SmartScreen walkthrough, the split Start/Install shortcut model, and checksum-verify steps. > 2. **Script-based install (macOS / Linux — not lifecycle-certified — and Windows if you prefer CLI).** Windows-only currently; macOS support pending lifecycle certification. The scripts below configure and launch the Docker Compose stack on macOS and Linux as a non-certified path, and on Windows as a CLI alternative. They do **not** install Docker Desktop, Docker Engine, WSL, or any other system prerequisite — those must be present before the scripts run. If Docker is not installed, the scripts fail with a clear error and you must install Docker manually before retrying. > > **Cross-platform parity:** Windows-only currently; macOS support pending lifecycle certification. No native installer ships for macOS or Linux — that parity is explicit follow-on work and is not scheduled. macOS and Linux operators use the script path below, which is not lifecycle-certified. @@ -285,7 +285,7 @@ There are two supported install paths. Pick the one that matches your platform a 2. Ensure Docker is running (you should see the Docker icon in your taskbar/menu bar, or `docker info` returns without error). 3. Confirm system requirements: 8+ CPU cores, 32 GB RAM, 50 GB free disk. -**Windows (double-click installer):** Download `CivicRecordsAI--Setup.exe` from the [GitHub Releases page](https://github.com/CivicSuite/civicrecords-ai/releases) for the tag you want, double-click it, acknowledge the SmartScreen "Unknown publisher" prompt (expected — see above), and follow the installer prompts. On first launch the installer automatically runs the full bootstrap (prereq check → model pull → first-boot seed). +**Windows (double-click installer):** Download `CivicSunshine--Setup.exe` from the [GitHub Releases page](https://github.com/CivicSuite/civicrecords-ai/releases) for the tag you want, double-click it, acknowledge the SmartScreen "Unknown publisher" prompt (expected — see above), and follow the installer prompts. On first launch the installer automatically runs the full bootstrap (prereq check → model pull → first-boot seed). **Windows (script path):** ```powershell @@ -337,7 +337,7 @@ All configuration lives in `.env` in the repo root. Never commit this file. ### B.3.1 Secrets Handling -CivicRecords AI v1.6.0 and later stores the JWT signing secret and first-admin password +CivicSunshine v1.6.0 and later stores the JWT signing secret and first-admin password in files instead of container environment variables. On Linux and macOS, `install.sh` writes `./data/secrets/jwt_secret` and `./data/secrets/first_admin_password` with `0400` permissions. Docker Compose @@ -371,7 +371,7 @@ Desktop deployments. ## B.3.2 Portal Mode (Private vs. Public) -CivicRecords AI can run in one of two modes. You pick the mode when you install, and you can change it later by editing `.env` and restarting the stack. **If you do nothing, the system runs in private mode** — the same behavior CivicRecords AI has always had. +CivicSunshine can run in one of two modes. You pick the mode when you install, and you can change it later by editing `.env` and restarting the stack. **If you do nothing, the system runs in private mode** — the same behavior CivicSunshine has always had. ### What each mode does @@ -395,7 +395,7 @@ A resident must create an account and sign in before they can submit a request. The installer will ask you which mode to run in. -**On Windows** (running `install.ps1` or the Start-Menu "Install or Repair CivicRecords AI" shortcut): +**On Windows** (running `install.ps1` or the Start-Menu "Install or Repair CivicSunshine" shortcut): ``` Portal mode — private (staff-only) or public (adds minimal resident surface)? @@ -414,9 +414,9 @@ Press Enter to accept the default (`private`), or type `public` and press Enter. ### Changing the mode after installation -You can switch modes at any time without reinstalling. You will need access to the server where CivicRecords AI is running and permission to restart the Docker stack. +You can switch modes at any time without reinstalling. You will need access to the server where CivicSunshine is running and permission to restart the Docker stack. -1. Open `.env` in the CivicRecords AI install folder (the same folder that has `docker-compose.yml`). +1. Open `.env` in the CivicSunshine install folder (the same folder that has `docker-compose.yml`). 2. Find the line that reads `PORTAL_MODE=private` (or add it if it is missing). 3. Change it to `PORTAL_MODE=public` — or the reverse, if you are switching back to private. 4. Save the file. @@ -436,15 +436,15 @@ If the site does not come up the way you expect, the most common cause is a typo ### Glossary -- **`.env`** — A plain-text configuration file in the CivicRecords AI install folder that holds settings like database passwords, mail server settings, and now `PORTAL_MODE`. Never share this file with anyone outside your IT team. -- **Docker stack** — The collection of running services (database, API, frontend, etc.) that make up CivicRecords AI. +- **`.env`** — A plain-text configuration file in the CivicSunshine install folder that holds settings like database passwords, mail server settings, and now `PORTAL_MODE`. Never share this file with anyone outside your IT team. +- **Docker stack** — The collection of running services (database, API, frontend, etc.) that make up CivicSunshine. - **Resident account** — A user account with the "public" role. Can submit requests but cannot view other people's requests or use any staff tools. --- ## B.3.3 Encryption Key for Connector Credentials (ENG-001 / Tier 6) -CivicRecords AI encrypts the credentials you enter for each connected data source — API keys, bearer tokens, OAuth2 client secrets, Basic-auth passwords, and database connection strings — before writing them to PostgreSQL. The encryption is driven by a single environment variable, `ENCRYPTION_KEY`. +CivicSunshine encrypts the credentials you enter for each connected data source — API keys, bearer tokens, OAuth2 client secrets, Basic-auth passwords, and database connection strings — before writing them to PostgreSQL. The encryption is driven by a single environment variable, `ENCRYPTION_KEY`. ### What the key protects @@ -526,7 +526,7 @@ docker compose restart worker ## B.5 Connector Types and Configuration -CivicRecords AI uses a standardized connector framework. Each connector must implement: `authenticate()`, `discover()`, `fetch()`, and `health_check()`. +CivicSunshine uses a standardized connector framework. Each connector must implement: `authenticate()`, `discover()`, `fetch()`, and `health_check()`. ### B.5.0 Adding a Data Source (Wizard Walkthrough) @@ -760,7 +760,7 @@ curl http://localhost:8000/datasources \ ## B.9 Model Registry -CivicRecords AI uses two model types: +CivicSunshine uses two model types: | Type | Default | Notes | |---|---|---| @@ -868,7 +868,7 @@ docker compose exec api alembic upgrade head # Rerun migrations ## C.1 System Overview -CivicRecords AI runs as seven Docker Compose services communicating over an internal Docker network. All data stays on the host machine — no external dependencies after initial setup. +CivicSunshine runs as seven Docker Compose services communicating over an internal Docker network. All data stays on the host machine — no external dependencies after initial setup. ```mermaid graph TB @@ -1301,4 +1301,4 @@ docker compose exec api python -m app.audit.verify_chain --- -*End of User Manual — CivicRecords AI v1.1+ · April 2026* +*End of User Manual — CivicSunshine v1.1+ · April 2026* diff --git a/backend/README.md b/backend/README.md index 950ebf8..2c49922 100644 --- a/backend/README.md +++ b/backend/README.md @@ -1,6 +1,6 @@ -# CivicRecords AI Backend Package +# CivicSunshine Backend Package -This directory is the Python package root for the CivicRecords AI backend. +This directory is the Python package root for the CivicSunshine backend. The project-level README, user manual, changelog, and release notes remain the operator-facing documentation sources. This package README exists so the wheel and source distribution are self-describing when published as release assets. diff --git a/backend/app/__init__.py b/backend/app/__init__.py index a2ebc1f..b178d40 100644 --- a/backend/app/__init__.py +++ b/backend/app/__init__.py @@ -1 +1 @@ -# CivicRecords AI - Backend +# CivicSunshine - Backend diff --git a/backend/app/ingestion/__init__.py b/backend/app/ingestion/__init__.py index 1708f4f..92fd3b4 100644 --- a/backend/app/ingestion/__init__.py +++ b/backend/app/ingestion/__init__.py @@ -1,4 +1,4 @@ -"""CivicRecords AI ingestion orchestration. +"""CivicSunshine ingestion orchestration. Parser, chunker, embedding, and pgvector storage primitives now live in ``civiccore.ingest``. This package keeps Records-specific Celery tasks, diff --git a/backend/app/main.py b/backend/app/main.py index 45bcd43..cddd5d8 100644 --- a/backend/app/main.py +++ b/backend/app/main.py @@ -114,7 +114,7 @@ async def lifespan(app: FastAPI): def create_app() -> FastAPI: app = FastAPI( - title="CivicRecords AI", + title="CivicSunshine", description="AI-powered open records support for American cities", version=APP_VERSION, lifespan=lifespan, diff --git a/backend/app/notifications/sync_notifications.py b/backend/app/notifications/sync_notifications.py index 43fb959..dc9e749 100644 --- a/backend/app/notifications/sync_notifications.py +++ b/backend/app/notifications/sync_notifications.py @@ -53,7 +53,7 @@ async def _queue_individual_circuit_open(session, source): await queue_notification( session=session, recipient_source_id=source.id, - subject=f"CivicRecords: Data source '{source.name}' paused", + subject=f"CivicSunshine: Data source '{source.name}' paused", body=( f"Source '{source.name}' has been automatically paused after " f"{source.consecutive_failure_count} consecutive sync failures.\n" @@ -76,7 +76,7 @@ async def _queue_digest_notification(session, source_ids: list[str], window_star await queue_notification( session=session, recipient_source_id=None, - subject=f"CivicRecords: {len(source_ids)} data sources paused", + subject=f"CivicSunshine: {len(source_ids)} data sources paused", body=( f"{len(source_ids)} data sources were paused after consecutive sync failures.\n" f"Window: {window_start.strftime('%Y-%m-%d %H:%M UTC')}\n" @@ -95,7 +95,7 @@ async def _queue_recovery_notification(session, source): await queue_notification( session=session, recipient_source_id=source.id, - subject=f"CivicRecords: Data source '{source.name}' recovered", + subject=f"CivicSunshine: Data source '{source.name}' recovered", body=( f"Source '{source.name}' successfully synced after being unpaused.\n" f"Log in to view sync details." diff --git a/backend/app/onboarding/router.py b/backend/app/onboarding/router.py index aaa018d..18ad6bf 100644 --- a/backend/app/onboarding/router.py +++ b/backend/app/onboarding/router.py @@ -50,7 +50,7 @@ _FIELD_NAMES: set[str] = {field.name for field in DEFAULT_PROFILE_FIELDS} _SYSTEM_PROMPT = """You are a friendly municipal records system setup assistant. Your job is -to help a city clerk configure CivicRecords AI for their municipality. +to help a city clerk configure CivicSunshine for their municipality. Ask ONE question at a time. Be conversational but concise. If the user's previous answer was unclear, ask a brief clarifying follow-up. Otherwise, diff --git a/backend/app/requests/router.py b/backend/app/requests/router.py index 3ba6dda..3934011 100644 --- a/backend/app/requests/router.py +++ b/backend/app/requests/router.py @@ -914,7 +914,7 @@ async def review_fee_waiver( _LETTER_DISCLAIMER = ( "\n\n---\n" "AI-GENERATED DRAFT — REQUIRES HUMAN REVIEW\n" - "This letter was generated by CivicRecords AI and must be reviewed " + "This letter was generated by CivicSunshine and must be reviewed " "and approved by authorized staff before being sent to the requester." ) _LOCAL_GENERATION_NUM_PREDICT = 220 diff --git a/backend/app/seed/first_boot.py b/backend/app/seed/first_boot.py index 679ee55..fbcbd1f 100644 --- a/backend/app/seed/first_boot.py +++ b/backend/app/seed/first_boot.py @@ -1,7 +1,7 @@ """T5B (Tier 5 Blocker B) — first-boot baseline seeding. Runs automatically from ``app.main`` lifespan after the first admin user -has been created. Populates the three baseline datasets CivicRecords AI +has been created. Populates the three baseline datasets CivicSunshine requires for a fresh deployment to be usable: 1. **Exemption rules** — 175 state-scoped keyword rules across 50 states + DC from diff --git a/backend/compliance_templates/ai-governance-policy.md b/backend/compliance_templates/ai-governance-policy.md index 84294d0..4ba6c79 100644 --- a/backend/compliance_templates/ai-governance-policy.md +++ b/backend/compliance_templates/ai-governance-policy.md @@ -164,4 +164,4 @@ This policy draws on frameworks and best practices from: > **Disclaimer:** Consult your city attorney before adoption. This governance policy template is a starting point and should be adapted to your jurisdiction's specific legal requirements, organizational structure, and operational context. -Template provided by CivicRecords AI (Apache 2.0). +Template provided by CivicSunshine (Apache 2.0). diff --git a/backend/compliance_templates/ai-use-disclosure.md b/backend/compliance_templates/ai-use-disclosure.md index 1ecc331..4b05fec 100644 --- a/backend/compliance_templates/ai-use-disclosure.md +++ b/backend/compliance_templates/ai-use-disclosure.md @@ -7,9 +7,9 @@ ## 1. System Description -{{CITY_NAME}} utilizes CivicRecords AI, an open-source records management assistance tool, to support staff in processing public records requests submitted under applicable open records laws. CivicRecords AI runs entirely on locally owned and operated hardware within {{CITY_NAME}}'s facilities. No data leaves {{CITY_NAME}}'s network. +{{CITY_NAME}} utilizes CivicSunshine, an open-source records management assistance tool, to support staff in processing public records requests submitted under applicable open records laws. CivicSunshine runs entirely on locally owned and operated hardware within {{CITY_NAME}}'s facilities. No data leaves {{CITY_NAME}}'s network. -### What CivicRecords AI Does +### What CivicSunshine Does - **Document search and retrieval:** Assists staff in locating responsive documents across municipal repositories by analyzing request language and matching it against indexed records. - **Exemption identification:** Flags portions of responsive documents that may contain information subject to statutory exemptions (e.g., personally identifiable information, attorney-client privilege, law enforcement sensitive data). @@ -17,12 +17,12 @@ - **Response drafting:** Generates draft response letters that cite applicable statutes, summarize responsive documents, and include required disclosures. All drafts are reviewed and edited by staff before release. - **Cost estimation:** Calculates estimated fees based on page counts, labor time, and applicable fee schedules. -### What CivicRecords AI Does NOT Do +### What CivicSunshine Does NOT Do -- **CivicRecords AI does not make final decisions.** Every action suggested by the AI — including exemption determinations, redactions, response language, and fee calculations — requires explicit human review and approval before taking effect. -- **CivicRecords AI does not deny or grant requests.** All decisions to fulfill, partially fulfill, or deny a records request are made by authorized {{CITY_NAME}} staff. -- **CivicRecords AI does not communicate directly with requesters.** All correspondence is reviewed, edited as necessary, and sent by {{CITY_NAME}} personnel. -- **CivicRecords AI does not learn from or retain personal data.** The system does not use requester information or request content to update its models. +- **CivicSunshine does not make final decisions.** Every action suggested by the AI — including exemption determinations, redactions, response language, and fee calculations — requires explicit human review and approval before taking effect. +- **CivicSunshine does not deny or grant requests.** All decisions to fulfill, partially fulfill, or deny a records request are made by authorized {{CITY_NAME}} staff. +- **CivicSunshine does not communicate directly with requesters.** All correspondence is reviewed, edited as necessary, and sent by {{CITY_NAME}} personnel. +- **CivicSunshine does not learn from or retain personal data.** The system does not use requester information or request content to update its models. ## 2. Human Oversight Guarantees @@ -41,7 +41,7 @@ No records request response is sent without a qualified staff member reviewing t ## 3. Data Sovereignty -All data processed by CivicRecords AI remains within {{CITY_NAME}}'s physical and logical control at all times: +All data processed by CivicSunshine remains within {{CITY_NAME}}'s physical and logical control at all times: - The system runs on hardware owned and maintained by {{CITY_NAME}}. - No data is transmitted to cloud services, third-party servers, or external APIs. @@ -51,7 +51,7 @@ All data processed by CivicRecords AI remains within {{CITY_NAME}}'s physical an ## 4. Software Transparency -CivicRecords AI is open-source software licensed under the Apache License 2.0. The source code is publicly available for inspection, audit, and independent review. {{CITY_NAME}} welcomes public scrutiny of the tools used in records management. +CivicSunshine is open-source software licensed under the Apache License 2.0. The source code is publicly available for inspection, audit, and independent review. {{CITY_NAME}} welcomes public scrutiny of the tools used in records management. ## 5. Contact Information @@ -69,4 +69,4 @@ Any requester may ask that their records request be processed without AI assista > **Disclaimer:** Consult your city attorney before adoption. This disclosure template is a starting point and should be adapted to your jurisdiction's specific legal requirements, policies, and operational context. -Template provided by CivicRecords AI (Apache 2.0). +Template provided by CivicSunshine (Apache 2.0). diff --git a/backend/compliance_templates/caia-impact-assessment.md b/backend/compliance_templates/caia-impact-assessment.md index c4962e8..3c2ea49 100644 --- a/backend/compliance_templates/caia-impact-assessment.md +++ b/backend/compliance_templates/caia-impact-assessment.md @@ -1,11 +1,11 @@ # Colorado AI Act (SB 24-205) Impact Assessment -## CivicRecords AI — Deployer Assessment +## CivicSunshine — Deployer Assessment **Deploying Entity:** {{CITY_NAME}}, {{STATE}} **Assessment Date:** {{EFFECTIVE_DATE}} **Prepared By:** {{CONTACT_NAME}} -**System Name:** CivicRecords AI +**System Name:** CivicSunshine **System Version:** {{SYSTEM_VERSION}} --- @@ -20,9 +20,9 @@ Under the Colorado AI Act (SB 24-205), a "high-risk artificial intelligence syst ### 1.2 Rationale for Non-High-Risk Classification -CivicRecords AI is classified as **not high-risk** for the following reasons: +CivicSunshine is classified as **not high-risk** for the following reasons: -1. **No autonomous decision-making:** CivicRecords AI does not make, and is not a substantial factor in making, any consequential decision. The system provides suggestions and draft content that must be reviewed and approved by authorized human staff before any action is taken. +1. **No autonomous decision-making:** CivicSunshine does not make, and is not a substantial factor in making, any consequential decision. The system provides suggestions and draft content that must be reviewed and approved by authorized human staff before any action is taken. 2. **Advisory role only:** The system functions as a staff productivity tool that assists with document search, exemption identification, redaction suggestions, and response drafting. It does not determine whether a records request is granted, denied, or partially fulfilled. @@ -38,7 +38,7 @@ Despite the non-high-risk classification, {{CITY_NAME}} voluntarily adopts the f ## 2. Human-in-the-Loop Enforcement -The following table documents every decision point where CivicRecords AI produces output that could influence records request processing, and the corresponding human oversight requirement: +The following table documents every decision point where CivicSunshine produces output that could influence records request processing, and the corresponding human oversight requirement: | Decision Point | AI Role | Human Role | Override Available? | |---|---|---|---| @@ -50,7 +50,7 @@ The following table documents every decision point where CivicRecords AI produce | Request denial | Not involved | Authorized staff or city attorney makes all denial decisions | N/A — AI is excluded | | Appeal processing | May retrieve prior correspondence for reference | Staff and/or city attorney handle all appeal determinations | N/A — AI provides reference only | -**Enforcement mechanism:** The CivicRecords AI application enforces human review through its workflow architecture. AI suggestions are presented in a review queue; no suggestion can be applied, sent, or finalized without an explicit staff approval action in the interface. +**Enforcement mechanism:** The CivicSunshine application enforces human review through its workflow architecture. AI suggestions are presented in a review queue; no suggestion can be applied, sent, or finalized without an explicit staff approval action in the interface. ## 3. Data Governance @@ -100,7 +100,7 @@ The following table documents every decision point where CivicRecords AI produce ### 5.2 Staff Training -- All staff using CivicRecords AI must complete initial training on the system's capabilities and limitations. +- All staff using CivicSunshine must complete initial training on the system's capabilities and limitations. - Annual refresher training on AI oversight responsibilities. - Training records maintained by {{CONTACT_NAME}}. @@ -112,13 +112,13 @@ The following table documents every decision point where CivicRecords AI produce ### 5.4 Audit Trail -- CivicRecords AI maintains a complete audit log of all AI suggestions, staff actions (accept/reject/modify), and final outcomes. +- CivicSunshine maintains a complete audit log of all AI suggestions, staff actions (accept/reject/modify), and final outcomes. - Audit logs are retained per {{CITY_NAME}}'s records retention schedule. - Logs are available for internal audit, legal review, or public records requests as applicable. ## 6. Certification -I certify that this impact assessment accurately describes {{CITY_NAME}}'s deployment and use of CivicRecords AI as of the assessment date. +I certify that this impact assessment accurately describes {{CITY_NAME}}'s deployment and use of CivicSunshine as of the assessment date. **Name:** {{CONTACT_NAME}} **Title:** {{CONTACT_TITLE}} @@ -128,6 +128,6 @@ I certify that this impact assessment accurately describes {{CITY_NAME}}'s deplo --- -> **Disclaimer:** Consult your city attorney before adoption. This impact assessment template is a starting point. While CivicRecords AI is designed to fall outside the Colorado AI Act's high-risk classification, your jurisdiction should independently evaluate its obligations under applicable law. +> **Disclaimer:** Consult your city attorney before adoption. This impact assessment template is a starting point. While CivicSunshine is designed to fall outside the Colorado AI Act's high-risk classification, your jurisdiction should independently evaluate its obligations under applicable law. -Template provided by CivicRecords AI (Apache 2.0). +Template provided by CivicSunshine (Apache 2.0). diff --git a/backend/compliance_templates/data-residency-attestation.md b/backend/compliance_templates/data-residency-attestation.md index 8af716d..130aa93 100644 --- a/backend/compliance_templates/data-residency-attestation.md +++ b/backend/compliance_templates/data-residency-attestation.md @@ -5,15 +5,15 @@ --- -## Attestation of Local Data Residency for CivicRecords AI +## Attestation of Local Data Residency for CivicSunshine -I, {{CONTACT_NAME}}, {{CONTACT_TITLE}} of {{CITY_NAME}}, {{STATE}}, hereby attest to the following facts regarding the deployment and operation of CivicRecords AI within {{CITY_NAME}}'s infrastructure. +I, {{CONTACT_NAME}}, {{CONTACT_TITLE}} of {{CITY_NAME}}, {{STATE}}, hereby attest to the following facts regarding the deployment and operation of CivicSunshine within {{CITY_NAME}}'s infrastructure. ## 1. Attestation Statements ### 1.1 Local Deployment -CivicRecords AI is installed and operates exclusively on server hardware owned by {{CITY_NAME}} and physically located at: +CivicSunshine is installed and operates exclusively on server hardware owned by {{CITY_NAME}} and physically located at: **{{FACILITY_ADDRESS}}** @@ -21,7 +21,7 @@ The system is administered by {{CITY_NAME}} IT staff. No third party has physica ### 1.2 No Cloud Services -CivicRecords AI does not use, connect to, or depend on any cloud computing services, including but not limited to: +CivicSunshine does not use, connect to, or depend on any cloud computing services, including but not limited to: - Cloud-hosted databases or storage (e.g., AWS S3, Azure Blob, Google Cloud Storage) - Cloud-hosted AI/ML inference APIs (e.g., OpenAI API, Azure AI, Google Vertex AI, AWS Bedrock) @@ -32,17 +32,17 @@ All application components — the web server, database, AI models, document sto ### 1.3 No Telemetry or External Data Transmission -CivicRecords AI does not transmit any data to external servers, services, or endpoints. Specifically: +CivicSunshine does not transmit any data to external servers, services, or endpoints. Specifically: - No usage analytics or telemetry data is collected or transmitted. - No crash reports or error logs are sent to external services. - No document content, metadata, or user information is transmitted outside {{CITY_NAME}}'s network. - No DNS, NTP, or other protocol-level communications are made to vendor-operated servers beyond standard OS-level services controlled by {{CITY_NAME}} IT. -- The application does not phone home, check for updates externally, or communicate with any CivicRecords AI project infrastructure. +- The application does not phone home, check for updates externally, or communicate with any CivicSunshine project infrastructure. ### 1.4 Local AI Models -All artificial intelligence and machine learning models used by CivicRecords AI operate locally: +All artificial intelligence and machine learning models used by CivicSunshine operate locally: - Model weights are stored on {{CITY_NAME}}'s servers. - All inference (AI processing) occurs on {{CITY_NAME}}'s hardware. @@ -54,8 +54,8 @@ All artificial intelligence and machine learning models used by CivicRecords AI {{CITY_NAME}} has verified the above attestation statements through the following methods: -- **Network audit:** Reviewed firewall logs and network traffic to confirm no external data transmission from the CivicRecords AI server. Date of last audit: {{LAST_AUDIT_DATE}} -- **Source code review:** Confirmed that the deployed version of CivicRecords AI contains no external API calls, telemetry code, or cloud service integrations. +- **Network audit:** Reviewed firewall logs and network traffic to confirm no external data transmission from the CivicSunshine server. Date of last audit: {{LAST_AUDIT_DATE}} +- **Source code review:** Confirmed that the deployed version of CivicSunshine contains no external API calls, telemetry code, or cloud service integrations. - **Configuration review:** Verified that application configuration files contain no external URLs, API keys, or cloud service credentials. - **Physical inspection:** Confirmed server hardware is located at the attested facility address and is physically secured. @@ -73,7 +73,7 @@ All artificial intelligence and machine learning models used by CivicRecords AI ## 3. Hardware Specifications -The following hardware is used to host CivicRecords AI: +The following hardware is used to host CivicSunshine: | Component | Specification | |---|---| @@ -128,4 +128,4 @@ Signature: ___________________________ > **Disclaimer:** Consult your city attorney before adoption. This attestation template is a starting point. Your jurisdiction may have additional data residency, security, or compliance requirements that should be incorporated. -Template provided by CivicRecords AI (Apache 2.0). +Template provided by CivicSunshine (Apache 2.0). diff --git a/backend/compliance_templates/response-letter-disclosure.md b/backend/compliance_templates/response-letter-disclosure.md index f83554d..f01ce65 100644 --- a/backend/compliance_templates/response-letter-disclosure.md +++ b/backend/compliance_templates/response-letter-disclosure.md @@ -8,7 +8,7 @@ Include the following paragraph in any records request response letter where AI-assisted processing was used: -> **AI Disclosure:** {{CITY_NAME}} used CivicRecords AI, a locally hosted open-source tool, to assist staff in searching for, reviewing, and preparing the responsive documents included with this response. All exemption determinations, redactions, and response content were reviewed and approved by authorized {{CITY_NAME}} personnel before release. CivicRecords AI does not make independent decisions regarding records requests. If you have questions about the use of AI in processing your request, or if you would like your request reprocessed without AI assistance, please contact {{CONTACT_NAME}} at {{CONTACT_EMAIL}}. +> **AI Disclosure:** {{CITY_NAME}} used CivicSunshine, a locally hosted open-source tool, to assist staff in searching for, reviewing, and preparing the responsive documents included with this response. All exemption determinations, redactions, and response content were reviewed and approved by authorized {{CITY_NAME}} personnel before release. CivicSunshine does not make independent decisions regarding records requests. If you have questions about the use of AI in processing your request, or if you would like your request reprocessed without AI assistance, please contact {{CONTACT_NAME}} at {{CONTACT_EMAIL}}. ## When to Include This Disclosure @@ -26,7 +26,7 @@ This disclosure paragraph **must** be included in a response letter when any of ### Edge Cases - **Partial AI use:** If AI was used for any substantive step (search, exemption, redaction, or drafting), include the disclosure even if other steps were performed manually. -- **AI suggestions rejected:** If staff reviewed AI suggestions but rejected all of them and proceeded manually, disclosure is still recommended for transparency but may be noted as: "CivicRecords AI was consulted during processing; however, all responsive documents, exemptions, and redactions were determined independently by staff." +- **AI suggestions rejected:** If staff reviewed AI suggestions but rejected all of them and proceeded manually, disclosure is still recommended for transparency but may be noted as: "CivicSunshine was consulted during processing; however, all responsive documents, exemptions, and redactions were determined independently by staff." - **Batch processing:** When responding to multiple requests in a batch where AI was used, include the disclosure in each individual response letter. ## Placement Guidance @@ -44,7 +44,7 @@ Dear [Requester Name], [Fee information, if applicable] -AI Disclosure: {{CITY_NAME}} used CivicRecords AI, a locally hosted +AI Disclosure: {{CITY_NAME}} used CivicSunshine, a locally hosted open-source tool, to assist staff in searching for, reviewing, and preparing the responsive documents included with this response. [...] @@ -63,4 +63,4 @@ Sincerely, > **Disclaimer:** Consult your city attorney before adoption. This template is a starting point and should be reviewed for compliance with your jurisdiction's open records laws and disclosure requirements. -Template provided by CivicRecords AI (Apache 2.0). +Template provided by CivicSunshine (Apache 2.0). diff --git a/backend/scripts/generate_pdf.py b/backend/scripts/generate_pdf.py index 85d24ff..0a7dac6 100644 --- a/backend/scripts/generate_pdf.py +++ b/backend/scripts/generate_pdf.py @@ -1,5 +1,5 @@ """ -generate_pdf.py — CivicRecords AI Technical Documentation PDF Generator +generate_pdf.py — CivicSunshine Technical Documentation PDF Generator Generates README-FULL.pdf in the project root using ReportLab Platypus. """ @@ -359,7 +359,7 @@ def on_page(canvas, doc): canvas.setFillColor(GRAY) canvas.setFont("Helvetica", 8) canvas.drawString(inch, 0.5 * inch, - "CivicRecords AI — Technical Documentation v1.0.0") + "CivicSunshine — Technical Documentation v1.0.0") canvas.drawRightString(doc.pagesize[0] - inch, 0.5 * inch, f"Page {doc.page}") canvas.setStrokeColor(colors.HexColor("#cbd5e1")) @@ -406,7 +406,7 @@ def build_title_page(s, W): # Title block on navy background title_data = [[ - Paragraph("CivicRecords AI", s["DocTitle"]), + Paragraph("CivicSunshine", s["DocTitle"]), ], [ Paragraph("Technical Documentation", s["DocSubtitle"]), ], [ @@ -523,7 +523,7 @@ def build_overview(s): story.append(Paragraph("What It Is", s["H2"])) story.append(Paragraph( - "CivicRecords AI is a fully open-source, locally-hosted AI system that helps municipal staff " + "CivicSunshine is a fully open-source, locally-hosted AI system that helps municipal staff " "respond to open records requests (FOIA, CORA, and state equivalents). It runs entirely on " "commodity hardware — a single Ryzen-based desktop with 32–64 GB RAM — inside a city's existing " "network perimeter. No cloud subscriptions, no vendor lock-in, no resident data leaving the building.", @@ -565,7 +565,7 @@ def build_overview(s): ("Exemption Detection", "Rules-based PII detection (SSN, phone, email, credit card) plus per-state statutory keyword matching. Optional LLM secondary review. All flags require human confirmation."), ("Request Management", "Full lifecycle tracking: intake → search → document attachment → review → approval → response. Deadline alerts for approaching and overdue requests."), ("Compliance by Design", "Hash-chained audit logs, human-in-the-loop enforcement, AI content labeling, data sovereignty verification. Designed for Colorado CAIA and 50-state regulatory compliance."), - ("Federation-Ready", "REST API with service accounts enables future cross-jurisdiction record discovery between CivicRecords AI instances."), + ("Federation-Ready", "REST API with service accounts enables future cross-jurisdiction record discovery between CivicSunshine instances."), ] cap_data = [["Capability", "Description"]] + [[b, t] for b, t in caps] story.append(make_table(cap_data, [1.8*inch, 4.9*inch])) @@ -580,7 +580,7 @@ def build_architecture(s): story.append(HRFlowable(width="100%", thickness=1, color=BLUE, spaceAfter=8)) story.append(Paragraph( - "CivicRecords AI is deployed as a Docker Compose stack of seven services. All services run " + "CivicSunshine is deployed as a Docker Compose stack of seven services. All services run " "in Linux containers on the host machine — no cloud infrastructure required. The services " "communicate over an internal Docker bridge network; only nginx is exposed to the city LAN.", s["Body"])) @@ -651,7 +651,7 @@ def build_arch_diagram(s, W): ])) story.append(wrapper) story.append(Paragraph( - "Figure 1 — CivicRecords AI Docker service topology", s["Caption"])) + "Figure 1 — CivicSunshine Docker service topology", s["Caption"])) story.append(Spacer(1, 10)) story.append(Paragraph("Network Isolation", s["H2"])) @@ -751,7 +751,7 @@ def build_db_schema(s): story.append(Paragraph("6. Database Schema", s["H1"])) story.append(HRFlowable(width="100%", thickness=1, color=BLUE, spaceAfter=8)) story.append(Paragraph( - "CivicRecords AI uses a single PostgreSQL 17 database with the pgvector extension. " + "CivicSunshine uses a single PostgreSQL 17 database with the pgvector extension. " "All tables are managed by Alembic migrations. The schema supports the full request " "lifecycle, audit logging, and vector-based document retrieval.", s["Body"])) @@ -929,7 +929,7 @@ def build_security(s): story.append(Paragraph("Human-in-the-Loop Enforcement", s["H2"])) story.append(Paragraph( - "CivicRecords AI is designed with mandatory human review at every decision point. " + "CivicSunshine is designed with mandatory human review at every decision point. " "The system never auto-redacts, auto-denies, or auto-releases records. All AI-generated " "content is clearly labeled as a draft requiring human confirmation.", s["Body"])) hitl = [ @@ -962,7 +962,7 @@ def build_security(s): story.append(Paragraph("Data Sovereignty", s["H2"])) story.append(Paragraph( - "CivicRecords AI is designed for environments where resident data must never leave the " + "CivicSunshine is designed for environments where resident data must never leave the " "network perimeter. The verification script scripts/verify-sovereignty.sh " "confirms no outbound connections are made during normal operation.", s["Body"])) sov = [ @@ -994,7 +994,7 @@ def build_security(s): story.append(Paragraph("Regulatory Compliance Design", s["H2"])) story.append(Paragraph( - "CivicRecords AI is designed to support compliance with Colorado CAIA (Colorado Artificial " + "CivicSunshine is designed to support compliance with Colorado CAIA (Colorado Artificial " "Intelligence Act) and similar state AI governance frameworks, as well as all 50 state " "open records statutes.", s["Body"])) comp = [ @@ -1081,7 +1081,7 @@ def build_deployment(s): story.append(Spacer(1, 12)) story.append(HRFlowable(width="100%", thickness=1, color=BLUE, spaceAfter=8)) story.append(Paragraph( - "CivicRecords AI v1.0.0 · Apache License 2.0 · " + "CivicSunshine v1.0.0 · Apache License 2.0 · " "https://github.com/CivicSuite/civicrecords-ai", ParagraphStyle("FootNote", parent=s["Body"], fontSize=9, textColor=GRAY, alignment=TA_CENTER))) @@ -1101,8 +1101,8 @@ def main(): rightMargin=inch, topMargin=inch, bottomMargin=0.75 * inch, - title="CivicRecords AI — Technical Documentation v1.0.0", - author="CivicRecords AI Project", + title="CivicSunshine — Technical Documentation v1.0.0", + author="CivicSunshine Project", subject="Technical Reference", ) diff --git a/backend/tests/test_co4_tier1_retrofit_ledger.py b/backend/tests/test_co4_tier1_retrofit_ledger.py index 7569092..f6e3d5a 100644 --- a/backend/tests/test_co4_tier1_retrofit_ledger.py +++ b/backend/tests/test_co4_tier1_retrofit_ledger.py @@ -13,7 +13,7 @@ def find_repo_root() -> Path: and (candidate / "scripts" / "check-tier1-ledger.py").exists() ): return candidate - raise AssertionError("Could not locate CivicRecords AI repository root.") + raise AssertionError("Could not locate CivicSunshine repository root.") REPO_ROOT = find_repo_root() diff --git a/backend/tests/test_starter_set_integration_helper.py b/backend/tests/test_starter_set_integration_helper.py index 2ed910d..2ad34e7 100644 --- a/backend/tests/test_starter_set_integration_helper.py +++ b/backend/tests/test_starter_set_integration_helper.py @@ -35,7 +35,7 @@ def _write_umbrella_fixture(root: Path) -> None: }, { "id": "civicclerk", - "current_version": "1.0.1", + "current_version": "1.0.4", "selectable": True, "dependencies": ["civiccore"], }, @@ -47,12 +47,12 @@ def _write_umbrella_fixture(root: Path) -> None: (docs / "starter-set-release-contract.md").write_text( "\n".join( [ - "CivicRecords AI reports v1.7.3", - "CivicClerk reports v1.0.1 with CivicCore v1.2.0", + "CivicSunshine reports v1.7.3", + "CivicMeetings reports v1.0.4 with CivicCore v1.2.0", "--staff-mode bearer --workflow-proof", "Package Cleanroom Contract", "workflow_proof_requested=true", - "not yet a claim that CivicRecords AI and CivicClerk exchange workflow records", + "not yet a claim that CivicSunshine and CivicMeetings exchange workflow records", ] ), encoding="utf-8", @@ -85,8 +85,8 @@ def test_starter_set_integration_passes_with_umbrella_contract(tmp_path: Path) - assert "starter_set_ready=true" in result.stdout assert "release_evidence_ready=true" in result.stdout assert "[PASS] clerk-core profile order" in result.stdout - assert "[PASS] CivicRecords AI module contract" in result.stdout - assert "[PASS] CivicClerk pairing" in result.stdout + assert "[PASS] CivicSunshine module contract" in result.stdout + assert "[PASS] CivicMeetings pairing" in result.stdout assert "[PASS] starter-set release contract" in result.stdout assert "[PASS] starter-set archives" in result.stdout assert "STARTER-SET-INTEGRATION: RELEASE-EVIDENCE-READY" in result.stdout diff --git a/docs/CHANGE-CONTROL.md b/docs/CHANGE-CONTROL.md index c0e6890..6f9ca53 100644 --- a/docs/CHANGE-CONTROL.md +++ b/docs/CHANGE-CONTROL.md @@ -1,4 +1,4 @@ -# CivicRecords AI — Change Control Register +# CivicSunshine — Change Control Register **Canonical Spec:** `docs/UNIFIED-SPEC.md` (Unified Design Specification v2.0, April 12, 2026) diff --git a/docs/UNIFIED-SPEC.md b/docs/UNIFIED-SPEC.md index 23da293..b37feb0 100644 --- a/docs/UNIFIED-SPEC.md +++ b/docs/UNIFIED-SPEC.md @@ -1,4 +1,4 @@ -CivicRecords AI +CivicSunshine Unified Design Specification Version 3.1 — Repo-Verified Canonical April 13, 2026 @@ -15,7 +15,7 @@ April 13, 2026 Status Legend: [IMPLEMENTED] evidenced in code, tests, and routes. [PARTIAL] present but incomplete. [UI SHELL] interface exists without full backend capability. [PLANNED] not implemented. [NEW in v1.1.0] / [NEW in v1.2.0] / [NEW in v1.3.0] / [NEW in v1.4.0] / [UPDATED in v1.4.3] / [UPDATED in v1.4.4] / [UPDATED in v1.4.5] / [UPDATED in v1.4.7] / [UPDATED in v1.4.8] / [UPDATED in v1.4.9] / [UPDATED in v1.4.10] / [UPDATED in v1.5.0] / [UPDATED in v1.6.0] / [UPDATED in v1.7.2] / [UPDATED in v1.7.3] indicate which release introduced or updated a feature. ## 1. Purpose of This Document -This is the single source of truth for CivicRecords AI. It merges comprehensive design detail with implementation status verified directly against the repository at commit head. Every feature is tagged with its actual implementation state. +This is the single source of truth for CivicSunshine. It merges comprehensive design detail with implementation status verified directly against the repository at commit head. Every feature is tagged with its actual implementation state. When narrative claims and repository evidence disagree, repository evidence wins. This document replaces all prior spec versions. ### 1.1 Version Alignment (Resolved) @@ -404,8 +404,8 @@ Chat-style UI (`frontend/src/pages/Onboarding.tsx`) with a Skip button that actu | Shortcut | Script | Behavior | |---|---|---| -| **Start CivicRecords AI** (also Desktop shortcut, if opted in) | `installer/windows/launch-start.ps1` | Daily start. Verifies Docker is reachable; runs `docker compose up -d` (idempotent); opens `http://localhost:8080/`. **Does NOT** run the prereq check, **does NOT** invoke `install.ps1`, **does NOT** pull any model, **does NOT** re-seed data. On failure, points the operator at "Install or Repair CivicRecords AI". | -| **Install or Repair CivicRecords AI** | `installer/windows/launch-install.ps1` | Full bootstrap / repair. Prereq check → `install.ps1` (T5C 4-model Gemma 4 picker + `ollama pull` of selected model + `ollama pull nomic-embed-text` + T5B baseline seeding) → open browser. Also triggered automatically from the installer wizard's post-install `[Run]` step on first-run. | +| **Start CivicSunshine** (also Desktop shortcut, if opted in) | `installer/windows/launch-start.ps1` | Daily start. Verifies Docker is reachable; runs `docker compose up -d` (idempotent); opens `http://localhost:8080/`. **Does NOT** run the prereq check, **does NOT** invoke `install.ps1`, **does NOT** pull any model, **does NOT** re-seed data. On failure, points the operator at "Install or Repair CivicSunshine". | +| **Install or Repair CivicSunshine** | `installer/windows/launch-install.ps1` | Full bootstrap / repair. Prereq check → `install.ps1` (T5C 4-model Gemma 4 picker + `ollama pull` of selected model + `ollama pull nomic-embed-text` + T5B baseline seeding) → open browser. Also triggered automatically from the installer wizard's post-install `[Run]` step on first-run. | The model-pull behavior of `install.ps1` is *always* present on the install/repair path (not optional, not manual) and *never* present on the daily-start path. The installer README, the top-level README, and the launcher banner say this plainly; there is no "Does not auto-pull the Gemma 4 LLM" language anywhere (the previous line by that name in the installer README was contradicted by `install.ps1` L284 and has been removed). @@ -413,18 +413,18 @@ The model-pull behavior of `install.ps1` is *always* present on the install/repa 1. `$CIVICRECORDS_VERSION` environment variable (CI sets this from the git tag with any leading `v` stripped). 2. `backend/pyproject.toml` `[project] version = "..."` (authoritative for untagged local dev builds). -`.github/workflows/release.yml` extracts the version from `github.ref_name`, exports `CIVICRECORDS_VERSION` to the build step, and the "Locate installer artifact" step expects exactly `build/CivicRecordsAI-${CIVICRECORDS_VERSION}-Setup.exe`. Local bash build and CI build produce the same artifact filename for the same version. +`.github/workflows/release.yml` extracts the version from `github.ref_name`, exports `CIVICRECORDS_VERSION` to the build step, and the "Locate installer artifact" step expects exactly `build/CivicSunshine-${CIVICRECORDS_VERSION}-Setup.exe`. Local bash build and CI build produce the same artifact filename for the same version. **Toolchain / pipeline inherited from PatentForgeLocal (verified direct read 2026-04-21):** - `installer/windows/civicrecords-ai.iss` — Inno Setup 6.x script. Admin elevation required, MinVersion=10.0, x64compatible, lzma2/max compression. AppId is a fresh GUID. `[Dirs]` marks `{app}\data|logs|config` with `uninsneveruninstall`. `[Code]` `CurUninstallStepChanged` prompts twice with truthful copy: step 1 stops the Compose stack (`docker compose down` — containers only, Docker-managed volumes preserved); step 2 deletes **local app files under the install dir only** (`{app}\data|logs|config`) and **explicitly preserves the Postgres database and Ollama models** (both in Docker-managed volumes). The full-wipe path (`docker compose down -v`) is called out in the dialog text for operators who want to remove the volumes too. The word "database" was removed from the file-system-deletion prompt where it was previously misleading. - `installer/windows/build-installer.sh` — bash build driver. Locates `ISCC.exe`, verifies bundle sources, resolves the version per the precedence above, passes it to ISCC via `/DMyAppVersion=`, compiles, reports output path + SHA-256. The PatentForgeLocal output-name typo (`PatentForgeLocalLocal-`) was intentionally not carried forward. - `.github/workflows/release.yml` — release-on-tag (`v*`). Single `windows-latest` job installs Inno Setup via `choco install innosetup -y`, resolves the version from the tag, runs the bash driver with `CIVICRECORDS_VERSION` set, uploads the `.exe` + `.sha256` file, and creates+publishes a draft GitHub release with both assets attached. -**CivicRecords-specific adaptations (not in PFL):** +**CivicSunshine-specific adaptations (not in PFL):** - `installer/windows/prereq-check.ps1` — reports on Docker Desktop, WSL 2 + Virtual Machine Platform, 32 GB RAM target-profile floor (Tier 5 Blocker 2), and host Ollama (preferred when present per the target profile). Prints concrete remediation commands for each miss. Does NOT auto-install Docker Desktop or silently enable WSL features — the elevation/reboot cost is too high to hide. Exits non-zero on required-prereq miss. -- `installer/windows/launch-install.ps1` — install/repair orchestrator (prereq-check → `install.ps1` → open browser). Invoked from the installer wizard's post-install `[Run]` step and from the "Install or Repair CivicRecords AI" shortcut. -- `installer/windows/launch-start.ps1` — daily-start script (Docker reachability check → `docker compose up -d` → open browser). Invoked from the "Start CivicRecords AI" Start Menu entry and the Desktop shortcut. Surfaces actionable errors if Docker is unreachable or the bring-up fails and points the operator at "Install or Repair CivicRecords AI" for rebuilds. -- Bundles the CivicRecords repo snapshot (backend source, frontend source, docs, scripts, Dockerfiles, `install.ps1`, `docker-compose.yml` + overlays, `.env.example`, LICENSE, README.md). No portable Python / Ollama binaries — CivicRecords runs in Docker, not native processes. +- `installer/windows/launch-install.ps1` — install/repair orchestrator (prereq-check → `install.ps1` → open browser). Invoked from the installer wizard's post-install `[Run]` step and from the "Install or Repair CivicSunshine" shortcut. +- `installer/windows/launch-start.ps1` — daily-start script (Docker reachability check → `docker compose up -d` → open browser). Invoked from the "Start CivicSunshine" Start Menu entry and the Desktop shortcut. Surfaces actionable errors if Docker is unreachable or the bring-up fails and points the operator at "Install or Repair CivicSunshine" for rebuilds. +- Bundles the CivicSunshine repo snapshot (backend source, frontend source, docs, scripts, Dockerfiles, `install.ps1`, `docker-compose.yml` + overlays, `.env.example`, LICENSE, README.md). No portable Python / Ollama binaries — CivicSunshine runs in Docker, not native processes. **Out of scope for T5E:** - No macOS / Linux native installer — cross-platform parity is documented as follow-on, not shipped. @@ -432,10 +432,10 @@ The model-pull behavior of `install.ps1` is *always* present on the install/repa - No auto-install of Docker Desktop, no silent WSL feature-enable. **Verification surfaces operators should trust:** -- The GitHub release page publishes both the `.exe` and a matching `CivicRecordsAI--Setup.exe.sha256` file. Operators can compare `Get-FileHash -Algorithm SHA256 ` against the checksum to verify the binary is byte-identical to the CI-produced artifact at the tagged commit. +- The GitHub release page publishes both the `.exe` and a matching `CivicSunshine--Setup.exe.sha256` file. Operators can compare `Get-FileHash -Algorithm SHA256 ` against the checksum to verify the binary is byte-identical to the CI-produced artifact at the tagged commit. ### 8.7 First-Boot Seeding [NEW in T5B, 2026-04-22] -`app/main.lifespan` auto-seeds the three baseline datasets CivicRecords AI needs on first boot, immediately after the first admin user is created and the systems catalog is auto-loaded: +`app/main.lifespan` auto-seeds the three baseline datasets CivicSunshine needs on first boot, immediately after the first admin user is created and the systems catalog is auto-loaded: | Dataset | Source | Natural key | Row count | |---|---|---|---| @@ -455,7 +455,7 @@ The model-pull behavior of `install.ps1` is *always* present on the install/repa **Two modes, locked at install time, changeable post-install by editing `.env` and restarting the stack.** Scott locked B4 = (b) on 2026-04-22 and selected Option A (authenticated public submission only, no anonymous walk-up) on the same day. T5D implements exactly that — no more, no less. -**Private mode (default).** Staff-only. No public routes are mounted. `/auth/register` returns 404 (not 403 — the route does not exist in private mode). `UserRole.PUBLIC` is not assignable via self-registration. The login screen is the only externally reachable page. This matches the pre-T5D behavior of every CivicRecords AI deployment; existing deployments that do nothing will keep working exactly as they did. +**Private mode (default).** Staff-only. No public routes are mounted. `/auth/register` returns 404 (not 403 — the route does not exist in private mode). `UserRole.PUBLIC` is not assignable via self-registration. The login screen is the only externally reachable page. This matches the pre-T5D behavior of every CivicSunshine deployment; existing deployments that do nothing will keep working exactly as they did. **Public mode — minimal surface (exact, locked).** Three user-visible surfaces, no more: 1. **Public landing page** (`/public/`) — explains what the city lets residents do online and routes them to register or sign in. @@ -936,7 +936,7 @@ Decisions that constrain implementation. Each links to the specific test functio | D-UI-2 | Notifications: created_by recipient, fallback to ADMIN-role users. Triggers: circuit-open + recovery. Rate-limit: batch within 5-min window → digest. | First-failure is noisy. Circuit-open is the signal. 10-source simultaneous outage → 1 digest not 10 emails. | `test_sync_notifications.py::test_circuit_open_fires_notification` | | D-FAIL-12 | 429 with `Retry-After` header honored at task-level (not enqueued as sync_failures). Capped at 600s to prevent worker starvation. | 429 is transient and expected on rate-limited municipal APIs. Task-level is the right layer — polluting sync_failures with rate-limit events would trip circuit breaker on noise. | `test_rest_connector.py::test_429_retry_after_header_honored` | | D-FAIL-13 | sync_failures and sync_run_log both CASCADE on DataSource delete. | Orphaned failure rows for a deleted source are noise. Admin deleting a source intends to remove all associated state. | `test_sync_failures.py::test_cascade_delete_removes_failures_and_run_log` | -| D-TENANT-1 | CivicRecords is single-tenant per install (one city per deployment). No org-level isolation within a deployment. All admin-role users within the installation share access to all sources. | Architecture is per-city SaaS/self-hosted. Multi-tenant within a single install is not a v1 requirement. | `test_datasources_router.py` — admin-role access tests (existing) | +| D-TENANT-1 | CivicSunshine is single-tenant per install (one city per deployment). No org-level isolation within a deployment. All admin-role users within the installation share access to all sources. | Architecture is per-city SaaS/self-hosted. Multi-tenant within a single install is not a v1 requirement. | `test_datasources_router.py` — admin-role access tests (existing) | | D-PROC-1 | Every Claude Code / Cowork session touching this repo MUST load the `coder-ui-qa-test` skill as its first action. The skill defines the Principal Engineer / Senior UI Designer / Senior QA Engineer standards and enforces Hard Rule 9 (mandatory deliverables gate). No push is permitted until all five Rule 9 artifact classes exist on disk. Override phrase: `"override rule 9"` (literal, from human in chat only). | The five Rule 9 deliverables (UML diagrams, README ×4 formats, USER-MANUAL ×3 formats/sections, landing page with 4 action buttons, GitHub Discussions seed) were absent from the initial v1.1.0 development because the skill was not loaded. Retroactive production required three commits after the fact. This decision ensures the gap cannot recur. | Verified via `CLAUDE.md` Hard Rule 0 (project-level) and the `coder-ui-qa-test` skill `§ HARD RULES §9`. | ## 18. Engineering Acceptance Criteria @@ -982,7 +982,7 @@ scripts/ — install scripts, verification scripts test-data/ — test fixtures docker-compose.yml + 3 variant files (dev, gpu, host-ollama) install.ps1 (Windows), install.sh (macOS/Linux) — **install paths as of 2026-04-22 (post-T5E):** -- **Windows:** double-click unsigned installer (Inno Setup 6.x) produced by `.github/workflows/release.yml` on every `v*` tag — `installer/windows/civicrecords-ai.iss` + `build-installer.sh`. Installs to `C:\Program Files\CivicRecords AI\`, runs `installer/windows/prereq-check.ps1` (Docker Desktop, WSL 2 + Virtual Machine Platform, 32 GB RAM floor, optional host Ollama), then `install.ps1` for the T5C Gemma 4 picker + auto-pull + T5B first-boot baseline seeding. Start Menu ships two separate shortcuts: **Start CivicRecords AI** (daily start via `launch-start.ps1` — `docker compose up -d` only, no install, no model pull) and **Install or Repair CivicRecords AI** (full bootstrap via `launch-install.ps1`). Operators must install Docker Desktop separately; the prereq check detects absence and prints remediation. See §8.8 and `installer/windows/README.md`. +- **Windows:** double-click unsigned installer (Inno Setup 6.x) produced by `.github/workflows/release.yml` on every `v*` tag — `installer/windows/civicrecords-ai.iss` + `build-installer.sh`. Installs to `C:\Program Files\CivicSunshine\`, runs `installer/windows/prereq-check.ps1` (Docker Desktop, WSL 2 + Virtual Machine Platform, 32 GB RAM floor, optional host Ollama), then `install.ps1` for the T5C Gemma 4 picker + auto-pull + T5B first-boot baseline seeding. Start Menu ships two separate shortcuts: **Start CivicSunshine** (daily start via `launch-start.ps1` — `docker compose up -d` only, no install, no model pull) and **Install or Repair CivicSunshine** (full bootstrap via `launch-install.ps1`). Operators must install Docker Desktop separately; the prereq check detects absence and prints remediation. See §8.8 and `installer/windows/README.md`. - **macOS / Linux:** script-based (`install.sh`) — configures and starts the Docker Compose stack; requires Docker Desktop (macOS) or Docker Engine (Linux) to already be installed and running. No platform-native installer ships in this slice; cross-platform installer parity is documented as follow-on, not implemented. CHANGELOG.md, CONTRIBUTING.md, CLAUDE.md, USER-MANUAL.md, LICENSE (Apache 2.0) Backend modules (20): admin, analytics, audit, auth, catalog, city_profile, connectors, datasources, departments, documents, exemptions, ingestion, llm, models, notifications, onboarding, requests, schemas, search, service_accounts @@ -991,7 +991,7 @@ Frontend pages (14): AuditLog, CityProfile, Dashboard, DataSources, Discovery, E Test modules (45): test_admin, test_analytics, test_audit, test_auth, test_catalog, test_chunker, test_city_profile, test_compliance_templates, test_coverage_gaps, test_datasource_connection, test_datasources, test_department_scoping, test_departments, test_documents, test_embedder, test_exemption_dashboard, test_exemption_features, test_exemption_rules_seed, test_exemptions, test_fee_lifecycle, test_fee_schedules, test_fees, test_health, test_imap_connector, test_ingestion_retry, test_llm_client, test_manual_drop, test_messages, test_model_registry, test_notification_dispatch, test_notifications, test_onboarding_interview, test_parsers, test_pipeline, test_prompt_injection, test_requests, test_response_letter, test_roles, test_search_api, test_search_engine, test_search_features, test_service_accounts, test_smtp_delivery, test_timeline, test_user_management ## Appendix B: Bottom-Line Summary -CivicRecords AI at v1.7.3 is a recovery-aligned internal staff platform with a minimal public surface, at-rest-encrypted connector credentials, Docker secret-file handling for JWT/admin bootstrap secrets, a Windows double-click installer path, and Phase 2 LLM integration aligned to the civiccore dependency line. From an 80-test foundation at v0.1.0 the codebase has grown to **640 backend tests collected and passing by Docker audit on 2026-05-15 + 36 frontend Vitest tests passing** with department-level access control, 50-state exemption coverage, a notification pipeline, a central LLM client with prompt injection sanitization, fee waiver workflows, a rich text editor, macro stripping, search enhancements, coverage gap monitoring, user management improvements, Tier 2 auth/authz hardening across 24 department-scoped handlers, credential redaction, bootstrap hardening, SSRF protection, Tier 6 at-rest encryption (Fernet envelope on `data_sources.connection_config`), shared connector-security extraction onto civiccore v0.13.0, persisted audit-log hashing/verification extraction onto civiccore v0.17.0, live connector retry/circuit-breaker primitive extraction onto civiccore v0.18.1, vendor-delta/mock-city contract consumption onto civiccore v0.19.0, startup config validation consumption onto civiccore v0.20.0, shared cron schedule validation/next-run computation consumption onto civiccore v0.21.0, shared datasource source-list status projection consumption onto civiccore v0.22.0, the v1.4.10 docs-only release alignment patch, the v1.5.0 CivicCore v1.0.1 recovery migration, the v1.6.0 Docker secret-file extraction closing QA-002, the v1.6.1 Celery ingestion worker event-loop recovery patch, v1.7.2 CivicCore v1.2.0 shared-ingestion release-asset alignment, and v1.7.3 direct-pip release assets with no functional change. +CivicSunshine at v1.7.3 is a recovery-aligned internal staff platform with a minimal public surface, at-rest-encrypted connector credentials, Docker secret-file handling for JWT/admin bootstrap secrets, a Windows double-click installer path, and Phase 2 LLM integration aligned to the civiccore dependency line. From an 80-test foundation at v0.1.0 the codebase has grown to **640 backend tests collected and passing by Docker audit on 2026-05-15 + 36 frontend Vitest tests passing** with department-level access control, 50-state exemption coverage, a notification pipeline, a central LLM client with prompt injection sanitization, fee waiver workflows, a rich text editor, macro stripping, search enhancements, coverage gap monitoring, user management improvements, Tier 2 auth/authz hardening across 24 department-scoped handlers, credential redaction, bootstrap hardening, SSRF protection, Tier 6 at-rest encryption (Fernet envelope on `data_sources.connection_config`), shared connector-security extraction onto civiccore v0.13.0, persisted audit-log hashing/verification extraction onto civiccore v0.17.0, live connector retry/circuit-breaker primitive extraction onto civiccore v0.18.1, vendor-delta/mock-city contract consumption onto civiccore v0.19.0, startup config validation consumption onto civiccore v0.20.0, shared cron schedule validation/next-run computation consumption onto civiccore v0.21.0, shared datasource source-list status projection consumption onto civiccore v0.22.0, the v1.4.10 docs-only release alignment patch, the v1.5.0 CivicCore v1.0.1 recovery migration, the v1.6.0 Docker secret-file extraction closing QA-002, the v1.6.1 Celery ingestion worker event-loop recovery patch, v1.7.2 CivicCore v1.2.0 shared-ingestion release-asset alignment, and v1.7.3 direct-pip release assets with no functional change. The system has meaningful security hardening (ReDoS protection, self-demotion guards, credential redaction, SSRF host validation, FIRST_ADMIN_PASSWORD validation, macro stripping), operational polish (retry, priority indicators, citation rendering, empty states), and accessibility foundations (44px touch targets, skip navigation, icon+color badges, full F1-F6 keyboard/SR audit complete), but release readiness must be re-earned through the recovery gate. diff --git a/docs/admin-manual-it.html b/docs/admin-manual-it.html index f6b4243..8ee01ee 100644 --- a/docs/admin-manual-it.html +++ b/docs/admin-manual-it.html @@ -3,10 +3,10 @@ -CivicRecords AI — IT Administrator Manual v1.4.1 +CivicSunshine — IT Administrator Manual v1.4.1