Commit Graph

25 Commits

Author SHA1 Message Date
77a97dac9e docs(plan): Plan 10 — instrumentation + Sentry logging implementation
33-task TDD plan implementing the R31–R55 spec across 9 phases:
foundation interfaces (NoopTracer/NoopLogger/withSpan), Sentry adapters
(SentryTracer/SentryLogger with __sentryReported double-report guard,
beforeSend + beforeSendTransaction PII scrubbers), DI binders + bindAll
Rule 0 dispatcher (orthogonal to USE_DEV_SEED/NODE_ENV), test
infrastructure (RecordingTracer/RecordingLogger + no-sentry guard),
per-feature wiring for all 5 features (blog/auth/marketing-pages/
navigation/media), contract suite span assertions, three-app integration
(web-next/cms/web-tanstack including @sentry/node + @sentry/react +
@sentry/vite-plugin variants), ESLint boundary rule + CI grep gate, and
docs + HTML updates (data-flow-explainer §06, di-explainer
instrumentation symbols, ADR-014).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-06 22:38:49 +02:00
ef2b8e300e docs(plan-9): doc-pass slice 1 — CLAUDE.md, core-shared AGENTS, architecture, plan-8 annotations
First slice of the combined Plan 8 + Plan 9 doc-update pass:
- CLAUDE.md Key Conventions: append schema-in-use-case, presenter,
  controller unknown input, feature-scoped tRPC error mapping, public
  surface split (./ui)
- packages/core-shared/AGENTS.md: document defineErrorMiddleware export
  + t re-export from trpc/init
- docs/superpowers/plans/2026-05-05-plan-8-*.md and matching spec:
  one-line note that some controller/router patterns shifted in Plan 9;
  link to the Plan 9 refactor log
- docs/architecture/overview.md: data-flow box now shows xProcedure +
  xInputSchema + xOutputSchema.parse + presenter + middleware lanes;
  three explanatory paragraphs added (schemas, presenter, error mapping)
- docs/architecture/dependency-flow.md: app-side ./ui subpath note,
  allowed/disallowed examples updated for Plan 9 paths

Remaining doc-pass items (root AGENTS.md, per-feature AGENTS.md ×5,
core-testing AGENTS.md, adding-a-feature.md, tdd-workflow.md,
testing-strategy.md, vertical-feature-spec.md) follow in subsequent
commits — to be dispatched in parallel.
2026-05-06 16:43:13 +02:00
88db39b3a3 docs(plan): Plan 9 — input/output unification implementation plan
9 tasks, TDD throughout, one commit per task:

1. Refactor changelog scaffold
2. core-shared/trpc/define-error-middleware.ts factory + tests
3. auth migration (3 use cases — schemas + presenter + procedures.ts + router + ./ui + tests)
4. blog migration (3 use cases)
5. marketing-pages migration (2 use cases)
6. navigation migration (1 use case)
7. media migration (3 use cases)
8. Final verification + boundary sweep
9. ADR-013 + final changelog summary

Every step has concrete code; no placeholders. Self-review shows full
spec coverage (R1–R30) with each rule mapped to one or more tasks.

Spec: docs/superpowers/specs/2026-05-06-input-output-unification-design.md

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-06 09:29:28 +02:00
bffc6a96b3 docs(plan-8): partial Lazar doc-update pass (CLAUDE.md, overview.md, ADR-012, Plan 7 annotations)
First slice of the Plan 8 deferred doc-update checklist:
- CLAUDE.md Key Conventions: factory-function use cases/controllers,
  entities/models/<x>.ts paths, .toDynamicValue DI bindings, direct
  injection in tests
- docs/architecture/overview.md data-flow box updated to factory style
  (controller resolved via container.get<IXController>; use case factory
  takes deps as args)
- docs/decisions/adr-012-lazar-conformance.md created — records the
  conformance decision and four intentional divergences
- docs/superpowers/plans/2026-05-05-plan-7-tdd-foundation.md and the
  matching spec annotated with a "pre-Plan-8 layout" note pointing at
  the refactor log

