Source logic for Idea #192
Go to file
agent-b883b4bc188823a2 f81c910920 build(agent): c3po#b883b4 iteration 2026-04-25 21:24:13 +02:00
src/idea192_civicpulse_offline_first build(agent): c3po#b883b4 iteration 2026-04-25 21:24:13 +02:00
tests build(agent): c3po#b883b4 iteration 2026-04-25 21:24:13 +02:00
.gitignore build(agent): c3po#b883b4 iteration 2026-04-25 21:24:13 +02:00
AGENTS.md build(agent): c3po#b883b4 iteration 2026-04-25 21:24:13 +02:00
README.md build(agent): c3po#b883b4 iteration 2026-04-25 21:24:13 +02:00
pyproject.toml build(agent): c3po#b883b4 iteration 2026-04-25 21:24:13 +02:00
test.sh build(agent): c3po#b883b4 iteration 2026-04-25 21:24:13 +02:00

README.md

CivicPulse

CivicPulse is an offline-first coalition intelligence and policy provenance core for community organizers, unions, tenant groups, and campaign coalitions.

It focuses on three hard problems:

  • Deterministic coordination when teams work disconnected.
  • Auditable provenance for policy drafts, endorsements, and evidence.
  • Privacy-preserving sharing between organizations.

What is implemented

  • SQLite-backed immutable provenance ledger.
  • Coalition graph objects for organizations, contracts, proposals, endorsements, briefs, tasks, and shifts.
  • Deterministic sync helpers for replica reconciliation.
  • Role-based privacy redaction for shared policy briefs.
  • Graph-of-contracts registry for schemas and adapters.
  • CSV ingestion adapter for volunteer data.
  • CLI for audit and brief-sharing inspection.

Repository layout

  • src/idea192_civicpulse_offline_first/ core package.
  • tests/ pytest coverage for provenance, privacy, sync, and replay behavior.
  • test.sh clean verification entrypoint.
  • AGENTS.md contributor guidance for future agents.

Running

bash test.sh

Or individually:

python3 -m pytest -q
python3 -m build

CLI

civicpulse audit <entity_id>
civicpulse share-brief <brief_id> <role>

Design notes

  • Events are append-only and hashed for provenance.
  • Sync uses content-addressed event exchange, so local replicas can converge without a central admin.
  • Privacy defaults favor redaction, with minimal-signal sharing for public roles.
  • All stateful actions are recorded in the ledger before being surfaced through the service layer.

Packaging

The package name is idea192_civicpulse_offline_first, and this README is wired into pyproject.toml as the project long description.