@next-friday/create-app 6.0.1 → 6.0.2
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/SETUP.md +2 -2
- package/templates/base/intent/README.md +15 -0
- package/templates/nestjs/AGENTS.md +1 -0
- package/templates/nestjs/README.md +1 -1
- package/templates/nextjs/AGENTS.md +1 -0
- package/templates/nextjs/README.md +1 -1
- package/templates/nodejs/AGENTS.md +1 -0
- package/templates/nodejs/README.md +1 -1
- package/templates/payload/AGENTS.md +1 -0
- package/templates/payload/README.md +1 -1
- package/templates/turborepo/AGENTS.md +1 -0
- package/templates/turborepo/README.md +1 -1
package/package.json
CHANGED
package/templates/base/SETUP.md
CHANGED
|
@@ -9,7 +9,7 @@ This project follows Anthropic's [AI-native SDLC Playbook](https://claude.com/re
|
|
|
9
9
|
3. **Build:** the engineer starts in plan mode, approves the plan, and commits it as `plan.md`. A tech lead approves higher-risk plans.
|
|
10
10
|
4. **Test:** the session runs **Verifying your work** in `AGENTS.md`.
|
|
11
11
|
5. **Review:** Claude Code Review and Bugbot review by `REVIEW.md`. A code owner approves; the agent never does.
|
|
12
|
-
6. **Deploy:** `agent-production-gate.sh`
|
|
12
|
+
6. **Deploy:** once `DEPLOY_ENABLED` is `true`, each push to `main` that passes CI deploys to `dev`, and the Deploy workflow promotes a commit to `uat` and then `prod`. `agent-production-gate.sh` blocks an agent's shell commands that deploy to `prod`, run a Railway command with `prod` as its environment, or push a release tag, unless a release manager started the session with `RELEASE_APPROVAL` set.
|
|
13
13
|
7. **Maintain:** larger work becomes a new `intent.md`.
|
|
14
14
|
|
|
15
15
|
## 1. First commit and push
|
|
@@ -94,7 +94,7 @@ Also replace the owner placeholder in `.github/zizmor.yml`.
|
|
|
94
94
|
- **Sources of truth (engineering lead):** for each artifact, name one system as the source of truth: this repository, an existing tool such as Jira, or, as the minimum, a link both ways (the record id in the file and the commit SHA in the record).
|
|
95
95
|
- **Higher risk (engineering lead):** decide which changes count as higher risk. A tech lead or architect approves their specs and plans.
|
|
96
96
|
- **Policies (each policy owner, with an engineer):** write the policy in `.agents/skills/<area>-policy/SKILL.md` from the owner's source of truth, then run `pnpm rules:sync`. Test that the skill triggers: ask for the relevant task in different ways and confirm the skill loads each time. The policy owner approves every later change as its code owner.
|
|
97
|
-
- **Production gate (engineering leadership, with change management and compliance):**
|
|
97
|
+
- **Production gate (engineering leadership, with change management and compliance):** name the release managers and add them as required reviewers on the `prod` environment, as the README's deploy section describes. `.agents/hooks/agent-production-gate.sh` blocks an agent's shell commands that dispatch a `prod` deploy, run a Railway command with `prod` as its environment, or push a release tag. It does not read MCP tools. A release manager whose own agent session must do one of these starts the agent with `RELEASE_APPROVAL` set to the approval record, for example `RELEASE_APPROVAL=CHG-123 claude`.
|
|
98
98
|
- **Review (tech lead):** replace `src/gen/` in `.agents/review.md` with this project's generated paths, then run `pnpm rules:sync`, which renders it to `REVIEW.md` for Claude Code Review. Once a month, rate the review findings and tune `.agents/review.md`.
|
|
99
99
|
- **People without Git experience:** connect GitHub to Claude (claude.ai or Cowork), so Claude commits `intent.md` for them.
|
|
100
100
|
|
|
@@ -6,3 +6,18 @@ This folder is the intent home. Every change starts here as an `intent.md`, and
|
|
|
6
6
|
- **Plan.** An idea, a ticket, or an incident becomes `intent.md`, written with the `write-intent` skill. The product owner reviews and corrects it before it is committed. Merging its pull request records the decision: `Status: accepted.` accepts it, and `Status: rejected.` rejects it.
|
|
7
7
|
- **Design.** The `write-spec` skill turns the accepted `intent.md` into `spec.md`, committed alongside it. The product owner reviews the spec against the idea and resolves each area of concern with its policy owner. Accepting the spec starts the build.
|
|
8
8
|
- **Build.** The engineer starts in plan mode with `intent.md` and `spec.md`, and commits the approved plan as `plan.md`. When implementation departs from the plan, `plan.md` changes in the same commit.
|
|
9
|
+
|
|
10
|
+
## Which file holds what
|
|
11
|
+
|
|
12
|
+
The bullets above say who writes and who decides each file. What each file answers:
|
|
13
|
+
|
|
14
|
+
| File | Answers |
|
|
15
|
+
| :---------- | :--------------------------------------------------------------------------------------------------------- |
|
|
16
|
+
| `intent.md` | The problem, the outcome wanted, the users and systems it affects, its constraints, and its open questions |
|
|
17
|
+
| `spec.md` | What to build and how it is designed: requirements, design, and areas of concern |
|
|
18
|
+
| `plan.md` | How to make the change: the files that change, the order of the work, and the tests that prove it |
|
|
19
|
+
|
|
20
|
+
## Where a technology choice goes
|
|
21
|
+
|
|
22
|
+
- **A choice already made**, such as a required framework or service, goes into the intent's **Constraints**. The spec designs within it.
|
|
23
|
+
- **A choice to weigh**, such as two libraries or two approaches, goes into the intent's **Proposed outcome** as a proposal or into its **Open questions**. The spec compares the options in its design, with sources, and the product owner accepts or corrects the choice in review.
|
|
@@ -43,6 +43,7 @@ If a test fails, fix the code, not the test.
|
|
|
43
43
|
When Claude makes a mistake twice, add the correction here.
|
|
44
44
|
|
|
45
45
|
- **Agent shell gate**: `.agents/hooks/agent-shell-gate.sh` blocks a shell command that writes to a protected path such as `.agents`, `.cursor`, `.claude/rules`, or `.husky`. It also blocks merging or approving a pull request, approving a deployment, and gh aliases, and asks the person before an irreversible git command such as a force push or a hard reset. It is a convenience, not a security boundary: CI and code-owner review are the boundary.
|
|
46
|
+
- **Production gate**: `.agents/hooks/agent-production-gate.sh` blocks a shell command that deploys to `prod` (`gh workflow run` or a workflow dispatch with `environment=prod`), a Railway CLI command that names `prod` with `-e`, `--environment`, or `railway environment`, and a release tag push, unless a release manager started the session with `RELEASE_APPROVAL` set. Report what is ready to promote instead. When a gated command appears only inside a message, write the text to a file with your file-editing tool, not a shell heredoc, and pass it with `git commit -F <file>` or `gh pr create --body-file <file>`. The gate reads only shell commands, so an MCP tool or a Railway command without `-e` or `--environment` passes it. It is a convenience, not a security boundary: the `prod` environment's required reviewers and Railway credentials are the boundary.
|
|
46
47
|
|
|
47
48
|
## Related documentation
|
|
48
49
|
|
|
@@ -53,7 +53,7 @@ On Vercel, the zero-configuration NestJS preset takes precedence over the `Docke
|
|
|
53
53
|
- the `RAILWAY_SERVICE` variable: the service name;
|
|
54
54
|
- the `APP_URL` variable: the public `https://` URL.
|
|
55
55
|
|
|
56
|
-
Limit `dev`, `uat`, and `prod` to the `main` branch
|
|
56
|
+
Limit `dev`, `uat`, and `prod` to the `main` branch. Add the release managers as required reviewers on `prod` only; `dev` deploys on every push to `main`, so a reviewer there would hold each push. Environment secrets and variables in a private repository need GitHub Pro, Team, or Enterprise; required reviewers in a private repository need GitHub Enterprise.
|
|
57
57
|
|
|
58
58
|
3. Set the repository variable `DEPLOY_ENABLED` to `true`. Each push to `main` that passes CI then deploys to `dev`.
|
|
59
59
|
4. Promote with **Actions → Deploy → Run workflow**, giving the environment and the full commit SHA. The workflow requires a successful CI run on `main` for that commit and a successful deployment to the previous environment, then waits for `/health`.
|
|
@@ -44,6 +44,7 @@ When Claude makes a mistake twice, add the correction here.
|
|
|
44
44
|
|
|
45
45
|
- **First end-to-end run**: run `pnpm exec playwright install chromium` once. `pnpm test:e2e` starts the development server unless one is already running.
|
|
46
46
|
- **Agent shell gate**: `.agents/hooks/agent-shell-gate.sh` blocks a shell command that writes to a protected path such as `.agents`, `.cursor`, `.claude/rules`, or `.husky`. It also blocks merging or approving a pull request, approving a deployment, and gh aliases, and asks the person before an irreversible git command such as a force push or a hard reset. It is a convenience, not a security boundary: CI and code-owner review are the boundary.
|
|
47
|
+
- **Production gate**: `.agents/hooks/agent-production-gate.sh` blocks a shell command that deploys to `prod` (`gh workflow run` or a workflow dispatch with `environment=prod`), a Railway CLI command that names `prod` with `-e`, `--environment`, or `railway environment`, and a release tag push, unless a release manager started the session with `RELEASE_APPROVAL` set. Report what is ready to promote instead. When a gated command appears only inside a message, write the text to a file with your file-editing tool, not a shell heredoc, and pass it with `git commit -F <file>` or `gh pr create --body-file <file>`. The gate reads only shell commands, so an MCP tool or a Railway command without `-e` or `--environment` passes it. It is a convenience, not a security boundary: the `prod` environment's required reviewers and Railway credentials are the boundary.
|
|
47
48
|
|
|
48
49
|
## Related documentation
|
|
49
50
|
|
|
@@ -49,7 +49,7 @@ On Vercel, deploy without the image; the Next.js preset takes precedence over th
|
|
|
49
49
|
- the `RAILWAY_SERVICE` variable: the service name;
|
|
50
50
|
- the `APP_URL` variable: the public `https://` URL.
|
|
51
51
|
|
|
52
|
-
Limit `dev`, `uat`, and `prod` to the `main` branch
|
|
52
|
+
Limit `dev`, `uat`, and `prod` to the `main` branch. Add the release managers as required reviewers on `prod` only; `dev` deploys on every push to `main`, so a reviewer there would hold each push. Environment secrets and variables in a private repository need GitHub Pro, Team, or Enterprise; required reviewers in a private repository need GitHub Enterprise.
|
|
53
53
|
|
|
54
54
|
3. Set the repository variable `DEPLOY_ENABLED` to `true`. Each push to `main` that passes CI then deploys to `dev`.
|
|
55
55
|
4. Promote with **Actions → Deploy → Run workflow**, giving the environment and the full commit SHA. The workflow requires a successful CI run on `main` for that commit and a successful deployment to the previous environment, then waits for `/health`.
|
|
@@ -41,6 +41,7 @@ If a test fails, fix the code, not the test.
|
|
|
41
41
|
When Claude makes a mistake twice, add the correction here.
|
|
42
42
|
|
|
43
43
|
- **Agent shell gate**: `.agents/hooks/agent-shell-gate.sh` blocks a shell command that writes to a protected path such as `.agents`, `.cursor`, `.claude/rules`, or `.husky`. It also blocks merging or approving a pull request, approving a deployment, and gh aliases, and asks the person before an irreversible git command such as a force push or a hard reset. It is a convenience, not a security boundary: CI and code-owner review are the boundary.
|
|
44
|
+
- **Production gate**: `.agents/hooks/agent-production-gate.sh` blocks a shell command that deploys to `prod` (`gh workflow run` or a workflow dispatch with `environment=prod`), a Railway CLI command that names `prod` with `-e`, `--environment`, or `railway environment`, and a release tag push, unless a release manager started the session with `RELEASE_APPROVAL` set. Report what is ready to promote instead. When a gated command appears only inside a message, write the text to a file with your file-editing tool, not a shell heredoc, and pass it with `git commit -F <file>` or `gh pr create --body-file <file>`. The gate reads only shell commands, so an MCP tool or a Railway command without `-e` or `--environment` passes it. It is a convenience, not a security boundary: the `prod` environment's required reviewers and Railway credentials are the boundary.
|
|
44
45
|
|
|
45
46
|
## Related documentation
|
|
46
47
|
|
|
@@ -49,7 +49,7 @@ docker run --env PORT=3000 --publish 3000:3000 app
|
|
|
49
49
|
- the `RAILWAY_SERVICE` variable: the service name;
|
|
50
50
|
- the `APP_URL` variable: the public `https://` URL.
|
|
51
51
|
|
|
52
|
-
Limit `dev`, `uat`, and `prod` to the `main` branch
|
|
52
|
+
Limit `dev`, `uat`, and `prod` to the `main` branch. Add the release managers as required reviewers on `prod` only; `dev` deploys on every push to `main`, so a reviewer there would hold each push. Environment secrets and variables in a private repository need GitHub Pro, Team, or Enterprise; required reviewers in a private repository need GitHub Enterprise.
|
|
53
53
|
|
|
54
54
|
3. Set the repository variable `DEPLOY_ENABLED` to `true`. Each push to `main` that passes CI then deploys to `dev`.
|
|
55
55
|
4. Promote with **Actions → Deploy → Run workflow**, giving the environment and the full commit SHA. The workflow requires a successful CI run on `main` for that commit and a successful deployment to the previous environment, then waits for `/health`.
|
|
@@ -47,6 +47,7 @@ When Claude makes a mistake twice, add the correction here.
|
|
|
47
47
|
|
|
48
48
|
- **Database for `pnpm dev` and end-to-end tests**: both need a PostgreSQL database in `DATABASE_URL` and `PAYLOAD_SECRET` in `.env`; the README lists every variable. Run `pnpm exec playwright install chromium` once before the first `pnpm test:e2e`.
|
|
49
49
|
- **Agent shell gate**: `.agents/hooks/agent-shell-gate.sh` blocks a shell command that writes to a protected path such as `.agents`, `.cursor`, `.claude/rules`, or `.husky`. It also blocks merging or approving a pull request, approving a deployment, and gh aliases, and asks the person before an irreversible git command such as a force push or a hard reset. It is a convenience, not a security boundary: CI and code-owner review are the boundary.
|
|
50
|
+
- **Production gate**: `.agents/hooks/agent-production-gate.sh` blocks a shell command that deploys to `prod` (`gh workflow run` or a workflow dispatch with `environment=prod`), a Railway CLI command that names `prod` with `-e`, `--environment`, or `railway environment`, and a release tag push, unless a release manager started the session with `RELEASE_APPROVAL` set. Report what is ready to promote instead. When a gated command appears only inside a message, write the text to a file with your file-editing tool, not a shell heredoc, and pass it with `git commit -F <file>` or `gh pr create --body-file <file>`. The gate reads only shell commands, so an MCP tool or a Railway command without `-e` or `--environment` passes it. It is a convenience, not a security boundary: the `prod` environment's required reviewers and Railway credentials are the boundary.
|
|
50
51
|
|
|
51
52
|
## Related documentation
|
|
52
53
|
|
|
@@ -73,7 +73,7 @@ On Vercel, deploy without the image; the Next.js preset takes precedence over th
|
|
|
73
73
|
- the `RAILWAY_SERVICE` variable: the service name;
|
|
74
74
|
- the `APP_URL` variable: the public `https://` URL.
|
|
75
75
|
|
|
76
|
-
Limit `dev`, `uat`, and `prod` to the `main` branch
|
|
76
|
+
Limit `dev`, `uat`, and `prod` to the `main` branch. Add the release managers as required reviewers on `prod` only; `dev` deploys on every push to `main`, so a reviewer there would hold each push. Environment secrets and variables in a private repository need GitHub Pro, Team, or Enterprise; required reviewers in a private repository need GitHub Enterprise.
|
|
77
77
|
|
|
78
78
|
3. Set the repository variable `DEPLOY_ENABLED` to `true`. Each push to `main` that passes CI then deploys to `dev`.
|
|
79
79
|
4. Promote with **Actions → Deploy → Run workflow**, giving the environment and the full commit SHA. The workflow requires a successful CI run on `main` for that commit and a successful deployment to the previous environment, then waits for `/health`.
|
|
@@ -50,6 +50,7 @@ When Claude makes a mistake twice, add the correction here.
|
|
|
50
50
|
- **Next.js docs live per app**: this Next.js version differs from your training data. Read the guide in `apps/app/node_modules/next/dist/docs/` or `apps/backoffice/node_modules/next/dist/docs/` before writing Next.js code; the workspace root has no `next` package.
|
|
51
51
|
- **Database for `pnpm dev` and end-to-end tests**: the backoffice needs a PostgreSQL database in `DATABASE_URL` and `PAYLOAD_SECRET` in `.env`; the README lists every variable. Run `pnpm --filter ./apps/app exec playwright install chromium` once before the first `pnpm test:e2e`.
|
|
52
52
|
- **Agent shell gate**: `.agents/hooks/agent-shell-gate.sh` blocks a shell command that writes to a protected path such as `.agents`, `.cursor`, `.claude/rules`, or `.husky`. It also blocks merging or approving a pull request, approving a deployment, and gh aliases, and asks the person before an irreversible git command such as a force push or a hard reset. It is a convenience, not a security boundary: CI and code-owner review are the boundary.
|
|
53
|
+
- **Production gate**: `.agents/hooks/agent-production-gate.sh` blocks a shell command that deploys to `prod` (`gh workflow run` or a workflow dispatch with `environment=prod`), a Railway CLI command that names `prod` with `-e`, `--environment`, or `railway environment`, and a release tag push, unless a release manager started the session with `RELEASE_APPROVAL` set. Report what is ready to promote instead. When a gated command appears only inside a message, write the text to a file with your file-editing tool, not a shell heredoc, and pass it with `git commit -F <file>` or `gh pr create --body-file <file>`. The gate reads only shell commands, so an MCP tool or a Railway command without `-e` or `--environment` passes it. It is a convenience, not a security boundary: the `prod` environment's required reviewers and Railway credentials are the boundary.
|
|
53
54
|
|
|
54
55
|
## Related documentation
|
|
55
56
|
|
|
@@ -79,7 +79,7 @@ On Vercel, deploy an app without its image. The Next.js preset takes precedence
|
|
|
79
79
|
- the `APP_URL` variable: the public Next.js `https://` URL;
|
|
80
80
|
- the `BACKOFFICE_URL` variable: the public backoffice `https://` URL.
|
|
81
81
|
|
|
82
|
-
Limit `dev`, `uat`, and `prod` to the `main` branch
|
|
82
|
+
Limit `dev`, `uat`, and `prod` to the `main` branch. Add the release managers as required reviewers on `prod` only; `dev` deploys on every push to `main`, so a reviewer there would hold each push. Environment secrets and variables in a private repository need GitHub Pro, Team, or Enterprise; required reviewers in a private repository need GitHub Enterprise.
|
|
83
83
|
|
|
84
84
|
3. Set the repository variable `DEPLOY_ENABLED` to `true`. Each push to `main` that passes CI then deploys to `dev`. The workflow compares the commit with the last GitHub deployment to that environment and runs `railway up` only for services whose packages changed. A promotion through `uat` or `prod` uses the same comparison against the commit last deployed there, so several commits still ship every changed service. The first deploy to an environment ships both services.
|
|
85
85
|
4. Promote with **Actions → Deploy → Run workflow**, giving the environment and the full commit SHA. The workflow requires a successful CI run on `main` for that commit and a successful deployment to the previous environment, then waits for `/health` on each service it uploaded.
|