Remaining Plan 8 doc-update items (root AGENTS.md, per-feature AGENTS.md,
adding-a-feature.md, tdd-workflow.md, testing-strategy.md,
vertical-feature-spec.md §6/§10, core-testing AGENTS.md) intentionally
paused — Plan 9 (input/output unification) will change overlapping
content, so resuming after Plan 9 lands avoids double-churn.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-06 09:17:35 +02:00
57ec36e87b docs(plan): Plan 8 — Lazar pattern conformance (10 tasks, refactor-log first)
Ten TDD'd tasks executing the Lazar Nikolov Clean Architecture pattern
across all 5 features. Task 1 scaffolds the refactor changelog (sole
artifact for the deferred doc-update pass). Tasks 2-3 are foundation
(entities split, file renames). Tasks 4-7 refactor each existing feature
to factory-function pattern. Task 8 scaffolds media as a full Clean
Architecture feature. Task 9 aligns factory/contract imports. Task 10
final verification.

External docs (CLAUDE.md, AGENTS.md, adding-a-feature.md, tdd-workflow.md,
ADR-012) explicitly NOT touched during the refactor — captured as a
checklist in the refactor changelog for a single batched doc-update pass
afterwards.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 21:09:35 +02:00
1ab3a3274f docs(plan): Plan 7 — TDD foundation (12 tasks, TDD-driven, subagent-ready)
Twelve self-contained tasks closing all 10 gaps from the spec:
1. Scaffold @repo/core-testing
2. Vitest base configs (jsdom + node) in core-typescript
3. Factories per feature
4. Contract suites per repository interface
5. core-ui jsdom + RTL tests
6. core-api / core-cms / core-trpc composition tests
7. App unit tests (web-next, web-tanstack, cms)
8. Storybook test-runner integration
9. tdd-workflow.md + adding-a-feature.md restructure
10. ADR-011 + per-feature AGENTS.md
11. CI workflow
12. Per-directory coverage thresholds

Each task TDD'd, single-commit-scoped, ready for subagent dispatch.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 12:53:13 +02:00
0972645ebb refactor: rename eslint-config + typescript-config to core-eslint + core-typescript
Aligns tooling packages with the core-* naming convention used by all
other foundation packages (core-shared, core-cms, core-api, core-trpc,
core-ui). Updates ~50 files: package.json names, devDependencies,
tsconfig extends, eslint.config imports, vitest.config imports, AGENTS.md
references, and the boundaries plugin patterns to match the new paths.

