@next-friday/create-app 3.0.0 → 4.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 (48) hide show
  1. package/package.json +1 -1
  2. package/templates/base/{.cursor/rules/git-workflow.mdc → .agents/skills/git-workflow/SKILL.md} +2 -2
  3. package/templates/base/{.cursor/rules/script-driven-changes.mdc → .agents/skills/script-driven-changes/SKILL.md} +2 -2
  4. package/templates/base/{.agents/rules/git-workflow.md → .claude/skills/git-workflow/SKILL.md} +5 -0
  5. package/templates/base/{.agents/rules/script-driven-changes.md → .claude/skills/script-driven-changes/SKILL.md} +5 -0
  6. package/templates/base/.cursor/BUGBOT.md +2 -2
  7. package/templates/base/.cursor/skills/git-workflow/SKILL.md +15 -0
  8. package/templates/base/.cursor/skills/script-driven-changes/SKILL.md +12 -0
  9. package/templates/nestjs/.agents/rules.json +23 -9
  10. package/templates/nestjs/.claude/rules/constitution-changes.md +25 -0
  11. package/templates/nestjs/.claude/rules/diagnostics-and-error-handling.md +13 -0
  12. package/templates/nestjs/.claude/rules/structured-logging.md +9 -0
  13. package/templates/{base → nestjs}/.cursor/rules/constitution-changes.mdc +2 -1
  14. package/templates/{base → nestjs}/.cursor/rules/diagnostics-and-error-handling.mdc +2 -1
  15. package/templates/{base → nestjs}/.cursor/rules/structured-logging.mdc +2 -1
  16. package/templates/nextjs/.agents/rules.json +23 -9
  17. package/templates/nextjs/.claude/rules/constitution-changes.md +25 -0
  18. package/templates/nextjs/.claude/rules/diagnostics-and-error-handling.md +15 -0
  19. package/templates/nextjs/.claude/rules/structured-logging.md +11 -0
  20. package/templates/nextjs/.cursor/rules/constitution-changes.mdc +11 -0
  21. package/templates/nextjs/.cursor/rules/diagnostics-and-error-handling.mdc +13 -0
  22. package/templates/nextjs/.cursor/rules/structured-logging.mdc +9 -0
  23. package/templates/nodejs/.agents/rules.json +23 -9
  24. package/templates/nodejs/.claude/rules/constitution-changes.md +25 -0
  25. package/templates/nodejs/.claude/rules/diagnostics-and-error-handling.md +13 -0
  26. package/templates/nodejs/.claude/rules/structured-logging.md +9 -0
  27. package/templates/nodejs/.cursor/rules/constitution-changes.mdc +11 -0
  28. package/templates/nodejs/.cursor/rules/diagnostics-and-error-handling.mdc +13 -0
  29. package/templates/nodejs/.cursor/rules/structured-logging.mdc +9 -0
  30. package/templates/payload/.agents/rules.json +23 -9
  31. package/templates/payload/.claude/rules/constitution-changes.md +25 -0
  32. package/templates/payload/.claude/rules/diagnostics-and-error-handling.md +15 -0
  33. package/templates/payload/.claude/rules/structured-logging.md +11 -0
  34. package/templates/payload/.cursor/rules/constitution-changes.mdc +11 -0
  35. package/templates/payload/.cursor/rules/diagnostics-and-error-handling.mdc +13 -0
  36. package/templates/payload/.cursor/rules/structured-logging.mdc +9 -0
  37. package/templates/turborepo/.agents/rules.json +23 -9
  38. package/templates/turborepo/.claude/rules/constitution-changes.md +25 -0
  39. package/templates/turborepo/.claude/rules/diagnostics-and-error-handling.md +15 -0
  40. package/templates/turborepo/.claude/rules/structured-logging.md +11 -0
  41. package/templates/turborepo/.cursor/rules/constitution-changes.mdc +11 -0
  42. package/templates/turborepo/.cursor/rules/diagnostics-and-error-handling.mdc +13 -0
  43. package/templates/turborepo/.cursor/rules/structured-logging.mdc +9 -0
  44. package/templates/base/.claude/rules/constitution-changes.md +0 -1
  45. package/templates/base/.claude/rules/diagnostics-and-error-handling.md +0 -1
  46. package/templates/base/.claude/rules/git-workflow.md +0 -1
  47. package/templates/base/.claude/rules/script-driven-changes.md +0 -1
  48. package/templates/base/.claude/rules/structured-logging.md +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next-friday/create-app",
3
- "version": "3.0.0",
3
+ "version": "4.0.0",
4
4
  "description": "Create a Next Friday project from a template.",
