Plan: Documentation Pass — UAT Readiness for All Audiences
On this page
- Status
- Context
- Scope
- Design
- Steps
- Step 1: Fix Stale Existing Docs
- Step 2: Agent Governance Docs
- Step 3: Root Files
- Step 4: Caseworker User Guide
- Step 5: Production Deployment Guide
- Step 6: Operational Runbooks
- Step 7: Compliance Certification Matrix
- Step 8: Developer Guide Enhancements
- Step 9: State Evaluator Guide
- Step 10: Security Data Flow Diagrams (#264)
- Step 11: Per-Service API Reference (#265)
- Step 12: Supporting Pages
- Step 13: Antora Navigation Rebuild
- Files Touched
- Verification
- Documentation Updates
Status
| Step | Description | Status |
|---|---|---|
1 |
Fix stale existing docs (CLAUDE.md, services.md, CHANGELOG, nav.adoc, plan status tables, roadmap) |
Done (2026-04-07) — MR !64 |
2 |
Agent governance: create shared-crates.md, rulesets.md, known-issues.md in .claude/docs/ |
Done (2026-04-07) — MR !64 |
3 |
Root files: expand SECURITY.adoc (SLAs, supported versions, measures), update README.adoc, CONTRIBUTING.adoc |
Done (2026-04-07) — MR !64 |
4 |
Caseworker user guide: 10 SNAP workflows with screenshots and regulatory context (#306) |
Done (2026-04-07) — MR !64 |
5 |
Production deployment guide: K8s, HA, monitoring, backup/DR (#304) |
Done (2026-04-07) — MR !64 |
6 |
Operational runbooks: incident response, key rotation, rollback, breach notification (#305) |
Done (2026-04-07) — MR !64 |
7 |
Compliance certification matrix: Pub 1075, HIPAA, IEVS, NIST mapping (#307) |
Done (2026-04-07) — MR !64 |
8 |
Developer guide enhancements: first-contribution walkthrough, troubleshooting, configuration reference (#262) |
Done (2026-04-07) — MR !64 |
9 |
State evaluator guide: executive summary, TCO signals, procurement model, risk register (#263) |
Done (2026-04-07) — MR !64 |
10 |
Security documentation: data flow diagrams, pen test framework, network architecture (#264) |
Done (2026-04-07) — 4 Mermaid sequence diagrams + encryption inventory |
11 |
Antora structural: per-service API reference pages, data model docs, design specs (#265) |
Done (2026-04-07) — 12 API reference pages + nav updated. Data model docs deferred. |
12 |
Supporting pages: federal requirements, CLI documentation, screenshots |
Done (2026-04-07) — federal-requirements.adoc + cli.adoc. Screenshots deferred. |
13 |
Antora nav.adoc rebuild: full 6-section hierarchy with all new pages |
Done (2026-04-07) — MR !64 |
Issues: #261, #262, #263, #264, #265, #304, #305, #306, #307
Branch (Steps 1-9, 12-13): docs/uat-documentation-pass — merged as MR !64
Branch (Steps 10-12 remainder): TBD
Context
A comprehensive 6-audience documentation audit revealed that Canopy’s documentation is mature for developers but has critical gaps for 5 other audiences. CRAIG (the sister project) has 120+ Antora pages across 8 subdirectories covering all audiences. Canopy has ~30 Antora pages, mostly plans and ADRs.
Six audiences were audited:
-
Developers: README and local-dev are adequate; missing shared-crates docs, rulesets guide, known-issues, first-contribution walkthrough, troubleshooting
-
State evaluators: why-canopy.adoc is excellent; missing executive summary, TCO, procurement model, production architecture, risk register
-
Security auditors: Architecture is strong; missing compliance certification matrix, incident response procedures, data retention policy, pen test framework, FedRAMP gap analysis
-
Caseworkers: ZERO end-user documentation. 10 core SNAP workflows are completely undocumented. UAT participants have no training material.
-
Operators/SRE: ZERO production deployment documentation. No runbooks, no backup/DR, no monitoring, no scaling guidance, no troubleshooting
-
Applicants: Post-UAT (deferred)
CRAIG patterns to adopt:
-
.claude/docs/shared-crates.md— public API surface for all shared crates -
.claude/docs/rulesets.md— JDM format, jurisdiction patterns, rule ordering -
.claude/docs/known-issues.md— gotchas and lessons learned -
docs/modules/ROOT/pages/api/— per-service narrative API reference -
docs/modules/ROOT/pages/guide/— per-role user guides with screenshots -
docs/modules/ROOT/pages/data-model-*.adoc— ER diagrams and cardinality -
docs/modules/ROOT/pages/design/— per-feature design specifications -
docs/modules/ROOT/pages/state-machines.adoc— Mermaid state diagrams -
docs/modules/ROOT/pages/plans/archive.adoc— completed plans with MR cross-refs -
Operations section: deployment-guide, security-operations, ato-readiness, nist-mapping, configuration-reference, troubleshooting
Scope
In scope:
-
Fix all stale content in existing documentation (test counts, route counts, plan status tables, roadmap)
-
Create 3 new
.claude/docs/agent governance files (shared-crates.md, rulesets.md, known-issues.md) -
Expand SECURITY.adoc with remediation SLAs, supported versions, security measures checklist
-
Create caseworker user guide with 10 SNAP workflows, screenshots, and regulatory citations
-
Create production deployment guide (infrastructure, K8s, HA, monitoring, backup/DR)
-
Create operational runbooks (incident response, key rotation, rollback, breach notification)
-
Create compliance certification matrix (IRS Pub 1075, HIPAA, IEVS, NIST 800-53)
-
Enhance Antora developer guide with first-contribution walkthrough and troubleshooting
-
Create state evaluator guide with executive summary, TCO, procurement model
-
Create security documentation with data flow diagrams and network architecture
-
Create per-service API reference pages (12 services)
-
Create data model documentation with ER diagrams
-
Create state machine diagrams (Mermaid) for determination, enrollment, appeal, IPV workflows
-
Create feature design specs for SNAP eligibility, notices, appeals, renewals
-
Create plan archive page with completed plans cross-referenced to MRs
-
Create federal requirements page mapping implementation to CFR/USC
-
Create configuration reference page (all env vars per service)
-
Create CLI documentation page (xtask commands + future canopy CLI)
-
Create troubleshooting guide for common failure modes
-
Capture worker portal screenshots via Playwright
-
Rebuild Antora nav.adoc with full 6-section hierarchy
Out of scope:
-
Applicant-facing help content (post-UAT, #267)
-
Video tutorials or interactive training (post-UAT)
-
Translated documentation (post-UAT, Fluent i18n for applicant portal only)
-
Commercial procurement template (state-specific, not project-level)
Design
Documentation Architecture
Following CRAIG’s proven 3-layer documentation model:
Layer 1: Agent Governance (.claude/docs/*.md)
├── Mandatory reads for AI agents and contributors
├── Conventions, testing, security, services reference
└── NEW: shared-crates.md, rulesets.md, known-issues.md
Layer 2: Root Files (README.adoc, CONTRIBUTING.adoc, SECURITY.adoc, CHANGELOG.adoc)
├── First contact for all visitors
└── EXPAND: SECURITY.adoc with SLAs and measures
Layer 3: Antora Site (docs/modules/ROOT/pages/)
├── Overview: index, why-canopy, roadmap
├── Getting Started: devstack, screenshots, glossary
├── User Guide: caseworker, supervisor (role-based)
├── Architecture: ADRs, data models, state machines, design specs
├── Developer Guide: setup, implementation, API reference, CLI, config, troubleshooting
├── Operations: deployment, security-ops, ATO, NIST mapping, runbooks
└── Plans: active → archive progression
File Organization
New files follow CRAIG’s directory patterns:
-
docs/modules/ROOT/pages/guide/caseworker.adoc— caseworker user guide -
docs/modules/ROOT/pages/guide/supervisor.adoc— supervisor guide (skeleton) -
docs/modules/ROOT/pages/api/canopy-snap.adoc— per-service API reference -
docs/modules/ROOT/pages/design/snap-eligibility.adoc— feature design spec -
docs/modules/ROOT/pages/data-model-snap.adoc— data model with ER diagram -
docs/modules/ROOT/pages/state-machines.adoc— all state machines -
docs/modules/ROOT/pages/deployment-guide.adoc— production deployment -
docs/modules/ROOT/pages/security-operations.adoc— security procedures -
docs/modules/ROOT/pages/ato-readiness.adoc— ATO checklist -
docs/modules/ROOT/pages/nist-architecture-mapping.adoc— NIST 800-53 controls -
docs/modules/ROOT/pages/configuration-reference.adoc— env vars per service -
docs/modules/ROOT/pages/cli.adoc— CLI command reference -
docs/modules/ROOT/pages/federal-requirements.adoc— CFR/USC mapping -
docs/modules/ROOT/pages/troubleshooting.adoc— common issues -
docs/modules/ROOT/pages/screenshots.adoc— worker portal captures -
docs/modules/ROOT/pages/plans/archive.adoc— completed plans index
Steps
Step 1: Fix Stale Existing Docs
Files: .claude/CLAUDE.md, .claude/docs/services.md, CHANGELOG.adoc, docs/modules/ROOT/nav.adoc, docs/modules/ROOT/pages/roadmap.adoc, plan status tables
-
CLAUDE.md: test count 500→512 in UAT section, snap route count 13→14, security 8→10, verification 3 internal
-
services.md: add params endpoint, archive endpoints, reporting clients, ABAWD endpoints (if not already current)
-
CHANGELOG.adoc: consolidate historical test count entries for release
-
nav.adoc: add ADR-009/010, add 3 plans (adr-003-compliance-remediation, devstack-staleness-guard, worker-portal-remediation)
-
roadmap.adoc: update with Phase 1 completion, link to MRs !55-63
-
Plan status tables: verify all plans match actual code state (worker-portal-snap, snap-federal-reporting, etc.)
Step 2: Agent Governance Docs
Files: .claude/docs/shared-crates.md, .claude/docs/rulesets.md, .claude/docs/known-issues.md
shared-crates.md: Document public API surface of all 10 shared crates (canopy-common, canopy-auth, canopy-db, canopy-mq, canopy-api, canopy-store, canopy-reference, canopy-signing, canopy-typst, canopy-rules-client, canopy-test-lib). For each: purpose, key types/traits, example usage.
rulesets.md: JDM format reference, decision table syntax, hit policies (first, collect), rule ordering, jurisdiction patterns (rulesets/federal/ vs rulesets/{jurisdiction}/), jurisdiction.toml structure, how to add a new ruleset.
known-issues.md: Devstack gotchas (Garage rpc_bind_addr, Docker orphan containers, stale test profile cache), Keycloak quirks (password hash format, emailVerified for password grant), nextest concurrency limits, cargo audit transitive typst advisories.
Step 3: Root Files
Files: SECURITY.adoc, README.adoc, CONTRIBUTING.adoc
SECURITY.adoc expansion (model after CRAIG):
* Supported versions table (current: 0.1.x)
* Remediation SLAs: Critical (24h patch + deploy), High (7 business days), Medium (30 days), Low (next scheduled release)
* Security measures checklist (15+ items: #![forbid(unsafe_code)], parameterized SQL, OIDC, rustls, Alpine, CSP, rate limiting, audit logging, cargo-deny, SAST, secret detection, container scanning, session security, field encryption, event payload validation)
README.adoc: Verify quick start commands are current, add link to Antora site, ensure non-developer path is clear.
CONTRIBUTING.adoc: Add "your first contribution" section, link to troubleshooting guide.
Step 4: Caseworker User Guide
Files: docs/modules/ROOT/pages/guide/caseworker.adoc
Document all 10 SNAP caseworker workflows with: * Step-by-step instructions (numbered, with expected outcomes) * Screenshots from worker portal (captured in Step 12) * Regulatory context (7 CFR citations for why each step matters) * Common errors and what to do
Workflows: 1. Login and navigation (Keycloak OIDC, sidebar, theme toggle) 2. Case search (htmx live search, name/SSN/case number) 3. Case detail (6 tabs: household, income, determination, notices, appeals, activity) 4. Application processing (expedited screening, eligibility review, approve/deny) 5. Appeal filing (form fields, continued benefits, hearing rights) 6. Interim contact recording (certification midpoint, contact methods) 7. Change report submission (income change, household change, threshold check) 8. ABAWD activity tracking (work hours, qualifying months, exemptions) 9. Verification discrepancy resolution (IEVS income comparison, resolve/dismiss) 10. Renewal queue management (filter by urgency, notice status, interim contacts)
Step 5: Production Deployment Guide
Files: docs/modules/ROOT/pages/deployment-guide.adoc
-
Infrastructure requirements (CPU, memory, disk per service tier)
-
Cloud deployment options (AWS ECS/EKS, Azure AKS, GCP GKE — reference architectures)
-
Kubernetes manifests or Helm chart structure (if applicable)
-
Secrets management (Vault, AWS Secrets Manager, Azure Key Vault)
-
Database provisioning (RDS/Cloud SQL with SSL, per-program isolation)
-
Load balancer / ingress configuration
-
High availability configuration (replica counts, health check endpoints)
-
Monitoring setup (Prometheus scrape config, Grafana dashboard JSON, alert rules)
-
Backup strategy (PostgreSQL PITR, RabbitMQ durable queues, S3 versioning)
-
Disaster recovery (RTO/RPO targets, failover procedures, tested rollback)
-
TLS certificate management (Let’s Encrypt / ACM, renewal automation)
-
Environment promotion workflow (dev → staging → production)
Step 6: Operational Runbooks
Files: docs/modules/ROOT/pages/security-operations.adoc, operational runbook sections
-
Incident response procedure (detect → classify → contain → eradicate → recover → notify)
-
Severity classification (P0 critical, P1 high, P2 medium, P3 low with response targets)
-
Key rotation runbook (ECDSA signing keys, Keycloak JWKS, encryption keys, database SSL)
-
Deployment rollback procedure (per-service, database migration rollback strategy)
-
Breach notification chain (IRS for FTI within 24h, FNS for IEVS, CMS for HIPAA, state AG)
-
Performance degradation troubleshooting (database slow queries, event bus backpressure, container OOM)
-
Service startup failure debugging (migration errors, Keycloak unreachable, RabbitMQ connection refused)
-
RabbitMQ message recovery (dead letter queue, requeue, message TTL)
Step 7: Compliance Certification Matrix
Files: docs/modules/ROOT/pages/ato-readiness.adoc, docs/modules/ROOT/pages/nist-architecture-mapping.adoc
ATO readiness checklist: Infrastructure prerequisites, security configuration validation, compliance documentation inventory, NIST control mapping completeness, biennial review schedule.
NIST 800-53 mapping: Map each relevant control family to Canopy implementation: * AC (Access Control) → Keycloak RBAC, role guards, session management * AU (Audit & Accountability) → canopy-security wildcard subscriber, hash chain, breach detection * IA (Identification & Authentication) → Keycloak OIDC, RS256 JWT, JWKS refresh * SC (System & Communications Protection) → rustls, field encryption, CSP, event payload validation * SI (System & Information Integrity) → cargo-deny, SAST, secret detection, input validation * MP (Media Protection) → S3 encryption, database SSL * PE (Physical & Environmental) → defer to cloud provider / state data center
Compliance matrix: IRS Pub 1075 controls → implementation, HIPAA controls → implementation, IEVS controls → implementation. Each control links to ADR, code file, and test that verifies it.
Data retention policy: Per data type (FTI: 5 years per Pub 1075 §4, IEVS: per state CMA, HIPAA PHI: 6 years, general PII: per state records retention schedule).
Step 8: Developer Guide Enhancements
Files: docs/modules/ROOT/pages/developer-guide.adoc, docs/modules/ROOT/pages/configuration-reference.adoc, docs/modules/ROOT/pages/troubleshooting.adoc
Developer guide additions:
* "Your first contribution" walkthrough (add a simple API endpoint end-to-end)
* Debugging guide (tracing, RUST_LOG, docker logs, database queries)
* cargo xtask command reference with dev refresh, --timing flag
* Staleness guard explanation
Configuration reference (new page): All environment variables per service, extracted from canopy-common/src/settings.rs and docker-compose.yml. Grouped by service with defaults and descriptions.
Troubleshooting (new page): Common devstack issues (port conflicts, stale containers, migration failures), Keycloak configuration (password hash, emailVerified, realm import), test failures (infrastructure guard, transient DB connections), cargo audit advisories.
Step 9: State Evaluator Guide
Files: docs/modules/ROOT/pages/evaluator-guide.adoc
-
Executive summary (2-3 pages, no Rust jargon): What Canopy does, who built it, what programs it supports
-
Cost signals: Federal cost sharing (90% FFP DDI, 75% M&O Medicaid, 50% SNAP), shared development model, no proprietary licensing
-
Program readiness matrix: SNAP (UAT-ready), TANF/Medicaid/CAPS/WIC (planned with timelines)
-
Deployment options: State-operated vs integrator-managed, skill requirements
-
Jurisdiction customization: JDM rulesets, jurisdiction.toml, no code changes for policy updates
-
Risk factors: Rust expertise availability, first production deployment, dependency on Georgia DHS roadmap
-
Procurement guidance: Open source (AGPL-3.0), no license fee, integrator RFQ considerations
-
Comparison to commercial IES: Feature matrix (what Canopy does vs typical vendor IES)
Step 10: Security Data Flow Diagrams (#264)
Files: docs/modules/ROOT/pages/security-operations.adoc (append new section)
Issue: #264 — remaining gap is data flow diagrams. All other items in #264 were delivered in Steps 6-7.
Add a == Data Flow Diagrams section to the end of security-operations.adoc with 4 Mermaid sequence diagrams. Use [mermaid] / …. block syntax (asciidoctor-kroki).
Diagram 1 — PII (SSN) Flow:
sequenceDiagram
participant Client as Caseworker (Browser)
participant Web as canopy-web (BFF)
participant Persons as canopy-persons
participant DB as canopy-persons DB
Client->>Web: POST /cases (form with SSN)
Web->>Persons: POST /v1/persons {ssn: "123-45-6789"}
Note over Persons: encrypt_ssn() via canopy-common::crypto
Note over Persons: AES-256-GCM + random 12-byte nonce
Persons->>DB: INSERT persons (ssn_encrypted BYTEA)
DB-->>Persons: OK
Persons-->>Web: Person {ssn: "***-**-6789"} (masked)
Web-->>Client: Case created
Key files: services/canopy-persons/src/store/persons.rs:9 (encrypt_ssn), crates/canopy-common/src/crypto.rs:16 (encrypt). SSN stored as [12-byte nonce | ciphertext | 16-byte auth tag] in persons.ssn_encrypted (BYTEA). Decrypted only on authorized read via Claims::require_caseworker_or_above().
Diagram 2 — FTI Flow:
sequenceDiagram
participant IRS as IRS / State DOR
participant TANF as canopy-tanf
participant TANFDB as canopy-tanf DB
participant MQ as RabbitMQ
participant Sec as canopy-security
IRS->>TANF: FTI data (future: IRS e-Services)
Note over TANF: FTI isolated per ADR-004
TANF->>TANFDB: INSERT fti_audit_log (accessed_by, purpose_code, data_elements)
TANF->>TANFDB: Store FTI in TANF-only tables
TANF->>MQ: Publish event (IDs only, NO FTI)
Note over MQ: Publisher rejects 27 restricted fields
MQ->>Sec: Wildcard subscriber logs event
Note over TANF: canopy-snap CANNOT query canopy-tanf DB (ADR-001)
Key files: services/canopy-tanf/migrations/20260325000001_create_fti_audit_log.sql (audit schema), crates/canopy-mq/src/publisher.rs:90 (RESTRICTED_FIELDS, 27 blocked field names). canopy-medicaid has identical isolation (COMPLIANCE.md) but FTI tables not yet implemented (post-UAT).
Diagram 3 — IEVS Flow:
sequenceDiagram
participant Elig as canopy-eligibility
participant SNAP as canopy-snap
participant Verify as canopy-verification
participant Sources as GA DOL / SSA
participant SNAPDB as canopy-snap DB
participant MQ as RabbitMQ
Elig->>SNAP: POST /v1/determine {ApplicationContext}
Note over SNAP: determine() computes eligibility
SNAP->>SNAP: verification::run_verification()
loop Each household member with SSN
SNAP->>Verify: POST /internal/v1/ievs/match {ssn, person_id}
Note over Verify: X-Service-Api-Key auth (not JWT)
Verify->>Sources: IevsAdapter queries (DOL SWR, DOL UI, SSA SDX, SSA BENDEX)
Sources-->>Verify: Match results
Verify-->>SNAP: IevsMatchResponse {wage_records, ui_record, sdx_record, bendex_record}
end
SNAP->>SNAPDB: INSERT ievs_match_results (per ADR-004, SNAP DB only)
Note over SNAP: Compare self-reported vs verified income
Note over SNAP: Variance > $100/month → INSERT ievs_discrepancies
SNAP->>MQ: Publish determination.completed.snap (IDs only, NO IEVS data)
Key files: services/canopy-snap/src/verification.rs:54 (run_verification), services/canopy-snap/src/verification_client.rs:54 (POST to verification), services/canopy-verification/src/api/ievs.rs:63 (handle_ievs_match), services/canopy-verification/src/noop.rs (NoopIevsAdapter for UAT). Tables: ievs_match_results, ievs_discrepancies in canopy-snap DB only.
Diagram 4 — Determination Signing Flow (ADR-002):
sequenceDiagram
participant Elig as canopy-eligibility
participant SNAP as canopy-snap
participant Sign as canopy-signing
participant SNAPDB as canopy-snap DB
participant EligDB as canopy-eligibility DB
Elig->>SNAP: POST /v1/determine {ApplicationContext}
SNAP->>SNAP: determine() builds SnapDetermination
SNAP->>Sign: signer.sign(serialized_determination)
Note over Sign: ECDSA P-256 detached JWS (RFC 7515)
Sign-->>SNAP: JWS signature string
SNAP->>SNAP: determination.signature = jws_string
SNAP->>SNAPDB: INSERT snap_determinations (signature TEXT NOT NULL)
SNAP-->>Elig: SnapDetermination {status, benefit_amount, ..., signature}
Note over Elig: Verification step
Elig->>Elig: Clear signature field, re-serialize payload
Elig->>Sign: verifier.verify(program, payload, jws_signature)
Note over Sign: VerifyingKeyRegistry checks current + previous keys
alt Signature valid
Elig->>EligDB: INSERT program_determinations (signature_verified = true)
Note over Elig: Included in combined results
else Signature invalid
Elig->>EligDB: INSERT program_determinations (signature_verified = false)
Note over Elig: Status = signature_quarantined, EXCLUDED from results
end
Key files: services/canopy-snap/src/determine.rs:295 (sign), services/canopy-snap/src/api/determine_handler.rs:101 (response), services/canopy-eligibility/src/orchestrator.rs:345 (verify), crates/canopy-signing/src/signer.rs (SigningKey), crates/canopy-signing/src/verifier.rs (VerifyingKeyRegistry).
After the 4 diagrams, add a brief encryption inventory table:
| Data | Algorithm | Location |
|---|---|---|
SSN |
AES-256-GCM (field-level) |
canopy-persons, canopy-snap |
Determinations |
ECDSA P-256 JWS (signing, not encryption) |
per program service |
Audit chain |
SHA-256 hash chain |
canopy-security |
HTTP |
TLS 1.2+ via rustls |
all services |
PostgreSQL |
sslmode=require |
all connections |
RabbitMQ |
amqps:// (production) |
all event traffic |
All PII at rest |
PostgreSQL TDE (recommended) |
production deployment |
Closes: #264
Step 11: Per-Service API Reference (#265)
Files: docs/modules/ROOT/pages/api/ directory — one .adoc file per implemented service (12 files)
Issue: #265
Prerequisite: Devstack must be running (cargo xtask dev start). Run cargo xtask api-docs --update to generate fresh OpenAPI JSON snapshots into test-results/openapi/. The snapshots are the authoritative source for endpoint details.
State machine diagrams were completed in MR !64 (Step 13). Data model docs and design specs are deferred to a future pass since they require ER diagram tooling and deeper schema analysis.
Template — each api/canopy-{service}.adoc file follows this structure:
= canopy-{service} API Reference
:description: REST API reference for canopy-{service}.
== Overview
{1-2 sentence purpose from .claude/docs/services.md}
Base URL: `http://localhost:{port}/v1`
Authentication: Bearer token (Keycloak RS256 JWT)
Minimum role: {role from handler Claims:: calls}
== Endpoints
=== {METHOD} /v1/{path}
{Description from OpenAPI summary}
**Request:**
[source,json]
{example request body from OpenAPI schema, or "No request body" for GET}
**Response** ({status code}):
[source,json]
{example response from OpenAPI schema}
**Error codes:** - 400 Bad Request — validation failure - 401 Unauthorized — missing or invalid JWT - 403 Forbidden — insufficient role - 404 Not Found — resource does not exist - 409 Conflict — invalid state transition
Per-service endpoint counts (from agent research, verified against code):
| Service | Port | Route Count | Minimum Role |
|---|---|---|---|
canopy-rules |
8001 |
7 |
caseworker |
canopy-persons |
8002 |
17 |
caseworker |
canopy-applications |
8003 |
8 |
caseworker |
canopy-eligibility |
8004 |
4 |
eligibility_specialist |
canopy-verification |
8005 |
0 public (3 internal) |
internal API key |
canopy-enrollment |
8006 |
6 |
eligibility_specialist |
canopy-renewals |
8007 |
7 |
caseworker |
canopy-notices |
8008 |
6 |
caseworker |
canopy-appeals |
8010 |
18 (8 appeals + 10 IPV) |
caseworker |
canopy-reporting |
8011 |
6 |
supervisor |
canopy-security |
8012 |
10 |
admin |
canopy-snap |
8013 |
14 |
varies (caseworker to eligibility_specialist) |
Implementation steps:
-
Create
docs/modules/ROOT/pages/api/directory -
Run
cargo xtask dev start && cargo xtask api-docs --updateto generate fresh OpenAPI snapshots -
For each service in the table above, create
api/canopy-{service}.adocusing the template -
Populate endpoint details from
test-results/openapi/{service}.json(method, path, description, request/response schemas) -
Add request/response JSON examples. For POST endpoints, use minimal valid payloads. For GET endpoints, show query parameters.
-
Add cross-references between services where orchestration occurs (e.g., canopy-eligibility → canopy-snap, canopy-snap → canopy-verification)
-
Add all 12 files to
nav.adocunder a new* API Referencesubsection within Developer Guide -
Verify all xrefs resolve
Do not create files for stub services (canopy-exchange, canopy-tanf, canopy-medicaid, canopy-caps, canopy-wic, canopy-portal) — they have no domain routes.
Closes: #265
Step 12: Supporting Pages
Files: docs/modules/ROOT/pages/federal-requirements.adoc, docs/modules/ROOT/pages/cli.adoc
Plan archive (plans/archive.adoc) and state machine diagrams (state-machines.adoc) were completed in MR !64. Screenshots are deferred until after the Antora Mermaid/Kroki integration is verified in CI.
federal-requirements.adoc — Map each 7 CFR section to Canopy implementation. Table format:
| CFR Section | Requirement | Canopy Implementation | Service |
|---|---|---|---|
7 CFR 273.2(i) |
Expedited service (≤7 days for qualifying households) |
|
canopy-applications |
7 CFR 273.9 |
Income deductions (standard, earned income, dependent care, medical, shelter/SUA) |
|
canopy-snap |
7 CFR 273.10 |
Eligibility determination (gross 130% FPL, net 100% FPL, asset test) |
Rules engine rulesets ( |
canopy-snap, canopy-rules |
7 CFR 273.10(e) |
Benefit allotment calculation (max allotment − 30% net income) |
Rules engine ( |
canopy-snap, canopy-rules |
7 CFR 273.12 |
Change reporting during certification |
|
canopy-renewals |
7 CFR 273.12(a)(1)(ii) |
Interim contact at certification midpoint |
|
canopy-renewals |
7 CFR 273.14 |
Recertification |
|
canopy-renewals |
7 CFR 273.15 |
Fair hearings |
|
canopy-appeals |
7 CFR 273.15(k) |
Continued benefits during appeal |
Auto-granted if filed within 14 days of adverse action |
canopy-appeals |
7 CFR 273.16 |
IPV disqualification |
|
canopy-appeals |
7 CFR 273.16(b) |
30-day ADH notice |
|
canopy-appeals |
7 CFR 273.24 |
ABAWD work requirements |
|
canopy-snap |
7 CFR 272.11 |
FNS-388 monthly participation report |
|
canopy-reporting |
7 CFR Part 275 |
QC universe (FNS-7176) |
|
canopy-reporting |
7 USC §2025(e) |
IEVS mandatory income verification |
|
canopy-verification, canopy-snap |
7 USC §2016(h)(9) |
Benefit expungement (12 months unused) |
|
canopy-enrollment |
For TANF (45 CFR Part 261), Medicaid (42 CFR Part 431), CAPS (45 CFR Part 98), and WIC (7 CFR 246): add placeholder rows noting "Planned — see {program}-eligibility plan" since these programs are stub services.
cli.adoc — Document all cargo xtask subcommands. Source: read xtask/src/cmd/*.rs files for argument definitions.
| Command | Description | Key Flags |
|---|---|---|
|
Start devstack (Docker Compose) |
|
|
Stop devstack |
— |
|
Rebuild changed services and restart |
— |
|
Auto-detect changes, minimum rebuild via staleness guard |
— |
|
Reload rulesets without restart |
— |
|
Show running service status |
— |
|
Remove devstack volumes and containers |
— |
|
Tail service logs |
|
|
Run fmt + clippy + nextest (8 threads) |
|
|
Run Playwright E2E tests against running devstack |
|
|
Pre-push validation (all checks) |
|
|
Seed devstack with test data |
— |
|
Fetch OpenAPI JSON from running services, diff against snapshots |
|
|
Generate ECDSA P-256 key pair for determination signing |
|
|
Verify Tier 1 doc integrity (SHA-256 hashes) |
|
For each command, read the corresponding xtask/src/cmd/{command}.rs file and document all CLI arguments, environment variable overrides, and exit codes.
Step 13: Antora Navigation Rebuild
Files: docs/modules/ROOT/nav.adoc
Rebuild to 6-section hierarchy matching CRAIG:
* Overview
** index, why-canopy, roadmap
* Getting Started
** developer-guide (quick start), screenshots, glossary
* User Guide
** guide/caseworker, guide/supervisor
** API Reference (12 per-service docs)
* Architecture & Design
** ADRs (001-010)
** Data Models (6 per-program)
** State Machines
** Design Specs (per-feature)
** Federal Requirements
* Developer Guide
** developer-guide (full), implementation-guide
** CLI Reference, Configuration Reference
** Troubleshooting, jurisdiction-onboarding
* Operations
** deployment-guide, security-operations
** ato-readiness, nist-architecture-mapping
** Operational Runbooks
* Plans
** Active plans (grouped by month)
** Archive (completed plans with MR cross-refs)
Files Touched
| File | Change |
|---|---|
|
Fix test counts, route counts, add Phase 1 completion note |
|
Add params, archive, reporting client endpoints |
|
Create — public API surface for 10+ shared crates |
|
Create — JDM format, jurisdiction patterns |
|
Create — devstack gotchas, Keycloak quirks |
|
Expand with SLAs, supported versions, measures checklist |
|
Update quick start, add Antora site link |
|
Add first-contribution walkthrough |
|
Consolidate test count entries, add documentation pass entry |
|
Full 6-section hierarchy rebuild |
|
Update with Phase 1 completion |
|
Create — 10 SNAP workflows with screenshots |
|
Create — production deployment |
|
Create — operational security procedures |
|
Create — ATO checklist |
|
Create — NIST 800-53 control mapping |
|
Create — state evaluator executive summary |
|
Create — all env vars per service |
|
Create — common failure modes |
|
Create — xtask + future CLI reference |
|
Create — CFR/USC implementation mapping |
|
Create — Mermaid diagrams for 5 state machines |
|
Create — worker portal captures |
|
Create — completed plans with MR cross-refs |
|
Create — 12 per-service API reference pages |
|
Create — 6 per-program ER diagrams |
|
Create — 5 feature design specs |
Verification
-
cargo xtask check-docs— Tier 1 doc integrity passes -
cargo xtask validate --skip-docker— all code checks pass (no code changes in this plan, but verify docs don’t break builds) -
Antora site builds without errors (
npx antora antora-playbook.ymlor equivalent) -
Every page in nav.adoc resolves to an existing file
-
All internal xref links resolve
-
Screenshots match current worker portal UI (regenerate if stale)
-
Every new page has SPDX header comment
-
Configuration reference matches actual
canopy-common/src/settings.rs -
Federal requirements page cites correct CFR sections (cross-check with plan regulatory citations)
Documentation Updates
This plan IS the documentation update. On completion:
-
All 6 audiences have complete documentation
-
All stale content in existing docs is corrected
-
Antora nav.adoc reflects full site hierarchy
-
Plan archive tracks all completed plans with MR numbers
-
CHANGELOG.adoc has documentation pass entry