@alxwlw/stack 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/LICENSE +21 -0
  2. package/canon/catalogs.json +50 -0
  3. package/canon/files/dependabot.template.yml +10 -0
  4. package/canon/files/dependency-cruiser.base.cjs +179 -0
  5. package/canon/files/editorconfig +13 -0
  6. package/canon/files/gitleaks-canon.toml +75 -0
  7. package/canon/files/gitleaks-local.template.toml +12 -0
  8. package/canon/files/knip.base.json +7 -0
  9. package/canon/files/markdownlint-cli2.jsonc +123 -0
  10. package/canon/files/markdownlintignore.template +4 -0
  11. package/canon/files/moon-tasks/bun-test.yml +17 -0
  12. package/canon/files/moon-tasks/oxfmt.yml +14 -0
  13. package/canon/files/moon-tasks/oxlint.yml +34 -0
  14. package/canon/files/moon-tasks/stack.yml +15 -0
  15. package/canon/files/moon-tasks/typescript.yml +32 -0
  16. package/canon/files/oxfmtrc.jsonc +23 -0
  17. package/canon/files/oxlintrc.template.json +6 -0
  18. package/canon/files/prettierignore.template +1 -0
  19. package/canon/files/proto-plugins/actionlint.toml +27 -0
  20. package/canon/files/proto-plugins/gitleaks.toml +27 -0
  21. package/canon/files/proto-plugins/shellcheck.toml +23 -0
  22. package/canon/files/prototools +18 -0
  23. package/canon/files/tsconfig.options.template.json +5 -0
  24. package/canon/files/workflow-stack-check-infra.yml +10 -0
  25. package/canon/files/workflow-stack-check.yml +8 -0
  26. package/canon/files/workflow-stack-sync.yml +16 -0
  27. package/canon/files/yamllint +66 -0
  28. package/canon/files/yamllint-canon-ignores +14 -0
  29. package/canon/files/yamllint-local-ignores.template +5 -0
  30. package/canon/manifest.json +158 -0
  31. package/package.json +27 -0
  32. package/schema.json +48 -0
  33. package/src/catalogs.ts +101 -0
  34. package/src/check.ts +27 -0
  35. package/src/cli.ts +75 -0
  36. package/src/config.ts +70 -0
  37. package/src/deps.ts +134 -0
  38. package/src/files.ts +75 -0
  39. package/src/findings.ts +19 -0
  40. package/src/init.ts +29 -0
  41. package/src/manifest.ts +33 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 alxwlw
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,50 @@
1
+ {
2
+ "dev": {
3
+ "typescript": "7.0.2",
4
+ "oxlint": "1.83.0",
5
+ "oxlint-tsgolint": "7.0.2001",
6
+ "oxfmt": "0.68.0",
7
+ "@types/node": "26.1.1",
8
+ "@types/bun": "1.4.2",
9
+ "knip": "6.27.0",
10
+ "dependency-cruiser": "18.1.0",
11
+ "vitest": "4.1.10",
12
+ "@playwright/test": "1.62.0",
13
+ "@alxwlw/stack": "1.0.0",
14
+ "@alxwlw/oxlint-config": "1.0.0",
15
+ "@alxwlw/tsconfig": "1.0.0"
16
+ },
17
+ "libs": {
18
+ "@nestjs/core": "12.0.1",
19
+ "@nestjs/common": "12.0.1",
20
+ "@nestjs/platform-express": "12.0.1",
21
+ "@nestjs/testing": "12.0.1",
22
+ "reflect-metadata": "0.2.2",
23
+ "rxjs": "7.8.2",
24
+ "@prisma/client": "7.8.0",
25
+ "prisma": "7.8.0",
26
+ "pg": "8.22.0",
27
+ "@types/pg": "8.20.0",
28
+ "ioredis": "5.11.1",
29
+ "@nats-io/jetstream": "3.4.0",
30
+ "@nats-io/nats-core": "3.4.0",
31
+ "@opentelemetry/api": "1.9.1",
32
+ "@opentelemetry/sdk-metrics": "2.10.0",
33
+ "zod": "4.4.3",
34
+ "react": "19.2.7",
35
+ "react-dom": "19.2.7",
36
+ "@types/react": "19.2.17",
37
+ "@types/react-dom": "19.2.3",
38
+ "react-router": "8.3.0",
39
+ "@tanstack/react-query": "5.101.2",
40
+ "@tanstack/react-table": "8.21.3",
41
+ "zustand": "5.0.14",
42
+ "@dnd-kit/core": "6.3.1",
43
+ "tailwindcss": "4.3.3",
44
+ "@tailwindcss/vite": "4.3.3",
45
+ "lucide-react": "1.25.0",
46
+ "@fontsource/ibm-plex-sans": "5.3.0",
47
+ "@fontsource/ibm-plex-mono": "5.3.0",
48
+ "@fontsource/ibm-plex-serif": "5.3.0"
49
+ }
50
+ }
@@ -0,0 +1,10 @@
1
+ # Repo-local Dependabot config — YOURS to edit (seeded once by `stack sync`, never overwritten).
2
+ version: 2
3
+ updates:
4
+ - package-ecosystem: 'npm'
5
+ directory: '/'
6
+ schedule:
7
+ interval: 'weekly'
8
+ ignore:
9
+ # Canon packages arrive through `stack sync`, not through Dependabot.
10
+ - dependency-name: '@alxwlw/*'
@@ -0,0 +1,179 @@
1
+ /** @type {import('dependency-cruiser').IConfiguration} */
2
+ module.exports = {
3
+ forbidden: [
4
+ // ── Boundary rules (error) ──────────────────────────────────────
5
+
6
+ {
7
+ name: 'no-app-to-app',
8
+ severity: 'error',
9
+ comment:
10
+ 'Apps must not import from other apps — use shared packages instead. ' +
11
+ 'Exception: __e2e__ tests may import from any app.',
12
+ from: { path: '^apps/([^/]+)/', pathNot: '^apps/__e2e__/' },
13
+ to: { path: '^apps/([^/]+)/', pathNot: '^apps/$1/' },
14
+ },
15
+ {
16
+ name: 'no-package-to-app',
17
+ severity: 'error',
18
+ comment: 'Packages must not import from apps — dependency direction is apps → packages.',
19
+ from: { path: '^packages/' },
20
+ to: { path: '^apps/' },
21
+ },
22
+ {
23
+ name: 'no-circular',
24
+ severity: 'error',
25
+ comment:
26
+ 'Circular dependencies make code hard to reason about and break tree-shaking. ' +
27
+ 'Exceptions: type-only cycles, NestJS forwardRef module cycles, dist/ artifacts ' +
28
+ '(chunk-splitting bundlers can produce benign cross-chunk cycles in built output).',
29
+ from: {
30
+ pathNot: ['[.]module[.](?:ts|js)$', '^apps/[^/]+/dist/', '^packages/[^/]+/dist/'],
31
+ },
32
+ to: {
33
+ circular: true,
34
+ dependencyTypesNot: ['type-only'],
35
+ },
36
+ },
37
+
38
+ // ── Hygiene rules (from default config) ─────────────────────────
39
+
40
+ {
41
+ name: 'no-orphans',
42
+ severity: 'warn',
43
+ comment:
44
+ 'This is an orphan module — it is likely not used anymore. Either use it or remove it.',
45
+ from: {
46
+ orphan: true,
47
+ pathNot: [
48
+ '(^|/)[.][^/]+[.](?:js|cjs|mjs|ts|cts|mts|json)$',
49
+ '[.]d[.]ts$',
50
+ '(^|/)tsconfig[.]json$',
51
+ '(^|/)(?:babel|webpack)[.]config[.](?:js|cjs|mjs|ts|cts|mts|json)$',
52
+ ],
53
+ },
54
+ to: {},
55
+ },
56
+ {
57
+ name: 'no-deprecated-core',
58
+ severity: 'warn',
59
+ comment: 'A module depends on a deprecated Node core module.',
60
+ from: {},
61
+ to: {
62
+ dependencyTypes: ['core'],
63
+ path: [
64
+ '^async_hooks$',
65
+ '^punycode$',
66
+ '^domain$',
67
+ '^constants$',
68
+ '^sys$',
69
+ '^_linklist$',
70
+ '^_stream_wrap$',
71
+ ],
72
+ },
73
+ },
74
+ {
75
+ name: 'not-to-deprecated',
76
+ severity: 'warn',
77
+ comment: 'This module uses a deprecated npm package.',
78
+ from: {},
79
+ to: { dependencyTypes: ['deprecated'] },
80
+ },
81
+ {
82
+ name: 'no-non-package-json',
83
+ severity: 'error',
84
+ comment:
85
+ "This module depends on an npm package that isn't in the 'dependencies' " +
86
+ 'section of your package.json.',
87
+ from: {},
88
+ to: { dependencyTypes: ['npm-no-pkg', 'npm-unknown'] },
89
+ },
90
+ {
91
+ name: 'not-to-unresolvable',
92
+ severity: 'error',
93
+ comment: 'This module depends on a module that cannot be resolved to disk.',
94
+ from: {},
95
+ to: { couldNotResolve: true },
96
+ },
97
+ {
98
+ name: 'no-duplicate-dep-types',
99
+ severity: 'warn',
100
+ comment:
101
+ 'This module depends on an npm package that occurs in both dependencies and devDependencies.',
102
+ from: {},
103
+ to: {
104
+ moreThanOneDependencyType: true,
105
+ dependencyTypesNot: ['type-only'],
106
+ },
107
+ },
108
+ {
109
+ name: 'not-to-spec',
110
+ severity: 'error',
111
+ comment: 'Production code must not import from test files.',
112
+ from: {},
113
+ to: { path: '[.](?:spec|test)[.](?:js|mjs|cjs|jsx|ts|mts|cts|tsx)$' },
114
+ },
115
+ {
116
+ name: 'not-to-dev-dep',
117
+ severity: 'error',
118
+ comment: 'This production module depends on a devDependency npm package.',
119
+ from: {
120
+ path: '^(packages|apps)',
121
+ pathNot: '[.](?:spec|test)[.](?:js|mjs|cjs|jsx|ts|mts|cts|tsx)$',
122
+ },
123
+ to: {
124
+ dependencyTypes: ['npm-dev'],
125
+ dependencyTypesNot: ['type-only'],
126
+ pathNot: ['node_modules/@types/'],
127
+ },
128
+ },
129
+ {
130
+ name: 'optional-deps-used',
131
+ severity: 'info',
132
+ comment: 'This module depends on an optional dependency.',
133
+ from: {},
134
+ to: { dependencyTypes: ['npm-optional'] },
135
+ },
136
+ {
137
+ name: 'peer-deps-used',
138
+ severity: 'warn',
139
+ comment: 'This module depends on a peer dependency.',
140
+ from: {},
141
+ to: { dependencyTypes: ['npm-peer'] },
142
+ },
143
+ ],
144
+ options: {
145
+ doNotFollow: { path: ['node_modules', '(^|/)dist(/|$)'] },
146
+ exclude: { path: '(^|/)dist(/|$)' },
147
+ includeOnly: ['^apps/', '^packages/'],
148
+ tsPreCompilationDeps: true,
149
+ detectJSDocImports: true,
150
+ tsConfig: { fileName: 'tsconfig.json' },
151
+ enhancedResolveOptions: {
152
+ exportsFields: ['exports'],
153
+ conditionNames: ['import', 'require', 'node', 'default', 'types'],
154
+ mainFields: ['main', 'types', 'typings'],
155
+ },
156
+ reporterOptions: {
157
+ dot: {
158
+ collapsePattern: '^(?:packages|apps)/[^/]+|node_modules/(?:@[^/]+/[^/]+|[^/]+)',
159
+ theme: {
160
+ graph: { splines: 'ortho', rankdir: 'TB' },
161
+ modules: [
162
+ {
163
+ criteria: { source: '^apps/' },
164
+ attributes: { fillcolor: '#ccddff' },
165
+ },
166
+ {
167
+ criteria: { source: '^packages/' },
168
+ attributes: { fillcolor: '#ffffcc' },
169
+ },
170
+ ],
171
+ },
172
+ },
173
+ archi: {
174
+ collapsePattern: '^(?:packages|apps)/[^/]+|node_modules/(?:@[^/]+/[^/]+|[^/]+)',
175
+ },
176
+ text: { highlightFocused: true },
177
+ },
178
+ },
179
+ };
@@ -0,0 +1,13 @@
1
+ root = true
2
+
3
+ [*]
4
+ charset = utf-8
5
+ end_of_line = lf
6
+ insert_final_newline = true
7
+ trim_trailing_whitespace = true
8
+ indent_style = tab
9
+ indent_size = 2
10
+
11
+ [*.{md,yml,yaml,json,jsonc}]
12
+ indent_style = space
13
+ indent_size = 2
@@ -0,0 +1,75 @@
1
+ # gitleaks config — canon ruleset. Runs in pre-commit + CI.
2
+ # Reference: https://github.com/gitleaks/gitleaks/blob/master/config/gitleaks.toml
3
+
4
+ # Inherit the default ruleset (catches AWS keys, JWTs, GH tokens,
5
+ # Slack tokens, private-key PEM blocks, generic API keys, etc.)
6
+ [extend]
7
+ useDefault = true
8
+
9
+ # Canon extensions.
10
+ [[rules]]
11
+ id = 'eth-private-key-no-prefix'
12
+ description = 'Ethereum private key (32 bytes hex, with or without 0x prefix)'
13
+ regex = '''(?i)(?:eth_?priv|private_?key)\s*[:=]\s*["']?(?:0x)?[a-f0-9]{64}["']?'''
14
+ tags = ['secret', 'ethereum']
15
+ keywords = ['privkey', 'private_key', 'privatekey']
16
+
17
+ [allowlist]
18
+ description = 'Global false-positive filters.'
19
+
20
+ # Commits allowlisted because the "secret" is a confirmed false positive.
21
+ # Add fingerprint + explanation when suppressing a specific finding, e.g.:
22
+ # commits = ['<sha>'] # path/to/file.ts line N: <why this isn't a secret>
23
+ commits = []
24
+
25
+ # Generated / vendored / cache paths.
26
+ paths = [
27
+ '''(.*/)?node_modules(/|$)''',
28
+ '''(.*/)?dist(/|$)''',
29
+ '''(.*/)?\.tsbuild(/|$)''',
30
+ '''(.*/)?coverage(/|$)''',
31
+ '''(.*/)?\.next(/|$)''',
32
+ '''(.*/)?\.source(/|$)''',
33
+ '''(.*/)?\.moon/cache(/|$)''',
34
+ '''pnpm-lock\.yaml$''',
35
+ '''(.*/)?CHANGELOG\.md$''',
36
+ '''(.*/)?prisma/migrations/''',
37
+ '''(.*/)?\.claude(/|$)''',
38
+ '''(.*/)?\.agent(/|$)''',
39
+ # Test fixtures and well-known Anvil/Hardhat deterministic accounts
40
+ # (these are published in every dev env and are NOT real secrets).
41
+ '''(.*/)?__tests__(/|$)''',
42
+ '''(.*/)?__mocks__(/|$)''',
43
+ '''(.*/)?fixtures?(/|$)''',
44
+ # Historical planning docs — false-positive regex matches in prose
45
+ # and curl examples. Skip the spec/plan/archive trees.
46
+ '''docs/(specs|plans|archive)/''',
47
+ '''\.superpowers/''',
48
+ '''docs/ideas/''',
49
+ '''docs/draft/''',
50
+ ]
51
+
52
+ # Well-known public test keys / addresses. Add here as they come up.
53
+ regexTarget = 'match'
54
+ regexes = [
55
+ # Hardhat / Anvil default accounts (10× published deterministic keys).
56
+ '''0xf39[fF]d6e51aad88[fF]6[fF]4ce6a[bB]8827279c[fF]{3}b92266''',
57
+ '''0x70997970[cC]51812dc3[aA]010[cC]7d01[bB]50e0d17dc79c8''',
58
+ '''0x3[cC]44[cC]dddb6[aA]900fa2[bB]585dd299e03d12fa4293[bB][cC]''',
59
+ # Anvil test account #0 private key — documented everywhere, not a
60
+ # real secret. Published in https://hardhat.org/hardhat-network/docs/reference.
61
+ '''(?i)ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80''',
62
+ # Test placeholders we put in fixtures on purpose.
63
+ '''dead[bB]eef''',
64
+ '''[fF]akeTokenDoNotUseInProd''',
65
+ ]
66
+
67
+ # Use stopwords to suppress obvious noise. Gitleaks uses Hashicorp's
68
+ # set by default; extend here if needed.
69
+ stopwords = [
70
+ 'placeholder',
71
+ 'example',
72
+ 'dummy',
73
+ 'fixture',
74
+ 'fake',
75
+ ]
@@ -0,0 +1,12 @@
1
+ # Repo-local gitleaks config — YOURS to edit (seeded once by `stack sync`,
2
+ # never overwritten). The canon ruleset lives in .gitleaks.canon.toml, which IS
3
+ # sync-managed verbatim — never edit that file; put repo-specific allowlists
4
+ # and extra rules HERE instead. gitleaks chains configs via [extend]:
5
+ # default ruleset → .gitleaks.canon.toml → this file.
6
+ [extend]
7
+ path = ".gitleaks.canon.toml"
8
+
9
+ # Example repo-local allowlist:
10
+ # [[allowlists]]
11
+ # description = "test fixtures with fake keys"
12
+ # paths = ['''tests/fixtures/.*''']
@@ -0,0 +1,7 @@
1
+ {
2
+ "$schema": "https://unpkg.com/knip@5/schema.json",
3
+ "tags": ["-lintignore"],
4
+ "exclude": ["duplicates"],
5
+ "ignore": ["**/dist/**", "**/.tsbuild/**", "**/coverage/**", ".claude/**"],
6
+ "ignoreBinaries": ["moon", "uv"]
7
+ }
@@ -0,0 +1,123 @@
1
+ // markdownlint-cli2 config — stack canon (sync-managed verbatim; never edit
2
+ // in a repo — repo-local ignore paths go in .markdownlintignore, which
3
+ // markdownlint-cli2 honors natively).
4
+ //
5
+ // Scope: **semantic** markdown linting only. Formatting (line wrap,
6
+ // list marker style, trailing whitespace, etc.) is handled by oxfmt
7
+ // via the existing `.moon/tasks/oxfmt.yml` **/*.{md,mdx,yml,yaml,json}
8
+ // glob. Rules that overlap with the formatter are disabled here to avoid
9
+ // fighting between the two tools.
10
+ //
11
+ // Enabled checks target bugs that a formatter can't catch:
12
+ // - broken heading hierarchy
13
+ // - missing blank lines around structural elements
14
+ // - fenced code blocks without language specifier
15
+ // - dead in-file anchors (#section references that don't exist)
16
+ // - broken reference links
17
+ //
18
+ // Full rule reference: https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md
19
+ {
20
+ "config": {
21
+ // ── Heading structure ────────────────────────────────────
22
+ "MD001": true, // heading-increment: no skipping levels (H1→H3)
23
+ "MD003": { "style": "atx" }, // heading-style: force # over ===
24
+ "MD018": true, // no-missing-space-atx: `#Title` → `# Title`
25
+ "MD019": true, // no-multiple-space-atx
26
+ "MD020": true, // no-missing-space-closed-atx
27
+ "MD021": true, // no-multiple-space-closed-atx
28
+ "MD023": true, // heading-start-left (no indented headings)
29
+ "MD025": false, // single-h1: sometimes we use multiple H1s (rare, fine)
30
+ "MD036": true, // no-emphasis-as-heading
31
+ "MD041": false, // first-line-h1: partial files may not start with H1
32
+ "MD042": true, // no-empty-links
33
+ "MD043": false, // required-headings: project-specific, too strict
34
+
35
+ // ── Blank lines around structural elements ───────────────
36
+ "MD022": true, // blanks-around-headings
37
+ "MD031": true, // blanks-around-fences
38
+ "MD032": true, // blanks-around-lists
39
+
40
+ // ── Code blocks ──────────────────────────────────────────
41
+ "MD040": true, // fenced-code-language: require lang on ```
42
+ "MD046": { "style": "fenced" }, // code-block-style: always fenced
43
+ "MD048": { "style": "backtick" }, // code-fence-style: ``` not ~~~
44
+ "MD014": false, // commands-show-output: allow $ prefix on shell snippets
45
+
46
+ // ── Emphasis ─────────────────────────────────────────────
47
+ "MD037": true, // no-space-in-emphasis
48
+ "MD038": true, // no-space-in-code
49
+ "MD039": true, // no-space-in-links
50
+ "MD049": { "style": "underscore" }, // emphasis-style: use _italic_
51
+ "MD050": { "style": "asterisk" }, // strong-style: use **bold**
52
+
53
+ // ── Links and references ─────────────────────────────────
54
+ "MD051": true, // link-fragments: validates #anchor targets
55
+ "MD052": true, // reference-links-images: defined references
56
+ "MD053": true, // link-image-reference-definitions: no unused refs
57
+ "MD054": false, // link-image-style: inline+reference mixed is fine
58
+ "MD059": true, // descriptive-link-text: avoid "click here"
59
+
60
+ // ── Tables ───────────────────────────────────────────────
61
+ // MD055/MD060 disabled: table pipe/column style is opinionated
62
+ // formatting that the formatter handles. MD056 stays enabled because
63
+ // it catches REAL bugs (missing cells = broken tables).
64
+ "MD055": false, // table-pipe-style
65
+ "MD056": true, // table-column-count: all rows have same number of cells
66
+ "MD058": false, // blanks-around-tables (formatter handles)
67
+ "MD060": false, // table-column-style (formatter handles)
68
+
69
+ // ── Handled by the formatter — explicitly disabled ────────
70
+ "MD004": false, // ul-style
71
+ "MD005": false, // list-indent
72
+ "MD007": false, // ul-indent
73
+ "MD009": false, // no-trailing-spaces
74
+ "MD010": false, // no-hard-tabs
75
+ "MD012": false, // no-multiple-blanks
76
+ "MD013": false, // line-length
77
+ "MD027": false, // no-multiple-space-blockquote
78
+ "MD028": false, // no-blanks-blockquote
79
+ "MD029": false, // ol-prefix
80
+ "MD030": false, // list-marker-space
81
+ "MD047": false, // single-trailing-newline
82
+
83
+ // ── Too noisy / not worth the signal ─────────────────────
84
+ "MD024": false, // no-duplicate-heading: sometimes intentional
85
+ "MD026": false, // no-trailing-punctuation: "Why not X?" is fine
86
+ "MD033": false, // no-inline-html: HTML comment markers + <details> are common
87
+ "MD034": false, // no-bare-urls: some examples intentionally bare
88
+ "MD035": false, // hr-style
89
+ "MD044": false, // proper-names: requires project-specific dictionary
90
+ "MD045": false, // no-alt-text: too many screenshots lack alt
91
+ },
92
+ "globs": ["**/*.md", "**/*.mdx"],
93
+ "ignores": [
94
+ // Build artifacts
95
+ "**/node_modules/**",
96
+ "**/dist/**",
97
+ "**/.tsbuild/**",
98
+ "**/coverage/**",
99
+ "**/.next/**",
100
+ "**/.moon/cache/**",
101
+ // Vendored / third-party
102
+ "**/CHANGELOG.md",
103
+ "**/LICENSE.md",
104
+ // Historical records — intentionally frozen in time, not
105
+ // kept current. Specs capture intent at write-time; plans
106
+ // capture execution at write-time. Re-linting them churns
107
+ // their commit history for no benefit.
108
+ "docs/specs/**",
109
+ "docs/plans/**",
110
+ ".superpowers/**",
111
+ // Brainstorming docs — idea exploration, not operational
112
+ "docs/ideas/**",
113
+ // Claude skill files (frozen instruction sets) — SKILL.md content is
114
+ // prose + example snippets that don't fit doc lint rules.
115
+ ".claude/**",
116
+ // Agent working directory — scratch space, not operational docs
117
+ ".agent/**",
118
+ // Archived docs — historical, kept for reference
119
+ "docs/archive/**",
120
+ // ADRs — accepted architectural decisions, frozen once shipped
121
+ "docs/adr/**",
122
+ ],
123
+ }
@@ -0,0 +1,4 @@
1
+ # Repo-local markdownlint ignores — YOURS to edit (seeded once by
2
+ # `stack sync`, never overwritten). gitignore-style patterns.
3
+ # The rule set lives in the sync-managed .markdownlint-cli2.jsonc — never edit
4
+ # that file; add repo-specific ignore paths HERE.
@@ -0,0 +1,17 @@
1
+ $schema: 'https://moonrepo.dev/schemas/tasks.json'
2
+
3
+ # Canon template (seeded once via --with=moon-tasks; repo-owned afterwards).
4
+ # NB moon 2.x: a project OVERRIDING this command must set options.mergeArgs:
5
+ # 'replace' — otherwise moon APPENDS the inherited args (`bun test` + override
6
+ # `bun test src` → `bun test bun test src`).
7
+
8
+ tasks:
9
+ test:
10
+ command: 'bun test'
11
+ inputs:
12
+ - 'src/**/*'
13
+ - 'test/**/*'
14
+ - 'package.json'
15
+ - 'tsconfig.json'
16
+ options:
17
+ cache: true
@@ -0,0 +1,14 @@
1
+ $schema: 'https://moonrepo.dev/schemas/tasks.json'
2
+
3
+ # Canon template (seeded once via --with=moon-tasks; repo-owned afterwards).
4
+ # oxfmt 0.68.0 reads .prettierignore natively — no --ignore-path flag needed.
5
+
6
+ tasks:
7
+ format:
8
+ command: 'oxfmt --check .'
9
+ inputs:
10
+ - '**/*.{ts,tsx,js,jsx,mts,json,md,yml,yaml}'
11
+ - '/.prettierignore'
12
+ - '/.oxfmtrc.jsonc'
13
+ options:
14
+ cache: true
@@ -0,0 +1,34 @@
1
+ $schema: 'https://moonrepo.dev/schemas/tasks.json'
2
+
3
+ # Canon template (seeded once via --with=moon-tasks; repo-owned afterwards).
4
+ # Pair with @alxwlw/oxlint-config presets in the repo root .oxlintrc.json.
5
+
6
+ tasks:
7
+ # Non-mutating check — what CI runs (`moon ci :lint`). `--type-aware` is
8
+ # LOAD-BEARING: without it every typescript/* type-aware rule is SILENTLY
9
+ # skipped (no error, no warning).
10
+ lint:
11
+ command: 'oxlint --type-aware --report-unused-disable-directives --config
12
+ $workspaceRoot/.oxlintrc.json .'
13
+ # Type-aware lint needs the project-reference `.d.ts`: unresolved imports
14
+ # produce `error`-typed values and the no-unsafe-* rules fire phantom hits.
15
+ deps:
16
+ - '~:typecheck'
17
+ inputs:
18
+ - 'src/**/*.{ts,tsx,mts,cts}'
19
+ - '/.oxlintrc.json'
20
+ options:
21
+ cache: true
22
+ # Mutating auto-fix — local only (pre-commit hook). NEVER --fix-suggestions in
23
+ # automation: tsgolint's require-await "suggestion" rewrites public signatures.
24
+ lint-fix:
25
+ command: 'oxlint --type-aware --report-unused-disable-directives --fix --config
26
+ $workspaceRoot/.oxlintrc.json .'
27
+ deps:
28
+ - '~:typecheck'
29
+ inputs:
30
+ - 'src/**/*.{ts,tsx,mts,cts}'
31
+ - '/.oxlintrc.json'
32
+ options:
33
+ cache: false
34
+ runInCI: false
@@ -0,0 +1,15 @@
1
+ $schema: 'https://moonrepo.dev/schemas/tasks.json'
2
+
3
+ # Canon template (seeded once via --with=moon-tasks; repo-owned afterwards).
4
+ # `stack check` reads .stack.jsonc; no git hook is imposed — wire this task
5
+ # into your own pre-commit/CI as you see fit.
6
+
7
+ tasks:
8
+ stack-check:
9
+ command: 'stack check'
10
+ inputs:
11
+ - '.stack.jsonc'
12
+ - '.prototools'
13
+ - 'pnpm-workspace.yaml'
14
+ options:
15
+ cache: false
@@ -0,0 +1,32 @@
1
+ $schema: 'https://moonrepo.dev/schemas/tasks.json'
2
+
3
+ # Canon template (seeded once by `stack sync --with=moon-tasks`; repo-owned
4
+ # afterwards). Pair with @alxwlw/tsconfig/refs|nest presets. Encodes moon 2.x
5
+ # footguns paid for in production — keep the comments.
6
+
7
+ fileGroups:
8
+ sources:
9
+ - 'src/**/*'
10
+
11
+ tasks:
12
+ typecheck:
13
+ command: 'tsc --build'
14
+ # Build dependency projects' declarations first, so a project's referenced
15
+ # `.tsbuild/*.d.ts` already exist when its own `tsc --build` runs.
16
+ deps:
17
+ - '^:typecheck'
18
+ inputs:
19
+ - '@globs(sources)'
20
+ - 'tsconfig.json'
21
+ - '/tsconfig.options.json'
22
+ outputs:
23
+ - '.tsbuild'
24
+ options:
25
+ # `tsc --build` is incremental: an up-to-date project emits nothing, which
26
+ # trips moon's "outputs declared but none created" check. cache stays off
27
+ # so the build always runs in `^:typecheck` order.
28
+ cache: false
29
+ # Serialize every `tsc --build` across the run: sibling leaf projects each
30
+ # rebuild their TRANSITIVE references, and two processes writing the same
31
+ # shared `.tsbuild/*.d.ts` race → intermittent TS6305 on fresh checkouts.
32
+ mutex: 'tsc-solution-build'
@@ -0,0 +1,23 @@
1
+ {
2
+ // Canon style — sync-managed verbatim; never edit in a repo. Repo-local
3
+ // ignore paths go in .prettierignore (create-if-absent, repo-owned):
4
+ // oxfmt 0.68.0 reads .prettierignore natively, no --ignore-path flag needed.
5
+ "useTabs": true,
6
+ "tabWidth": 2,
7
+ "singleQuote": true,
8
+ "semi": true,
9
+ "trailingComma": "all",
10
+ "printWidth": 100,
11
+ "arrowParens": "always",
12
+ "endOfLine": "lf",
13
+
14
+ // Default is `true`, and a repo's first sync would silently re-key every package.json in the
15
+ // tree (the first live acceptance run re-keyed 17 of them in one consumer, whose own pre-canon
16
+ // config had this explicitly off for exactly that reason). A canon adoption should not carry a
17
+ // hidden mass-reorder of product manifests — a repo that wants sorted package.json can opt in.
18
+ "sortPackageJson": false,
19
+
20
+ // TOML belongs to gitleaks and uv, not this formatter: gitleaks-canon.toml's rules are
21
+ // regex literals inside '''...''' blocks, and a formatter has no business rewriting them.
22
+ "ignorePatterns": ["**/*.toml"],
23
+ }
@@ -0,0 +1,6 @@
1
+ // Repo-local oxlint config — YOURS to edit (seeded once by `stack sync`, never overwritten).
2
+ // Other presets: base.jsonc, nest.jsonc, react.jsonc, next.jsonc.
3
+ {
4
+ "$schema": "./node_modules/oxlint/configuration_schema.json",
5
+ "extends": ["./node_modules/@alxwlw/oxlint-config/node.jsonc"]
6
+ }
@@ -0,0 +1 @@
1
+ # Repo-local formatter ignores — YOURS to edit (seeded once by `stack sync`, never overwritten).