5
5
  "keywords": [
6
6
  "create",
@@ -1,6 +1,6 @@
1
1
  ---
2
- description: "Git workflow: trunk-based branches, commits, and pull requests"
3
- alwaysApply: true
2
+ name: git-workflow
3
+ description: Trunk-based branches, commits, and pull requests. Use when creating a branch, committing, pushing, or opening, updating, or merging a pull request.
4
4
  ---
5
5
 
6
6
  # Git Workflow
@@ -1,6 +1,6 @@
1
1
  ---
2
- description: "Scripts: apply a repeated edit across many files with a script"
3
- alwaysApply: true
2
+ name: script-driven-changes
3
+ description: Change many files with a script, not by hand. Use when a change repeats one pattern across more than a few files, or needs a one-off script.
4
4
  ---
5
5
 
6
6
  # Scripts
@@ -1,3 +1,8 @@
1
+ ---
2
+ name: git-workflow
3
+ description: Trunk-based branches, commits, and pull requests. Use when creating a branch, committing, pushing, or opening, updating, or merging a pull request.
4
+ ---
5
+
1
6
  # Git Workflow
2
7
 
3
8
  The repository uses trunk-based development.
@@ -1,3 +1,8 @@
1
+ ---
2
+ name: script-driven-changes
3
+ description: Change many files with a script, not by hand. Use when a change repeats one pattern across more than a few files, or needs a one-off script.
4
+ ---
5
+
1
6
  # Scripts
2
7
 
3
8
  When a change repeats one pattern across more than a few files, run a script. Derive facts from the toolchain (TypeScript compiler API, `git`), not by reading files by eye. Edit by hand when the change needs judgment in one place.
@@ -16,10 +16,10 @@ Review pull requests against the project's agent guide and rules:
16
16
  - [Test Admission](../.agents/rules/deterministic-testing.md)
17
17
  - [Diagnostics](../.agents/rules/diagnostics-and-error-handling.md)
18
18
  - [Evidence](../.agents/rules/evidence-before-claims.md)
19
- - [Git Workflow](../.agents/rules/git-workflow.md)
19
+ - [Git Workflow](../.agents/skills/git-workflow/SKILL.md)
20
20
  - [Findings](../.agents/rules/no-suppression.md)
21
21
  - [Platform and Library First](../.agents/rules/platform-and-library-first.md)
22
- - [Scripts](../.agents/rules/script-driven-changes.md)
22
+ - [Scripts](../.agents/skills/script-driven-changes/SKILL.md)
23
23
  - [Sibling Style](../.agents/rules/single-author-style.md)
24
24
  - [Logging](../.agents/rules/structured-logging.md)
25
25
  - [TypeScript-First](../.agents/rules/typescript-first.md)
@@ -0,0 +1,15 @@
1
+ ---
2
+ name: git-workflow
3
+ description: Trunk-based branches, commits, and pull requests. Use when creating a branch, committing, pushing, or opening, updating, or merging a pull request.
4
+ ---
5
+
6
+ # Git Workflow
7
+
8
+ The repository uses trunk-based development.
9
+
10
+ - Branch from the latest `origin/main`, in a worktree or a new branch named `<type>/<short-description>`. `main` is the only long-lived branch. The Git hooks block commits and pushes on it, except the first commit and push that create `main` in a new repository.
11
+ - Write commit messages in the format that `@next-friday/commitlint-config-friday` defines. The `commit-msg` hook rejects anything else.
12
+ - When work ends in a pull request, push its branch and open the pull request ready for review without asking. CI skips drafts. Work that does not end in one, such as an investigation or a prototype, opens none.
13
+ - Fill the pull request body from `.github/pull_request_template.md`.
14
+ - After you open a pull request, report its URL and continue. Drive it to merge-ready only when the user asks, and watch the checks with `gh pr checks --watch`. Merge only when the user asks to merge, land, or ship. Merge with `--squash`, bottom-up for a stack.
15
+ - Rebase and `git push --force-with-lease` only branches you own.
@@ -0,0 +1,12 @@
1
+ ---
2
+ name: script-driven-changes
3
+ description: Change many files with a script, not by hand. Use when a change repeats one pattern across more than a few files, or needs a one-off script.
4
+ ---
5
+
6
+ # Scripts
7
+
8
+ When a change repeats one pattern across more than a few files, run a script. Derive facts from the toolchain (TypeScript compiler API, `git`), not by reading files by eye. Edit by hand when the change needs judgment in one place.
9
+
10
+ Commit a script when a reviewer needs to rerun it or when the work outlives the session, and add it as a `package.json` script so knip counts it as an entry. Keep any other one-off script in a temporary directory outside the repository, and remove a committed script when its workflow ends. Fail on unmapped input. Back up before a destructive run.
11
+
12
+ Print summaries: counts, first errors. Verify what owned checks omit, such as the running app.
@@ -12,7 +12,25 @@
12
12
  "description": "Codebase hygiene: modify existing code instead of accumulating new code"
13
13
  },
14
14
  "constitution-changes": {
15
- "description": "Constitution changes: change rules, hooks, and agent settings only through a dedicated issue"
15
+ "description": "Constitution changes: change rules, hooks, and agent settings only through a dedicated issue",
16
+ "globs": [
17
+ ".agents/rules/**",
18
+ ".agents/rules.json",
19
+ ".agents/hooks/**",
20
+ ".claude/settings.json",
21
+ ".claude/rules/**",
22
+ ".cursor/rules/**",
23
+ ".cursor/hooks/**",
24
+ ".cursor/hooks.json",
25
+ "scripts/sync-agent-rules.ts",
26
+ "scripts/check-agent-gates.ts",
27
+ ".husky/**",
28
+ ".commitlintrc.json",
29
+ ".prettierrc.json",
30
+ "eslint.config.ts",
31
+ ".lintstagedrc.json",
32
+ ".gitleaks.toml"
33
+ ]
16
34
  },
17
35
  "current-state-authority": {
18
36
  "description": "Current state: implement from user requirements and the working tree"
@@ -32,28 +50,24 @@
32
50
  "globs": ["**/*.test.ts"]
33
51
  },
34
52
  "diagnostics-and-error-handling": {
35
- "description": "Diagnostics: fix runtime failures at the source and keep the root cause"
53
+ "description": "Diagnostics: fix runtime failures at the source and keep the root cause",
54
+ "globs": ["**/*.ts", "**/*.js"]
36
55
  },
37
56
  "evidence-before-claims": {
38
57
  "description": "Evidence: verify and cite a claim before stating or writing it"
39
58
  },
40
- "git-workflow": {
41
- "description": "Git workflow: trunk-based branches, commits, and pull requests"
42
- },
43
59
  "no-suppression": {
44
60
  "description": "Findings: fix scanner and linter reports without inline suppressions"
45
61
  },
