Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,34 @@ on:
jobs:
verify:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16
env:
POSTGRES_PASSWORD: civicnotice
POSTGRES_USER: civicnotice
POSTGRES_DB: civicnotice_test
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U civicnotice -d civicnotice_test"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: "3.11"
- name: Install CivicCore release wheel
run: python -m pip install https://github.com/CivicSuite/civiccore/releases/download/v0.3.0/civiccore-0.3.0-py3-none-any.whl
run: python -m pip install https://github.com/CivicSuite/civiccore/releases/download/v1.2.0/civiccore-1.2.0-py3-none-any.whl
- name: Install package
run: python -m pip install -e ".[dev]"
- name: Assert CivicCore release version
run: python -c "import civiccore; assert civiccore.__version__ == '1.2.0', civiccore.__version__"
- name: Run release gate
env:
CIVICNOTICE_POSTGRES_TEST_URL: postgresql+psycopg2://civicnotice:civicnotice@localhost:5432/civicnotice_test
run: bash scripts/verify-release.sh


4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
## Hard Boundaries

- CivicNotice never decides legal sufficiency, publishes official notices, provides legal advice, writes back to publication systems, or updates a notice system of record.
- CivicNotice v0.1.1 must not call live LLMs or live agenda systems.
- CivicNotice v0.2.0 must not call live LLMs or live agenda systems.
- deadline tracking, publication readiness tracking, channel planning, and records exports must be marked staff-review-required where applicable.
- CivicNotice depends on CivicCore; CivicCore must never depend on CivicNotice.
- CivicNotice may reference CivicClerk meeting concepts only through released APIs or deterministic sample data in v0.1.1.
- CivicNotice may reference CivicClerk meeting concepts only through released APIs or deterministic sample data in v0.2.0.

## Verification

Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,22 @@ All notable changes to CivicNotice will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).

## [0.2.0] - 2026-06-19

### Added

- Added durable publication-proof workpapers for staff evidence packets linked to Clerk, procurement, board, or manual source records.
- Added deterministic statutory rule checks and staff-editable notice drafting templates for common notice types.
- Added subscriber delivery planning with active/suppressed subscriber accounting, deduped email recipients, required-channel checks, and language-review flags.
- Added accessibility, plain-language, and human-approved translation readiness packets for public notices.
- Added archive/handoff packets that assemble required notice evidence, missing items, and Clerk/Procure/Boards/Records handoff targets.

### Changed

- Moved CivicNotice to the `civiccore v1.2.0` release wheel used by the current Windows Local city-core platform.
- Synchronized runtime health/version tests, docs, release gate version surfaces, and public UI copy for the v0.2.0 notice workflow release.
- Preserved the deterministic notice registry, deadline tracking, publication-readiness, channel-planning, records-export, optional workpaper persistence, and honest unshipped-boundary behavior from v0.1.2.

## [0.1.2] - 2026-04-29

### Changed
Expand Down
42 changes: 38 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
# CivicNotice

CivicNotice is the CivicSuite module for public hearing notices, legal notices, bid notices, vacancy notices, statutory publication deadlines, publication-readiness review, channel planning, and notice-record export checklists.
CivicNotice is the CivicSuite module for public hearing notices, legal notices, bid notices, vacancy notices, statutory publication deadlines, statutory rule checks, notice drafting templates, accessibility and language-readiness review, publication-readiness review, channel planning, subscriber delivery planning, archive/handoff packets, and notice-record export checklists.

Current state: **v0.1.2 notice compliance foundation release**, aligned to the `civiccore v0.9.0` release wheel. This repo ships a FastAPI package, health/root endpoints, documentation gates, deterministic sample notice registry, CivicCore-backed statutory deadline plans, optional database-backed registry/deadline workpapers, publication-readiness checklists, channel-planning helpers, notice/records export checklist, and accessible public sample UI at `/civicnotice`. It does **not** ship legal sufficiency decisions, legal advice, live LLM calls, official notice publication, publication-system write-back, or notice system-of-record integrations.
Current state: **v0.2.0 notice compliance foundation release**, aligned to the `civiccore v1.2.0` release wheel. This repo ships a FastAPI package, health/root endpoints, documentation gates, deterministic sample notice registry, CivicCore-backed statutory deadline plans, deterministic statutory rule checks, notice drafting templates, accessibility and language-readiness review packets, optional database-backed registry/deadline/publication-proof workpapers, publication-readiness checklists, channel-planning helpers, subscriber delivery planning, archive/handoff packets, notice/records export checklist, and accessible public sample UI at `/civicnotice`. It does **not** ship legal sufficiency decisions, legal advice, live LLM calls, official notice publication, publication-system write-back, or notice system-of-record integrations.

