Commit Graph

352 Commits

Author SHA1 Message Date
b87a406c96 chore(work): finish 10-sbom-ci-workflow 2026-05-20 13:33:07 +02:00
08bc19293a ci(release): attach CycloneDX SBOM to every GitHub release
Amends release-please.yml with conditional steps that run only when
release-please cuts a release:
- checkout + pnpm install to give @cyclonedx/cyclonedx-npm the full
  resolved workspace graph
- pnpm dlx @cyclonedx/cyclonedx-npm generates a CycloneDX 1.6 JSON SBOM
  named sbom-<tag>.cdx.json; --ignore-npm-errors is required because
  npm ls exits non-zero for dev-deps-of-dev-deps pnpm correctly elides
- softprops/action-gh-release@<SHA> (v3.0.0, Renovate-managed) attaches
  the file to the GitHub release as a downloadable asset

Adds ADR-023 §9 amendment documenting the step shape, rationale for
pnpm dlx (avoids lockfile per ADR-022), --ignore-npm-errors behaviour,
SHA pinning per ADR-023 §1, and the extended failure-mode table.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 11:31:08 +00:00
224a5d78c8 chore(work): finish 09-app-wiring-web-tanstack-and-cms 2026-05-20 13:22:08 +02:00
f0968b7a3c chore(work): tick task in 09-app-wiring-web-tanstack-and-cms 2026-05-20 13:11:05 +02:00
dc718fd9c8 chore(work): finish 08-app-wiring-web-next 2026-05-20 12:14:20 +02:00
de458a6d1e chore(work): finish 07-security-header-adapters 2026-05-20 11:58:22 +02:00
6903c59cc7 chore(work): tick task in 07-security-header-adapters 2026-05-20 11:48:13 +02:00
6575a4857e chore(work): finish 06-security-headers-core-module 2026-05-20 11:35:46 +02:00
dd2af0c902 docs: seed PRD for compliance docs scaffolds epic (ADR-025 Epic D)
Implementation seed for ADR-025 Epic D, the final epic: seven fill-in
policy templates under docs/compliance/templates/ (2 anchored, 5
skeleton with not-code-enforced banner), a two-column pre-launch
compliance checklist mapping playbook obligations to template
mechanisms, a compliance-overview.md hub, and a landed + refreshed
operator-checklist.md. Pure docs — no code, no conformance changes.
Status: approved — ready for pnpm work decompose.
2026-05-20 11:34:29 +02:00
650a97b1bb chore(work): finish 05-auth-signin-rate-limit-backfill 2026-05-20 11:27:19 +02:00
91d7a24ed9 chore(work): finish 04-with-rate-limit-wrapper-and-conformance 2026-05-20 11:05:31 +02:00
24b2490d86 chore(work): finish 03-no-undeclared-rate-limit-eslint-rule 2026-05-20 10:45:02 +02:00
a478a8e6ea chore(work): finish 02-rate-limit-implementations 2026-05-20 10:38:24 +02:00
f2449c9d65 chore(work): tick task in 02-rate-limit-implementations 2026-05-20 10:32:31 +02:00
e2a5278899 chore(work): finish 01-rate-limit-type-primitives 2026-05-20 10:24:32 +02:00
a633561c82 chore(work): decompose security-headers-rate-limit-sbom epic
Generated 1 epic + 11 stories under docs/work/epics/ from the approved
PRD docs/work/prds/security-headers-rate-limit-sbom.prd.md. Stories
cover rate-limit type primitives + implementations + ESLint rule +
withRateLimit wrapper, auth.signIn rate-limit backfill, security
headers core module + framework adapters, app wiring across web-next /
web-tanstack / cms, SBOM CI workflow, and documentation. Ready for
`pnpm work dispatch --execute`.
2026-05-20 10:14:54 +02:00
352a7c64c1 chore(work): finish epic dsr-consent-and-cookie-banner 2026-05-20 00:09:29 +02:00
a3505f2e69 docs(compliance): add DSR guide, consent guide, subject-linkage example, glossary terms
- docs/guides/dsr.md: GDPR Art. 15/16/17/18/20 interface mapping, tRPC
  router wiring, multi-subject handling, soft vs cascade-hard semantics,
  DeletionCertificate format and storage requirements
- docs/guides/consent.md: requiresConsent manifest field, withConsent DI
  wiring, runtime isGranted pattern, IConsent audit trail, anonymous→
  authenticated migration, cookie _v versioning, SSR-safe banner loading,
  CNIL/EDPB equal-prominence requirement
- docs/compliance/subject-linkage.example.md: SubjectLink kind discriminator
  with worked support-ticket example (owner submitter + reference assignee)