46
62
  "platform-and-library-first": {
47
63
  "description": "Platform and library first: use built-in features, then maintained libraries, then custom code"
48
64
  },
49
- "script-driven-changes": {
50
- "description": "Scripts: apply a repeated edit across many files with a script"
51
- },
52
65
  "single-author-style": {
53
66
  "description": "Sibling style: match layout, naming, and composition in the same project"
54
67
  },
55
68
  "structured-logging": {
56
- "description": "Logging: log through a logging library in structured, durable records"
69
+ "description": "Logging: log through a logging library in structured, durable records",
70
+ "globs": ["**/*.ts", "**/*.js"]
57
71
  },
58
72
  "typescript-first": {
59
73
  "description": "TypeScript-first: write source, tests, and scripts as .ts",
@@ -0,0 +1,25 @@
1
+ ---
2
+ paths:
3
+ - ".agents/rules/**"
4
+ - ".agents/rules.json"
5
+ - ".agents/hooks/**"
6
+ - ".claude/settings.json"
7
+ - ".claude/rules/**"
8
+ - ".cursor/rules/**"
9
+ - ".cursor/hooks/**"
10
+ - ".cursor/hooks.json"
11
+ - "scripts/sync-agent-rules.ts"
12
+ - "scripts/check-agent-gates.ts"
13
+ - ".husky/**"
14
+ - ".commitlintrc.json"
15
+ - ".prettierrc.json"
16
+ - "eslint.config.ts"
17
+ - ".lintstagedrc.json"
18
+ - ".gitleaks.toml"
19
+ ---
20
+
21
+ # Constitution Changes
22
+
23
+ The constitution is the set of files that agent settings deny to agents: rules, hooks, lint, format, and commit configuration, and the agent settings themselves. It is company policy.
24
+
25
+ A developer changes the constitution through a dedicated issue, never inside a feature pull request. When a task needs a constitution change, propose it to the user, reference that issue, and wait for it to merge before the task depends on it.
@@ -0,0 +1,13 @@
1
+ ---
2
+ paths:
3
+ - "**/*.ts"
4
+ - "**/*.js"
5
+ ---
6
+
7
+ # Diagnostics
8
+
9
+ Resolve runtime failures at the source with the language's standard narrowing, validation, and error types. For missing third-party types, take upstream definitions or a narrow adapter in the established location.
10
+
11
+ Surface errors at the caller or process boundary with diagnostic context. Handle an error to add context, recover, or translate it at an application boundary. Retain the root cause through the language's exception mechanism.
12
+
13
+ Report unresolved type, declaration, or rule conflicts to the user. Findings follow `no-suppression.md`.
@@ -0,0 +1,9 @@
1
+ ---
2
+ paths:
3
+ - "**/*.ts"
4
+ - "**/*.js"
5
+ ---
6
+
7
+ # Logging
8
+
9
+ Application code logs through the stack's logging library or the framework's logger, never `console.*`. Write structured records, and send them to a store that keeps them longer than the host does.
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  description: "Constitution changes: change rules, hooks, and agent settings only through a dedicated issue"
3
- alwaysApply: true
3
+ globs: ".agents/rules/**,.agents/rules.json,.agents/hooks/**,.claude/settings.json,.claude/rules/**,.cursor/rules/**,.cursor/hooks/**,.cursor/hooks.json,scripts/sync-agent-rules.ts,scripts/check-agent-gates.ts,.husky/**,.commitlintrc.json,.prettierrc.json,eslint.config.ts,.lintstagedrc.json,.gitleaks.toml"
4
+ alwaysApply: false
4
5
  ---
5
6
 
6
7
  # Constitution Changes
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  description: "Diagnostics: fix runtime failures at the source and keep the root cause"
3
- alwaysApply: true
3
+ globs: "**/*.ts,**/*.js"
4
+ alwaysApply: false
4
5
  ---
5
6
 
6
7
  # Diagnostics
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  description: "Logging: log through a logging library in structured, durable records"
3
- alwaysApply: true
3
+ globs: "**/*.ts,**/*.js"
4
+ alwaysApply: false
4
5
  ---
5
6
 
6
7
  # Logging
@@ -12,7 +12,25 @@
12
12
  "description": "Codebase hygiene: modify existing code instead of accumulating new code"
13
13
  },
14
14
  "constitution-changes": {
15
- "description": "Constitution changes: change rules, hooks, and agent settings only through a dedicated issue"
15
+ "description": "Constitution changes: change rules, hooks, and agent settings only through a dedicated issue",
16
+ "globs": [
17
+ ".agents/rules/**",
18
+ ".agents/rules.json",
19
+ ".agents/hooks/**",
20
+ ".claude/settings.json",
21
+ ".claude/rules/**",
22
+ ".cursor/rules/**",
23
+ ".cursor/hooks/**",
24
+ ".cursor/hooks.json",
25
+ "scripts/sync-agent-rules.ts",
26
+ "scripts/check-agent-gates.ts",
27
+ ".husky/**",
28
+ ".commitlintrc.json",
29
+ "prettier.config.ts",
30
+ "eslint.config.ts",
31
+ ".lintstagedrc.json",
32
+ ".gitleaks.toml"
33
+ ]
16
34
  },
17
35
  "current-state-authority": {
18
36
  "description": "Current state: implement from user requirements and the working tree"
@@ -32,28 +50,24 @@
32
50
  "globs": ["**/*.test.ts", "**/*.test.tsx"]
33
51
  },
