Commit Graph

614 Commits

Author SHA1 Message Date
132ebc689f ci: add conformance step after lint 2026-05-12 23:58:20 +02:00
dfd6e1c3cc feat: wire pnpm conformance script + turbo task 2026-05-12 23:58:10 +02:00
24769eb442 feat(scripts): conformance drift gate + tests 2026-05-12 23:57:52 +02:00
a0b2ecee2b docs(work): story 04 — CI drift gate 2026-05-12 23:56:34 +02:00
b5771fc4ba plan(conformance): milestone iv — CI drift gate 2026-05-12 23:55:14 +02:00
b0563e4712 Merge branch 'worktree-conformance-milestone-iii-b': conformance milestone iii.b — AST-aware ESLint rules 2026-05-12 23:53:30 +02:00
a07e62befd docs(work): close story 03.b — AST-aware ESLint rules
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-12 23:53:13 +02:00
4d7b25fd15 feat(core-eslint): wire AST-aware conformance rules into plugin + base
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-12 23:52:31 +02:00
15e90820d2 feat(core-eslint): no-undeclared-audit rule
AST-aware ESLint rule that catches auditLog.record({ type: "X" }) calls
in use-case files where X is not declared in the matching
manifest.useCases[name].audits array.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-12 23:51:42 +02:00
3e2b096c3c feat(core-eslint): no-undeclared-event-publish rule
AST-aware ESLint rule that catches bus.publish("X") calls in use-case
files where X is not declared in the matching manifest.useCases[name].publishes array.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-12 23:51:06 +02:00
21a6822d55 feat(core-eslint): use-case name helper (file slug → manifest key) 2026-05-12 23:49:32 +02:00
7cfb78b99e feat(core-eslint): manifest AST parser for per-use-case attributes 2026-05-12 23:49:12 +02:00
bfb2324dd9 docs(work): story 03.b — AST-aware ESLint rules 2026-05-12 23:48:35 +02:00
fb23980d85 plan(conformance): milestone iii.b — AST-aware ESLint rules 2026-05-12 23:47:18 +02:00
70c211cbf5 Merge branch 'worktree-conformance-milestone-iii-a': conformance milestone iii.a — structural ESLint rules
Some checks failed
Sentry PII guard (R31) / pii-guard (push) Has been cancelled
CI / typecheck + lint + boundaries + test + build (push) Has been cancelled
CI / Playwright e2e (push) Has been cancelled
CI / Storybook smoke tests (push) Has been cancelled
2026-05-12 23:29:37 +02:00
654f2b2a02 docs(work): close story 03.a — structural ESLint rules 2026-05-12 23:25:30 +02:00
b9ac64b36b feat(core-eslint): register conformance plugin + structural rules in base config 2026-05-12 23:24:01 +02:00
8a2c8db955 feat(core-eslint): conformance plugin module + ./plugin export 2026-05-12 23:23:20 +02:00
3117df1c14 feat(core-eslint): required-cores-installed rule 2026-05-12 23:22:43 +02:00
d585b59590 feat(core-eslint): usecase-must-have-test-file rule 2026-05-12 23:21:38 +02:00
b7bb37023f feat(core-eslint): feature-must-have-manifest rule
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-12 23:20:37 +02:00
6f8e75accb feat(core-eslint): workspace helper for conformance rules 2026-05-12 23:19:11 +02:00
41ffe9f787 feat(core-eslint): manifest source helper for conformance rules
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-12 23:18:02 +02:00
ff83769b30 docs(work): story 03.a — structural ESLint rules 2026-05-12 23:16:52 +02:00
f22f747aa9 plan(conformance): milestone iii.a — structural ESLint rules
10-task plan for standing up the conformance ESLint plugin in
@repo/core-eslint and shipping three structural rules:

- feature-must-have-manifest (warn): use-case files require a manifest
- usecase-must-have-test-file (error): TDD sibling test enforcement
- required-cores-installed (error): manifest cores ↔ workspace.yaml

Scope deliberately excludes manifest-AST analysis (no-undeclared-event-
publish, no-undeclared-audit) — those require parsing the manifest's TS
source as JS and walking the use-case AST, deferred to plan iii.b.

