feat: add CCPA/CPRA privacy policy document type #165

Closed
pook wants to merge 2 commits from feat/ccpa-privacy-policy into main
Owner

Summary

  • Adds a new ccpa-privacy-policy document type with all CCPA/CPRA-required sections: PI categories, purpose of collection, consumer rights (access, delete, correct, opt-out, limit sensitive PI, non-discrimination), sale/sharing disclosure with GPC support, data retention, and contact info
  • Registers template in document generation pipeline with POST /generate/ccpa-privacy-policy endpoint
  • Includes 12 unit tests validating clause presence, content completeness, and registry integration

Changes

  • src/templates/ccpa-privacy-policy.ts — new template (7 clauses, 6 required + 1 optional)
  • src/templates/index.ts — register ccpa-privacy-policy type
  • src/db/schema.ts — add to documentTypeEnum
  • src/routes/generate-ccpa.ts — new route handler
  • src/routes/questionnaire.ts — accept new document type
  • src/services/document-generator.ts — clause selection logic
  • src/index.ts — register route
  • tests/unit/ccpa-privacy-policy.test.ts — unit tests

Test plan

  • bun test unit tests — 12/12 pass
  • Build succeeds
  • E2E: POST /generate/ccpa-privacy-policy with sample business data
  • DB migration: run bun run db:generate + db:migrate to add enum value

Closes #36

🤖 Generated with Claude Code

## Summary - Adds a new `ccpa-privacy-policy` document type with all CCPA/CPRA-required sections: PI categories, purpose of collection, consumer rights (access, delete, correct, opt-out, limit sensitive PI, non-discrimination), sale/sharing disclosure with GPC support, data retention, and contact info - Registers template in document generation pipeline with `POST /generate/ccpa-privacy-policy` endpoint - Includes 12 unit tests validating clause presence, content completeness, and registry integration ## Changes - `src/templates/ccpa-privacy-policy.ts` — new template (7 clauses, 6 required + 1 optional) - `src/templates/index.ts` — register `ccpa-privacy-policy` type - `src/db/schema.ts` — add to `documentTypeEnum` - `src/routes/generate-ccpa.ts` — new route handler - `src/routes/questionnaire.ts` — accept new document type - `src/services/document-generator.ts` — clause selection logic - `src/index.ts` — register route - `tests/unit/ccpa-privacy-policy.test.ts` — unit tests ## Test plan - [x] `bun test` unit tests — 12/12 pass - [x] Build succeeds - [ ] E2E: POST /generate/ccpa-privacy-policy with sample business data - [ ] DB migration: run `bun run db:generate` + `db:migrate` to add enum value Closes #36 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Add a dedicated CCPA/CPRA privacy policy template with all required sections:
categories of PI collected, purpose of collection, consumer rights (know, delete,
correct, opt-out, limit sensitive PI, non-discrimination), sale/sharing disclosure
with opt-out mechanisms (including GPC), sensitive PI handling, data retention,
and contact information.

Closes #36

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
Owner

Closed 2026-04-10 during pipeline triage.

Merge conflicts with current main were blocking the CEO agent's backlog view. The compliancebot repo had ~60 open PRs and 141 open agent-task issues. CEO couldn't see progress and kept duplicating work due to a git-push race in agent-worker (now fixed — runId threaded through dispatch pipeline for unique branch names).

Reopen / resubmit against current main if the work is still relevant. Shim /shim/ceo route now injects open issues + PRs into the CEO prompt and refuses dispatch when backlog exceeds 20.

Closed 2026-04-10 during pipeline triage. Merge conflicts with current main were blocking the CEO agent's backlog view. The compliancebot repo had ~60 open PRs and 141 open agent-task issues. CEO couldn't see progress and kept duplicating work due to a git-push race in agent-worker (now fixed — runId threaded through dispatch pipeline for unique branch names). Reopen / resubmit against current main if the work is still relevant. Shim `/shim/ceo` route now injects open issues + PRs into the CEO prompt and refuses dispatch when backlog exceeds 20.
pook closed this pull request 2026-04-10 15:08:12 -04:00

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pook/compliancebot!165
No description provided.