Commit Graph

14 Commits

Author SHA1 Message Date
b992fee088 feat(core-consent): extend generator with consent template + fix withCapture brand propagation
- Add consent to CORE_PACKAGE_GENERATORS in turbo/generators/config.ts so
  pnpm turbo gen core-package consent is a valid command (not hand-rollable)
- Create turbo/generators/templates/core-package/consent/ mirroring the
  analytics template shape (AGENTS.md, package.json, tsconfig, turbo, vitest,
  eslint, src/index.ts scaffolds)
- Regenerate packages/core-consent/ from the new template (replaces the
  previous hand-rolled attempt that violated the generator-first rule)
- Add __consentChecked to withCapture PROPAGATED_BRANDS so the brand bubbles
  through the full withSpan→withCapture wrapper chain to the outermost binding
  that assertFeatureConformance reads

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 11:01:17 +00:00
ea384c67c4 feat(core-analytics): scaffold @repo/core-analytics via generator
Add the `pnpm turbo gen core-package analytics` generator template and
run it to scaffold the @repo/core-analytics workspace package. The
package lands in placeholder state (empty barrel export) ready for the
IAnalytics + NoopAnalytics implementation in the next commit.

Includes:
- turbo/generators/templates/core-package/analytics/ templates
- turbo/generators/config.ts analytics generator registration
- packages/core-analytics/ placeholder scaffold
- apps/web-next/next.config.mjs transpilePackages entry

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 11:26:24 +00:00
b1e2e8a788 feat(tooling): pre-ship approved library traces in optional core generator templates
Each of the five optional core package generators (events, realtime, audit,
trpc, ui) now copies pre-written decision: approved trace files into
docs/library-decisions/ at scaffold time, covering every direct runtime
dependency of that core package.

This prevents a pre-commit gate failure the first time a developer runs
pnpm turbo gen core-package <name> — the generator is the policy-compliant
path, so the traces land by construction.

- Added docs/library-decisions/*.md.hbs trace files under each of the five
  core-package template directories (15 files total)
- Updated generator config to emit traces into workspace docs/library-decisions/
  via a second emitTemplateTree call per core package
- Updated all five __snapshots__/core-package/*.snapshot.json to include the
  new trace file entries
- Added verify-doc-shas.test.ts to pin SHA256 hashes of all 15 trace templates
  so snapshot and file content cannot drift independently

ADR refs: events→ADR-015, realtime→ADR-016, audit→ADR-018;
trpc and ui cite closest ADR or null where no specific ADR exists.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 09:34:17 +00:00
2edc76002a refactor(docs): strip residual Phase/Plan setup-history references
Final sweep for setup-process bookkeeping not caught by template-reset-v1.
ADRs drop Plan-N qualifiers; spec collapses the historical 11-phase
migration table; scaffolding guide drops "Phase added" column; comment
prefixes referencing R-numbers in test describes / eslint inline comments
are normalized. Architecture-level rule IDs (R40, R52, E0, J0, etc.) are
preserved where they serve as stable cross-references in ADRs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 10:28:31 +02:00
17ae157365 refactor: strip Phase/Plan/R-number references from source comments 2026-05-13 09:51:45 +02:00
3fe95694c5 feat(generators): capture core-audit as verbatim template files 2026-05-11 16:39:00 +02:00
4977617c94 fix(generators): mention core-ui-component generator in core-ui template AGENTS.md
The template's AGENTS.md.hbs describes the 4-file component pattern under
`## Structure` but didn't tell agents how to scaffold one. After Phase 4
shipped the generator, an agent reading core-ui's AGENTS.md still wouldn't
discover `pnpm turbo gen core-ui-component` and would build files manually.

Added a one-line note immediately under the Structure heading pointing at
the generator. Snapshot hash for AGENTS.md updated to match.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 09:41:39 +02:00
c50dd96113 feat(generators): add splice anchors to core-ui tier barrels 2026-05-11 09:12:17 +02:00
d974bb6267 feat(generators): capture core-ui as verbatim template files
28 .hbs files mirror packages/core-ui verbatim:
atoms (Button, Input, Label + stories + tests), molecules (FormField),
organisms/templates (empty barrels), lib/utils, styles/globals.css,
plus all root config files (package.json, tsconfig.json, vitest.config.ts,
eslint.config.js, turbo.json, AGENTS.md).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 14:17:47 +02:00
0a3a2c3845 feat(generators): capture core-trpc as verbatim template files
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 14:06:14 +02:00
a342d064ad feat(generators): capture core-events as verbatim template files
Mirror packages/core-events/** into turbo/generators/templates/core-package/events/**/*.hbs.
15 files total (6 top-level + 9 src). No Handlebars interpolation needed
since none of the source files contain {{ }} patterns.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 13:52:38 +02:00
a7f0a13d34 feat(generators): capture realtime ESLint rules as template files 2026-05-09 13:28:54 +02:00
2dcfecc826 feat(generators): capture core-realtime as verbatim template files 2026-05-09 13:28:46 +02:00
4c7ccf9d1c docs: core-package generator reference + Quick Start entry
Adds docs/scaffolding/core-package-generator.md with usage, template
table, and drift-verification instructions. Updates CLAUDE.md Quick
Start and AGENTS.md Key Commands with the new pnpm turbo gen core-package
entry. Creates templates/core-package/.gitkeep placeholder for Phase 3+.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 13:23:37 +02:00