34
52
  "diagnostics-and-error-handling": {
35
- "description": "Diagnostics: fix runtime failures at the source and keep the root cause"
53
+ "description": "Diagnostics: fix runtime failures at the source and keep the root cause",
54
+ "globs": ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx"]
36
55
  },
37
56
  "evidence-before-claims": {
38
57
  "description": "Evidence: verify and cite a claim before stating or writing it"
39
58
  },
40
- "git-workflow": {
41
- "description": "Git workflow: trunk-based branches, commits, and pull requests"
42
- },
43
59
  "no-suppression": {
44
60
  "description": "Findings: fix scanner and linter reports without inline suppressions"
45
61
  },
46
62
  "platform-and-library-first": {
47
63
  "description": "Platform and library first: use built-in features, then maintained libraries, then custom code"
48
64
  },
49
- "script-driven-changes": {
50
- "description": "Scripts: apply a repeated edit across many files with a script"
51
- },
52
65
  "single-author-style": {
53
66
  "description": "Sibling style: match layout, naming, and composition in the same project"
54
67
  },
55
68
  "structured-logging": {
56
- "description": "Logging: log through a logging library in structured, durable records"
69
+ "description": "Logging: log through a logging library in structured, durable records",
70
+ "globs": ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx"]
57
71
  },
58
72
  "typescript-first": {
59
73
  "description": "TypeScript-first: write source, tests, and scripts as .ts or .tsx",
@@ -0,0 +1,25 @@
1
+ ---
2
+ paths:
3
+ - ".agents/rules/**"
4
+ - ".agents/rules.json"
5
+ - ".agents/hooks/**"
6
+ - ".claude/settings.json"
7
+ - ".claude/rules/**"
8
+ - ".cursor/rules/**"
9
+ - ".cursor/hooks/**"
10
+ - ".cursor/hooks.json"
11
+ - "scripts/sync-agent-rules.ts"
12
+ - "scripts/check-agent-gates.ts"
13
+ - ".husky/**"
14
+ - ".commitlintrc.json"
15
+ - "prettier.config.ts"
16
+ - "eslint.config.ts"
17
+ - ".lintstagedrc.json"
18
+ - ".gitleaks.toml"
19
+ ---
20
+
21
+ # Constitution Changes
22
+
23
+ The constitution is the set of files that agent settings deny to agents: rules, hooks, lint, format, and commit configuration, and the agent settings themselves. It is company policy.
24
+
25
+ A developer changes the constitution through a dedicated issue, never inside a feature pull request. When a task needs a constitution change, propose it to the user, reference that issue, and wait for it to merge before the task depends on it.
@@ -0,0 +1,15 @@
1
+ ---
2
+ paths:
3
+ - "**/*.ts"
4
+ - "**/*.tsx"
5
+ - "**/*.js"
6
+ - "**/*.jsx"
7
+ ---
8
+
9
+ # Diagnostics
10
+
11
+ Resolve runtime failures at the source with the language's standard narrowing, validation, and error types. For missing third-party types, take upstream definitions or a narrow adapter in the established location.
12
+
13
+ Surface errors at the caller or process boundary with diagnostic context. Handle an error to add context, recover, or translate it at an application boundary. Retain the root cause through the language's exception mechanism.
14
+
15
+ Report unresolved type, declaration, or rule conflicts to the user. Findings follow `no-suppression.md`.
@@ -0,0 +1,11 @@
1
+ ---
2
+ paths:
3
+ - "**/*.ts"
4
+ - "**/*.tsx"
5
+ - "**/*.js"
6
+ - "**/*.jsx"
7
+ ---
8
+
9
+ # Logging
10
+
11
+ Application code logs through the stack's logging library or the framework's logger, never `console.*`. Write structured records, and send them to a store that keeps them longer than the host does.
@@ -0,0 +1,11 @@
1
+ ---
2
+ description: "Constitution changes: change rules, hooks, and agent settings only through a dedicated issue"
3
+ globs: ".agents/rules/**,.agents/rules.json,.agents/hooks/**,.claude/settings.json,.claude/rules/**,.cursor/rules/**,.cursor/hooks/**,.cursor/hooks.json,scripts/sync-agent-rules.ts,scripts/check-agent-gates.ts,.husky/**,.commitlintrc.json,prettier.config.ts,eslint.config.ts,.lintstagedrc.json,.gitleaks.toml"
4
+ alwaysApply: false
5
+ ---
6
+
7
+ # Constitution Changes
8
+
9
+ The constitution is the set of files that agent settings deny to agents: rules, hooks, lint, format, and commit configuration, and the agent settings themselves. It is company policy.
10
+
11
+ A developer changes the constitution through a dedicated issue, never inside a feature pull request. When a task needs a constitution change, propose it to the user, reference that issue, and wait for it to merge before the task depends on it.
@@ -0,0 +1,13 @@
1
+ ---
2
+ description: "Diagnostics: fix runtime failures at the source and keep the root cause"
3
+ globs: "**/*.ts,**/*.tsx,**/*.js,**/*.jsx"
4
+ alwaysApply: false
5
+ ---
6
+
7
+ # Diagnostics
8
+
9
+ Resolve runtime failures at the source with the language's standard narrowing, validation, and error types. For missing third-party types, take upstream definitions or a narrow adapter in the established location.
10
+
11
+ Surface errors at the caller or process boundary with diagnostic context. Handle an error to add context, recover, or translate it at an application boundary. Retain the root cause through the language's exception mechanism.
12
+
13
+ Report unresolved type, declaration, or rule conflicts to the user. Findings follow `no-suppression.md`.
@@ -0,0 +1,9 @@
1
+ ---
2
+ description: "Logging: log through a logging library in structured, durable records"
3
+ globs: "**/*.ts,**/*.tsx,**/*.js,**/*.jsx"
4
+ alwaysApply: false
5
+ ---
6
+
7
+ # Logging
8
+
9
+ Application code logs through the stack's logging library or the framework's logger, never `console.*`. Write structured records, and send them to a store that keeps them longer than the host does.
@@ -12,7 +12,25 @@
12
12
  "description": "Codebase hygiene: modify existing code instead of accumulating new code"
13
13
  },