- docs/glossary.md: SubjectLink, DeletionCertificate, UserConsentState,
  ConsentChecked entries; Manifest definition updated with requiresConsent
- CLAUDE.md: lint comment 8→12 conformance rules; conformance section notes
  requiresConsent; brand composition order updated to full 5-wrapper chain
- docs/guides/conformance-quickref.md: requiresConsent field added to
  manifest table; component-must-have-story, component-must-have-test,
  atomic-tier-import-direction added to ESLint rules table

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 22:07:50 +00:00
a1587539de chore(work): finish 10-auth-signup-migration 2026-05-19 23:56:58 +02:00
5151454783 chore(work): finish 09-cookie-consent-banner 2026-05-19 23:38:46 +02:00
051bfbf062 test(core-ui): add axe-core a11y assertions to CookieConsentBanner
Previous attempt was rejected because the axe-core a11y requirement
had no test infrastructure — ARIA roles were correct but unverified by
a scanner. This adds jest-axe (approved via library-decision trace) and
asserts toHaveNoViolations() for both modal and banner variants.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 21:36:26 +00:00
de178035bd chore(work): finish 08-core-ui-scaffold 2026-05-19 23:03:57 +02:00
bce9ded915 feat(core-ui): scaffold @repo/core-ui via generator
Runs pnpm turbo gen core-package ui to produce the package shell:
atomic-design components (Button, Input, Label, FormField), vitest
config excluding story files from coverage, and transpilePackages
wiring in web-next. Adds @vitest/coverage-v8 devDep and
label.stories.tsx to satisfy lint/coverage gates.

Also fixes scripts/library-decisions/check.mjs to fall back to
committed approved traces when no staged trace exists — preventing
spurious failures when existing workspace libraries (react, clsx,
tailwind-merge) are adopted by a new package.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 20:59:48 +00:00
81898d9902 chore(work): finish 07-core-api-router-composition 2026-05-19 22:52:11 +02:00
b2bfb5bfce chore(work): finish 06-core-dsr 2026-05-19 22:39:13 +02:00
46e575a5a6 feat(core-dsr): handlers, dsrRouter, integration tests
Add four protocol-agnostic handlers (export, delete, rectify, restrict)
returning normalized { status, body, headers } responses, and a tRPC
dsrRouter via createDsrRouter(binding) following the factory pattern.

Auth checks: requireAuthenticated middleware gates all four procedures;
cascade-hard delete additionally requires admin role. Integration tests
assert happy-path response shapes, UNAUTHORIZED/FORBIDDEN error codes,
and error passthrough from the DSR service layer.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 20:34:51 +00:00
6f56a04335 chore(work): tick task in 06-core-dsr 2026-05-19 22:14:15 +02:00
6606b59d1e feat(core-dsr): Payload impls, recording doubles, DI binders, contract tests
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 20:05:06 +00:00
8068d1bf98 chore(work): tick task in 06-core-dsr 2026-05-19 21:35:10 +02:00
86d949294f chore(work): finish 05-core-consent-react 2026-05-19 21:21:28 +02:00
33e3c093ad chore(work): finish 04-core-consent-implementation 2026-05-19 15:27:07 +02:00
e53f35a0c5 feat(core-consent): add handlers and consentRouter tRPC router
Protocol-agnostic handlers (grant, withdraw, isGranted, getCategories)
in core-consent/handlers/ call IConsent methods and return typed results.

consentRouter uses a consent-specific tRPC context (userId + consentFactory)
so each procedure can resolve the per-user IConsent instance at call time.
Auth middleware guards all four procedures and maps UnauthenticatedError →
UNAUTHORIZED via defineErrorMiddleware from core-shared (no local duplicate).

76 tests passing; new handler and router code at 100% branch coverage.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 13:22:33 +00:00
ae4e0f2680 chore(work): tick task in 04-core-consent-implementation 2026-05-19 15:01:40 +02:00
c346f85bc8 chore(work): tick task in 04-core-consent-implementation 2026-05-19 14:53:51 +02:00
5792b7412a chore(work): finish 03-core-consent-foundation 2026-05-19 13:54:40 +02:00
1cab88916a feat(core-eslint): add no-undeclared-consent-check rule (conformance gate 12)
Extends the conformance ESLint layer with the consent-check rule:

- `no-undeclared-consent-check` (warn): `consent.isGranted("X")` in a
  use-case file must match a category declared in `manifest.requiresConsent`;
  also warns when requiresConsent is declared but no isGranted call is found.
