chore(template): clean-slate template snapshot from bb4a0c7

Curated, product-agnostic snapshot of the post-story-04 tree: demo
content deleted, auth-only reference feature, web-next shell, all gates
green. Product-specific docs, ADRs 027-029, PRDs/epics/archive, editor
library traces, and product naming are curated out; generic template
repairs (coverage provider devDeps, root test:coverage script, live
lint fixes, root-only release-please) are kept. See TEMPLATE.md for
provenance, curation list, and usage.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016j8z4VHjedXDTjEDNg7qHK
This commit is contained in:
2026-07-12 20:40:54 +02:00
commit f77e6ea881
1062 changed files with 105156 additions and 0 deletions

View File

@@ -0,0 +1,59 @@
import fs from "node:fs";
import path from "node:path";
/**
* Identifies "component files" by location + extension:
* - `.tsx` extension
* - Inside `packages/core-ui/src/` OR `packages/<feature>/src/ui/`
* - NOT a test, stories, spec, or barrel file
*/
function isComponentFile(filename) {
if (!filename.endsWith(".tsx")) return false;
const base = path.basename(filename);
if (
base === "index.tsx" ||
base.endsWith(".test.tsx") ||
base.endsWith(".stories.tsx") ||
base.endsWith(".spec.tsx")
) {
return false;
}
return (
filename.includes("/packages/core-ui/src/") ||
/\/packages\/[^/]+\/src\/ui\//.test(filename)
);
}
/** @type {import("eslint").Rule.RuleModule} */
export default {
meta: {
type: "problem",
docs: {
description:
"Every component file must have a sibling *.stories.tsx for Storybook coverage.",
},
schema: [],
messages: {
missingStory:
"Component {{filename}} has no sibling Storybook story at {{expected}}. Stories are the spec for visual conformance.",
},
},
create(context) {
return {
Program(node) {
const filename = context.filename;
if (!isComponentFile(filename)) return;
const expected = filename.replace(/\.tsx$/, ".stories.tsx");
if (fs.existsSync(expected)) return;
context.report({
node,
messageId: "missingStory",
data: {
filename: path.basename(filename),
expected: path.basename(expected),
},
});
},
};
},
};