14
14
  "constitution-changes": {
15
- "description": "Constitution changes: change rules, hooks, and agent settings only through a dedicated issue"
15
+ "description": "Constitution changes: change rules, hooks, and agent settings only through a dedicated issue",
16
+ "globs": [
17
+ ".agents/rules/**",
18
+ ".agents/rules.json",
19
+ ".agents/hooks/**",
20
+ ".claude/settings.json",
21
+ ".claude/rules/**",
22
+ ".cursor/rules/**",
23
+ ".cursor/hooks/**",
24
+ ".cursor/hooks.json",
25
+ "scripts/sync-agent-rules.ts",
26
+ "scripts/check-agent-gates.ts",
27
+ ".husky/**",
28
+ ".commitlintrc.json",
29
+ ".prettierrc.json",
30
+ "eslint.config.ts",
31
+ ".lintstagedrc.json",
32
+ ".gitleaks.toml"
33
+ ]
16
34
  },
17
35
  "current-state-authority": {
18
36
  "description": "Current state: implement from user requirements and the working tree"
@@ -32,28 +50,24 @@
32
50
  "globs": ["**/*.test.ts"]
33
51
  },
34
52
  "diagnostics-and-error-handling": {
35
- "description": "Diagnostics: fix runtime failures at the source and keep the root cause"
53
+ "description": "Diagnostics: fix runtime failures at the source and keep the root cause",
54
+ "globs": ["**/*.ts", "**/*.js"]
36
55
  },
37
56
  "evidence-before-claims": {
38
57
  "description": "Evidence: verify and cite a claim before stating or writing it"
39
58
  },
40
- "git-workflow": {
41
- "description": "Git workflow: trunk-based branches, commits, and pull requests"
42
- },
43
59
  "no-suppression": {
44
60
  "description": "Findings: fix scanner and linter reports without inline suppressions"
45
61
  },
46
62
  "platform-and-library-first": {
47
63
  "description": "Platform and library first: use built-in features, then maintained libraries, then custom code"
48
64
  },
49
- "script-driven-changes": {
50
- "description": "Scripts: apply a repeated edit across many files with a script"
51
- },
52
65
  "single-author-style": {
53
66
  "description": "Sibling style: match layout, naming, and composition in the same project"
54
67
  },
55
68
  "structured-logging": {
56
- "description": "Logging: log through a logging library in structured, durable records"
69
+ "description": "Logging: log through a logging library in structured, durable records",
70
+ "globs": ["**/*.ts", "**/*.js"]
57
71
  },
58
72
  "typescript-first": {
59
73
  "description": "TypeScript-first: write source, tests, and scripts as .ts",
@@ -0,0 +1,25 @@
1
+ ---
2
+ paths:
3
+ - ".agents/rules/**"
4
+ - ".agents/rules.json"
5
+ - ".agents/hooks/**"
6
+ - ".claude/settings.json"
7
+ - ".claude/rules/**"
8
+ - ".cursor/rules/**"
9
+ - ".cursor/hooks/**"
10
+ - ".cursor/hooks.json"
11
+ - "scripts/sync-agent-rules.ts"
12
+ - "scripts/check-agent-gates.ts"
13
+ - ".husky/**"
14
+ - ".commitlintrc.json"
15
+ - ".prettierrc.json"
16
+ - "eslint.config.ts"
17
+ - ".lintstagedrc.json"
18
+ - ".gitleaks.toml"
19
+ ---
20
+
21
+ # Constitution Changes
22
+
23
+ The constitution is the set of files that agent settings deny to agents: rules, hooks, lint, format, and commit configuration, and the agent settings themselves. It is company policy.
24
+
25
+ A developer changes the constitution through a dedicated issue, never inside a feature pull request. When a task needs a constitution change, propose it to the user, reference that issue, and wait for it to merge before the task depends on it.
@@ -0,0 +1,13 @@
1
+ ---
2
+ paths:
3
+ - "**/*.ts"
4
+ - "**/*.js"
5
+ ---
6
+
7
+ # Diagnostics
8
+
9
+ Resolve runtime failures at the source with the language's standard narrowing, validation, and error types. For missing third-party types, take upstream definitions or a narrow adapter in the established location.
10
+
11
+ Surface errors at the caller or process boundary with diagnostic context. Handle an error to add context, recover, or translate it at an application boundary. Retain the root cause through the language's exception mechanism.
12
+
13
+ Report unresolved type, declaration, or rule conflicts to the user. Findings follow `no-suppression.md`.
@@ -0,0 +1,9 @@
1
+ ---
2
+ paths:
3
+ - "**/*.ts"
4
+ - "**/*.js"
5
+ ---
6
+
7
+ # Logging
8
+
9
+ Application code logs through the stack's logging library or the framework's logger, never `console.*`. Write structured records, and send them to a store that keeps them longer than the host does.
@@ -0,0 +1,11 @@
1
+ ---
2
+ description: "Constitution changes: change rules, hooks, and agent settings only through a dedicated issue"
3
+ globs: ".agents/rules/**,.agents/rules.json,.agents/hooks/**,.claude/settings.json,.claude/rules/**,.cursor/rules/**,.cursor/hooks/**,.cursor/hooks.json,scripts/sync-agent-rules.ts,scripts/check-agent-gates.ts,.husky/**,.commitlintrc.json,.prettierrc.json,eslint.config.ts,.lintstagedrc.json,.gitleaks.toml"
4
+ alwaysApply: false
5
+ ---
6
+
7
+ # Constitution Changes
8
+
9
+ The constitution is the set of files that agent settings deny to agents: rules, hooks, lint, format, and commit configuration, and the agent settings themselves. It is company policy.
10
+
11
+ A developer changes the constitution through a dedicated issue, never inside a feature pull request. When a task needs a constitution change, propose it to the user, reference that issue, and wait for it to merge before the task depends on it.
@@ -0,0 +1,13 @@
1
+ ---
2
+ description: "Diagnostics: fix runtime failures at the source and keep the root cause"
3
+ globs: "**/*.ts,**/*.js"
4
+ alwaysApply: false
5
+ ---
6
+
7
+ # Diagnostics
8
+
9
+ Resolve runtime failures at the source with the language's standard narrowing, validation, and error types. For missing third-party types, take upstream definitions or a narrow adapter in the established location.
10
+
11
+ Surface errors at the caller or process boundary with diagnostic context. Handle an error to add context, recover, or translate it at an application boundary. Retain the root cause through the language's exception mechanism.
12
+
13
+ Report unresolved type, declaration, or rule conflicts to the user. Findings follow `no-suppression.md`.
@@ -0,0 +1,9 @@
1
+ ---
2
+ description: "Logging: log through a logging library in structured, durable records"
3
+ globs: "**/*.ts,**/*.js"
4
+ alwaysApply: false
5
+ ---
6
+
7
+ # Logging
8
+
9
+ Application code logs through the stack's logging library or the framework's logger, never `console.*`. Write structured records, and send them to a store that keeps them longer than the host does.
@@ -12,7 +12,25 @@
12
12
  "description": "Codebase hygiene: modify existing code instead of accumulating new code"
13
13
  },