- `_manifest-ast.js`: adds `parseManifestFully` which extracts top-level
  `name`, `requiredCores`, `requiresConsent`, and per-use-case maps from the
  manifest AST; `requiresConsent` extraction tested in `_manifest-ast.test.js`.
- `_rule-context.js` / `_rule-schema.js`: shared helpers extracted from the
  existing per-rule files so the new rule can resolve use-case name + feature
  root without duplication.
- Existing rules (`no-undeclared-audit`, `no-undeclared-event-publish`,
  `no-undeclared-analytics-event`) updated to use the shared helpers.
- `plugin.js` + `base.js` register the rule at warn severity.
- CLAUDE.md + conformance-quickref.md: rule count advanced from 11 → 12.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 11:51:30 +00:00
ef9cfd243e docs: seed PRD for security headers + rate-limit + SBOM (ADR-025 Epic C)
Implementation seed for ADR-025 Epic C: six security headers middleware
with nonce-based CSP in core-shared/security (Next + TanStack adapters),
fourth conformance channel for rate-limit in core-shared/rate-limit
(IRateLimit + RateLimited brand + multi-budget manifest field +
no-undeclared-rate-limit ESLint rule), CycloneDX SBOM step in
release-please.yml. auth.signIn backfilled as canonical rate-limit
reference. ADR-023 amendment for SBOM captured. Status: approved —
ready for pnpm work decompose.
2026-05-19 13:09:20 +02:00
9956d73b10 chore(work): tick task in 03-core-consent-foundation 2026-05-19 13:06:52 +02:00
f5d08dc84a chore(work): finish 02-audit-enum-amendment 2026-05-19 12:29:20 +02:00
dd339b11b1 feat(core-shared): extend audit action enum with consent and restriction types
Adds CONSENT_GRANT, CONSENT_WITHDRAW, RESTRICT, UNRESTRICT to the
AuditAction closed enum per GDPR Art. 7 and Art. 18 requirements.

core-consent and core-dsr optional cores (Epic B Stories 03/06) emit
these action types via core-audit's IAuditLog channel; the values must
exist in core-shared's enum before either optional core can be built.
No change to IAuditLog's interface surface — new values flow through
AuditEntry.action automatically.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 10:16:30 +00:00
8cf9f4be98 chore(work): finish 01-subject-linkage-types 2026-05-19 12:13:16 +02:00
5abf7fe623 chore(work): decompose dsr-consent-and-cookie-banner epic
Generated 1 epic + 11 stories under docs/work/epics/ from the approved
PRD docs/work/prds/dsr-consent-and-cookie-banner.prd.md. Stories cover
subject-linkage types, ADR-018 audit enum amendment, core-consent
foundation + impl + react, core-dsr (4 interfaces), core-api router
composition, core-ui scaffold + CookieConsentBanner, auth signup
migration, and documentation. Ready for `pnpm work dispatch --execute`.
2026-05-19 11:55:05 +02:00
ae886a4499 docs: seed PRD for DSR + consent + cookie banner epic (ADR-025 Epic B)
Implementation seed for ADR-025 Epic B: two new optional cores
(@repo/core-dsr with 4 interfaces, @repo/core-consent with IConsent +
ConsentChecked brand + requiresConsent manifest field), CookieConsentBanner
in core-ui with EU-prominence defaults, subject-linkage types in
core-shared, ADR-018 amendment adding 4 new audit action types
(CONSENT_GRANT/WITHDRAW + RESTRICT/UNRESTRICT). 15 user stories ordered
by the in-epic sequencing hints. Status: approved — ready for
pnpm work decompose.
2026-05-19 11:41:25 +02:00
07caaa1695 chore(work): finish epic compliance-manifests-pii-retention-subprocessors 2026-05-18 22:23:29 +02:00
879b0215c3 docs(compliance): add docs/compliance reference examples and README
Adds docs/compliance/ as the canonical onboarding reference for the
compliance module, covering every field in each generated YAML artifact
with inline annotations and explaining the docs/compliance/ (examples)
vs compliance/ (live artifacts) split.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 20:22:01 +00:00
188625b4a8 chore(work): finish 07-pre-commit-and-ci-integration 2026-05-18 22:16:22 +02:00
add54f14ef chore(work): finish 06-compliance-generator-scripts 2026-05-18 22:12:12 +02:00
3ec30507d3 chore(work): tick task in 06-compliance-generator-scripts 2026-05-18 22:02:54 +02:00
d8dbc99bab chore(work): tick task in 06-compliance-generator-scripts 2026-05-18 21:53:18 +02:00
ab44b2f16d chore(work): tick task in 06-compliance-generator-scripts 2026-05-18 21:47:27 +02:00