Uses regex-based manifest source extraction to avoid pulling in the
TypeScript compiler API at lint time. Manifest shape is constrained by
the literal `as const` form that defineFeature enforces, so the regex
path is sufficient.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 23:15:35 +02:00
64297a233b Merge branch 'worktree-conformance-milestone-ii': conformance milestone ii — assertFeatureConformance + boot wiring 2026-05-12 23:01:27 +02:00
83f135b5e1 fix(conformance): withCapture propagates inner brands + chain test + docstring fixes 2026-05-12 23:00:50 +02:00
046bd0829e docs(work): close story 02 — assertFeatureConformance + boot wiring 2026-05-12 22:54:45 +02:00
3a6115924b feat(auth): bindProductionAuth self-asserts conformance at tail
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-12 22:53:06 +02:00
5e32074c2e feat(core-shared/conformance): assertFeatureConformance helper
Adds boot-time check that every manifest-declared use case is bound
through withSpan (__instrumented) + withCapture (__captured), with
withAudit (__audited) enforced when audits[] is non-empty. Propagates
inner brands through withSpan so the outermost container-resolved
binding carries all brand markers.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-12 22:49:18 +02:00
bbd9c1e856 feat(core-shared/conformance): re-export ConformanceError 2026-05-12 22:43:57 +02:00
49bd7e0782 feat(core-shared/conformance): ConformanceError class 2026-05-12 22:43:15 +02:00
1d8b30045a feat(core-audit): withAudit wraps and attaches runtime __audited marker 2026-05-12 22:42:16 +02:00
77fddcde78 feat(core-shared/instrumentation): withCapture attaches runtime __captured marker 2026-05-12 22:40:44 +02:00
9e21baf5fb feat(core-shared/instrumentation): withSpan attaches runtime __instrumented marker 2026-05-12 22:39:13 +02:00
a593962b3d feat(core-shared/conformance): runtime brand markers + isX predicates 2026-05-12 22:37:43 +02:00
198765ff06 docs(work): story 02 — assertFeatureConformance + boot wiring 2026-05-12 22:36:18 +02:00
925f4e4e5b docs(core-audit): TODO breadcrumb for future audit recording automation 2026-05-12 22:35:23 +02:00
8054c125d9 feat(auth): re-export authManifest + AuthManifest from package root 2026-05-12 22:34:38 +02:00
31d5123737 plan(conformance): milestone ii — assertFeatureConformance + boot wiring
12-task implementation plan for the runtime boot-time check of the
conformance system. Reifies the phantom-type brands from milestone i as
non-enumerable runtime markers via Object.defineProperty, and ships
assertFeatureConformance(container, manifest, symbols, ctx) which walks
the manifest, resolves each use case from the feature's container, and
throws ConformanceError synchronously when a binding is missing a
required brand.

Per-feature self-assertion: each bindProductionX(ctx) calls
assertFeatureConformance at its tail, so the boot check runs once per
feature and is forward-compatible with future apps wiring those binders.

Also bundles the two forward-looking items the milestone-i reviewer
flagged (re-export authManifest from auth root barrel; TODO breadcrumb
in withAudit for future automation).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 22:33:20 +02:00
50313c794f Merge branch 'worktree-conformance-milestone-i': conformance milestone i — defineFeature + brands + auth.signIn proof 2026-05-12 22:23:40 +02:00
0aa5f0633d docs(work): close story 01 — defineFeature + brands + auth.signIn proof 2026-05-12 21:53:17 +02:00
bf3abea776 fix(core-audit): rename unused withAudit test param to _input 2026-05-12 21:52:06 +02:00
17bf9fd0c1 test(auth): assert unwrapped factory rejected at branded slot 2026-05-12 21:49:57 +02:00
db646c22e4 feat(auth): bind signIn through ProductionUseCase<I, O, M> branded slot
Adds explicit ProductionUseCase<SignInInput, SignInOutput, AuthManifest["useCases"]["signIn"]>
type annotation to wrappedSignIn in bind-production.ts. To satisfy the Instrumented & Captured
intersection requirement, withSpan gains a brand-preserving overload so composing
withSpan ∘ withCapture returns Instrumented<F> & Captured<F>.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-12 21:46:33 +02:00
5141314a9d feat(auth): declare authManifest with signIn/signUp/signOut 2026-05-12 21:42:55 +02:00
103e06d20a feat(core-audit): withAudit wrapper + Audited<F> brand 2026-05-12 21:41:40 +02:00
c7bd9a2f8a feat(core-shared/conformance): barrel + ./conformance subpath export 2026-05-12 21:37:18 +02:00
82cfde9c93 feat(core-shared/conformance): ProductionUseCase<I, O, M> branded slot type 2026-05-12 21:35:59 +02:00
b3784ce255 feat(core-shared/conformance): defineFeature helper + manifest types 2026-05-12 21:34:19 +02:00