14
14
  "constitution-changes": {
15
- "description": "Constitution changes: change rules, hooks, and agent settings only through a dedicated issue"
15
+ "description": "Constitution changes: change rules, hooks, and agent settings only through a dedicated issue",
16
+ "globs": [
17
+ ".agents/rules/**",
18
+ ".agents/rules.json",
19
+ ".agents/hooks/**",
20
+ ".claude/settings.json",
21
+ ".claude/rules/**",
22
+ ".cursor/rules/**",
23
+ ".cursor/hooks/**",
24
+ ".cursor/hooks.json",
25
+ "scripts/sync-agent-rules.ts",
26
+ "scripts/check-agent-gates.ts",
27
+ ".husky/**",
28
+ ".commitlintrc.json",
29
+ ".prettierrc.json",
30
+ "eslint.config.ts",
31
+ ".lintstagedrc.json",
32
+ ".gitleaks.toml"
33
+ ]
16
34
  },
17
35
  "current-state-authority": {
18
36
  "description": "Current state: implement from user requirements and the working tree"
@@ -32,28 +50,24 @@
32
50
  "globs": ["**/*.test.ts", "**/*.test.tsx"]
33
51
  },
34
52
  "diagnostics-and-error-handling": {
35
- "description": "Diagnostics: fix runtime failures at the source and keep the root cause"
53
+ "description": "Diagnostics: fix runtime failures at the source and keep the root cause",
54
+ "globs": ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx"]
36
55
  },
37
56
  "evidence-before-claims": {
38
57
  "description": "Evidence: verify and cite a claim before stating or writing it"
39
58
  },
40
- "git-workflow": {
41
- "description": "Git workflow: trunk-based branches, commits, and pull requests"
42
- },
43
59
  "no-suppression": {
44
60
  "description": "Findings: fix scanner and linter reports without inline suppressions"
45
61
  },
46
62
  "platform-and-library-first": {
47
63
  "description": "Platform and library first: use built-in features, then maintained libraries, then custom code"
48
64
  },
49
- "script-driven-changes": {
50
- "description": "Scripts: apply a repeated edit across many files with a script"
51
- },
52
65
  "single-author-style": {
53
66
  "description": "Sibling style: match layout, naming, and composition in the same project"
54
67
  },
55
68
  "structured-logging": {
56
- "description": "Logging: log through a logging library in structured, durable records"
69
+ "description": "Logging: log through a logging library in structured, durable records",
70
+ "globs": ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx"]
57
71
  },
