Skip to content

docs(civiccore): Phase 1 extraction inventory - #23

Draft
scottconverse wants to merge 1 commit into
masterfrom
civiccore-extraction-inventory
Draft

scottconverse wants to merge 1 commit into
masterfrom
civiccore-extraction-inventory

Conversation

@scottconverse

Copy link
Copy Markdown
Collaborator

Draft for review — not for merge. This PR is the planning artifact for the upcoming CivicCore extraction (Phase 1).

Adds docs/civiccore-extraction-inventory.md (one file, +545 lines, no code changes).

What it does

Walks every backend/app/ subdirectory and classifies each module per CivicCore Extraction Spec §8 (moves), §9 (stays), and §10 (DB ownership):

Bucket Subsystems Backend .py files
MOVES → civiccore 13 ~75
STAYS in civicrecords-ai 9 ~12
INVESTIGATE — needs decision 8 ~15

Auditor review summary (2026-04-23)

Scott's audit agent reviewed the inventory and accepted most recommendations. Two pre-Phase-1 decisions are now recorded as ADRs in the umbrella repo:

  • ADR-0002 — `Base = declarative_base()` lives in `civiccore.models.base.Base`, not under `user.py`. Phase 1 ships a 5-line shim from `app.models.user`.
  • ADR-0003 — Civiccore's Alembic baseline is the revision immediately after `787207afc66a`. The Phase-2 extensions migration is not hand-split. Existing v1.2.x deployments stamp civiccore's baseline as applied.

Six spec-vs-reality drifts (LLM filenames, sovereignty script consolidation, app-shell vs AdminShell, no design-tokens directory, letters/fees living inside other modules) have been corrected in the umbrella spec at commit 1deda21.

Phase-1 critical path

Identified in Section D of the inventory. ~5 auth + 4 audit + 2 departments + 2 service_accounts modules; 4 models (User/UserRole/Base, AuditLog, Department, ServiceAccount); 4 schemas; 2 migrations (`001_initial`, `012_add_liaison_public_roles`); 8 tests.

Branch hygiene

Branch `civiccore-extraction-inventory` was created from `origin/master` at `3cf7719` to keep this PR isolated from the unfinished resident-tracking spec work on local master (`073b58e`).

Out of scope (per Hard Rule 8)

Anything beyond writing the inventory. No code changes to civicrecords-ai. The Phase-5 letters/fees restructuring, the F.6 ModelRegistry split, and the Phase-1 extraction work itself are separate PRs.

🤖 Generated with Claude Code

Walks every backend/app/ subdirectory and classifies each per
CivicCore Extraction Spec §8 (moves), §9 (stays), §10 (DB ownership).
INVESTIGATE bucket surfaces ambiguous cases for Scott's decision
before Phase 1 begins. Phase 1 critical-path files identified
(User/Role/Department/audit_log + migrations).

Branch isolated from local master at origin/master (3cf7719) to
avoid bundling unfinished resident-tracking spec work.

Source of truth: github.com/CivicSuite/civicsuite specs/02_CivicCore.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant