@next-friday/create-app 6.0.2 → 7.1.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.
- package/package.json +3 -2
- package/templates/base/.agents/rules/constitution-changes.md +1 -1
- package/templates/base/.agents/skills/sdlc/SKILL.md +45 -0
- package/templates/base/.agents/skills/sdlc/playbooks/plan.md +33 -0
- package/templates/base/.agents/skills/sdlc/playbooks/question.md +8 -0
- package/templates/base/.agents/skills/sdlc-help/SKILL.md +22 -0
- package/templates/base/.claude/skills/sdlc/SKILL.md +45 -0
- package/templates/base/.claude/skills/sdlc/playbooks/plan.md +33 -0
- package/templates/base/.claude/skills/sdlc/playbooks/question.md +8 -0
- package/templates/base/.claude/skills/sdlc-help/SKILL.md +22 -0
- package/templates/base/.cursor/BUGBOT.md +0 -2
- package/templates/base/.cursor/skills/sdlc/SKILL.md +45 -0
- package/templates/base/.cursor/skills/sdlc/playbooks/plan.md +33 -0
- package/templates/base/.cursor/skills/sdlc/playbooks/question.md +8 -0
- package/templates/base/.cursor/skills/sdlc-help/SKILL.md +22 -0
- package/templates/base/SETUP.md +2 -2
- package/templates/base/intent/README.md +1 -1
- package/templates/base/scripts/check-human-gates.ts +383 -0
- package/templates/nestjs/.agents/rules.json +1 -1
- package/templates/nestjs/.claude/rules/constitution-changes.md +1 -1
- package/templates/nestjs/.cursor/rules/constitution-changes.mdc +2 -2
- package/templates/nestjs/.github/workflows/ci.yml +2 -0
- package/templates/nestjs/AGENTS.md +3 -1
- package/templates/nestjs/package.json +2 -1
- package/templates/nextjs/.agents/rules.json +1 -1
- package/templates/nextjs/.claude/rules/constitution-changes.md +1 -1
- package/templates/nextjs/.cursor/rules/constitution-changes.mdc +2 -2
- package/templates/nextjs/.github/workflows/ci.yml +2 -0
- package/templates/nextjs/AGENTS.md +3 -1
- package/templates/nextjs/package.json +2 -1
- package/templates/nodejs/.agents/rules.json +1 -1
- package/templates/nodejs/.claude/rules/constitution-changes.md +1 -1
- package/templates/nodejs/.cursor/rules/constitution-changes.mdc +2 -2
- package/templates/nodejs/.github/workflows/ci.yml +2 -0
- package/templates/nodejs/AGENTS.md +3 -1
- package/templates/nodejs/package.json +2 -1
- package/templates/payload/.agents/rules.json +1 -1
- package/templates/payload/.claude/rules/constitution-changes.md +1 -1
- package/templates/payload/.cursor/rules/constitution-changes.mdc +2 -2
- package/templates/payload/.github/workflows/ci.yml +2 -0
- package/templates/payload/AGENTS.md +3 -1
- package/templates/payload/package.json +2 -1
- package/templates/turborepo/.agents/rules.json +1 -1
- package/templates/turborepo/.claude/rules/constitution-changes.md +1 -1
- package/templates/turborepo/.cursor/rules/constitution-changes.mdc +2 -2
- package/templates/turborepo/.github/workflows/ci.yml +2 -0
- package/templates/turborepo/AGENTS.md +3 -1
- package/templates/turborepo/package.json +2 -1
- package/templates/base/.agents/skills/git-workflow/SKILL.md +0 -15
- package/templates/base/.agents/skills/script-driven-changes/SKILL.md +0 -12
- package/templates/base/.agents/skills/write-intent/SKILL.md +0 -31
- package/templates/base/.claude/skills/git-workflow/SKILL.md +0 -15
- package/templates/base/.claude/skills/script-driven-changes/SKILL.md +0 -12
- package/templates/base/.claude/skills/write-intent/SKILL.md +0 -31
- package/templates/base/.cursor/skills/git-workflow/SKILL.md +0 -15
- package/templates/base/.cursor/skills/script-driven-changes/SKILL.md +0 -12
- package/templates/base/.cursor/skills/write-intent/SKILL.md +0 -31
|
@@ -39,7 +39,9 @@ If a test fails, fix the code, not the test.
|
|
|
39
39
|
5. **Read configuration through `requireEnvironment` in `src/environment.ts`.** Document each variable in `.env.example`.
|
|
40
40
|
6. **Start from the accepted spec, in plan mode.** Claude Code starts every session in plan mode (`.claude/settings.json`); in Cursor, switch to Plan Mode before the first edit. Give the plan the change's `intent/<change>/intent.md` and `spec.md`, and have it name the files that change, the order of the work, and the tests that prove it. Commit the approved plan as `intent/<change>/plan.md`. When implementation departs from the plan, update `plan.md` in the same commit.
|
|
41
41
|
7. **Start a bug fix with a failing test.** Reproduce the bug as a test, run it, and confirm it fails for the reason you expect. Commit that test. Then create `.git/bug-fix-in-progress`, so `.agents/hooks/agent-test-edit-gate.sh` blocks test edits, and make the test pass without editing it. Delete `.git/bug-fix-in-progress` when the fix is done.
|
|
42
|
-
8. **Start work only when a person asks or a trigger runs it, and stop only at the human gates, before an irreversible action, or for a decision only a person can make.** A question or a statement gets an answer, not a file, a commit, or a pull request. Once a task starts, carry it to the next gate without asking; `.agents/rules/agent-owned-work.md` lists the gates.
|
|
42
|
+
8. **Start work only when a person asks or a trigger runs it, and stop only at the human gates, before an irreversible action, or for a decision only a person can make.** A question or a statement gets an answer, not a file, a commit, or a pull request. When a message reports a problem without asking for work, answer in a few lines and end with the message that would start the work: `/sdlc` followed by their own words. Once a task starts, carry it to the next gate without asking; `.agents/rules/agent-owned-work.md` lists the gates.
|
|
43
|
+
9. **Branch from the latest `origin/main`, and open the pull request ready for review.** Name the branch `<type>/<short-description>` and fill the body from `.github/pull_request_template.md`. `.github/workflows/ci.yml` runs full verification only on a pull request that is not a draft. Drive it until it is green and waits only on code owner approval, as `babysit-pr` describes. Rebase and `git push --force-with-lease` only branches you own. Never merge a pull request: a person merges it with `--squash` after code owner approval, bottom-up for a stack of pull requests.
|
|
44
|
+
10. **Write replies a person can check.** Reply in the language the person wrote in. Write paths from the project root, such as `README.md:12`, never from the machine's root. State as a fact only what you opened or ran in this turn, and say what you ran; mark anything else as inferred or not checked. Answer what was asked and stop: leave out tools, services, and steps the request does not need, and never hand the person a check you could run. Send nothing outside the session, such as a message to another session or a service, unless a task step says to.
|
|
43
45
|
|
|
44
46
|
## Things Claude gets wrong
|
|
45
47
|
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
"gates:check": "node scripts/check-agent-gates.ts",
|
|
22
22
|
"generate:importmap": "payload generate:importmap",
|
|
23
23
|
"generate:types": "payload generate:types",
|
|
24
|
+
"human-gates:check": "node scripts/check-human-gates.ts",
|
|
24
25
|
"knip": "node --env-file-if-exists=.env node_modules/knip/bin/knip.js",
|
|
25
26
|
"lint": "eslint . --fix --cache --max-warnings=0 --no-inline-config",
|
|
26
27
|
"lint:check": "eslint . --cache --max-warnings=0 --no-inline-config",
|
|
@@ -42,7 +43,7 @@
|
|
|
42
43
|
"test:watch": "vitest",
|
|
43
44
|
"typecheck": "next typegen && tsc --noEmit -p tsconfig.json",
|
|
44
45
|
"verify": "pnpm verify:static && pnpm test:coverage && pnpm build",
|
|
45
|
-
"verify:static": "pnpm suppressions:check && pnpm rules:check && pnpm gates:check && pnpm lint:check && pnpm format:check && pnpm sort-package-json:check && pnpm peers:check && pnpm typecheck && pnpm knip && pnpm depcruise"
|
|
46
|
+
"verify:static": "pnpm suppressions:check && pnpm rules:check && pnpm gates:check && pnpm human-gates:check && pnpm lint:check && pnpm format:check && pnpm sort-package-json:check && pnpm peers:check && pnpm typecheck && pnpm knip && pnpm depcruise"
|
|
46
47
|
},
|
|
47
48
|
"dependencies": {
|
|
48
49
|
"@payloadcms/db-postgres": "3.92.1",
|
|
@@ -12,7 +12,7 @@
|
|
|
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
|
|
15
|
+
"description": "Constitution changes: change rules, hooks, and agent settings in a pull request a code owner approves",
|
|
16
16
|
"globs": [
|
|
17
17
|
".agents/rules/**",
|
|
18
18
|
".agents/rules.json",
|
|
@@ -22,4 +22,4 @@ paths:
|
|
|
22
22
|
|
|
23
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
24
|
|
|
25
|
-
|
|
25
|
+
The constitution changes in a pull request like any other change, and a code owner approves it in review. Agent settings stop an agent from editing these files. When a task needs a constitution change, write the exact new text and the files it goes in on the pull request; a person commits it to that branch.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "Constitution changes: change rules, hooks, and agent settings
|
|
2
|
+
description: "Constitution changes: change rules, hooks, and agent settings in a pull request a code owner approves"
|
|
3
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
4
|
alwaysApply: false
|
|
5
5
|
---
|
|
@@ -8,4 +8,4 @@ alwaysApply: false
|
|
|
8
8
|
|
|
9
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
10
|
|
|
11
|
-
|
|
11
|
+
The constitution changes in a pull request like any other change, and a code owner approves it in review. Agent settings stop an agent from editing these files. When a task needs a constitution change, write the exact new text and the files it goes in on the pull request; a person commits it to that branch.
|
|
@@ -41,7 +41,9 @@ If a test fails, fix the code, not the test.
|
|
|
41
41
|
5. **Read backoffice configuration through `requireEnvironment` in `apps/backoffice/src/environment.ts`.** Document each variable in `.env.example`.
|
|
42
42
|
6. **Start from the accepted spec, in plan mode.** Claude Code starts every session in plan mode (`.claude/settings.json`); in Cursor, switch to Plan Mode before the first edit. Give the plan the change's `intent/<change>/intent.md` and `spec.md`, and have it name the files that change, the order of the work, and the tests that prove it. Commit the approved plan as `intent/<change>/plan.md`. When implementation departs from the plan, update `plan.md` in the same commit.
|
|
43
43
|
7. **Start a bug fix with a failing test.** Reproduce the bug as a test, run it, and confirm it fails for the reason you expect. Commit that test. Then create `.git/bug-fix-in-progress`, so `.agents/hooks/agent-test-edit-gate.sh` blocks test edits, and make the test pass without editing it. Delete `.git/bug-fix-in-progress` when the fix is done.
|
|
44
|
-
8. **Start work only when a person asks or a trigger runs it, and stop only at the human gates, before an irreversible action, or for a decision only a person can make.** A question or a statement gets an answer, not a file, a commit, or a pull request. Once a task starts, carry it to the next gate without asking; `.agents/rules/agent-owned-work.md` lists the gates.
|
|
44
|
+
8. **Start work only when a person asks or a trigger runs it, and stop only at the human gates, before an irreversible action, or for a decision only a person can make.** A question or a statement gets an answer, not a file, a commit, or a pull request. When a message reports a problem without asking for work, answer in a few lines and end with the message that would start the work: `/sdlc` followed by their own words. Once a task starts, carry it to the next gate without asking; `.agents/rules/agent-owned-work.md` lists the gates.
|
|
45
|
+
9. **Branch from the latest `origin/main`, and open the pull request ready for review.** Name the branch `<type>/<short-description>` and fill the body from `.github/pull_request_template.md`. `.github/workflows/ci.yml` runs full verification only on a pull request that is not a draft. Drive it until it is green and waits only on code owner approval, as `babysit-pr` describes. Rebase and `git push --force-with-lease` only branches you own. Never merge a pull request: a person merges it with `--squash` after code owner approval, bottom-up for a stack of pull requests.
|
|
46
|
+
10. **Write replies a person can check.** Reply in the language the person wrote in. Write paths from the project root, such as `README.md:12`, never from the machine's root. State as a fact only what you opened or ran in this turn, and say what you ran; mark anything else as inferred or not checked. Answer what was asked and stop: leave out tools, services, and steps the request does not need, and never hand the person a check you could run. Send nothing outside the session, such as a message to another session or a service, unless a task step says to.
|
|
45
47
|
|
|
46
48
|
## Things Claude gets wrong
|
|
47
49
|
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
"gates:check": "node scripts/check-agent-gates.ts",
|
|
22
22
|
"generate:importmap": "pnpm --filter ./apps/backoffice generate:importmap",
|
|
23
23
|
"generate:types": "pnpm --filter ./apps/backoffice generate:types",
|
|
24
|
+
"human-gates:check": "node scripts/check-human-gates.ts",
|
|
24
25
|
"knip": "knip",
|
|
25
26
|
"lint": "eslint . --fix --cache --max-warnings=0 --no-inline-config",
|
|
26
27
|
"lint:check": "eslint . --cache --max-warnings=0 --no-inline-config",
|
|
@@ -41,7 +42,7 @@
|
|
|
41
42
|
"test:watch": "turbo run test:watch --filter=./apps/*",
|
|
42
43
|
"typecheck": "tsc --noEmit -p tsconfig.json && turbo run typecheck ${TURBO_FILTER:-\"--filter=./apps/*\"}",
|
|
43
44
|
"verify": "pnpm verify:static && pnpm test:coverage && pnpm build",
|
|
44
|
-
"verify:static": "pnpm suppressions:check && pnpm rules:check && pnpm gates:check && pnpm lint:check && pnpm format:check && pnpm sort-package-json:check && pnpm peers:check && pnpm typecheck && pnpm knip && pnpm depcruise"
|
|
45
|
+
"verify:static": "pnpm suppressions:check && pnpm rules:check && pnpm gates:check && pnpm human-gates:check && pnpm lint:check && pnpm format:check && pnpm sort-package-json:check && pnpm peers:check && pnpm typecheck && pnpm knip && pnpm depcruise"
|
|
45
46
|
},
|
|
46
47
|
"devDependencies": {
|
|
47
48
|
"@commitlint/cli": "21.2.4",
|
|
@@ -1,15 +0,0 @@
|
|
|
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 drive it until it is green and waits only on code owner approval, as `babysit-pr` describes. Never approve or merge it: a code owner approves, and a person merges with `--squash`, bottom-up for a stack.
|
|
15
|
-
- Rebase and `git push --force-with-lease` only branches you own.
|
|
@@ -1,12 +0,0 @@
|
|
|
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.
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: write-intent
|
|
3
|
-
description: Write intent.md, the proto-spec that starts a change, by interviewing the originator. Run it with /write-intent.
|
|
4
|
-
disable-model-invocation: true
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Write intent.md
|
|
8
|
-
|
|
9
|
-
1. Let the originator describe the problem in their own words: what they cannot do today, who is affected, what better looks like, and what is out of scope.
|
|
10
|
-
2. Interview them in rounds until no decision is left to guess. Each round, ask every question whose prerequisites are already settled, numbered, each with your recommended answer, worded so "yes" accepts it. Then wait for the answers, and build the next round on them. Aim at the problem (who, how often, and a number with its source), the outcome as the user would see it, the constraints, and what is out of scope.
|
|
11
|
-
3. Find facts yourself: read the code, the docs, and the existing `intent/` folders before you ask, and never ask what a file can tell you. Put only decisions to the originator. When they cannot answer one yet, record it as an open question instead of guessing.
|
|
12
|
-
4. Write the result as `intent/<change>/intent.md`, where `<change>` is a short kebab-case name, using the template below. Show the whole draft, and ask whether it matches what they meant. Revise it until they say it does.
|
|
13
|
-
5. When the originator confirms the draft, commit `intent.md` and open a pull request. The product owner accepts it by merging the pull request, or rejects it by setting `Status: rejected.` and merging.
|
|
14
|
-
|
|
15
|
-
## Template
|
|
16
|
-
|
|
17
|
-
```markdown
|
|
18
|
-
# Intent: <title>
|
|
19
|
-
|
|
20
|
-
Author: <name> (<team>). Status: draft.
|
|
21
|
-
|
|
22
|
-
## Problem
|
|
23
|
-
|
|
24
|
-
## Proposed outcome
|
|
25
|
-
|
|
26
|
-
## Affected users and systems
|
|
27
|
-
|
|
28
|
-
## Constraints
|
|
29
|
-
|
|
30
|
-
## Open questions
|
|
31
|
-
```
|
|
@@ -1,15 +0,0 @@
|
|
|
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 drive it until it is green and waits only on code owner approval, as `babysit-pr` describes. Never approve or merge it: a code owner approves, and a person merges with `--squash`, bottom-up for a stack.
|
|
15
|
-
- Rebase and `git push --force-with-lease` only branches you own.
|
|
@@ -1,12 +0,0 @@
|
|
|
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.
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: write-intent
|
|
3
|
-
description: Write intent.md, the proto-spec that starts a change, by interviewing the originator. Run it with /write-intent.
|
|
4
|
-
disable-model-invocation: true
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Write intent.md
|
|
8
|
-
|
|
9
|
-
1. Let the originator describe the problem in their own words: what they cannot do today, who is affected, what better looks like, and what is out of scope.
|
|
10
|
-
2. Interview them in rounds until no decision is left to guess. Each round, ask every question whose prerequisites are already settled, numbered, each with your recommended answer, worded so "yes" accepts it. Then wait for the answers, and build the next round on them. Aim at the problem (who, how often, and a number with its source), the outcome as the user would see it, the constraints, and what is out of scope.
|
|
11
|
-
3. Find facts yourself: read the code, the docs, and the existing `intent/` folders before you ask, and never ask what a file can tell you. Put only decisions to the originator. When they cannot answer one yet, record it as an open question instead of guessing.
|
|
12
|
-
4. Write the result as `intent/<change>/intent.md`, where `<change>` is a short kebab-case name, using the template below. Show the whole draft, and ask whether it matches what they meant. Revise it until they say it does.
|
|
13
|
-
5. When the originator confirms the draft, commit `intent.md` and open a pull request. The product owner accepts it by merging the pull request, or rejects it by setting `Status: rejected.` and merging.
|
|
14
|
-
|
|
15
|
-
## Template
|
|
16
|
-
|
|
17
|
-
```markdown
|
|
18
|
-
# Intent: <title>
|
|
19
|
-
|
|
20
|
-
Author: <name> (<team>). Status: draft.
|
|
21
|
-
|
|
22
|
-
## Problem
|
|
23
|
-
|
|
24
|
-
## Proposed outcome
|
|
25
|
-
|
|
26
|
-
## Affected users and systems
|
|
27
|
-
|
|
28
|
-
## Constraints
|
|
29
|
-
|
|
30
|
-
## Open questions
|
|
31
|
-
```
|
|
@@ -1,15 +0,0 @@
|
|
|
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 drive it until it is green and waits only on code owner approval, as `babysit-pr` describes. Never approve or merge it: a code owner approves, and a person merges with `--squash`, bottom-up for a stack.
|
|
15
|
-
- Rebase and `git push --force-with-lease` only branches you own.
|
|
@@ -1,12 +0,0 @@
|
|
|
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.
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: write-intent
|
|
3
|
-
description: Write intent.md, the proto-spec that starts a change, by interviewing the originator. Run it with /write-intent.
|
|
4
|
-
disable-model-invocation: true
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Write intent.md
|
|
8
|
-
|
|
9
|
-
1. Let the originator describe the problem in their own words: what they cannot do today, who is affected, what better looks like, and what is out of scope.
|
|
10
|
-
2. Interview them in rounds until no decision is left to guess. Each round, ask every question whose prerequisites are already settled, numbered, each with your recommended answer, worded so "yes" accepts it. Then wait for the answers, and build the next round on them. Aim at the problem (who, how often, and a number with its source), the outcome as the user would see it, the constraints, and what is out of scope.
|
|
11
|
-
3. Find facts yourself: read the code, the docs, and the existing `intent/` folders before you ask, and never ask what a file can tell you. Put only decisions to the originator. When they cannot answer one yet, record it as an open question instead of guessing.
|
|
12
|
-
4. Write the result as `intent/<change>/intent.md`, where `<change>` is a short kebab-case name, using the template below. Show the whole draft, and ask whether it matches what they meant. Revise it until they say it does.
|
|
13
|
-
5. When the originator confirms the draft, commit `intent.md` and open a pull request. The product owner accepts it by merging the pull request, or rejects it by setting `Status: rejected.` and merging.
|
|
14
|
-
|
|
15
|
-
## Template
|
|
16
|
-
|
|
17
|
-
```markdown
|
|
18
|
-
# Intent: <title>
|
|
19
|
-
|
|
20
|
-
Author: <name> (<team>). Status: draft.
|
|
21
|
-
|
|
22
|
-
## Problem
|
|
23
|
-
|
|
24
|
-
## Proposed outcome
|
|
25
|
-
|
|
26
|
-
## Affected users and systems
|
|
27
|
-
|
|
28
|
-
## Constraints
|
|
29
|
-
|
|
30
|
-
## Open questions
|
|
31
|
-
```
|