58
72
  "typescript-first": {
59
73
  "description": "TypeScript-first: write source, tests, and scripts as .ts or .tsx",
@@ -0,0 +1,25 @@
1
+ ---
2
+ paths:
3
+ - ".agents/rules/**"
4
+ - ".agents/rules.json"
5
+ - ".agents/hooks/**"
6
+ - ".claude/settings.json"
7
+ - ".claude/rules/**"
8
+ - ".cursor/rules/**"
9
+ - ".cursor/hooks/**"
10
+ - ".cursor/hooks.json"
11
+ - "scripts/sync-agent-rules.ts"
12
+ - "scripts/check-agent-gates.ts"
13
+ - ".husky/**"
14
+ - ".commitlintrc.json"
15
+ - ".prettierrc.json"
16
+ - "eslint.config.ts"
17
+ - ".lintstagedrc.json"
18
+ - ".gitleaks.toml"
19
+ ---
20
+
21
+ # Constitution Changes
22
+
23
+ The constitution is the set of files that agent settings deny to agents: rules, hooks, lint, format, and commit configuration, and the agent settings themselves. It is company policy.
24
+
25
+ A developer changes the constitution through a dedicated issue, never inside a feature pull request. When a task needs a constitution change, propose it to the user, reference that issue, and wait for it to merge before the task depends on it.
@@ -0,0 +1,15 @@
1
+ ---
2
+ paths:
3
+ - "**/*.ts"
4
+ - "**/*.tsx"
5
+ - "**/*.js"
6
+ - "**/*.jsx"
7
+ ---
8
+
9
+ # Diagnostics
10
+
11
+ Resolve runtime failures at the source with the language's standard narrowing, validation, and error types. For missing third-party types, take upstream definitions or a narrow adapter in the established location.
12
+
13
+ Surface errors at the caller or process boundary with diagnostic context. Handle an error to add context, recover, or translate it at an application boundary. Retain the root cause through the language's exception mechanism.
14
+
15
+ Report unresolved type, declaration, or rule conflicts to the user. Findings follow `no-suppression.md`.
@@ -0,0 +1,11 @@
1
+ ---
2
+ paths:
3
+ - "**/*.ts"
4
+ - "**/*.tsx"
5
+ - "**/*.js"
6
+ - "**/*.jsx"
7
+ ---
8
+
9
+ # Logging
10
+
11
+ Application code logs through the stack's logging library or the framework's logger, never `console.*`. Write structured records, and send them to a store that keeps them longer than the host does.
@@ -0,0 +1,11 @@
1
+ ---
2
+ description: "Constitution changes: change rules, hooks, and agent settings only through a dedicated issue"
3
+ globs: ".agents/rules/**,.agents/rules.json,.agents/hooks/**,.claude/settings.json,.claude/rules/**,.cursor/rules/**,.cursor/hooks/**,.cursor/hooks.json,scripts/sync-agent-rules.ts,scripts/check-agent-gates.ts,.husky/**,.commitlintrc.json,.prettierrc.json,eslint.config.ts,.lintstagedrc.json,.gitleaks.toml"
4
+ alwaysApply: false
5
+ ---
6
+
7
+ # Constitution Changes
8
+
9
+ The constitution is the set of files that agent settings deny to agents: rules, hooks, lint, format, and commit configuration, and the agent settings themselves. It is company policy.
10
+
11
+ A developer changes the constitution through a dedicated issue, never inside a feature pull request. When a task needs a constitution change, propose it to the user, reference that issue, and wait for it to merge before the task depends on it.
@@ -0,0 +1,13 @@
1
+ ---
2
+ description: "Diagnostics: fix runtime failures at the source and keep the root cause"
3
+ globs: "**/*.ts,**/*.tsx,**/*.js,**/*.jsx"
4
+ alwaysApply: false
5
+ ---
6
+
7
+ # Diagnostics
8
+
9
+ Resolve runtime failures at the source with the language's standard narrowing, validation, and error types. For missing third-party types, take upstream definitions or a narrow adapter in the established location.
10
+
11
+ Surface errors at the caller or process boundary with diagnostic context. Handle an error to add context, recover, or translate it at an application boundary. Retain the root cause through the language's exception mechanism.
12
+
13
+ Report unresolved type, declaration, or rule conflicts to the user. Findings follow `no-suppression.md`.
@@ -0,0 +1,9 @@
1
+ ---
2
+ description: "Logging: log through a logging library in structured, durable records"
3
+ globs: "**/*.ts,**/*.tsx,**/*.js,**/*.jsx"
4
+ alwaysApply: false
5
+ ---
6
+
7
+ # Logging
8
+
9
+ Application code logs through the stack's logging library or the framework's logger, never `console.*`. Write structured records, and send them to a store that keeps them longer than the host does.
@@ -12,7 +12,25 @@
12
12
  "description": "Codebase hygiene: modify existing code instead of accumulating new code"
13
13
  },
14
14
  "constitution-changes": {
15
- "description": "Constitution changes: change rules, hooks, and agent settings only through a dedicated issue"
15
+ "description": "Constitution changes: change rules, hooks, and agent settings only through a dedicated issue",
16
+ "globs": [
17
+ ".agents/rules/**",
18
+ ".agents/rules.json",
19
+ ".agents/hooks/**",
20
+ ".claude/settings.json",
21
+ ".claude/rules/**",
22
+ ".cursor/rules/**",
23
+ ".cursor/hooks/**",
24
+ ".cursor/hooks.json",
25
+ "scripts/sync-agent-rules.ts",
26
+ "scripts/check-agent-gates.ts",
27
+ ".husky/**",
28
+ ".commitlintrc.json",
29
+ "prettier.config.ts",
30
+ "eslint.config.ts",
31
+ ".lintstagedrc.json",
32
+ ".gitleaks.toml"
33
+ ]
16
34
  },
17
35
  "current-state-authority": {
18
36
  "description": "Current state: implement from user requirements and the working tree"
@@ -32,28 +50,24 @@
32
50
  "globs": ["**/*.test.ts", "**/*.test.tsx"]
33
51
  },
34
52
  "diagnostics-and-error-handling": {
35
- "description": "Diagnostics: fix runtime failures at the source and keep the root cause"
53
+ "description": "Diagnostics: fix runtime failures at the source and keep the root cause",
54
+ "globs": ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx"]
36
55
  },
37
56
  "evidence-before-claims": {
38
57
  "description": "Evidence: verify and cite a claim before stating or writing it"
39
58
  },
40
- "git-workflow": {
41
- "description": "Git workflow: trunk-based branches, commits, and pull requests"
42
- },
43
59
  "no-suppression": {
44
60
  "description": "Findings: fix scanner and linter reports without inline suppressions"
45
61
  },
46
62
  "platform-and-library-first": {
47
63
  "description": "Platform and library first: use built-in features, then maintained libraries, then custom code"
48
64
  },