The tooling-specific patterns in boundaries/elements are now ordered BEFORE
the broader core-* pattern to ensure correct first-match-wins behavior.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 10:37:07 +02:00
588f47affa docs(plans): delete six stale 2026-04-06 plan docs (superseded by 2026-05-04-plan-{1..6}) 2026-05-05 09:34:44 +02:00
1f0a6e73bf docs(plan): add Plan 6 (cleanup + enforcement + e2e + docs)
20 tasks in 5 phases: A) migrate ui→core-ui, repoint apps/cms+storybook,
delete 6 legacy packages; B) eslint-plugin-boundaries with three-tag
model + composition exceptions; C) Playwright in both apps with smoke
specs + root test:e2e task; D) full doc rewrite (overview, dependency
flow, guides, root+per-package AGENTS.md, 4 new ADRs, 4 updated/
superseded ADRs, delete 6 stale plans); E) all-green final check.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 09:09:41 +02:00
cdd7513032 docs(plan-5): add superjson transformer to httpBatchLink in both providers
Server uses superjson via core-shared/trpc/init's initTRPC config.
Client httpBatchLink must match or complex types (Date, Map, Set)
silently break on the wire. Caught during execution.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 08:48:49 +02:00
a3b72f5a7f docs(plan): add Plan 5 (app + UI integration)
17 tasks: populate core-trpc with React client + per-framework providers;
add bindProduction(config) helpers to each payload-backed feature;
swap web-next deps from @repo/api/api-client/ui to core-* + features;
wire tRPC route handler with idempotent bindAllProduction(); render
example pages (home with nav + site name + article list, /about,
/blog/[slug]); parallel-prove framework portability in web-tanstack.
First plan that produces browser-rendered output.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 08:43:04 +02:00
ff6fec7eab fix(tsconfig): set rootDir explicitly in feature packages
TypeScript emits an informational diagnostic when source files span
multiple top-level dirs (src/ + tests/) without explicit rootDir.
Setting rootDir="." satisfies the recommendation and matches the
include pattern. Updates blog, auth, marketing-pages — and Plan 4
doc so navigation (still pending) starts correct.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 08:30:19 +02:00
09f45afab1 docs(plan): add Plan 4 (marketing-pages + navigation features)
17 tasks: marketing-pages with Pages collection + SiteSettings global +
read use-cases + tRPC router; navigation with Header global + read
use-case + tRPC router. Composes both into core-cms (now 4 collections,
2 globals) and core-api (now 4 namespaces). All Plan 2/3 lessons baked in.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 08:24:33 +02:00
42ef78bcfd docs(plan): add Plan 3 (Auth + Media + restore blog relations)
17 tasks: full auth feature canonical migration (entities, services,
use-cases, DI with constructor-injected service, controllers, users
collection, tRPC router); skeleton media feature (collection only);
restore blog's author→users relation and featuredImage→media upload.
Bakes in all Plan-2 lessons (vitest alias, no rootDir, relative imports
in src, no @repo/core-cms in feature deps).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 00:35:51 +02:00
ed4d204a7e docs(plan-2): document relative-imports-in-source rule for feature packages
Discovered during execution: when downstream packages like @repo/core-api
typecheck and follow imports into a feature, they don't have the feature's
@/ alias and fail with TS2307. Source files use relative imports;
@/ is reserved for test files within the feature's own context.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-04 22:36:10 +02:00
81fe4aa3b2 docs(plan-2): document constructor-injection pattern for payload repos
Revises Task 2.8's note: spec example used `import config from
'@repo/core-cms'` which creates a workspace dependency cycle (blog deps
on core-cms; core-cms deps on blog/cms). Constructor injection breaks the
cycle at the package graph. Apply to all payload-backed feature repos.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-04 22:32:01 +02:00
1da0c06085 docs(plan-2): fix vitest.config.ts to include @/ alias
Vitest doesn't read tsconfig paths automatically; the alias must be
declared in vitest.config.ts via resolve.alias. Discovered during
execution and fixed in the live blog package; updating the source
plan so future feature plans (auth, media, etc.) start correct.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-04 22:22:05 +02:00
74cb9bd29a docs(plan): add Plan 2 (Blog feature canonical migration)
17 tasks migrating the existing content/articles domain into a new
@repo/blog package with full canonical layer shape. Per-feature
InversifyJS container, payload-articles repository using getPayload +
core-cms config, simplified schema (author as text, no featuredImage)
with TODOs to restore in Plan 3 when auth + media features are migrated.
Wires blog/cms into core-cms and blog/api into core-api.

Plan 2 of 6 — total revised from original 4 during execution to keep
each plan digestible (Plan 1 in-flight numbering preserved).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-04 22:07:00 +02:00
5e041e4906 docs(plan): add Plan 1 (Foundation) for vertical refactor
Implementation plan for spec phases 1-3: scaffold five core-* packages,
populate core-shared with Payload primitives + tRPC plumbing, and lift
the Payload config into a stub core-cms with apps/cms repointed at it.
First of four plans in the vertical-refactor sequence.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-04 20:15:07 +02:00
eb195c8261 feat: add root documentation (CLAUDE.md, AGENTS.md, .mcp.json) 2026-04-06 15:02:01 +02:00
d13f7d166e Add Plan 5: UI System implementation plan 2026-04-06 14:55:35 +02:00
1b93fecb7f Add Plan 4: API Layer + App Shells implementation plan 2026-04-06 14:48:00 +02:00
0196de59a4 Add Plan 3: Payload CMS Integration implementation plan
10 tasks covering: cms-core dependencies, Users/Articles/Media collections,
slug auto-generation hook, SiteSettings global, Payload config, dual-mode
cms-client (local + HTTP), thin Next.js admin shell, build verification.
2026-04-06 14:38:33 +02:00
25e533b6be Add Plan 2: Core Package + DI implementation plan
12 tasks covering: dependencies, vitest config, entities (models + errors),
application interfaces, DI container (InversifyJS), mock infrastructure,
auth use cases + tests (TDD), content use cases + tests (TDD),
auth controllers + tests, content controllers + tests, public API exports.
2026-04-06 14:21:30 +02:00
d0d335d829 Add Plan 1: Monorepo Foundation implementation plan
8 tasks covering: root workspace files, shared TypeScript config,
shared ESLint config, placeholder packages, placeholder apps,
Docker Compose, dependency installation + verification, test dirs.
2026-04-06 13:56:00 +02:00