Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
f228ee8
chore(toolchain): pivot to bun 1.3.13 + ts 6 strict + zod 4 schema re…
primeinc May 10, 2026
f23e1c1
chore(toolchain): biome 2.4.15 + auto-fix sweep on src/ + script Code…
primeinc May 10, 2026
a5db9e3
chore(toolchain): eslint flat config + host-io boundary + @octokit/re…
primeinc May 10, 2026
0101392
fix(types): TS6 strict + bun:test API compat — typecheck + tests green
primeinc May 10, 2026
514f00f
chore(eslint): cite canonical sources for security carve-outs + drop …
primeinc May 10, 2026
834aaa2
feat(contracts): paths-as-data catalog (config + schema + codegen + a…
primeinc May 10, 2026
03002e2
feat(gate): no-loose-zod scanner — bans z.any() / z.unknown() at call…
primeinc May 10, 2026
97df01c
feat(gate): dependency-cruiser architecture rules + delete orphan evi…
primeinc May 10, 2026
0d455d7
feat(gate): knip — unused files / exports / deps + delete two more or…
primeinc May 10, 2026
3489044
feat(manifest): Zod schema as source of truth + @exodus/schemasafe bo…
primeinc May 10, 2026
8d6c3cd
ci(workflows): migrate server-side workflows from pnpm to bun
primeinc May 10, 2026
72f14dc
feat(telemetry): src/telemetry/* — westcore-x1 OTel shape + pino redact
primeinc May 10, 2026
42536c4
refactor(fetch): derive GitHub REST + GraphQL types from canonical so…
primeinc May 10, 2026
9c6a89d
fix(codeql): close 5 alerts surfaced on PR #79
primeinc May 10, 2026
514088b
feat(cli): src/cli/dual-write.ts + commander + listr2 + picocolors
primeinc May 10, 2026
bd4a05a
style(cli-normalize): apply biome useTemplate suggestion
primeinc May 10, 2026
b08edb4
feat(web): rebuild on TanStack Start + tailwind v4 + bun (static prer…
primeinc May 10, 2026
eb0e298
ci: empty commit to force workflow re-trigger on PR #79
primeinc May 10, 2026
8707db4
docs(web): replace stale vite-template README with TanStack Start layout
primeinc May 10, 2026
6a5b382
Merge remote-tracking branch 'origin/main' into chore/bun-modernization
primeinc May 10, 2026
14e32da
fix(web): add @types/node so tsc resolves process in playwright.confi…
primeinc May 10, 2026
e25babe
feat(gate): bun audit stage — block CI on high/critical CVEs (#30)
primeinc May 10, 2026
6f9d9ca
docs: bot naming doctrine + permission capability ledger (#73)
primeinc May 10, 2026
45ee42a
docs: read-the-room evidence rule + PR template (#75)
primeinc May 10, 2026
cc2668a
feat(privacy): src/privacy/* — quarantine + sentinel leak tripwire (#74)
primeinc May 10, 2026
1adf8a0
feat(classifier): typed validation gate for AI output (#71)
primeinc May 10, 2026
d1f1f39
chore: add main release branch guard
primeinc May 11, 2026
b50f08e
chore: add app-backed main PR retargeter
primeinc May 11, 2026
6f6f723
docs: document branch governance app permissions
primeinc May 11, 2026
518e579
ci: run gates for next branch
primeinc May 11, 2026
4775057
ci: run web gate for next branch
primeinc May 11, 2026
6d8427b
chore: add app-backed branch ruleset bootstrap
primeinc May 11, 2026
18c5282
fix: use app client id for retarget token
primeinc May 11, 2026
a629535
fix: use app client id for ruleset bootstrap token
primeinc May 11, 2026
e4edc2a
fix: use app-id for retarget token
primeinc May 11, 2026
48ce9ba
fix: use app-id for ruleset bootstrap token
primeinc May 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
233 changes: 233 additions & 0 deletions .dependency-cruiser.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,233 @@
/** @type {import('dependency-cruiser').IConfiguration} */
//
// Architecture rules for github-stars. Defense-in-depth alongside
// eslint's no-restricted-imports + biome's noPrivateImports — three
// separate gates because each sees a different slice of the import
// graph (eslint resolves TS-typed imports; biome reads barrels;
// dependency-cruiser walks the runtime resolution tree including
// transitive package boundaries).
//
// Doctrine source: ../../juv2/.dependency-cruiser.mjs
// (rules ported verbatim where applicable; rule-scope `^packages`
// rewritten to `^src` because we are a flat single-package repo).
//
// Run: `bun run depcruise` (configured in package.json — invokes
// `dependency-cruiser --validate src`).

const config = {
forbidden: [
{
name: "no-circular",
severity: "error",
comment:
"This dependency is part of a circular relationship. You might want to revise " +
"your solution (i.e. use dependency inversion, make sure the modules have a single responsibility).",
from: {},
to: {
circular: true,
},
},
{
name: "no-orphans",
comment:
"This is an orphan module — it's likely not used (anymore?). Either use it or " +
"remove it. If it's logical this module is an orphan (i.e. it's a config file), " +
"add an exception for it in your dependency-cruiser configuration. By default " +
"this rule does not scrutinize dot-files (e.g. .eslintrc.js), TypeScript declaration " +
"files (.d.ts), tsconfig.json and some of the babel and webpack configs.",
severity: "warn",
from: {
orphan: true,
pathNot: [
"(^|/)[.][^/]+[.](?:js|cjs|mjs|ts|cts|mts|json)$", // dot files
"[.]d[.]ts$", // TypeScript declaration files
"(^|/)tsconfig[.]json$", // TypeScript config
"(^|/)(?:babel|webpack)[.]config[.](?:js|cjs|mjs|ts|cts|mts|json)$",
// CLI runners (no in-repo importer; entry from package.json scripts).
"(^|/)src/cli-(normalize|validate)[.]ts$",
"(^|/)src/(auth/setup-doctor|fetch/cli|sync/cli|gate/cli|gate/no-loose-zod-cli|contracts/paths-codegen)[.]ts$",
],
},
to: {},
},
{
name: "no-deprecated-core",
comment:
"A module depends on a node core module that has been deprecated. Find an alternative.",
severity: "warn",
from: {},
to: {
dependencyTypes: ["core"],
path: [
"^async_hooks$",
"^punycode$",
"^domain$",
"^constants$",
"^sys$",
"^_linklist$",
"^_stream_wrap$",
],
},
},
{
name: "not-to-deprecated",
comment:
"This module uses a (version of an) npm module that has been deprecated. Either upgrade to a later " +
"version of that module, or find an alternative. Deprecated modules are a security risk.",
severity: "warn",
from: {},
to: {
dependencyTypes: ["deprecated"],
},
},
{
name: "no-non-package-json",
severity: "error",
comment:
"This module depends on an npm package that isn't in the 'dependencies' section of your package.json. " +
"That's problematic as the package either (1) won't be available on live (2 — worse) will be " +
"available on live with an non-guaranteed version. Fix it by adding the package to the dependencies " +
"in your package.json.",
from: {},
to: {
dependencyTypes: ["npm-no-pkg", "npm-unknown"],
// Bun's `.bun/<pkg>@<ver>+<hash>/node_modules/<pkg>/...d.ts`
// resolution path makes type-only imports look like runtime
// deps to depcruise's classifier (the resolved path lives
// outside any package.json's `dependencies` section). Type-
// surface imports are not runtime debt — `.d.ts` is erased
// at compile time.
pathNot: ["[.]d[.](ts|cts|mts)$"],
},
},
{
name: "not-to-unresolvable",
comment:
"This module depends on a module that cannot be found ('resolved to disk'). If it's an npm " +
"module: add it to your package.json. In all other cases you likely already know what to do.",
severity: "error",
from: {},
to: {
couldNotResolve: true,
},
},
{
name: "no-duplicate-dep-types",
comment:
"Likely this module depends on an external ('npm') package that occurs more than once " +
"in your package.json i.e. both as a devDependency and in dependencies. This will cause " +
"maintenance problems later on.",
severity: "warn",
from: {},
to: {
moreThanOneDependencyType: true,
dependencyTypesNot: ["type-only"],
},
},
{
name: "not-to-spec",
comment:
"This module depends on a spec (test) file. The responsibility of a spec file is to test code. " +
"If there's something in a spec that's of use to other modules, it doesn't have that single " +
"responsibility anymore. Factor it out into (e.g.) a separate utility/helper.",
severity: "error",
from: {},
to: {
path: "[.](?:spec|test)[.](?:js|mjs|cjs|jsx|ts|mts|cts|tsx)$",
},
},
{
name: "not-to-dev-dep",
severity: "error",
comment:
"This module depends on an npm package from the 'devDependencies' section of your " +
"package.json. It looks like something that ships to production, though. To prevent problems " +
"with npm packages that aren't there on production declare it (only!) in the 'dependencies' " +
"section of your package.json. If this module is development only — add it to the " +
"from.pathNot re of the not-to-dev-dep rule in the dependency-cruiser configuration.",
from: {
path: "^src",
pathNot: "[.](?:spec|test)[.](?:js|mjs|cjs|jsx|ts|mts|cts|tsx)$",
},
to: {
dependencyTypes: ["npm-dev"],
dependencyTypesNot: ["type-only"],
pathNot: ["node_modules/@types/", "[.]d[.](ts|cts|mts)$"],
},
},
{
name: "optional-deps-used",
severity: "info",
comment:
"This module depends on an npm package that is declared as an optional dependency. " +
"As this makes sense in limited situations only, it's flagged here.",
from: {},
to: {
dependencyTypes: ["npm-optional"],
},
},
{
name: "peer-deps-used",
comment:
"This module depends on an npm package that is declared as a peer dependency. " +
"This makes sense if your package is e.g. a plugin, but in other cases — maybe not so much.",
severity: "warn",
from: {},
to: {
dependencyTypes: ["npm-peer"],
},
},
],
options: {
doNotFollow: {
path: ["node_modules"],
},
// Detect TS-only imports that get erased at compile time so the
// type-surface graph is visible alongside the runtime graph.
tsPreCompilationDeps: true,
// Detect process.getBuiltinModule calls as imports.
detectProcessBuiltinModuleCalls: true,
// Each consumer owns its own dependency ledger; root devDeps don't
// bleed into per-file classification.
combinedDependencies: false,
// JSDoc-style imports (e.g. `import("foo")` in TSDoc `{@link}`
// references) are scanned alongside real imports.
detectJSDocImports: true,
tsConfig: {
fileName: "tsconfig.json",
},
skipAnalysisNotInRules: true,
builtInModules: {
add: [
"bun",
"bun:ffi",
"bun:jsc",
"bun:sqlite",
"bun:test",
"bun:wrap",
"detect-libc",
"undici",
"ws",
],
},
enhancedResolveOptions: {
exportsFields: ["exports"],
conditionNames: ["import", "require", "node", "default", "types"],
mainFields: ["module", "main", "types", "typings"],
},
reporterOptions: {
dot: {
collapsePattern: "node_modules/(?:@[^/]+/[^/]+|[^/]+)",
},
archi: {
collapsePattern:
"^(?:src|lib(s?)|app(s?)|bin|test(s?)|spec(s?))/[^/]+|node_modules/(?:@[^/]+/[^/]+|[^/]+)",
},
text: {
highlightFocused: true,
},
},
},
};

export default config;
Loading
Loading