## What CivicNotice Does

- Create sample notice registry stubs.
- Build statutory publication deadline reminder plans using the shared CivicCore notice helper.
- Persist notice registry and deadline-plan workpapers when `CIVICNOTICE_WORKPAPER_DB_URL` is configured.
- Check notice packets against deterministic staff-review rule packs for common notice types.
- Build staff-editable notice templates with required fields and unresolved placeholders.
- Build accessibility, plain-language, and human-approved translation readiness packets.
- Persist notice registry, deadline-plan, and publication-proof workpapers when `CIVICNOTICE_WORKPAPER_DB_URL` is configured.
- Store staff-reviewed publication proof packets linked to upstream Clerk, procurement, board, or manual source records.
- Assemble publication-readiness checklists for staff review.
- Plan notice channels and accessibility-review needs.
- Build subscriber delivery plans without sending notices or storing subscriber PII.
- Assemble archive/handoff packets for Clerk, Procure, Boards, Records, and manual staff files.
- Produce notice and records export checklists.
- Demonstrate a public notice-support UI at `/civicnotice`.

Expand All @@ -19,7 +25,7 @@ Current state: **v0.1.2 notice compliance foundation release**, aligned to the `
- It does not decide legal sufficiency.
- It does not publish official notices.
- It does not provide legal advice.
- It does not call live LLMs in v0.1.2.
- It does not call live LLMs in v0.2.0.
- It does not write back to publication systems.
- It does not replace a notice system of record.

Expand All @@ -28,14 +34,40 @@ Current state: **v0.1.2 notice compliance foundation release**, aligned to the `
- `GET /` returns the shipped/planned boundary.
- `GET /health` returns package and CivicCore versions.
- `GET /civicnotice` returns the accessible public sample UI.
- `GET /docs` opens the interactive FastAPI API documentation for local deployments.
- `GET /openapi.json` returns the machine-readable API schema, including accepted request and error shapes.
- `POST /api/v1/civicnotice/registry` returns a sample notice registry stub.
- `GET /api/v1/civicnotice/registry/{record_id}` retrieves a persisted notice registry record.
- `POST /api/v1/civicnotice/deadlines` returns statutory deadline reminders.
- `GET /api/v1/civicnotice/deadlines/{plan_id}` retrieves a persisted deadline plan.
- `POST /api/v1/civicnotice/rule-check` checks a notice packet against deterministic staff-review rules.
- `POST /api/v1/civicnotice/templates` returns a staff-editable notice template.
- `POST /api/v1/civicnotice/publication-proof` stores a durable publication proof workpaper.
- `GET /api/v1/civicnotice/publication-proof/{proof_id}` retrieves a persisted publication proof workpaper.
- `POST /api/v1/civicnotice/publication-check` returns a publication-readiness checklist.
- `POST /api/v1/civicnotice/accessibility-review` returns accessibility and language-readiness flags.
- `POST /api/v1/civicnotice/channels` returns channel planning flags.
- `POST /api/v1/civicnotice/subscribers/plan` returns a subscriber delivery plan.
- `POST /api/v1/civicnotice/archive-packet` returns archive and handoff readiness for a notice file.
- `POST /api/v1/civicnotice/export` returns a notice and records export checklist.

## Start and Smoke-Check CivicNotice

Install the package with its development dependencies, start the ASGI app target `civicnotice.main:app`, and open the local `/health` and `/civicnotice` routes. A fresh user can reach the core stateless API and public sample UI without a database, model server, account, or API key.

Minimal workflow to smoke-check after startup:

1. Confirm `/health` reports `service: civicnotice`, version `0.2.0`, and CivicCore `1.2.0`.
2. Post a registry stub to `/api/v1/civicnotice/registry` without a database and confirm the response includes `record_id: null`, registry notes, and the staff-responsibility disclaimer.
3. Open `/docs` or `/openapi.json` to inspect accepted fields, then post a rule check to `/api/v1/civicnotice/rule-check` with a supported notice type, event date, publication dates, channels, content fields, and statutory basis. Unsupported notice types return a 422 response with supported choices.
4. Open `/civicnotice` and confirm the page is a static public sample with boundary copy, not an official publication workflow.