49
- "script-driven-changes": {
50
- "description": "Scripts: apply a repeated edit across many files with a script"
51
- },
52
65
  "single-author-style": {
53
66
  "description": "Sibling style: match layout, naming, and composition in the same project"
54
67
  },
55
68
  "structured-logging": {
56
- "description": "Logging: log through a logging library in structured, durable records"
69
+ "description": "Logging: log through a logging library in structured, durable records",
70
+ "globs": ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx"]
57
71
  },
58
72
  "typescript-first": {
59
73
  "description": "TypeScript-first: write source, tests, and scripts as .ts or .tsx",
@@ -0,0 +1,25 @@
1
+ ---
2
+ paths:
3
+ - ".agents/rules/**"
4
+ - ".agents/rules.json"
5
+ - ".agents/hooks/**"
6
+ - ".claude/settings.json"
7
+ - ".claude/rules/**"
8
+ - ".cursor/rules/**"
9
+ - ".cursor/hooks/**"
10
+ - ".cursor/hooks.json"
11
+ - "scripts/sync-agent-rules.ts"
12
+ - "scripts/check-agent-gates.ts"
13
+ - ".husky/**"
14
+ - ".commitlintrc.json"
15
+ - "prettier.config.ts"
16
+ - "eslint.config.ts"
17
+ - ".lintstagedrc.json"
18
+ - ".gitleaks.toml"
19
+ ---
20
+
21
+ # Constitution Changes
22
+
23
+ The constitution is the set of files that agent settings deny to agents: rules, hooks, lint, format, and commit configuration, and the agent settings themselves. It is company policy.
24
+
25
+ A developer changes the constitution through a dedicated issue, never inside a feature pull request. When a task needs a constitution change, propose it to the user, reference that issue, and wait for it to merge before the task depends on it.
@@ -0,0 +1,15 @@
1
+ ---
2
+ paths:
3
+ - "**/*.ts"
4
+ - "**/*.tsx"
5
+ - "**/*.js"
6
+ - "**/*.jsx"
7
+ ---
8
+
9
+ # Diagnostics
10
+
11
+ Resolve runtime failures at the source with the language's standard narrowing, validation, and error types. For missing third-party types, take upstream definitions or a narrow adapter in the established location.
12
+
13
+ Surface errors at the caller or process boundary with diagnostic context. Handle an error to add context, recover, or translate it at an application boundary. Retain the root cause through the language's exception mechanism.
14
+
15
+ Report unresolved type, declaration, or rule conflicts to the user. Findings follow `no-suppression.md`.
@@ -0,0 +1,11 @@
1
+ ---
2
+ paths:
3
+ - "**/*.ts"
4
+ - "**/*.tsx"
5
+ - "**/*.js"
6
+ - "**/*.jsx"
7
+ ---
8
+
9
+ # Logging
10
+
11
+ Application code logs through the stack's logging library or the framework's logger, never `console.*`. Write structured records, and send them to a store that keeps them longer than the host does.
@@ -0,0 +1,11 @@
1
+ ---
2
+ description: "Constitution changes: change rules, hooks, and agent settings only through a dedicated issue"
3
+ globs: ".agents/rules/**,.agents/rules.json,.agents/hooks/**,.claude/settings.json,.claude/rules/**,.cursor/rules/**,.cursor/hooks/**,.cursor/hooks.json,scripts/sync-agent-rules.ts,scripts/check-agent-gates.ts,.husky/**,.commitlintrc.json,prettier.config.ts,eslint.config.ts,.lintstagedrc.json,.gitleaks.toml"
4
+ alwaysApply: false
5
+ ---
6
+
7
+ # Constitution Changes
8
+
9
+ The constitution is the set of files that agent settings deny to agents: rules, hooks, lint, format, and commit configuration, and the agent settings themselves. It is company policy.
10
+
11
+ A developer changes the constitution through a dedicated issue, never inside a feature pull request. When a task needs a constitution change, propose it to the user, reference that issue, and wait for it to merge before the task depends on it.
@@ -0,0 +1,13 @@
1
+ ---
2
+ description: "Diagnostics: fix runtime failures at the source and keep the root cause"
3
+ globs: "**/*.ts,**/*.tsx,**/*.js,**/*.jsx"
4
+ alwaysApply: false
5
+ ---
6
+
7
+ # Diagnostics
8
+
9
+ Resolve runtime failures at the source with the language's standard narrowing, validation, and error types. For missing third-party types, take upstream definitions or a narrow adapter in the established location.
10
+
11
+ Surface errors at the caller or process boundary with diagnostic context. Handle an error to add context, recover, or translate it at an application boundary. Retain the root cause through the language's exception mechanism.
12
+
13
+ Report unresolved type, declaration, or rule conflicts to the user. Findings follow `no-suppression.md`.
@@ -0,0 +1,9 @@
1
+ ---
2
+ description: "Logging: log through a logging library in structured, durable records"
3
+ globs: "**/*.ts,**/*.tsx,**/*.js,**/*.jsx"
4
+ alwaysApply: false
5
+ ---
6
+
7
+ # Logging
8
+
9
+ Application code logs through the stack's logging library or the framework's logger, never `console.*`. Write structured records, and send them to a store that keeps them longer than the host does.
@@ -1 +0,0 @@
1
- @../../.agents/rules/constitution-changes.md
@@ -1 +0,0 @@
1
- @../../.agents/rules/diagnostics-and-error-handling.md
@@ -1 +0,0 @@
1
- @../../.agents/rules/git-workflow.md
@@ -1 +0,0 @@
1
- @../../.agents/rules/script-driven-changes.md
@@ -1 +0,0 @@
1
- @../../.agents/rules/structured-logging.md