@next-friday/create-app 2.1.4 → 2.1.6
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.
- package/package.json +1 -1
- package/templates/base/.agents/rules/agent-owned-work.md +3 -0
- package/templates/base/.agents/rules/constitution-changes.md +5 -0
- package/templates/base/.agents/rules/dependency-security.md +1 -1
- package/templates/base/.agents/rules/descriptive-naming.md +12 -0
- package/templates/base/.agents/rules/evidence-before-claims.md +3 -0
- package/templates/base/.agents/rules/platform-and-library-first.md +9 -0
- package/templates/base/.agents/rules/single-author-style.md +1 -1
- package/templates/base/.agents/rules/structured-logging.md +3 -0
- package/templates/base/.claude/rules/agent-owned-work.md +1 -0
- package/templates/base/.claude/rules/constitution-changes.md +1 -0
- package/templates/base/.claude/rules/dependency-security.md +1 -1
- package/templates/base/.claude/rules/descriptive-naming.md +1 -0
- package/templates/base/.claude/rules/evidence-before-claims.md +1 -0
- package/templates/base/.claude/rules/platform-and-library-first.md +1 -0
- package/templates/base/.claude/rules/structured-logging.md +1 -0
- package/templates/base/.cursor/BUGBOT.md +6 -0
- package/templates/base/.cursor/rules/agent-owned-work.mdc +8 -0
- package/templates/base/.cursor/rules/constitution-changes.mdc +10 -0
- package/templates/base/.cursor/rules/dependency-security.mdc +1 -1
- package/templates/base/.cursor/rules/descriptive-naming.mdc +17 -0
- package/templates/base/.cursor/rules/evidence-before-claims.mdc +8 -0
- package/templates/base/.cursor/rules/platform-and-library-first.mdc +14 -0
- package/templates/base/.cursor/rules/single-author-style.mdc +1 -1
- package/templates/base/.cursor/rules/structured-logging.mdc +8 -0
- package/templates/nestjs/.agents/rules.json +18 -0
- package/templates/nestjs/AGENTS.md +0 -1
- package/templates/nextjs/.agents/rules.json +18 -0
- package/templates/nextjs/AGENTS.md +0 -1
- package/templates/nodejs/.agents/rules.json +18 -0
- package/templates/nodejs/AGENTS.md +0 -1
- package/templates/payload/.agents/rules.json +18 -0
- package/templates/payload/AGENTS.md +0 -1
- package/templates/turborepo/.agents/rules.json +18 -0
- package/templates/turborepo/AGENTS.md +0 -1
package/package.json
CHANGED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
# Agent-Owned Work
|
|
2
|
+
|
|
3
|
+
Do the work that an agent, a script, or an API can do; do not hand it to the user. Before you ask the user, check the code, data, docs, and tools that already exist. Ask only for what no one else can provide, such as payment, legal identity, or a business fact recorded nowhere. Constitution edits follow `constitution-changes.md`.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Constitution Changes
|
|
2
|
+
|
|
3
|
+
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.
|
|
4
|
+
|
|
5
|
+
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.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Dependencies
|
|
2
2
|
|
|
3
|
-
Add a dependency when active code, tests, build tooling, or a documented contract uses it, and
|
|
3
|
+
Add a dependency when active code, tests, build tooling, or a documented contract uses it, and neither the platform nor existing project code covers the need. A maintained library that replaces custom code meets this test; `platform-and-library-first.md` sets the order. Assess cadence, license, advisories, compatibility, and transitives first. Place it in the manifest of the project that imports it, in the ecosystem category that matches its role.
|
|
4
4
|
|
|
5
5
|
Resolve a vulnerability that Dependabot or OSV-Scanner reports by upgrading the dependency. For a transitive dependency, add a pnpm override in `pnpm-workspace.yaml`. When no fix exists, record the accepted risk as `no-suppression.md` describes.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Descriptive Naming
|
|
2
|
+
|
|
3
|
+
A path or identifier names what it holds. A reader knows what a file, directory, module, or route contains without opening it.
|
|
4
|
+
|
|
5
|
+
- **Name the responsibility.** Each file and directory name states the feature, domain concept, or role it holds.
|
|
6
|
+
- **No organization names.** Do not put an organization, brand, customer, or tenant name in a path or identifier. User-visible text that names the organization reads it from one configured source, not from a literal.
|
|
7
|
+
- **Distinguishable siblings.** Qualify a generic word such as `settings`, `config`, `utils`, `helpers`, `common`, or `detail` with its domain noun. Files that sit together each name the role they play.
|
|
8
|
+
- **Do not copy a name that breaks this rule.** Sibling style does not override it. Give new code a descriptive name and report the existing name to the user.
|
|
9
|
+
|
|
10
|
+
Folder names and file suffixes that the framework or toolchain requires follow that tool's convention.
|
|
11
|
+
|
|
12
|
+
_Completion criterion_: Every path and identifier the diff adds names its responsibility, contains no organization name, and is distinguishable from its siblings.
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
# Evidence
|
|
2
|
+
|
|
3
|
+
Verify a claim about files, commands, APIs, versions, or limits before you state or write it, and cite its source: `path:line`, command output, or an official documentation URL. Do not write a value without a source into code or docs; state it as unverified and give the reason.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Platform and Library First
|
|
2
|
+
|
|
3
|
+
Meet a need with the first option that covers it:
|
|
4
|
+
|
|
5
|
+
1. A built-in feature of the framework or platform.
|
|
6
|
+
2. A maintained library or an official template.
|
|
7
|
+
3. Custom code. State in the pull request why the first two fall short.
|
|
8
|
+
|
|
9
|
+
Add a library as `dependency-security.md` describes.
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Treat each application, package, or component as one author's work. Match representative siblings for layout, naming, exports, helpers, composition, errors, and abstraction. Use the language's standard idiom when no sibling exists. Name the convention when a conflict affects the design.
|
|
4
4
|
|
|
5
|
-
Keep execution flow collocated. Extract a helper when multiple callers share it. One term per concept; parallel symbols share grammatical shape. Comments follow `code-comments.md`.
|
|
5
|
+
Keep execution flow collocated. Extract a helper when multiple callers share it. One term per concept; parallel symbols share grammatical shape. Comments follow `code-comments.md`. Names follow `descriptive-naming.md`, which matching siblings does not override.
|
|
6
6
|
|
|
7
7
|
Keep edits in the requested component, its call sites, and the workspace metadata it needs. Cross-project convention changes are in scope only when the task names them.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@../../.agents/rules/agent-owned-work.md
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@../../.agents/rules/constitution-changes.md
|
|
@@ -7,6 +7,6 @@ paths:
|
|
|
7
7
|
|
|
8
8
|
# Dependencies
|
|
9
9
|
|
|
10
|
-
Add a dependency when active code, tests, build tooling, or a documented contract uses it, and
|
|
10
|
+
Add a dependency when active code, tests, build tooling, or a documented contract uses it, and neither the platform nor existing project code covers the need. A maintained library that replaces custom code meets this test; `platform-and-library-first.md` sets the order. Assess cadence, license, advisories, compatibility, and transitives first. Place it in the manifest of the project that imports it, in the ecosystem category that matches its role.
|
|
11
11
|
|
|
12
12
|
Resolve a vulnerability that Dependabot or OSV-Scanner reports by upgrading the dependency. For a transitive dependency, add a pnpm override in `pnpm-workspace.yaml`. When no fix exists, record the accepted risk as `no-suppression.md` describes.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@../../.agents/rules/descriptive-naming.md
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@../../.agents/rules/evidence-before-claims.md
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@../../.agents/rules/platform-and-library-first.md
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@../../.agents/rules/structured-logging.md
|
|
@@ -3,16 +3,22 @@
|
|
|
3
3
|
Review pull requests against the project's agent guide and rules:
|
|
4
4
|
|
|
5
5
|
- [Agent guide](../AGENTS.md)
|
|
6
|
+
- [Agent-Owned Work](../.agents/rules/agent-owned-work.md)
|
|
6
7
|
- [Owned Checks](../.agents/rules/automation-owned-checks.md)
|
|
7
8
|
- [Required Comments](../.agents/rules/code-comments.md)
|
|
8
9
|
- [Codebase Hygiene](../.agents/rules/codebase-hygiene.md)
|
|
10
|
+
- [Constitution Changes](../.agents/rules/constitution-changes.md)
|
|
9
11
|
- [Current State](../.agents/rules/current-state-authority.md)
|
|
10
12
|
- [Demand-Driven Configuration](../.agents/rules/demand-driven-configuration.md)
|
|
11
13
|
- [Dependencies](../.agents/rules/dependency-security.md)
|
|
14
|
+
- [Descriptive Naming](../.agents/rules/descriptive-naming.md)
|
|
12
15
|
- [Test Admission](../.agents/rules/deterministic-testing.md)
|
|
13
16
|
- [Diagnostics](../.agents/rules/diagnostics-and-error-handling.md)
|
|
17
|
+
- [Evidence](../.agents/rules/evidence-before-claims.md)
|
|
14
18
|
- [Git Workflow](../.agents/rules/git-workflow.md)
|
|
15
19
|
- [Findings](../.agents/rules/no-suppression.md)
|
|
20
|
+
- [Platform and Library First](../.agents/rules/platform-and-library-first.md)
|
|
16
21
|
- [Scripts](../.agents/rules/script-driven-changes.md)
|
|
17
22
|
- [Sibling Style](../.agents/rules/single-author-style.md)
|
|
23
|
+
- [Logging](../.agents/rules/structured-logging.md)
|
|
18
24
|
- [TypeScript-First](../.agents/rules/typescript-first.md)
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Agent-owned work: do what an agent, script, or API can do instead of asking the user"
|
|
3
|
+
alwaysApply: true
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Agent-Owned Work
|
|
7
|
+
|
|
8
|
+
Do the work that an agent, a script, or an API can do; do not hand it to the user. Before you ask the user, check the code, data, docs, and tools that already exist. Ask only for what no one else can provide, such as payment, legal identity, or a business fact recorded nowhere. Constitution edits follow `constitution-changes.md`.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Constitution changes: change rules, hooks, and agent settings only through a dedicated issue"
|
|
3
|
+
alwaysApply: true
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Constitution Changes
|
|
7
|
+
|
|
8
|
+
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.
|
|
9
|
+
|
|
10
|
+
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.
|
|
@@ -6,6 +6,6 @@ alwaysApply: false
|
|
|
6
6
|
|
|
7
7
|
# Dependencies
|
|
8
8
|
|
|
9
|
-
Add a dependency when active code, tests, build tooling, or a documented contract uses it, and
|
|
9
|
+
Add a dependency when active code, tests, build tooling, or a documented contract uses it, and neither the platform nor existing project code covers the need. A maintained library that replaces custom code meets this test; `platform-and-library-first.md` sets the order. Assess cadence, license, advisories, compatibility, and transitives first. Place it in the manifest of the project that imports it, in the ecosystem category that matches its role.
|
|
10
10
|
|
|
11
11
|
Resolve a vulnerability that Dependabot or OSV-Scanner reports by upgrading the dependency. For a transitive dependency, add a pnpm override in `pnpm-workspace.yaml`. When no fix exists, record the accepted risk as `no-suppression.md` describes.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Descriptive naming: paths and identifiers name what they hold, without organization names"
|
|
3
|
+
alwaysApply: true
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Descriptive Naming
|
|
7
|
+
|
|
8
|
+
A path or identifier names what it holds. A reader knows what a file, directory, module, or route contains without opening it.
|
|
9
|
+
|
|
10
|
+
- **Name the responsibility.** Each file and directory name states the feature, domain concept, or role it holds.
|
|
11
|
+
- **No organization names.** Do not put an organization, brand, customer, or tenant name in a path or identifier. User-visible text that names the organization reads it from one configured source, not from a literal.
|
|
12
|
+
- **Distinguishable siblings.** Qualify a generic word such as `settings`, `config`, `utils`, `helpers`, `common`, or `detail` with its domain noun. Files that sit together each name the role they play.
|
|
13
|
+
- **Do not copy a name that breaks this rule.** Sibling style does not override it. Give new code a descriptive name and report the existing name to the user.
|
|
14
|
+
|
|
15
|
+
Folder names and file suffixes that the framework or toolchain requires follow that tool's convention.
|
|
16
|
+
|
|
17
|
+
_Completion criterion_: Every path and identifier the diff adds names its responsibility, contains no organization name, and is distinguishable from its siblings.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Evidence: verify and cite a claim before stating or writing it"
|
|
3
|
+
alwaysApply: true
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Evidence
|
|
7
|
+
|
|
8
|
+
Verify a claim about files, commands, APIs, versions, or limits before you state or write it, and cite its source: `path:line`, command output, or an official documentation URL. Do not write a value without a source into code or docs; state it as unverified and give the reason.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Platform and library first: use built-in features, then maintained libraries, then custom code"
|
|
3
|
+
alwaysApply: true
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Platform and Library First
|
|
7
|
+
|
|
8
|
+
Meet a need with the first option that covers it:
|
|
9
|
+
|
|
10
|
+
1. A built-in feature of the framework or platform.
|
|
11
|
+
2. A maintained library or an official template.
|
|
12
|
+
3. Custom code. State in the pull request why the first two fall short.
|
|
13
|
+
|
|
14
|
+
Add a library as `dependency-security.md` describes.
|
|
@@ -7,6 +7,6 @@ alwaysApply: true
|
|
|
7
7
|
|
|
8
8
|
Treat each application, package, or component as one author's work. Match representative siblings for layout, naming, exports, helpers, composition, errors, and abstraction. Use the language's standard idiom when no sibling exists. Name the convention when a conflict affects the design.
|
|
9
9
|
|
|
10
|
-
Keep execution flow collocated. Extract a helper when multiple callers share it. One term per concept; parallel symbols share grammatical shape. Comments follow `code-comments.md`.
|
|
10
|
+
Keep execution flow collocated. Extract a helper when multiple callers share it. One term per concept; parallel symbols share grammatical shape. Comments follow `code-comments.md`. Names follow `descriptive-naming.md`, which matching siblings does not override.
|
|
11
11
|
|
|
12
12
|
Keep edits in the requested component, its call sites, and the workspace metadata it needs. Cross-project convention changes are in scope only when the task names them.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Logging: log through a logging library in structured, durable records"
|
|
3
|
+
alwaysApply: true
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Logging
|
|
7
|
+
|
|
8
|
+
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,4 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
+
"agent-owned-work": {
|
|
3
|
+
"description": "Agent-owned work: do what an agent, script, or API can do instead of asking the user"
|
|
4
|
+
},
|
|
2
5
|
"automation-owned-checks": {
|
|
3
6
|
"description": "Owned checks: hooks and CI define what must pass; run checks by hand to verify"
|
|
4
7
|
},
|
|
@@ -8,6 +11,9 @@
|
|
|
8
11
|
"codebase-hygiene": {
|
|
9
12
|
"description": "Codebase hygiene: modify existing code instead of accumulating new code"
|
|
10
13
|
},
|
|
14
|
+
"constitution-changes": {
|
|
15
|
+
"description": "Constitution changes: change rules, hooks, and agent settings only through a dedicated issue"
|
|
16
|
+
},
|
|
11
17
|
"current-state-authority": {
|
|
12
18
|
"description": "Current state: implement from user requirements and the working tree"
|
|
13
19
|
},
|
|
@@ -18,6 +24,9 @@
|
|
|
18
24
|
"description": "Dependencies: add a package only when code or a contract uses it",
|
|
19
25
|
"globs": ["package.json", "pnpm-lock.yaml", "pnpm-workspace.yaml"]
|
|
20
26
|
},
|
|
27
|
+
"descriptive-naming": {
|
|
28
|
+
"description": "Descriptive naming: paths and identifiers name what they hold, without organization names"
|
|
29
|
+
},
|
|
21
30
|
"deterministic-testing": {
|
|
22
31
|
"description": "Test admission: add a case only when it catches a defect current tests miss",
|
|
23
32
|
"globs": ["**/*.test.ts"]
|
|
@@ -25,18 +34,27 @@
|
|
|
25
34
|
"diagnostics-and-error-handling": {
|
|
26
35
|
"description": "Diagnostics: fix runtime failures at the source and keep the root cause"
|
|
27
36
|
},
|
|
37
|
+
"evidence-before-claims": {
|
|
38
|
+
"description": "Evidence: verify and cite a claim before stating or writing it"
|
|
39
|
+
},
|
|
28
40
|
"git-workflow": {
|
|
29
41
|
"description": "Git workflow: trunk-based branches, commits, and pull requests"
|
|
30
42
|
},
|
|
31
43
|
"no-suppression": {
|
|
32
44
|
"description": "Findings: fix scanner and linter reports without inline suppressions"
|
|
33
45
|
},
|
|
46
|
+
"platform-and-library-first": {
|
|
47
|
+
"description": "Platform and library first: use built-in features, then maintained libraries, then custom code"
|
|
48
|
+
},
|
|
34
49
|
"script-driven-changes": {
|
|
35
50
|
"description": "Scripts: apply a repeated edit across many files with a script"
|
|
36
51
|
},
|
|
37
52
|
"single-author-style": {
|
|
38
53
|
"description": "Sibling style: match layout, naming, and composition in the same project"
|
|
39
54
|
},
|
|
55
|
+
"structured-logging": {
|
|
56
|
+
"description": "Logging: log through a logging library in structured, durable records"
|
|
57
|
+
},
|
|
40
58
|
"typescript-first": {
|
|
41
59
|
"description": "TypeScript-first: write source, tests, and scripts as .ts",
|
|
42
60
|
"globs": ["**/*.ts", "**/*.js"]
|
|
@@ -3,6 +3,5 @@
|
|
|
3
3
|
NestJS service on pnpm. Source lives in `src/`, end-to-end tests in `test/`.
|
|
4
4
|
|
|
5
5
|
- Follow the rules in `.agents/rules/`; `.agents/rules.json` gives each rule's scope. Claude Code and Cursor load them automatically.
|
|
6
|
-
- Rule files, agent hooks, and agent settings are company policy: propose a change to the user, who edits them.
|
|
7
6
|
- Put unit tests next to the code as `*.test.ts`; put end-to-end tests in `test/` as `*.e2e.test.ts`.
|
|
8
7
|
- Read configuration from environment variables and fail when one is missing; document each variable in `.env.example`.
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
+
"agent-owned-work": {
|
|
3
|
+
"description": "Agent-owned work: do what an agent, script, or API can do instead of asking the user"
|
|
4
|
+
},
|
|
2
5
|
"automation-owned-checks": {
|
|
3
6
|
"description": "Owned checks: hooks and CI define what must pass; run checks by hand to verify"
|
|
4
7
|
},
|
|
@@ -8,6 +11,9 @@
|
|
|
8
11
|
"codebase-hygiene": {
|
|
9
12
|
"description": "Codebase hygiene: modify existing code instead of accumulating new code"
|
|
10
13
|
},
|
|
14
|
+
"constitution-changes": {
|
|
15
|
+
"description": "Constitution changes: change rules, hooks, and agent settings only through a dedicated issue"
|
|
16
|
+
},
|
|
11
17
|
"current-state-authority": {
|
|
12
18
|
"description": "Current state: implement from user requirements and the working tree"
|
|
13
19
|
},
|
|
@@ -18,6 +24,9 @@
|
|
|
18
24
|
"description": "Dependencies: add a package only when code or a contract uses it",
|
|
19
25
|
"globs": ["package.json", "pnpm-lock.yaml", "pnpm-workspace.yaml"]
|
|
20
26
|
},
|
|
27
|
+
"descriptive-naming": {
|
|
28
|
+
"description": "Descriptive naming: paths and identifiers name what they hold, without organization names"
|
|
29
|
+
},
|
|
21
30
|
"deterministic-testing": {
|
|
22
31
|
"description": "Test admission: add a case only when it catches a defect current tests miss",
|
|
23
32
|
"globs": ["**/*.test.ts", "**/*.test.tsx"]
|
|
@@ -25,18 +34,27 @@
|
|
|
25
34
|
"diagnostics-and-error-handling": {
|
|
26
35
|
"description": "Diagnostics: fix runtime failures at the source and keep the root cause"
|
|
27
36
|
},
|
|
37
|
+
"evidence-before-claims": {
|
|
38
|
+
"description": "Evidence: verify and cite a claim before stating or writing it"
|
|
39
|
+
},
|
|
28
40
|
"git-workflow": {
|
|
29
41
|
"description": "Git workflow: trunk-based branches, commits, and pull requests"
|
|
30
42
|
},
|
|
31
43
|
"no-suppression": {
|
|
32
44
|
"description": "Findings: fix scanner and linter reports without inline suppressions"
|
|
33
45
|
},
|
|
46
|
+
"platform-and-library-first": {
|
|
47
|
+
"description": "Platform and library first: use built-in features, then maintained libraries, then custom code"
|
|
48
|
+
},
|
|
34
49
|
"script-driven-changes": {
|
|
35
50
|
"description": "Scripts: apply a repeated edit across many files with a script"
|
|
36
51
|
},
|
|
37
52
|
"single-author-style": {
|
|
38
53
|
"description": "Sibling style: match layout, naming, and composition in the same project"
|
|
39
54
|
},
|
|
55
|
+
"structured-logging": {
|
|
56
|
+
"description": "Logging: log through a logging library in structured, durable records"
|
|
57
|
+
},
|
|
40
58
|
"typescript-first": {
|
|
41
59
|
"description": "TypeScript-first: write source, tests, and scripts as .ts or .tsx",
|
|
42
60
|
"globs": ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx"]
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
Next.js App Router application on pnpm. Routes live in `app/`.
|
|
4
4
|
|
|
5
5
|
- Follow the rules in `.agents/rules/`; `.agents/rules.json` gives each rule's scope. Claude Code and Cursor load them automatically.
|
|
6
|
-
- Rule files, agent hooks, and agent settings are company policy: propose a change to the user, who edits them.
|
|
7
6
|
- Put unit tests next to the code as `*.test.ts`; put Playwright end-to-end tests in `test/` as `*.e2e.test.ts`. Component tests need a DOM test environment, which is not set up yet; ask the user before adding one.
|
|
8
7
|
- Read configuration from environment variables and fail when one is missing; document each variable in `.env.example`.
|
|
9
8
|
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
+
"agent-owned-work": {
|
|
3
|
+
"description": "Agent-owned work: do what an agent, script, or API can do instead of asking the user"
|
|
4
|
+
},
|
|
2
5
|
"automation-owned-checks": {
|
|
3
6
|
"description": "Owned checks: hooks and CI define what must pass; run checks by hand to verify"
|
|
4
7
|
},
|
|
@@ -8,6 +11,9 @@
|
|
|
8
11
|
"codebase-hygiene": {
|
|
9
12
|
"description": "Codebase hygiene: modify existing code instead of accumulating new code"
|
|
10
13
|
},
|
|
14
|
+
"constitution-changes": {
|
|
15
|
+
"description": "Constitution changes: change rules, hooks, and agent settings only through a dedicated issue"
|
|
16
|
+
},
|
|
11
17
|
"current-state-authority": {
|
|
12
18
|
"description": "Current state: implement from user requirements and the working tree"
|
|
13
19
|
},
|
|
@@ -18,6 +24,9 @@
|
|
|
18
24
|
"description": "Dependencies: add a package only when code or a contract uses it",
|
|
19
25
|
"globs": ["package.json", "pnpm-lock.yaml", "pnpm-workspace.yaml"]
|
|
20
26
|
},
|
|
27
|
+
"descriptive-naming": {
|
|
28
|
+
"description": "Descriptive naming: paths and identifiers name what they hold, without organization names"
|
|
29
|
+
},
|
|
21
30
|
"deterministic-testing": {
|
|
22
31
|
"description": "Test admission: add a case only when it catches a defect current tests miss",
|
|
23
32
|
"globs": ["**/*.test.ts"]
|
|
@@ -25,18 +34,27 @@
|
|
|
25
34
|
"diagnostics-and-error-handling": {
|
|
26
35
|
"description": "Diagnostics: fix runtime failures at the source and keep the root cause"
|
|
27
36
|
},
|
|
37
|
+
"evidence-before-claims": {
|
|
38
|
+
"description": "Evidence: verify and cite a claim before stating or writing it"
|
|
39
|
+
},
|
|
28
40
|
"git-workflow": {
|
|
29
41
|
"description": "Git workflow: trunk-based branches, commits, and pull requests"
|
|
30
42
|
},
|
|
31
43
|
"no-suppression": {
|
|
32
44
|
"description": "Findings: fix scanner and linter reports without inline suppressions"
|
|
33
45
|
},
|
|
46
|
+
"platform-and-library-first": {
|
|
47
|
+
"description": "Platform and library first: use built-in features, then maintained libraries, then custom code"
|
|
48
|
+
},
|
|
34
49
|
"script-driven-changes": {
|
|
35
50
|
"description": "Scripts: apply a repeated edit across many files with a script"
|
|
36
51
|
},
|
|
37
52
|
"single-author-style": {
|
|
38
53
|
"description": "Sibling style: match layout, naming, and composition in the same project"
|
|
39
54
|
},
|
|
55
|
+
"structured-logging": {
|
|
56
|
+
"description": "Logging: log through a logging library in structured, durable records"
|
|
57
|
+
},
|
|
40
58
|
"typescript-first": {
|
|
41
59
|
"description": "TypeScript-first: write source, tests, and scripts as .ts",
|
|
42
60
|
"globs": ["**/*.ts", "**/*.js"]
|
|
@@ -3,6 +3,5 @@
|
|
|
3
3
|
Node.js HTTP service on pnpm, without a framework. Source lives in `src/`.
|
|
4
4
|
|
|
5
5
|
- Follow the rules in `.agents/rules/`; `.agents/rules.json` gives each rule's scope. Claude Code and Cursor load them automatically.
|
|
6
|
-
- Rule files, agent hooks, and agent settings are company policy: propose a change to the user, who edits them.
|
|
7
6
|
- Put tests next to the code as `*.test.ts`.
|
|
8
7
|
- Read configuration from environment variables and fail when one is missing; document each variable in `.env.example`.
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
+
"agent-owned-work": {
|
|
3
|
+
"description": "Agent-owned work: do what an agent, script, or API can do instead of asking the user"
|
|
4
|
+
},
|
|
2
5
|
"automation-owned-checks": {
|
|
3
6
|
"description": "Owned checks: hooks and CI define what must pass; run checks by hand to verify"
|
|
4
7
|
},
|
|
@@ -8,6 +11,9 @@
|
|
|
8
11
|
"codebase-hygiene": {
|
|
9
12
|
"description": "Codebase hygiene: modify existing code instead of accumulating new code"
|
|
10
13
|
},
|
|
14
|
+
"constitution-changes": {
|
|
15
|
+
"description": "Constitution changes: change rules, hooks, and agent settings only through a dedicated issue"
|
|
16
|
+
},
|
|
11
17
|
"current-state-authority": {
|
|
12
18
|
"description": "Current state: implement from user requirements and the working tree"
|
|
13
19
|
},
|
|
@@ -18,6 +24,9 @@
|
|
|
18
24
|
"description": "Dependencies: add a package only when code or a contract uses it",
|
|
19
25
|
"globs": ["package.json", "pnpm-lock.yaml", "pnpm-workspace.yaml"]
|
|
20
26
|
},
|
|
27
|
+
"descriptive-naming": {
|
|
28
|
+
"description": "Descriptive naming: paths and identifiers name what they hold, without organization names"
|
|
29
|
+
},
|
|
21
30
|
"deterministic-testing": {
|
|
22
31
|
"description": "Test admission: add a case only when it catches a defect current tests miss",
|
|
23
32
|
"globs": ["**/*.test.ts", "**/*.test.tsx"]
|
|
@@ -25,18 +34,27 @@
|
|
|
25
34
|
"diagnostics-and-error-handling": {
|
|
26
35
|
"description": "Diagnostics: fix runtime failures at the source and keep the root cause"
|
|
27
36
|
},
|
|
37
|
+
"evidence-before-claims": {
|
|
38
|
+
"description": "Evidence: verify and cite a claim before stating or writing it"
|
|
39
|
+
},
|
|
28
40
|
"git-workflow": {
|
|
29
41
|
"description": "Git workflow: trunk-based branches, commits, and pull requests"
|
|
30
42
|
},
|
|
31
43
|
"no-suppression": {
|
|
32
44
|
"description": "Findings: fix scanner and linter reports without inline suppressions"
|
|
33
45
|
},
|
|
46
|
+
"platform-and-library-first": {
|
|
47
|
+
"description": "Platform and library first: use built-in features, then maintained libraries, then custom code"
|
|
48
|
+
},
|
|
34
49
|
"script-driven-changes": {
|
|
35
50
|
"description": "Scripts: apply a repeated edit across many files with a script"
|
|
36
51
|
},
|
|
37
52
|
"single-author-style": {
|
|
38
53
|
"description": "Sibling style: match layout, naming, and composition in the same project"
|
|
39
54
|
},
|
|
55
|
+
"structured-logging": {
|
|
56
|
+
"description": "Logging: log through a logging library in structured, durable records"
|
|
57
|
+
},
|
|
40
58
|
"typescript-first": {
|
|
41
59
|
"description": "TypeScript-first: write source, tests, and scripts as .ts or .tsx",
|
|
42
60
|
"globs": ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx"]
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
Payload CMS on Next.js App Router and PostgreSQL, on pnpm. Source lives in `src/`: the site in `src/app/(frontend)/`, collections in `src/collections/`, and the Payload config in `src/payload.config.ts`.
|
|
4
4
|
|
|
5
5
|
- Follow the rules in `.agents/rules/`; `.agents/rules.json` gives each rule's scope. Claude Code and Cursor load them automatically.
|
|
6
|
-
- Rule files, agent hooks, and agent settings are company policy: propose a change to the user, who edits them.
|
|
7
6
|
- Put unit tests next to the code as `*.test.ts`; put Playwright end-to-end tests in `test/` as `*.e2e.test.ts`. Component tests need a DOM test environment, which is not set up yet; ask the user before adding one.
|
|
8
7
|
- Payload generates `src/app/(payload)/`, `src/payload-types.ts`, and `src/migrations/`. After changing a collection, regenerate them with `pnpm generate:types`, `pnpm generate:importmap`, and `pnpm migrate:create <name>`, and commit the results.
|
|
9
8
|
- Read configuration through `requireEnvironment` in `src/environment.ts`; document each variable in `.env.example`.
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
+
"agent-owned-work": {
|
|
3
|
+
"description": "Agent-owned work: do what an agent, script, or API can do instead of asking the user"
|
|
4
|
+
},
|
|
2
5
|
"automation-owned-checks": {
|
|
3
6
|
"description": "Owned checks: hooks and CI define what must pass; run checks by hand to verify"
|
|
4
7
|
},
|
|
@@ -8,6 +11,9 @@
|
|
|
8
11
|
"codebase-hygiene": {
|
|
9
12
|
"description": "Codebase hygiene: modify existing code instead of accumulating new code"
|
|
10
13
|
},
|
|
14
|
+
"constitution-changes": {
|
|
15
|
+
"description": "Constitution changes: change rules, hooks, and agent settings only through a dedicated issue"
|
|
16
|
+
},
|
|
11
17
|
"current-state-authority": {
|
|
12
18
|
"description": "Current state: implement from user requirements and the working tree"
|
|
13
19
|
},
|
|
@@ -18,6 +24,9 @@
|
|
|
18
24
|
"description": "Dependencies: add a package only when code or a contract uses it",
|
|
19
25
|
"globs": ["package.json", "pnpm-lock.yaml", "pnpm-workspace.yaml"]
|
|
20
26
|
},
|
|
27
|
+
"descriptive-naming": {
|
|
28
|
+
"description": "Descriptive naming: paths and identifiers name what they hold, without organization names"
|
|
29
|
+
},
|
|
21
30
|
"deterministic-testing": {
|
|
22
31
|
"description": "Test admission: add a case only when it catches a defect current tests miss",
|
|
23
32
|
"globs": ["**/*.test.ts", "**/*.test.tsx"]
|
|
@@ -25,18 +34,27 @@
|
|
|
25
34
|
"diagnostics-and-error-handling": {
|
|
26
35
|
"description": "Diagnostics: fix runtime failures at the source and keep the root cause"
|
|
27
36
|
},
|
|
37
|
+
"evidence-before-claims": {
|
|
38
|
+
"description": "Evidence: verify and cite a claim before stating or writing it"
|
|
39
|
+
},
|
|
28
40
|
"git-workflow": {
|
|
29
41
|
"description": "Git workflow: trunk-based branches, commits, and pull requests"
|
|
30
42
|
},
|
|
31
43
|
"no-suppression": {
|
|
32
44
|
"description": "Findings: fix scanner and linter reports without inline suppressions"
|
|
33
45
|
},
|
|
46
|
+
"platform-and-library-first": {
|
|
47
|
+
"description": "Platform and library first: use built-in features, then maintained libraries, then custom code"
|
|
48
|
+
},
|
|
34
49
|
"script-driven-changes": {
|
|
35
50
|
"description": "Scripts: apply a repeated edit across many files with a script"
|
|
36
51
|
},
|
|
37
52
|
"single-author-style": {
|
|
38
53
|
"description": "Sibling style: match layout, naming, and composition in the same project"
|
|
39
54
|
},
|
|
55
|
+
"structured-logging": {
|
|
56
|
+
"description": "Logging: log through a logging library in structured, durable records"
|
|
57
|
+
},
|
|
40
58
|
"typescript-first": {
|
|
41
59
|
"description": "TypeScript-first: write source, tests, and scripts as .ts or .tsx",
|
|
42
60
|
"globs": ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx"]
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
Turborepo workspace on pnpm. `apps/app` is the Next.js site. `apps/backoffice` is the Payload CMS. Root scripts run the same checks as the other Next Friday templates and delegate framework commands with Turborepo.
|
|
4
4
|
|
|
5
5
|
- Follow the rules in `.agents/rules/`; `.agents/rules.json` gives each rule's scope. Claude Code and Cursor load them automatically.
|
|
6
|
-
- Rule files, agent hooks, and agent settings are company policy: propose a change to the user, who edits them.
|
|
7
6
|
- Put unit tests next to the code as `*.test.ts`. Put Playwright end-to-end tests in `apps/app/test/` and `apps/backoffice/test/` as `*.e2e.test.ts`. Component tests need a DOM test environment, which is not set up yet; ask the user before adding one.
|
|
8
7
|
- The Next.js site lives in `apps/app/app/`. The backoffice site lives in `apps/backoffice/src/app/(frontend)/`, collections in `apps/backoffice/src/collections/`, and the Payload config in `apps/backoffice/src/payload.config.ts`.
|
|
9
8
|
- Payload generates `apps/backoffice/src/app/(payload)/`, `apps/backoffice/src/payload-types.ts`, and `apps/backoffice/src/migrations/`. After changing a collection, regenerate them with `pnpm generate:types`, `pnpm generate:importmap`, and `pnpm migrate:create <name>`, and commit the results.
|