## Persistence and Durable Writes

Without `CIVICNOTICE_WORKPAPER_DB_URL`, CivicNotice runs in deterministic stateless mode: registry and deadline POST requests return transient payloads, persisted GET routes return actionable 503 responses, and publication-proof storage is unavailable.

With `CIVICNOTICE_WORKPAPER_DB_URL`, registry, deadline, and publication-proof workpapers are durable. Persistence-backed write routes also require `CIVICNOTICE_TRUSTED_WRITE_TOKEN` and the matching `X-CivicNotice-Write-Token` request header. This is a minimal trusted-mode guard for local deployments; it is not a replacement for a production identity system.

## Local Development

```bash
Expand All @@ -44,6 +76,8 @@ python -m pytest -q
bash scripts/verify-release.sh
```

The release gate requires `CIVICNOTICE_POSTGRES_TEST_URL` so PostgreSQL persistence coverage cannot be skipped. Plain unit tests may still run without PostgreSQL for local development.

## License

Code is Apache License 2.0. Documentation is CC BY 4.0.
40 changes: 38 additions & 2 deletions README.txt
Original file line number Diff line number Diff line change
@@ -1,30 +1,66 @@
CivicNotice
===========

CivicNotice is the CivicSuite module for public hearing notices, legal notices, bid notices, vacancy notices, statutory publication deadlines, publication-readiness review, channel planning, and notice-record export checklists.
CivicNotice is the CivicSuite module for public hearing notices, legal notices, bid notices, vacancy notices, statutory publication deadlines, statutory rule checks, notice drafting templates, accessibility and language-readiness review, publication-readiness review, channel planning, subscriber delivery planning, archive/handoff packets, and notice-record export checklists.

Current state: v0.1.2 notice compliance foundation release, aligned to the civiccore v0.9.0 release wheel. This repo ships a FastAPI package, health/root endpoints, documentation gates, deterministic sample notice registry, CivicCore-backed statutory deadline plans, optional database-backed registry/deadline workpapers via CIVICNOTICE_WORKPAPER_DB_URL, publication-readiness checklists, channel-planning helpers, notice/records export checklist, and accessible public sample UI at /civicnotice.
Current state: v0.2.0 notice compliance foundation release, aligned to the civiccore v1.2.0 release wheel. This repo ships a FastAPI package, health/root endpoints, documentation gates, deterministic sample notice registry, CivicCore-backed statutory deadline plans, deterministic statutory rule checks, notice drafting templates, accessibility and language-readiness review packets, optional database-backed registry/deadline/publication-proof workpapers via CIVICNOTICE_WORKPAPER_DB_URL, publication-readiness checklists, channel-planning helpers, subscriber delivery planning, archive/handoff packets, notice/records export checklist, and accessible public sample UI at /civicnotice.

It does not ship legal sufficiency decisions, legal advice, live LLM calls, official notice publication, publication-system write-back, or notice system-of-record integrations.

What CivicNotice does:
- Create sample notice registry stubs.
- Build statutory publication deadline reminder plans using the shared CivicCore notice helper.
- Check notice packets against deterministic staff-review rule packs for common notice types.
- Build staff-editable notice templates with required fields and unresolved placeholders.
- Build accessibility, plain-language, and human-approved translation readiness packets.
- Persist notice registry, deadline-plan, and publication-proof workpapers when CIVICNOTICE_WORKPAPER_DB_URL is configured.
- Store staff-reviewed publication proof packets linked to upstream source records.
- Assemble publication-readiness checklists for staff review.
- Plan notice channels and accessibility-review needs.
- Build subscriber delivery plans without sending notices or storing subscriber PII.
- Assemble archive/handoff packets for Clerk, Procure, Boards, Records, and manual staff files.
- Produce notice and records export checklists.
- Demonstrate a public notice-support UI at /civicnotice.

API surface:
- GET /
- GET /health
- GET /civicnotice
- GET /docs
- GET /openapi.json
- POST /api/v1/civicnotice/registry
- GET /api/v1/civicnotice/registry/{record_id}
- POST /api/v1/civicnotice/deadlines
- GET /api/v1/civicnotice/deadlines/{plan_id}
- POST /api/v1/civicnotice/rule-check
- POST /api/v1/civicnotice/templates
- POST /api/v1/civicnotice/publication-proof
- GET /api/v1/civicnotice/publication-proof/{proof_id}
- POST /api/v1/civicnotice/publication-check
- POST /api/v1/civicnotice/accessibility-review
- POST /api/v1/civicnotice/channels
- POST /api/v1/civicnotice/subscribers/plan
- POST /api/v1/civicnotice/archive-packet
- POST /api/v1/civicnotice/export

