fix(002): stop shipping the template website/ into produced apps#25
Conversation
AI Code ReviewCoupling gate violation
Fix: Add a line to Everything else looks correct
Automated review by Claude. Diff size: 13 lines. |
The born-with carry-forward classifier (born-with.ts) is whitelist-by-default: any top-level entry not in a skip set falls through to the 'app' classification and is copied into every produced app. The template's own Docusaurus docs site (website/, baseUrl /template-encore/, title acme-vue-encore) matched no skip set, so it shipped into every generated tenant repo despite having no runtime role there. Add 'website' to GENERATOR_ARTIFACT_TOP_LEVEL (same treatment as scripts/modules/orchestration/.derived). Seed a website/ entry in the synthetic baseline fixture and add a negative assertion so the drop is exercised, not vacuously true. requirements/ is deliberately NOT touched: it is the factory pipeline's output location (per stagecraft importArtifacts.ts), not a leak. specs/ 000-018 stays: it is the intended born-with spec kernel. All 19 setup-app tests pass; full CI (typecheck + 185 tests + lockstep) green.
2dc1815 to
7bd3cd5
Compare
AI Code ReviewReviewNo security issuesThe change adds a single string to a No lockstep concern
Coupling gate: satisfied
Style violations (house rules)CLAUDE.md: "Never write multi-paragraph docstrings or multi-line comment blocks — one short line max." Three violations in this diff:
'website', // Docusaurus documentation site FOR the template itself (baseUrl
// `/template-encore/`, title `acme-vue-encore`): template-dev docs with no
// runtime role in a produced app. Without this it fell through to the default
// `app` classification and shipped into every generated repo.Should be trimmed to one line, e.g.
Logic: correct set
Minor: spec amendment meta-commentaryThe last line of the spec amendment ("Couples the born-with policy change to its owning spec per the coupling gate") is process narration, not a spec requirement. Strip it; the amendment content above it already demonstrates the coupling. Automated review by Claude. Diff size: 30 lines. |
…uced apps (#26) #25 stripped website/ from produced tenant apps but left template-encore's spec 016-docs-website, which establishes website/ and .github/workflows/deploy-docs.yml. Every scaffold then carried a spec whose established artifact was gone, so the produced app's own `spec-spine index` emitted I-004 for the missing website/ unit and the fail-closed `index check` in stagecraft's per-request scaffold rejected it, orphaning the job: index is STALE ... stale shard(s): by-spec/016-docs-website (blocking diagnostics) This blocked all new project creation. The stagecraft gate was correct; the drift was the incomplete #25 cleanup. - born-with.ts: add TEMPLATE_DEV_SPEC_IDS (016-docs-website), consulted alongside GENERATOR_META_SPEC_IDS in classifyEntry's specs/ branch. - setup-app.ts: drop the orphaned .github/workflows/deploy-docs.yml in the copy walk (other workflows stay born-with the app). - fixture + setup-app.test.ts: seed the spec + a kept/dropped workflow pair, with negative assertions. - amend spec 002; regenerate the 002 registry + index shards. Verified: produced tree now passes compile -> index -> index check (0 diagnostics, "index is fresh", exit 0); full adapter suite 186/186.
Problem
Every produced tenant app shipped with the template's own Docusaurus documentation site (
website/,baseUrl: /template-encore/,title: acme-vue-encore) at its repo root. That site documents template-encore itself; it has no runtime role in a generated app.Root cause: the born-with carry-forward classifier (
adapters/acme-vue-encore/scripts/lib/born-with.ts) is whitelist-by-default. Any top-level entry not in a skip set falls throughclassifyEntryto the'app'classification and is copied into the produced app.website/was in no skip set, so it leaked, and nothing tested for its absence.Fix
'website'toGENERATOR_ARTIFACT_TOP_LEVEL(the same treatment asscripts/modules/orchestration/.derived).website/entry in the synthetic baseline fixture (makeBaselineFixture) and add a negative assertion tosetup-app.test.ts, so the drop is actually exercised rather than vacuously true.Deliberately not touched
requirements/stays: it is the factory pipeline's output location (per stagecraftimportArtifacts.ts, which deliberately excludes it from knowledge ingestion), not a leak.specs/000-018 stays: it is the intended born-with spec kernel that the produced app's own CI (spec-spine index check, coupling) needs.Verification
setup-appcarry-forward tests pass (including the newwebsiteassertion).scripts/files are not spec-claimed paths).