Start and smoke-check CivicNotice:

Install the package with development dependencies, start the ASGI app target civicnotice.main:app, and open the local /health and /civicnotice routes. A fresh user can reach the core stateless API and public sample UI without a database, model server, account, or API key.

Minimal smoke check:
1. Confirm /health reports service civicnotice, version 0.2.0, and CivicCore 1.2.0.
2. Post a registry stub to /api/v1/civicnotice/registry without a database and confirm record_id is null with registry notes and the staff-responsibility disclaimer.
3. Open /docs or /openapi.json to inspect accepted fields, then post a rule check to /api/v1/civicnotice/rule-check with a supported notice type, event date, publication dates, channels, content fields, and statutory basis. Unsupported notice types return a 422 response with supported choices.
4. Open /civicnotice and confirm the page is a static public sample with boundary copy, not an official publication workflow.

Persistence and durable writes:

Without CIVICNOTICE_WORKPAPER_DB_URL, CivicNotice runs in deterministic stateless mode: registry and deadline POST requests return transient payloads, persisted GET routes return actionable 503 responses, and publication-proof storage is unavailable.

With CIVICNOTICE_WORKPAPER_DB_URL, registry, deadline, and publication-proof workpapers are durable. Persistence-backed write routes also require CIVICNOTICE_TRUSTED_WRITE_TOKEN and the matching X-CivicNotice-Write-Token request header. This is a minimal trusted-mode guard for local deployments; it is not a replacement for a production identity system.

Release gate:

The full release gate requires CIVICNOTICE_POSTGRES_TEST_URL so PostgreSQL persistence coverage cannot be skipped. Plain unit tests may still run without PostgreSQL for local development.

License: Apache License 2.0 for code; CC BY 4.0 for documentation.
30 changes: 28 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,32 @@
# Security

CivicNotice is early-stage software. Current version: `0.1.2`. Do not deploy it as a system of record until a release explicitly says it is production-ready.
CivicNotice is early-stage software. Current version: `0.2.0`. Do not deploy it as a system of record until a release explicitly says it is production-ready.

Report suspected vulnerabilities privately to the project maintainer. Do not open public issues containing exploit details, secrets, or sensitive municipal data.
## Supported Versions

| Version | Security support |
| --- | --- |
| 0.2.x | Supported for private vulnerability reports |
| 0.1.x | Best-effort only |

## Private Reporting

Report suspected vulnerabilities through GitHub private vulnerability reporting for the `CivicSuite/civicnotice` repository when available. If private reporting is unavailable, contact the repository owner privately before opening a public issue.

Do not include live municipal secrets, resident data, publication affidavits, subscriber lists, credentials, access tokens, database dumps, or exploit details in public issues, pull requests, screenshots, or discussion threads.

## What To Include

- Affected CivicNotice version and commit, if known.
- Whether `CIVICNOTICE_WORKPAPER_DB_URL` or `CIVICNOTICE_TRUSTED_WRITE_TOKEN` was configured.
- Steps to reproduce with synthetic data only.
- Expected and observed behavior.
- Impact assessment, including whether durable workpaper writes or public notice artifacts are exposed.

## Response Expectations

Maintainers should acknowledge private reports within 5 business days, triage severity, and coordinate a fix or advisory before public disclosure when the report is valid. Critical issues affecting durable writes, stored workpapers, or sensitive data handling should be prioritized before feature work.

## Deployment Boundary

CivicNotice 0.2.0 is designed for local, staff-reviewed municipal workflows. Persistence-backed writes require the trusted write token, but this token is only a minimal local guard. Production deployments should place CivicNotice behind the city's normal authentication, authorization, TLS, logging, backup, and network controls.
3 changes: 1 addition & 2 deletions SUPPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

CivicNotice is not a hosted service. Cities or implementers operate their own installation.

For bugs and documentation issues, open a GitHub issue. For security concerns, follow `SECURITY.md`.

For bugs and documentation issues, open a GitHub issue with synthetic data only. For security concerns, follow `SECURITY.md` and use private vulnerability reporting or a private maintainer contact instead of a public issue.



Loading