@next-friday/create-app 9.1.0 → 9.2.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 (338) hide show
  1. package/README.md +5 -4
  2. package/dist/main.mjs +135 -96
  3. package/package.json +8 -6
  4. package/templates/base/.agents/hooks/agent-mcp-gate.sh +7 -2
  5. package/templates/base/.agents/hooks/agent-production-gate.sh +6 -1
  6. package/templates/base/.agents/hooks/agent-shell-gate.sh +1 -181
  7. package/templates/base/.agents/hooks/agent-test-edit-gate.sh +12 -3
  8. package/templates/base/.agents/review.md +2 -2
  9. package/templates/base/.agents/rules/no-suppression.md +1 -1
  10. package/templates/base/.agents/skill-evals/README.md +42 -0
  11. package/templates/base/.agents/skill-evals/sdlc/answers-question-without-writing/case.yaml +12 -0
  12. package/templates/base/.agents/skill-evals/sdlc/answers-question-without-writing/graders/01-the-reply-explains-why-pnpm.md +7 -0
  13. package/templates/base/.agents/skill-evals/sdlc/answers-question-without-writing/graders/02-no-file-in-the-project.md +7 -0
  14. package/templates/base/.agents/skill-evals/sdlc/answers-question-without-writing/graders/03-no-commit-is-made-nothing.md +7 -0
  15. package/templates/base/.agents/skill-evals/sdlc/answers-question-without-writing/graders/04-the-reply-is-in-the.md +7 -0
  16. package/templates/base/.agents/skill-evals/sdlc/answers-question-without-writing/graders/05-every-path-in-the-reply.md +7 -0
  17. package/templates/base/.agents/skill-evals/sdlc/answers-question-without-writing/graders/06-everything-the-reply-states-as.md +7 -0
  18. package/templates/base/.agents/skill-evals/sdlc/answers-question-without-writing/prompt.md +8 -0
  19. package/templates/base/.agents/skill-evals/sdlc/build-continues-from-an-accepted-plan/case.yaml +12 -0
  20. package/templates/base/.agents/skill-evals/sdlc/build-continues-from-an-accepted-plan/fixture.md +1 -0
  21. package/templates/base/.agents/skill-evals/sdlc/build-continues-from-an-accepted-plan/graders/01-work-happens-on-the-plan-branch.md +7 -0
  22. package/templates/base/.agents/skill-evals/sdlc/build-continues-from-an-accepted-plan/graders/02-the-plan-is-implemented-and-checked.md +7 -0
  23. package/templates/base/.agents/skill-evals/sdlc/build-continues-from-an-accepted-plan/graders/03-the-branch-is-pushed.md +7 -0
  24. package/templates/base/.agents/skill-evals/sdlc/build-continues-from-an-accepted-plan/graders/04-the-reply-lists-three-playbooks.md +7 -0
  25. package/templates/base/.agents/skill-evals/sdlc/build-continues-from-an-accepted-plan/graders/05-no-approval-and-no-merge.md +7 -0
  26. package/templates/base/.agents/skill-evals/sdlc/build-continues-from-an-accepted-plan/graders/06-the-reply-ends-at-the-code-owner.md +7 -0
  27. package/templates/base/.agents/skill-evals/sdlc/build-continues-from-an-accepted-plan/graders/07-the-plan-names-the-engineer.md +7 -0
  28. package/templates/base/.agents/skill-evals/sdlc/build-continues-from-an-accepted-plan/prompt.md +8 -0
  29. package/templates/base/.agents/skill-evals/sdlc/build-interviews-before-planning/case.yaml +71 -0
  30. package/templates/base/.agents/skill-evals/sdlc/build-interviews-before-planning/fixture.md +1 -0
  31. package/templates/base/.agents/skill-evals/sdlc/build-interviews-before-planning/graders/01-the-reply-asks-numbered-questions.md +7 -0
  32. package/templates/base/.agents/skill-evals/sdlc/build-interviews-before-planning/graders/02-no-plan-before-the-answers.md +7 -0
  33. package/templates/base/.agents/skill-evals/sdlc/build-interviews-before-planning/graders/03-no-question-depends-on-another.md +7 -0
  34. package/templates/base/.agents/skill-evals/sdlc/build-interviews-before-planning/graders/04-no-file-or-commit.md +7 -0
  35. package/templates/base/.agents/skill-evals/sdlc/build-interviews-before-planning/graders/05-the-reply-is-in-thai.md +7 -0
  36. package/templates/base/.agents/skill-evals/sdlc/build-interviews-before-planning/prompt.md +8 -0
  37. package/templates/base/.agents/skill-evals/sdlc/build-plans-and-waits-for-the-engineer/case.yaml +68 -0
  38. package/templates/base/.agents/skill-evals/sdlc/build-plans-and-waits-for-the-engineer/fixture.md +1 -0
  39. package/templates/base/.agents/skill-evals/sdlc/build-plans-and-waits-for-the-engineer/graders/01-the-plan-has-the-four-headings.md +7 -0
  40. package/templates/base/.agents/skill-evals/sdlc/build-plans-and-waits-for-the-engineer/graders/02-no-source-file-or-commit.md +7 -0
  41. package/templates/base/.agents/skill-evals/sdlc/build-plans-and-waits-for-the-engineer/graders/03-the-reply-names-the-gate.md +7 -0
  42. package/templates/base/.agents/skill-evals/sdlc/build-plans-and-waits-for-the-engineer/graders/04-the-reply-is-in-thai.md +7 -0
  43. package/templates/base/.agents/skill-evals/sdlc/build-plans-and-waits-for-the-engineer/prompt.md +10 -0
  44. package/templates/base/.agents/skill-evals/sdlc/deploy-stops-at-the-production-gate/case.yaml +8 -0
  45. package/templates/base/.agents/skill-evals/sdlc/deploy-stops-at-the-production-gate/fixture.md +1 -0
  46. package/templates/base/.agents/skill-evals/sdlc/deploy-stops-at-the-production-gate/graders/01-no-deployment-is-started.md +7 -0
  47. package/templates/base/.agents/skill-evals/sdlc/deploy-stops-at-the-production-gate/graders/02-the-reply-names-the-release-manager-gate.md +7 -0
  48. package/templates/base/.agents/skill-evals/sdlc/deploy-stops-at-the-production-gate/graders/03-the-reply-says-what-it-could-not-read.md +7 -0
  49. package/templates/base/.agents/skill-evals/sdlc/deploy-stops-at-the-production-gate/graders/04-the-reply-is-in-the-language.md +7 -0
  50. package/templates/base/.agents/skill-evals/sdlc/deploy-stops-at-the-production-gate/prompt.md +8 -0
  51. package/templates/base/.agents/skill-evals/sdlc/drafts-intent-and-waits-for-yes/case.yaml +13 -0
  52. package/templates/base/.agents/skill-evals/sdlc/drafts-intent-and-waits-for-yes/graders/01-a-file-intentkebabcasenameintentmd-exists-with.md +7 -0
  53. package/templates/base/.agents/skill-evals/sdlc/drafts-intent-and-waits-for-yes/graders/02-the-reply-shows-the-draft.md +7 -0
  54. package/templates/base/.agents/skill-evals/sdlc/drafts-intent-and-waits-for-yes/graders/03-no-commit-is-made-nothing.md +7 -0
  55. package/templates/base/.agents/skill-evals/sdlc/drafts-intent-and-waits-for-yes/graders/04-reply-lists-the-playbook-steps.md +7 -0
  56. package/templates/base/.agents/skill-evals/sdlc/drafts-intent-and-waits-for-yes/graders/05-the-reply-is-in-the.md +7 -0
  57. package/templates/base/.agents/skill-evals/sdlc/drafts-intent-and-waits-for-yes/graders/06-every-path-in-the-reply.md +7 -0
  58. package/templates/base/.agents/skill-evals/sdlc/drafts-intent-and-waits-for-yes/graders/07-the-drafts-open-questions-section.md +7 -0
  59. package/templates/base/.agents/skill-evals/sdlc/drafts-intent-and-waits-for-yes/prompt.md +10 -0
  60. package/templates/base/.agents/skill-evals/sdlc/fix-reproduces-finds-the-cause-and-waits-for-the-engineer/case.yaml +34 -0
  61. package/templates/base/.agents/skill-evals/sdlc/fix-reproduces-finds-the-cause-and-waits-for-the-engineer/fixture.md +1 -0
  62. package/templates/base/.agents/skill-evals/sdlc/fix-reproduces-finds-the-cause-and-waits-for-the-engineer/graders/01-the-reply-shows-the-reproduction-output.md +7 -0
  63. package/templates/base/.agents/skill-evals/sdlc/fix-reproduces-finds-the-cause-and-waits-for-the-engineer/graders/02-the-reply-names-one-cause-with-evidence.md +7 -0
  64. package/templates/base/.agents/skill-evals/sdlc/fix-reproduces-finds-the-cause-and-waits-for-the-engineer/graders/03-the-plan-has-the-four-headings.md +7 -0
  65. package/templates/base/.agents/skill-evals/sdlc/fix-reproduces-finds-the-cause-and-waits-for-the-engineer/graders/04-no-file-or-commit.md +7 -0
  66. package/templates/base/.agents/skill-evals/sdlc/fix-reproduces-finds-the-cause-and-waits-for-the-engineer/graders/05-the-reply-names-the-gate.md +7 -0
  67. package/templates/base/.agents/skill-evals/sdlc/fix-reproduces-finds-the-cause-and-waits-for-the-engineer/graders/06-the-reply-is-in-thai.md +7 -0
  68. package/templates/base/.agents/skill-evals/sdlc/fix-reproduces-finds-the-cause-and-waits-for-the-engineer/prompt.md +8 -0
  69. package/templates/base/.agents/skill-evals/sdlc/interviews-before-writing-intent/case.yaml +12 -0
  70. package/templates/base/.agents/skill-evals/sdlc/interviews-before-writing-intent/graders/01-the-first-message-restates-the.md +7 -0
  71. package/templates/base/.agents/skill-evals/sdlc/interviews-before-writing-intent/graders/02-the-reply-asks-numbered-questions.md +7 -0
  72. package/templates/base/.agents/skill-evals/sdlc/interviews-before-writing-intent/graders/03-no-intentmd-is-written-before.md +7 -0
  73. package/templates/base/.agents/skill-evals/sdlc/interviews-before-writing-intent/graders/04-reply-lists-the-playbook-steps.md +7 -0
  74. package/templates/base/.agents/skill-evals/sdlc/interviews-before-writing-intent/graders/05-no-commit-is-made-nothing.md +7 -0
  75. package/templates/base/.agents/skill-evals/sdlc/interviews-before-writing-intent/graders/06-the-reply-is-in-the.md +7 -0
  76. package/templates/base/.agents/skill-evals/sdlc/interviews-before-writing-intent/graders/07-every-path-in-the-reply.md +7 -0
  77. package/templates/base/.agents/skill-evals/sdlc/interviews-before-writing-intent/graders/08-no-question-in-the-round.md +7 -0
  78. package/templates/base/.agents/skill-evals/sdlc/interviews-before-writing-intent/prompt.md +8 -0
  79. package/templates/base/.agents/skill-evals/sdlc/maintain-writes-intent-from-a-finding/case.yaml +14 -0
  80. package/templates/base/.agents/skill-evals/sdlc/maintain-writes-intent-from-a-finding/fixture.md +1 -0
  81. package/templates/base/.agents/skill-evals/sdlc/maintain-writes-intent-from-a-finding/graders/01-the-intent-has-the-five-headings.md +7 -0
  82. package/templates/base/.agents/skill-evals/sdlc/maintain-writes-intent-from-a-finding/graders/02-problem-holds-the-error-and-where.md +7 -0
  83. package/templates/base/.agents/skill-evals/sdlc/maintain-writes-intent-from-a-finding/graders/03-unverified-cause-is-an-open-question.md +7 -0
  84. package/templates/base/.agents/skill-evals/sdlc/maintain-writes-intent-from-a-finding/graders/04-no-source-file-is-changed.md +7 -0
  85. package/templates/base/.agents/skill-evals/sdlc/maintain-writes-intent-from-a-finding/graders/05-a-branch-is-pushed-and-the-gate-is-named.md +7 -0
  86. package/templates/base/.agents/skill-evals/sdlc/maintain-writes-intent-from-a-finding/graders/06-the-person-is-asked-no-question.md +7 -0
  87. package/templates/base/.agents/skill-evals/sdlc/maintain-writes-intent-from-a-finding/prompt.md +8 -0
  88. package/templates/base/.agents/skill-evals/sdlc/reported-problem-starts-the-plan/case.yaml +12 -0
  89. package/templates/base/.agents/skill-evals/sdlc/reported-problem-starts-the-plan/graders/01-the-reply-follows-the-plan.md +7 -0
  90. package/templates/base/.agents/skill-evals/sdlc/reported-problem-starts-the-plan/graders/02-the-reply-does-not-tell.md +7 -0
  91. package/templates/base/.agents/skill-evals/sdlc/reported-problem-starts-the-plan/graders/03-no-file-is-created-or.md +7 -0
  92. package/templates/base/.agents/skill-evals/sdlc/reported-problem-starts-the-plan/graders/04-the-reply-is-in-the.md +7 -0
  93. package/templates/base/.agents/skill-evals/sdlc/reported-problem-starts-the-plan/graders/05-every-path-in-the-reply.md +7 -0
  94. package/templates/base/.agents/skill-evals/sdlc/reported-problem-starts-the-plan/prompt.md +8 -0
  95. package/templates/base/.agents/skill-evals/sdlc/request-that-fits-no-row/case.yaml +11 -0
  96. package/templates/base/.agents/skill-evals/sdlc/request-that-fits-no-row/fixture.md +1 -0
  97. package/templates/base/.agents/skill-evals/sdlc/request-that-fits-no-row/graders/01-no-file-is-written-and-nothing-is-committed.md +7 -0
  98. package/templates/base/.agents/skill-evals/sdlc/request-that-fits-no-row/graders/02-the-reply-names-the-closest-row.md +7 -0
  99. package/templates/base/.agents/skill-evals/sdlc/request-that-fits-no-row/graders/03-the-reply-is-short-and-in-thai.md +7 -0
  100. package/templates/base/.agents/skill-evals/sdlc/request-that-fits-no-row/prompt.md +8 -0
  101. package/templates/base/.agents/skill-evals/sdlc/review-reports-findings-and-never-merges/case.yaml +79 -0
  102. package/templates/base/.agents/skill-evals/sdlc/review-reports-findings-and-never-merges/fixture.md +1 -0
  103. package/templates/base/.agents/skill-evals/sdlc/review-reports-findings-and-never-merges/graders/01-findings-have-pass-severity-and-location.md +7 -0
  104. package/templates/base/.agents/skill-evals/sdlc/review-reports-findings-and-never-merges/graders/02-no-approval-and-no-merge.md +7 -0
  105. package/templates/base/.agents/skill-evals/sdlc/review-reports-findings-and-never-merges/graders/03-the-reply-names-the-code-owner-gate.md +7 -0
  106. package/templates/base/.agents/skill-evals/sdlc/review-reports-findings-and-never-merges/graders/04-nothing-is-pushed-or-changed.md +7 -0
  107. package/templates/base/.agents/skill-evals/sdlc/review-reports-findings-and-never-merges/graders/05-the-review-runs-in-a-fresh-context.md +7 -0
  108. package/templates/base/.agents/skill-evals/sdlc/review-reports-findings-and-never-merges/prompt.md +8 -0
  109. package/templates/base/.agents/skill-evals/sdlc/spec-for-unmerged-intent-stops/case.yaml +42 -0
  110. package/templates/base/.agents/skill-evals/sdlc/spec-for-unmerged-intent-stops/fixture.md +1 -0
  111. package/templates/base/.agents/skill-evals/sdlc/spec-for-unmerged-intent-stops/graders/01-no-spec-is-written.md +7 -0
  112. package/templates/base/.agents/skill-evals/sdlc/spec-for-unmerged-intent-stops/graders/02-no-commit-is-made.md +7 -0
  113. package/templates/base/.agents/skill-evals/sdlc/spec-for-unmerged-intent-stops/graders/03-the-reply-says-not-merged.md +7 -0
  114. package/templates/base/.agents/skill-evals/sdlc/spec-for-unmerged-intent-stops/graders/04-the-reply-is-in-the.md +7 -0
  115. package/templates/base/.agents/skill-evals/sdlc/spec-for-unmerged-intent-stops/graders/05-the-reply-is-short.md +7 -0
  116. package/templates/base/.agents/skill-evals/sdlc/spec-for-unmerged-intent-stops/prompt.md +8 -0
  117. package/templates/base/.agents/skill-evals/sdlc/statement-without-command-starts-no-work/case.yaml +12 -0
  118. package/templates/base/.agents/skill-evals/sdlc/statement-without-command-starts-no-work/graders/01-no-intentmd-or-any-other.md +7 -0
  119. package/templates/base/.agents/skill-evals/sdlc/statement-without-command-starts-no-work/graders/02-no-commit-is-made-nothing.md +7 -0
  120. package/templates/base/.agents/skill-evals/sdlc/statement-without-command-starts-no-work/graders/03-the-reply-is-in-the.md +7 -0
  121. package/templates/base/.agents/skill-evals/sdlc/statement-without-command-starts-no-work/graders/04-every-path-in-the-reply.md +7 -0
  122. package/templates/base/.agents/skill-evals/sdlc/statement-without-command-starts-no-work/graders/05-the-reply-says-that-work.md +7 -0
  123. package/templates/base/.agents/skill-evals/sdlc/statement-without-command-starts-no-work/prompt.md +8 -0
  124. package/templates/base/.agents/skill-evals/sdlc/writes-spec-from-merged-intent/case.yaml +42 -0
  125. package/templates/base/.agents/skill-evals/sdlc/writes-spec-from-merged-intent/fixture.md +1 -0
  126. package/templates/base/.agents/skill-evals/sdlc/writes-spec-from-merged-intent/graders/01-the-spec-has-the-five-headings.md +7 -0
  127. package/templates/base/.agents/skill-evals/sdlc/writes-spec-from-merged-intent/graders/02-policies-has-one-line-per-policy.md +7 -0
  128. package/templates/base/.agents/skill-evals/sdlc/writes-spec-from-merged-intent/graders/03-no-policy-is-called-unwritten.md +7 -0
  129. package/templates/base/.agents/skill-evals/sdlc/writes-spec-from-merged-intent/graders/04-a-branch-is-pushed-for-review.md +7 -0
  130. package/templates/base/.agents/skill-evals/sdlc/writes-spec-from-merged-intent/graders/05-the-reply-names-the-gate.md +7 -0
  131. package/templates/base/.agents/skill-evals/sdlc/writes-spec-from-merged-intent/graders/06-the-reply-is-in-the.md +7 -0
  132. package/templates/base/.agents/skill-evals/sdlc/writes-spec-from-merged-intent/graders/07-no-merge-is-made.md +7 -0
  133. package/templates/base/.agents/skill-evals/sdlc/writes-spec-from-merged-intent/graders/08-the-four-policies-are-read-before-writing.md +7 -0
  134. package/templates/base/.agents/skill-evals/sdlc/writes-spec-from-merged-intent/prompt.md +8 -0
  135. package/templates/base/.agents/skill-evals/sdlc-help/explains-how-to-start-work/case.yaml +11 -0
  136. package/templates/base/.agents/skill-evals/sdlc-help/explains-how-to-start-work/graders/01-the-reply-says-that-work.md +7 -0
  137. package/templates/base/.agents/skill-evals/sdlc-help/explains-how-to-start-work/graders/02-the-reply-gives-one-example.md +7 -0
  138. package/templates/base/.agents/skill-evals/sdlc-help/explains-how-to-start-work/graders/03-the-reply-lists-the-project.md +7 -0
  139. package/templates/base/.agents/skill-evals/sdlc-help/explains-how-to-start-work/graders/04-no-file-is-created-or.md +7 -0
  140. package/templates/base/.agents/skill-evals/sdlc-help/explains-how-to-start-work/graders/05-the-reply-is-in-the.md +7 -0
  141. package/templates/base/.agents/skill-evals/sdlc-help/explains-how-to-start-work/graders/06-every-path-in-the-reply.md +7 -0
  142. package/templates/base/.agents/skill-evals/sdlc-help/explains-how-to-start-work/prompt.md +8 -0
  143. package/templates/base/.agents/skill-evals/sdlc-help/unknown-playbook-is-not-invented/case.yaml +10 -0
  144. package/templates/base/.agents/skill-evals/sdlc-help/unknown-playbook-is-not-invented/graders/01-the-reply-says-that-this.md +7 -0
  145. package/templates/base/.agents/skill-evals/sdlc-help/unknown-playbook-is-not-invented/graders/02-the-reply-does-not-describe.md +7 -0
  146. package/templates/base/.agents/skill-evals/sdlc-help/unknown-playbook-is-not-invented/graders/03-no-file-is-created-or.md +7 -0
  147. package/templates/base/.agents/skill-evals/sdlc-help/unknown-playbook-is-not-invented/graders/04-the-reply-is-in-the.md +7 -0
  148. package/templates/base/.agents/skill-evals/sdlc-help/unknown-playbook-is-not-invented/graders/05-every-path-in-the-reply.md +7 -0
  149. package/templates/base/.agents/skill-evals/sdlc-help/unknown-playbook-is-not-invented/prompt.md +8 -0
  150. package/templates/base/.agents/skill-evals/sdlc-help/work-request-is-sent-to-sdlc/case.yaml +11 -0
  151. package/templates/base/.agents/skill-evals/sdlc-help/work-request-is-sent-to-sdlc/graders/01-the-reply-says-to-send.md +7 -0
  152. package/templates/base/.agents/skill-evals/sdlc-help/work-request-is-sent-to-sdlc/graders/02-no-file-is-created-or.md +7 -0
  153. package/templates/base/.agents/skill-evals/sdlc-help/work-request-is-sent-to-sdlc/graders/03-the-reply-is-in-the.md +7 -0
  154. package/templates/base/.agents/skill-evals/sdlc-help/work-request-is-sent-to-sdlc/graders/04-every-path-in-the-reply.md +7 -0
  155. package/templates/base/.agents/skill-evals/sdlc-help/work-request-is-sent-to-sdlc/prompt.md +8 -0
  156. package/templates/base/.agents/skills/sdlc/SKILL.md +25 -21
  157. package/templates/base/.agents/skills/sdlc/playbooks/build.md +13 -8
  158. package/templates/base/.agents/skills/sdlc/playbooks/deploy.md +2 -2
  159. package/templates/base/.agents/skills/sdlc/playbooks/design.md +4 -4
  160. package/templates/base/.agents/skills/sdlc/playbooks/fix.md +23 -0
  161. package/templates/base/.agents/skills/sdlc/playbooks/maintain.md +2 -3
  162. package/templates/base/.agents/skills/sdlc/playbooks/open-pr.md +3 -3
  163. package/templates/base/.agents/skills/sdlc/playbooks/plan.md +2 -2
  164. package/templates/base/.agents/skills/sdlc/playbooks/review.md +2 -2
  165. package/templates/base/.agents/skills/sdlc-help/SKILL.md +3 -1
  166. package/templates/base/.claude/managed-settings.example.json +2 -2
  167. package/templates/base/.claude/settings.json +0 -13
  168. package/templates/base/.claude/skills/sdlc/SKILL.md +25 -21
  169. package/templates/base/.claude/skills/sdlc/playbooks/build.md +13 -8
  170. package/templates/base/.claude/skills/sdlc/playbooks/deploy.md +2 -2
  171. package/templates/base/.claude/skills/sdlc/playbooks/design.md +4 -4
  172. package/templates/base/.claude/skills/sdlc/playbooks/fix.md +23 -0
  173. package/templates/base/.claude/skills/sdlc/playbooks/maintain.md +2 -3
  174. package/templates/base/.claude/skills/sdlc/playbooks/open-pr.md +3 -3
  175. package/templates/base/.claude/skills/sdlc/playbooks/plan.md +2 -2
  176. package/templates/base/.claude/skills/sdlc/playbooks/review.md +2 -2
  177. package/templates/base/.claude/skills/sdlc-help/SKILL.md +3 -1
  178. package/templates/base/.cursor/hooks.json +0 -6
  179. package/templates/base/.cursor/rules/no-suppression.mdc +1 -1
  180. package/templates/base/.cursor/skills/sdlc/SKILL.md +25 -21
  181. package/templates/base/.cursor/skills/sdlc/playbooks/build.md +13 -8
  182. package/templates/base/.cursor/skills/sdlc/playbooks/deploy.md +2 -2
  183. package/templates/base/.cursor/skills/sdlc/playbooks/design.md +4 -4
  184. package/templates/base/.cursor/skills/sdlc/playbooks/fix.md +23 -0
  185. package/templates/base/.cursor/skills/sdlc/playbooks/maintain.md +2 -3
  186. package/templates/base/.cursor/skills/sdlc/playbooks/open-pr.md +3 -3
  187. package/templates/base/.cursor/skills/sdlc/playbooks/plan.md +2 -2
  188. package/templates/base/.cursor/skills/sdlc/playbooks/review.md +2 -2
  189. package/templates/base/.cursor/skills/sdlc-help/SKILL.md +3 -1
  190. package/templates/base/.github/ISSUE_TEMPLATE/documentation.yml +1 -1
  191. package/templates/base/.github/dependabot.yml +1 -10
  192. package/templates/base/.github/file-filters.yml +3 -6
  193. package/templates/base/.github/workflows/agent-evals.yml +46 -0
  194. package/templates/base/.github/workflows/claude-fix-loop.yml +45 -0
  195. package/templates/base/.github/workflows/control-band.yml +115 -0
  196. package/templates/base/.github/workflows/dependency-review.yml +1 -0
  197. package/templates/base/.github/workflows/deploy.yml +4 -2
  198. package/templates/base/.github/workflows/osv-scanner.yml +0 -5
  199. package/templates/base/.github/workflows/pr-triage.yml +1 -1
  200. package/templates/base/.github/workflows/secret-scan.yml +4 -1
  201. package/templates/base/.github/workflows/spec-on-intent-merge.yml +108 -0
  202. package/templates/base/.github/workflows/validate-pr-title.yml +3 -2
  203. package/templates/base/.husky/pre-push +1 -8
  204. package/templates/base/REVIEW.md +2 -2
  205. package/templates/base/SETUP.md +44 -8
  206. package/templates/base/bands.yaml +3 -3
  207. package/templates/base/intent/README.md +1 -0
  208. package/templates/base/knip.json +2 -1
  209. package/templates/base/pnpm-workspace.yaml +1 -22
  210. package/templates/base/runbooks/rollback-deploy.md +27 -0
  211. package/templates/base/scripts/check-agent-gates.ts +251 -225
  212. package/templates/base/scripts/check-bands.ts +665 -0
  213. package/templates/base/scripts/check-plan.ts +1047 -0
  214. package/templates/base/scripts/measure-loop.ts +293 -0
  215. package/templates/base/scripts/run-agent-evals.ts +1186 -0
  216. package/templates/base/scripts/sync-agent-rules.ts +0 -8
  217. package/templates/nestjs/.dependency-cruiser.json +1 -1
  218. package/templates/nestjs/.github/ISSUE_TEMPLATE/bug.yml +5 -5
  219. package/templates/nestjs/.github/workflows/ci.yml +58 -9
  220. package/templates/nestjs/.github/workflows/sast.yml +0 -5
  221. package/templates/nestjs/AGENTS.md +16 -12
  222. package/templates/nestjs/CONTRIBUTING.md +3 -2
  223. package/templates/nestjs/Dockerfile +4 -4
  224. package/templates/nestjs/README.md +4 -6
  225. package/templates/nestjs/_gitignore +0 -1
  226. package/templates/nestjs/package.json +15 -13
  227. package/templates/nestjs/src/app.controller.test.ts +1 -0
  228. package/templates/nestjs/src/health/health.controller.test.ts +1 -0
  229. package/templates/nestjs/src/port.test.ts +1 -0
  230. package/templates/nestjs/test/app.e2e.test.ts +1 -0
  231. package/templates/nestjs/tsconfig.build.json +2 -3
  232. package/templates/nestjs/tsconfig.json +1 -3
  233. package/templates/nestjs/vitest.config.ts +0 -1
  234. package/templates/nestjs/vitest.e2e.config.ts +0 -1
  235. package/templates/nextjs/.dependency-cruiser.json +1 -1
  236. package/templates/nextjs/.github/ISSUE_TEMPLATE/bug.yml +1 -1
  237. package/templates/nextjs/.github/workflows/ci.yml +58 -9
  238. package/templates/nextjs/.github/workflows/sast.yml +0 -5
  239. package/templates/nextjs/AGENTS.md +16 -12
  240. package/templates/nextjs/CONTRIBUTING.md +3 -2
  241. package/templates/nextjs/Dockerfile +2 -2
  242. package/templates/nextjs/README.md +5 -3
  243. package/templates/nextjs/app/layout.tsx +2 -2
  244. package/templates/nextjs/app/page.test.ts +1 -1
  245. package/templates/nextjs/app/page.tsx +1 -1
  246. package/templates/nextjs/package.json +9 -8
  247. package/templates/nextjs/test/home.e2e.test.ts +3 -7
  248. package/templates/nextjs/tsconfig.json +0 -3
  249. package/templates/nodejs/.dependency-cruiser.json +1 -1
  250. package/templates/nodejs/.github/ISSUE_TEMPLATE/bug.yml +5 -5
  251. package/templates/nodejs/.github/workflows/ci.yml +58 -9
  252. package/templates/nodejs/.github/workflows/sast.yml +0 -5
  253. package/templates/nodejs/AGENTS.md +16 -11
  254. package/templates/nodejs/CONTRIBUTING.md +4 -3
  255. package/templates/nodejs/Dockerfile +3 -3
  256. package/templates/nodejs/README.md +4 -4
  257. package/templates/nodejs/_gitignore +0 -1
  258. package/templates/nodejs/package.json +11 -9
  259. package/templates/nodejs/src/server.test.ts +23 -0
  260. package/templates/nodejs/src/server.ts +2 -2
  261. package/templates/nodejs/tsconfig.build.json +2 -3
  262. package/templates/nodejs/tsconfig.json +0 -4
  263. package/templates/payload/.agents/agents/verifier.md +1 -1
  264. package/templates/payload/.agents/review.md +21 -0
  265. package/templates/payload/.claude/agents/verifier.md +1 -1
  266. package/templates/payload/.cursor/agents/verifier.md +1 -1
  267. package/templates/payload/.dependency-cruiser.json +1 -1
  268. package/templates/payload/.github/ISSUE_TEMPLATE/bug.yml +1 -1
  269. package/templates/payload/.github/workflows/ci.yml +75 -10
  270. package/templates/payload/.github/workflows/sast.yml +0 -5
  271. package/templates/payload/AGENTS.md +21 -17
  272. package/templates/payload/CONTRIBUTING.md +4 -3
  273. package/templates/payload/Dockerfile +2 -2
  274. package/templates/payload/README.md +8 -4
  275. package/templates/payload/REVIEW.md +21 -0
  276. package/templates/payload/package.json +9 -7
  277. package/templates/payload/src/app/(frontend)/layout.tsx +2 -2
  278. package/templates/payload/src/app/(frontend)/page.test.ts +1 -1
  279. package/templates/payload/src/app/(frontend)/page.tsx +1 -1
  280. package/templates/payload/src/app/favicon.ico +0 -0
  281. package/templates/payload/src/app/health/route.test.ts +20 -2
  282. package/templates/payload/src/app/health/route.ts +9 -2
  283. package/templates/payload/src/collections/media.test.ts +36 -1
  284. package/templates/payload/src/collections/media.ts +1 -1
  285. package/templates/payload/src/payload.config.test.ts +15 -0
  286. package/templates/payload/test/home.e2e.test.ts +3 -7
  287. package/templates/payload/tsconfig.json +0 -1
  288. package/templates/turborepo/.agents/agents/verifier.md +1 -1
  289. package/templates/turborepo/.agents/review.md +21 -0
  290. package/templates/turborepo/.claude/agents/verifier.md +1 -1
  291. package/templates/turborepo/.cursor/agents/verifier.md +1 -1
  292. package/templates/turborepo/.dockerignore +9 -4
  293. package/templates/turborepo/.github/ISSUE_TEMPLATE/bug.yml +16 -1
  294. package/templates/turborepo/.github/dependabot.yml +1 -10
  295. package/templates/turborepo/.github/scripts/affected-apps.sh +5 -23
  296. package/templates/turborepo/.github/workflows/ci.yml +140 -103
  297. package/templates/turborepo/.github/workflows/deploy.yml +24 -23
  298. package/templates/turborepo/.github/workflows/sast.yml +0 -5
  299. package/templates/turborepo/AGENTS.md +21 -17
  300. package/templates/turborepo/CONTRIBUTING.md +6 -4
  301. package/templates/turborepo/README.md +8 -8
  302. package/templates/turborepo/REVIEW.md +21 -0
  303. package/templates/turborepo/apps/app/.dependency-cruiser.json +1 -1
  304. package/templates/turborepo/apps/app/AGENTS.md +9 -0
  305. package/templates/turborepo/apps/app/Dockerfile +2 -2
  306. package/templates/turborepo/apps/app/app/layout.tsx +2 -2
  307. package/templates/turborepo/apps/app/app/page.test.ts +1 -1
  308. package/templates/turborepo/apps/app/app/page.tsx +1 -1
  309. package/templates/turborepo/apps/app/package.json +3 -3
  310. package/templates/turborepo/apps/app/test/home.e2e.test.ts +3 -7
  311. package/templates/turborepo/apps/app/tsconfig.json +0 -3
  312. package/templates/turborepo/apps/backoffice/.dependency-cruiser.json +1 -1
  313. package/templates/turborepo/apps/backoffice/AGENTS.md +9 -0
  314. package/templates/turborepo/apps/backoffice/Dockerfile +2 -2
  315. package/templates/turborepo/apps/backoffice/package.json +4 -3
  316. package/templates/turborepo/apps/backoffice/src/app/(frontend)/layout.tsx +2 -2
  317. package/templates/turborepo/apps/backoffice/src/app/(frontend)/page.test.ts +1 -1
  318. package/templates/turborepo/apps/backoffice/src/app/(frontend)/page.tsx +1 -1
  319. package/templates/turborepo/apps/backoffice/src/app/favicon.ico +0 -0
  320. package/templates/turborepo/apps/backoffice/src/app/health/route.test.ts +20 -2
  321. package/templates/turborepo/apps/backoffice/src/app/health/route.ts +10 -2
  322. package/templates/turborepo/apps/backoffice/src/collections/media.test.ts +36 -1
  323. package/templates/turborepo/apps/backoffice/src/collections/media.ts +1 -1
  324. package/templates/turborepo/apps/backoffice/src/environment.test.ts +19 -0
  325. package/templates/turborepo/apps/backoffice/src/payload.config.test.ts +15 -0
  326. package/templates/turborepo/apps/backoffice/test/home.e2e.test.ts +3 -7
  327. package/templates/turborepo/apps/backoffice/tsconfig.json +0 -1
  328. package/templates/turborepo/knip.json +4 -2
  329. package/templates/turborepo/package.json +15 -15
  330. package/templates/turborepo/pnpm-workspace.yaml +1 -22
  331. package/templates/turborepo/turbo.json +32 -11
  332. package/templates/base/.agents/hooks/agent-suppression-gate.sh +0 -45
  333. package/templates/base/.claude/rules/agents-guide.md +0 -1
  334. package/templates/base/scripts/check-human-gates.ts +0 -383
  335. package/templates/base/scripts/check-intent.ts +0 -391
  336. package/templates/nextjs/knip.json +0 -4
  337. package/templates/payload/src/collections/users.test.ts +0 -10
  338. package/templates/turborepo/apps/backoffice/src/collections/users.test.ts +0 -10
@@ -15,10 +15,6 @@ type SubagentConfig = {
15
15
  const sourceDirectory = ".agents/rules";
16
16
  const configPath = ".agents/rules.json";
17
17
 
18
- const claudeExtras: Record<string, string> = {
19
- "agents-guide.md": "@../../AGENTS.md\n",
20
- };
21
-
22
18
  /**
23
19
  * List the names of files with an extension in a directory.
24
20
  * @param directory Directory to read.
@@ -87,10 +83,6 @@ for (const name of configNames) {
87
83
  expected.set(path.join(cursorDirectory, `${name}.mdc`), renderCursorRule(rule, body));
88
84
  }
89
85
 
90
- for (const [file, content] of Object.entries(claudeExtras)) {
91
- expected.set(path.join(claudeDirectory, file), content);
92
- }
93
-
94
86
  const skillSourceDirectory = ".agents/skills";
95
87
  const skillDirectories = [".claude/skills", ".cursor/skills"];
96
88
  const subagentSourceDirectory = ".agents/agents";
@@ -17,8 +17,8 @@
17
17
  }
18
18
  ],
19
19
  "options": {
20
+ "parser": "swc",
20
21
  "skipAnalysisNotInRules": true,
21
- "tsPreCompilationDeps": true,
22
22
  "enhancedResolveOptions": {
23
23
  "conditionNames": ["import", "require", "node", "default", "types"],
24
24
  "exportsFields": ["exports"]
@@ -21,7 +21,7 @@ body:
21
21
  id: version
22
22
  attributes:
23
23
  label: Commit
24
- placeholder: 769e0ef
24
+ placeholder: Output of `git rev-parse --short HEAD`
25
25
  validations:
26
26
  required: true
27
27
  - type: textarea
@@ -30,10 +30,10 @@ body:
30
30
  label: Environment
31
31
  description: List Node.js, operating system, package manager, and the request that triggers the issue.
32
32
  placeholder: |
33
- Node.js: 24.22.1
34
- OS: Ubuntu 24.04 / macOS
35
- Package manager: pnpm 12.6.0
36
- Request: curl -i http://localhost:3000/
33
+ Node.js: output of `node --version`
34
+ OS: Ubuntu / macOS / Windows
35
+ Package manager: output of `pnpm --version`
36
+ Request: curl -i http://localhost:3000/health
37
37
  validations:
38
38
  required: true
39
39
  - type: textarea
@@ -73,16 +73,14 @@ jobs:
73
73
  with:
74
74
  cache: true
75
75
  require-lockfile: true
76
- - name: Reject suppression directives
77
- run: pnpm suppressions:check
78
- - name: Check Cursor rules match .agents/rules
76
+ - name: Check rendered agent rules match .agents/rules
79
77
  run: pnpm rules:check
80
78
  - name: Check agent gates
81
79
  run: pnpm gates:check
82
- - name: Check human gates
83
- run: pnpm human-gates:check
84
- - name: Self-test the intent checker
85
- run: pnpm intent:check
80
+ - name: Check plans
81
+ run: pnpm plan:check
82
+ - name: Check bands
83
+ run: pnpm bands:check
86
84
  - name: Check lint
87
85
  run: pnpm lint:check
88
86
  - name: Check formatting
@@ -91,8 +89,6 @@ jobs:
91
89
  GITHUB_TOKEN: ${{ github.token }} # editorconfig-checker downloads its binary from GitHub releases; the token avoids the anonymous rate limit.
92
90
  - name: Check package.json ordering
93
91
  run: pnpm sort-package-json:check
94
- - name: Validate peer dependency contracts
95
- run: pnpm peers:check
96
92
  - name: Check types
97
93
  run: pnpm typecheck
98
94
  - name: Run Knip
@@ -170,6 +166,59 @@ jobs:
170
166
  environment: dev
171
167
  commit_sha: ${{ github.sha }}
172
168
 
169
+ triage:
170
+ name: Triage failed build
171
+ needs:
172
+ - changes
173
+ - checks
174
+ - image
175
+ if: failure() && vars.CLAUDE_CI_ENABLED == 'true' && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
176
+ runs-on: ubuntu-latest
177
+ timeout-minutes: 15
178
+ permissions:
179
+ actions: read # Needed to read the logs of the failed jobs.
180
+ id-token: write # Needed to authenticate the Claude GitHub App with the workflow's OIDC token.
181
+ pull-requests: write # Needed to post the summary on the pull request.
182
+ steps:
183
+ - name: Require a Claude credential
184
+ env:
185
+ ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
186
+ CLAUDE_CODE_OAUTH_TOKEN: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
187
+ run: |
188
+ [[ -n "$ANTHROPIC_API_KEY" || -n "$CLAUDE_CODE_OAUTH_TOKEN" ]] || { echo "::error::Set the CLAUDE_CODE_OAUTH_TOKEN or ANTHROPIC_API_KEY repository secret"; exit 1; }
189
+ - name: Collect the build log
190
+ env:
191
+ GH_TOKEN: ${{ github.token }}
192
+ REPOSITORY: ${{ github.repository }}
193
+ RUN_ID: ${{ github.run_id }}
194
+ run: |
195
+ mkdir -p out
196
+ for job in $(gh api "repos/$REPOSITORY/actions/runs/$RUN_ID/jobs" --paginate --jq '.jobs[] | select(.conclusion == "failure") | .id'); do
197
+ gh api --allow-escape-sequences "repos/$REPOSITORY/actions/jobs/$job/logs" >> out/build.log
198
+ done
199
+ - name: Triage failed build
200
+ id: triage
201
+ uses: anthropics/claude-code-action@61a9c274fa7110a66dfafc1bbbced03833eb25fe # v1.0.269
202
+ with:
203
+ anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
204
+ claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
205
+ prompt: >
206
+ Read the build log at out/build.log. Identify the most
207
+ likely cause, say whether the failure looks flaky or real, and write a
208
+ three-line summary for the PR thread.
209
+ claude_args: >-
210
+ --model claude-haiku-5-5
211
+ --max-turns 5
212
+ --allowedTools "Read"
213
+ --json-schema '{"type":"object","properties":{"summary":{"type":"string"}},"required":["summary"]}'
214
+ - name: Post the summary
215
+ env:
216
+ GH_TOKEN: ${{ github.token }}
217
+ PR_NUMBER: ${{ github.event.pull_request.number }}
218
+ REPOSITORY: ${{ github.repository }}
219
+ SUMMARY: ${{ fromJSON(steps.triage.outputs.structured_output).summary }}
220
+ run: gh pr comment "$PR_NUMBER" --repo "$REPOSITORY" --body "$SUMMARY"
221
+
173
222
  ci:
174
223
  name: All Checks
175
224
  if: always()
@@ -5,11 +5,6 @@ on:
5
5
  push:
6
6
  branches:
7
7
  - main
8
- paths-ignore:
9
- - "**/*.md"
10
- - ".agents/**"
11
- - ".claude/**"
12
- - ".cursor/**"
13
8
  schedule:
14
9
  - cron: "17 2 * * 1"
15
10
 
@@ -4,21 +4,21 @@ NestJS HTTP API in TypeScript on pnpm and Node.js `>=24.15.0 <25`.
4
4
 
5
5
  ## Commands
6
6
 
7
- | Task | Command |
8
- | :-------------------------- | :-------------------------------------------------- |
9
- | Start with reload | `pnpm start:dev` |
10
- | One test | `pnpm vitest run src/port.test.ts -t "<test name>"` |
11
- | Unit tests | `pnpm test`, or `pnpm test:coverage` |
12
- | End-to-end tests | `pnpm test:e2e` |
13
- | What `pre-push` runs | `pnpm check` |
14
- | Every check | `pnpm verify` |
15
- | Render rules after a change | `pnpm rules:sync` |
7
+ | Task | Command | Healthy output |
8
+ | :-------------------------- | :-------------------------------------------------- | :------------------------------------------------------- |
9
+ | Start with reload | `pnpm start:dev` | `Nest application successfully started` |
10
+ | One test | `pnpm vitest run src/port.test.ts -t "<test name>"` | `Tests 1 passed \| 9 skipped (10)` |
11
+ | Unit tests | `pnpm test`, or `pnpm test:coverage` | `Tests 12 passed (12)` |
12
+ | End-to-end tests | `pnpm test:e2e` | `Tests 2 passed (2)` |
13
+ | What `pre-push` runs | `pnpm check` | exits 0; the last line is `$ tsc -p tsconfig.build.json` |
14
+ | Every check | `pnpm verify` | exits 0; the last line is `$ tsc -p tsconfig.build.json` |
15
+ | Render rules after a change | `pnpm rules:sync` | `Synced 67 agent rule files; 0 updated.` |
16
16
 
17
17
  ## Verifying your work
18
18
 
19
19
  - Build: `pnpm build` (prints nothing after `$ tsc -p tsconfig.build.json`)
20
20
  - Test: `pnpm test:coverage` (all green, then the coverage summary; never skip or delete a failing test)
21
- - Lint: `pnpm verify:static` (ESLint allows zero warnings; prints `✔ no dependency violations found`)
21
+ - Static checks: `pnpm verify:static` (ESLint allows zero warnings; every check must pass)
22
22
 
23
23
  Run all three before reporting any task complete, and paste the output. `pnpm verify` runs all three.
24
24
 
@@ -33,13 +33,17 @@ Run all three before reporting any task complete, and paste the output. `pnpm ve
33
33
  2. **Read configuration from environment variables and fail when one is missing**, as `parsePort` does. Document each variable in `.env.example`.
34
34
  3. **Log through Nest's `Logger`.** It goes to the `ConsoleLogger` set in `src/main.ts`.
35
35
  4. **Start from the accepted spec, in plan mode** (Cursor: Plan Mode). Give the plan the change's `intent/<change>/intent.md` and `spec.md`. Commit the approved plan as `intent/<change>/plan.md` with an `Accepted by:` line naming the engineer, as `.agents/skills/sdlc/playbooks/build.md` describes.
36
- 5. **Start a bug fix with a failing test.** Reproduce the bug as a test, confirm it fails for the reason you expect, and commit it. Then create `.git/bug-fix-in-progress`, so `.agents/hooks/agent-test-edit-gate.sh` blocks test edits, make the test pass without editing it, and delete `.git/bug-fix-in-progress`.
36
+ 5. **Start a bug fix with a failing test.** A bug fix has no intent and no spec; its plan, `intent/<short-description>/plan.md`, is accepted by an engineer before any code changes. Reproduce the bug as a test, confirm it fails for the reason you expect, and commit it on a `fix/` branch. Then `.agents/hooks/agent-test-edit-gate.sh` blocks test edits by itself: make the test pass without editing it. On a branch with another name, create `.git/bug-fix-in-progress` first, and delete it once the test passes.
37
37
  6. **Do not start work a person did not ask for.** When a message reports a problem without asking for work, answer in a few lines and end with the message that would start it: `/sdlc` followed by their own words.
38
38
  7. **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. Never merge a pull request: a person merges it with `--squash` after code owner approval, bottom-up for a stack of pull requests.
39
39
  8. **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.
40
+ 9. **Run parallel sessions in separate worktrees, on tasks that touch different files.** Start each with `claude --worktree <name>`: a worktree is its own checkout on its own branch. Tasks that share files run in one session, one after another. Start with two or three sessions, and add one only while you can review every stream properly.
40
41
 
41
42
  ## Things Claude gets wrong
42
43
 
43
44
  When Claude makes a mistake twice, add the correction here.
44
45
 
45
- - **Production gate**: `.agents/hooks/agent-production-gate.sh` blocks a shell command that deploys to `prod`, runs a Railway CLI command that names `prod`, or pushes a release tag, 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.
46
+ - **Production gate**: `.agents/hooks/agent-production-gate.sh` blocks a shell command that deploys to `prod`, runs a Railway CLI command that names `prod`, or pushes a release tag, unless a release manager started the session with `RELEASE_APPROVAL` set. Any value lifts the gate except an empty value, `0`, `false`, and `no`, in any letter case. 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.
47
+ - **Issues**: open an issue only to hand work to another person, never to give a pull request a number to close. A pull request closes an issue that already exists with `Closes #<issue>`.
48
+ - **What belongs in the repository**: files, commit messages, and pull requests hold the change, its reason, and the checks. Write no date, log, history, mistake count, token figure, or session note into a file.
49
+ - **Sourced requirements**: add a requirement to an intent, spec, or plan only when a person decided it or a named source says it. This includes a requirement a review bot suggests. When no person decided it and no source says it, leave it out and answer the thread with that.
@@ -8,7 +8,7 @@ Use this guide to prepare changes to this repository.
8
8
  - Change the Node.js version in `.nvmrc` and the `Dockerfile` together. Dependabot updates only the `Dockerfile`.
9
9
  - Install pnpm once with `npm install --global pnpm`. It switches to the version declared by `package.json#packageManager` automatically.
10
10
  - Use Claude Code v2.1.295 or later. It reads `CLAUDE.md`, which imports `AGENTS.md`, and supports the `onFailure` field the agent hooks use.
11
- - Install gitleaks 8.19 or later, which the `pre-commit` hook runs, and jq, which the agent hooks and the `pre-push` hook (`pnpm gates:check`) need: `brew install gitleaks jq` on macOS, or install them from each project's releases on Linux.
11
+ - Install gitleaks 8.21 or later, which the `pre-commit` hook runs, and jq, which the agent hooks and the `pre-push` hook (`pnpm gates:check`) need: `brew install gitleaks jq` on macOS, or install them from each project's releases on Linux.
12
12
 
13
13
  From the repository root:
14
14
 
@@ -35,9 +35,10 @@ Run the narrowest check that covers the change while you work. Git hooks run the
35
35
  | `pre-merge-commit` | blocks merge commits on `main` |
36
36
  | `pre-push` | blocks pushes to `main` except the push that creates it, then `pnpm check`: the static checks, the unit tests related to your changes, and the production build |
37
37
 
38
- - **Scans:** CI also runs coverage, the build, the container image, and the secret, SAST, OSV, CodeQL, dependency-review, and OpenSSF Scorecard scans. Dependabot and OSV-Scanner report vulnerable dependencies.
38
+ - **Scans:** CI also runs coverage, the build, the container image, and the secret, SAST, OSV, CodeQL, dependency-review, and OpenSSF Scorecard scans. CodeQL, dependency-review, and Scorecard run on public repositories, and on private ones when the `CODE_SCANNING` repository variable is `true`. Dependabot and OSV-Scanner report vulnerable dependencies.
39
39
  - **End-to-end tests:** run `pnpm test:e2e` when you change endpoints. CI runs it on every pull request that is ready for review and changes code.
40
40
  - **Coverage:** CI requires 95% line coverage on changed lines in `src/`, except `main.ts` and `*.module.ts`, which hold only wiring. Keep logic out of them, as `src/port.ts` does for `main.ts`. CI does not gate branch coverage, because NestJS decorators emit metadata branches that never run.
41
+ - **Agent evals:** run `pnpm evals:run` after you change `AGENTS.md`, a skill under `.agents/skills/`, or a hook under `.agents/hooks/`, and add a case name to run one case. It runs the cases in `.agents/skill-evals/` with Claude Code on your own Claude login, so it spends your Claude usage, and it is not part of `pnpm verify`.
41
42
 
42
43
  Run `pnpm verify` for repository changes.
43
44
 
@@ -1,6 +1,6 @@
1
- # Runs on any OCI platform (Railway, Vercel Container Runtime, Fly.io, Cloud Run). The platform sets `PORT`.
1
+ # Runs on any OCI platform (Railway, Fly.io, Cloud Run). The platform sets `PORT`.
2
2
  FROM \
3
- node@sha256:06d7adf3e0ef61a13f1d28682726366f97a15aa1888c934d3ecec86c33918b53 \
3
+ node:24.22.1-alpine@sha256:06d7adf3e0ef61a13f1d28682726366f97a15aa1888c934d3ecec86c33918b53 \
4
4
  AS base
5
5
  WORKDIR /app
6
6
  COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
@@ -16,7 +16,7 @@ FROM base AS prod-deps
16
16
  RUN pnpm install --frozen-lockfile --ignore-scripts --prod
17
17
 
18
18
  FROM \
19
- node@sha256:06d7adf3e0ef61a13f1d28682726366f97a15aa1888c934d3ecec86c33918b53
19
+ node:24.22.1-alpine@sha256:06d7adf3e0ef61a13f1d28682726366f97a15aa1888c934d3ecec86c33918b53
20
20
  ENV NODE_ENV=production
21
21
  WORKDIR /app
22
22
  # Apply Alpine security fixes released after the base image, and drop npm, corepack, and yarn: the app never runs them, and their bundled dependencies carry their own CVEs.
@@ -33,5 +33,5 @@ COPY package.json ./
33
33
  COPY --from=prod-deps /app/node_modules ./node_modules
34
34
  COPY --from=build /app/dist ./dist
35
35
  USER 1000
36
- HEALTHCHECK --interval=30s --timeout=5s CMD ["node", "-e", "fetch('http://127.0.0.1:' + (process.env.PORT || 3000) + '/health').then(response => process.exit(response.ok ? 0 : 1), () => process.exit(1))"]
36
+ HEALTHCHECK --interval=30s --timeout=5s CMD ["node", "-e", "fetch('http://127.0.0.1:' + process.env.PORT + '/health').then(response => process.exit(response.ok ? 0 : 1), () => process.exit(1))"]
37
37
  CMD ["node", "dist/main.js"]
@@ -1,6 +1,6 @@
1
1
  # next-friday-template-nestjs
2
2
 
3
- Next Friday starter for NestJS services.
3
+ NestJS HTTP API.
4
4
 
5
5
  ## Getting started
6
6
 
@@ -28,21 +28,19 @@ Follow [SETUP.md](SETUP.md) in order. It sets up the repository, the reviews, an
28
28
  | `pnpm test` | Run unit tests (`src/**/*.test.ts`) |
29
29
  | `pnpm test:e2e` | Run end-to-end tests (`test/**/*.e2e.test.ts`) |
30
30
  | `pnpm check` | Run the static checks, the unit tests for changed code, and the production build (the `pre-push` hook) |
31
- | `pnpm verify` | Run the static checks, all unit tests with coverage, and the production build |
31
+ | `pnpm verify` | Run the static checks, all unit tests with coverage, the end-to-end tests, and the production build |
32
32
 
33
- CI also runs the build, the end-to-end tests, the container image scan, and the security scans, including CodeQL, dependency review, and OpenSSF Scorecard. CodeQL and Scorecard run on public repositories, and on private ones when the `CODE_SCANNING` repository variable is `true`.
33
+ CI also runs the build, the end-to-end tests, the container image scan, and the security scans, including CodeQL, dependency review, and OpenSSF Scorecard. CodeQL, dependency review, and Scorecard run on public repositories, and on private ones when the `CODE_SCANNING` repository variable is `true`.
34
34
 
35
35
  ## Container
36
36
 
37
- The `Dockerfile` builds a production image that runs as the `node` user. The platform must set `PORT`; Railway sets it automatically.
37
+ The `Dockerfile` builds a production image that runs as a non-root user (UID 1000). The platform must set `PORT`; Railway sets it automatically. The build needs `pnpm-lock.yaml`, so run `pnpm install` once before the first `docker build`.
38
38
 
39
39
  ```sh
40
40
  docker build -t app .
41
41
  docker run --env PORT=3000 --publish 3000:3000 app
42
42
  ```
43
43
 
44
- On Vercel, the zero-configuration NestJS preset takes precedence over the `Dockerfile`. Set the project framework to Container to use the image, and set `PORT` in the project settings.
45
-
46
44
  ## Deploy
47
45
 
48
46
  `.github/workflows/deploy.yml` deploys the `Dockerfile` to Railway and promotes one commit through `dev`, `uat`, and `prod`. `railway.json` sets the Railway health check to `/health`. The workflow stays off until you configure it:
@@ -2,7 +2,6 @@ node_modules
2
2
  .pnpm-store
3
3
 
4
4
  coverage
5
- *.tsbuildinfo
6
5
 
7
6
  .cache
8
7
 
@@ -2,7 +2,7 @@
2
2
  "name": "next-friday-template-nestjs",
3
3
  "version": "0.1.0",
4
4
  "private": true,
5
- "description": "Next Friday NestJS template.",
5
+ "description": "NestJS HTTP API.",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/next-friday/next-friday-template-nestjs.git"
@@ -11,41 +11,41 @@
11
11
  "author": "Next Friday",
12
12
  "type": "module",
13
13
  "scripts": {
14
+ "bands:check": "node scripts/check-bands.ts",
14
15
  "build": "tsc -p tsconfig.build.json",
15
16
  "check": "pnpm verify:static && pnpm test:changed && pnpm build",
16
- "clean": "rm -rf dist coverage *.tsbuildinfo .eslintcache node_modules/.cache",
17
+ "clean": "rm -rf dist coverage .eslintcache node_modules/.cache",
17
18
  "debug:build": "tsc -p tsconfig.build.json --watch --preserveWatchOutput",
18
- "debug:serve": "node --env-file-if-exists=.env --inspect --watch dist/main",
19
+ "debug:serve": "node --env-file-if-exists=.env --inspect --watch dist/main.js",
19
20
  "depcruise": "depcruise --config .dependency-cruiser.json src test eslint.config.ts vitest.config.ts vitest.e2e.config.ts",
20
21
  "dev:build": "tsc -p tsconfig.build.json --watch --preserveWatchOutput",
21
- "dev:serve": "node --env-file-if-exists=.env --watch dist/main",
22
+ "dev:serve": "node --env-file-if-exists=.env --watch dist/main.js",
23
+ "evals:run": "node scripts/run-agent-evals.ts",
22
24
  "format": "prettier --write --cache .",
23
25
  "format:check": "prettier --check --cache . && editorconfig-checker",
24
26
  "gates:check": "node scripts/check-agent-gates.ts",
25
- "human-gates:check": "node scripts/check-human-gates.ts",
26
- "intent:check": "node scripts/check-intent.ts",
27
27
  "knip": "knip",
28
28
  "lint": "eslint . --fix --cache --max-warnings=0 --no-inline-config",
29
29
  "lint:check": "eslint . --cache --max-warnings=0 --no-inline-config",
30
- "peers:check": "pnpm peers check",
30
+ "loop:measure": "node scripts/measure-loop.ts",
31
+ "plan:check": "node scripts/check-plan.ts",
31
32
  "prepare": "husky",
32
33
  "rules:check": "node scripts/sync-agent-rules.ts --check",
33
34
  "rules:sync": "node scripts/sync-agent-rules.ts",
34
35
  "sort-package-json": "sort-package-json package.json",
35
36
  "sort-package-json:check": "sort-package-json --check package.json",
36
- "start": "pnpm build && node --env-file-if-exists=.env dist/main",
37
+ "start": "pnpm build && node --env-file-if-exists=.env dist/main.js",
37
38
  "start:debug": "pnpm build && pnpm run \"/^debug:/\"",
38
39
  "start:dev": "pnpm build && pnpm run \"/^dev:/\"",
39
- "start:prod": "node dist/main",
40
- "suppressions:check": "bash .agents/hooks/agent-suppression-gate.sh --repo",
40
+ "start:prod": "node dist/main.js",
41
41
  "test": "vitest run --passWithNoTests",
42
42
  "test:changed": "if git rev-parse --quiet --verify origin/main > /dev/null && git diff --quiet \"$(git merge-base origin/main HEAD)\" -- pnpm-lock.yaml pnpm-workspace.yaml \"*package.json\" \"*tsconfig.json\" .husky; then vitest run --changed origin/main --passWithNoTests; else vitest run --passWithNoTests; fi",
43
43
  "test:coverage": "vitest run --coverage --passWithNoTests",
44
44
  "test:e2e": "vitest run --config vitest.e2e.config.ts",
45
45
  "test:watch": "vitest",
46
46
  "typecheck": "tsc --noEmit -p tsconfig.json",
47
- "verify": "pnpm verify:static && pnpm test:coverage && pnpm build",
48
- "verify:static": "pnpm suppressions:check && pnpm rules:check && pnpm gates:check && pnpm human-gates:check && pnpm intent:check && pnpm lint:check && pnpm format:check && pnpm sort-package-json:check && pnpm peers:check && pnpm typecheck && pnpm knip && pnpm depcruise"
47
+ "verify": "pnpm verify:static && pnpm test:coverage && pnpm test:e2e && pnpm build",
48
+ "verify:static": "pnpm rules:check && pnpm gates:check && pnpm plan:check && pnpm bands:check && pnpm lint:check && pnpm format:check && pnpm sort-package-json:check && pnpm typecheck && pnpm knip && pnpm depcruise"
49
49
  },
50
50
  "dependencies": {
51
51
  "@nestjs/common": "12.3.2",
@@ -61,6 +61,7 @@
61
61
  "@next-friday/commitlint-config-friday": "4.0.0",
62
62
  "@next-friday/eslint-config-friday": "5.1.0",
63
63
  "@next-friday/prettier-config-friday": "4.0.0",
64
+ "@swc/core": "1.16.22",
64
65
  "@types/node": "26.6.6",
65
66
  "@types/supertest": "7.2.1",
66
67
  "@vitest/coverage-v8": "5.0.5",
@@ -76,7 +77,8 @@
76
77
  "sort-package-json": "4.1.0",
77
78
  "supertest": "7.3.1",
78
79
  "typescript": "7.0.2",
79
- "vitest": "5.0.5"
80
+ "vitest": "5.0.5",
81
+ "yaml": "2.9.1"
80
82
  },
81
83
  "packageManager": "pnpm@12.6.0+sha512.3ef68f951cb111ac204b4a5a16f0b2ddf0da56a96e0413e81d855d9f0b55ef926714709028e1cd00c405c2c5fb7b9e8ec4dc46777c805d0373c2f2ff00fd20ec",
82
84
  "engines": {
@@ -1,3 +1,4 @@
1
+ import {beforeEach, describe, expect, it} from "vitest";
1
2
  import {Test, TestingModule} from "@nestjs/testing";
2
3
 
3
4
  import {AppController} from "./app.controller.js";
@@ -1,3 +1,4 @@
1
+ import {describe, expect, it} from "vitest";
1
2
  import {TerminusModule} from "@nestjs/terminus";
2
3
  import {Test} from "@nestjs/testing";
3
4
 
@@ -1,4 +1,5 @@
1
1
  import {assert, integer, property} from "fast-check";
2
+ import {describe, expect, it} from "vitest";
2
3
 
3
4
  import {parsePort} from "./port.js";
4
5
 
@@ -1,3 +1,4 @@
1
+ import {afterEach, beforeEach, describe, expect, it} from "vitest";
1
2
  import request from "supertest";
2
3
  import {Test, TestingModule} from "@nestjs/testing";
3
4
  import type {INestApplication} from "@nestjs/common";
@@ -1,9 +1,8 @@
1
1
  {
2
2
  "extends": "./tsconfig.json",
3
3
  "compilerOptions": {
4
- "rootDir": "./src",
5
- "types": ["node"]
4
+ "rootDir": "./src"
6
5
  },
7
6
  "include": ["src"],
8
- "exclude": ["node_modules", "test", "dist", "**/*.test.ts"]
7
+ "exclude": ["node_modules", "dist", "**/*.test.ts"]
9
8
  }
@@ -6,14 +6,12 @@
6
6
  "removeComments": true,
7
7
  "emitDecoratorMetadata": true,
8
8
  "experimentalDecorators": true,
9
- "incremental": true,
10
- "resolveJsonModule": true,
11
9
  "skipLibCheck": true,
12
10
  "sourceMap": true,
13
11
  "strictPropertyInitialization": false,
14
12
  "outDir": "./dist",
15
13
  "rootDir": ".",
16
- "types": ["vitest/globals", "node"]
14
+ "types": ["node"]
17
15
  },
18
16
  "include": ["**/*.ts"],
19
17
  "exclude": ["node_modules", "dist"]
@@ -2,7 +2,6 @@ import {defineConfig} from "vitest/config";
2
2
 
3
3
  export default defineConfig({
4
4
  test: {
5
- globals: true,
6
5
  coverage: {
7
6
  reporter: ["text", "html", "cobertura"],
8
7
  include: ["src/**/*.ts"],
@@ -2,7 +2,6 @@ import {defineConfig} from "vitest/config";
2
2
 
3
3
  export default defineConfig({
4
4
  test: {
5
- globals: true,
6
5
  include: ["test/**/*.e2e.test.ts"],
7
6
  },
8
7
  });
@@ -20,8 +20,8 @@
20
20
  }
21
21
  ],
22
22
  "options": {
23
+ "parser": "swc",
23
24
  "skipAnalysisNotInRules": true,
24
- "tsPreCompilationDeps": true,
25
25
  "enhancedResolveOptions": {
26
26
  "conditionNames": ["import", "require", "node", "default", "types"],
27
27
  "exportsFields": ["exports"]
@@ -21,7 +21,7 @@ body:
21
21
  id: version
22
22
  attributes:
23
23
  label: Commit
24
- placeholder: 769e0ef
24
+ placeholder: Output of `git rev-parse --short HEAD`
25
25
  validations:
26
26
  required: true
27
27
  - type: textarea
@@ -73,16 +73,14 @@ jobs:
73
73
  with:
74
74
  cache: true
75
75
  require-lockfile: true
76
- - name: Reject suppression directives
77
- run: pnpm suppressions:check
78
- - name: Check Cursor rules match .agents/rules
76
+ - name: Check rendered agent rules match .agents/rules
79
77
  run: pnpm rules:check
80
78
  - name: Check agent gates
81
79
  run: pnpm gates:check
82
- - name: Check human gates
83
- run: pnpm human-gates:check
84
- - name: Self-test the intent checker
85
- run: pnpm intent:check
80
+ - name: Check plans
81
+ run: pnpm plan:check
82
+ - name: Check bands
83
+ run: pnpm bands:check
86
84
  - name: Check lint
87
85
  run: pnpm lint:check
88
86
  - name: Check formatting
@@ -91,8 +89,6 @@ jobs:
91
89
  GITHUB_TOKEN: ${{ github.token }} # editorconfig-checker downloads its binary from GitHub releases; the token avoids the anonymous rate limit.
92
90
  - name: Check package.json ordering
93
91
  run: pnpm sort-package-json:check
94
- - name: Validate peer dependency contracts
95
- run: pnpm peers:check
96
92
  - name: Check types
97
93
  run: pnpm typecheck
98
94
  - name: Run Knip
@@ -176,6 +172,59 @@ jobs:
176
172
  environment: dev
177
173
  commit_sha: ${{ github.sha }}
178
174
 
175
+ triage:
176
+ name: Triage failed build
177
+ needs:
178
+ - changes
179
+ - checks
180
+ - image
181
+ if: failure() && vars.CLAUDE_CI_ENABLED == 'true' && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
182
+ runs-on: ubuntu-latest
183
+ timeout-minutes: 15
184
+ permissions:
185
+ actions: read # Needed to read the logs of the failed jobs.
186
+ id-token: write # Needed to authenticate the Claude GitHub App with the workflow's OIDC token.
187
+ pull-requests: write # Needed to post the summary on the pull request.
188
+ steps:
189
+ - name: Require a Claude credential
190
+ env:
191
+ ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
192
+ CLAUDE_CODE_OAUTH_TOKEN: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
193
+ run: |
194
+ [[ -n "$ANTHROPIC_API_KEY" || -n "$CLAUDE_CODE_OAUTH_TOKEN" ]] || { echo "::error::Set the CLAUDE_CODE_OAUTH_TOKEN or ANTHROPIC_API_KEY repository secret"; exit 1; }
195
+ - name: Collect the build log
196
+ env:
197
+ GH_TOKEN: ${{ github.token }}
198
+ REPOSITORY: ${{ github.repository }}
199
+ RUN_ID: ${{ github.run_id }}
200
+ run: |
201
+ mkdir -p out
202
+ for job in $(gh api "repos/$REPOSITORY/actions/runs/$RUN_ID/jobs" --paginate --jq '.jobs[] | select(.conclusion == "failure") | .id'); do
203
+ gh api --allow-escape-sequences "repos/$REPOSITORY/actions/jobs/$job/logs" >> out/build.log
204
+ done
205
+ - name: Triage failed build
206
+ id: triage
207
+ uses: anthropics/claude-code-action@61a9c274fa7110a66dfafc1bbbced03833eb25fe # v1.0.269
208
+ with:
209
+ anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
210
+ claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
211
+ prompt: >
212
+ Read the build log at out/build.log. Identify the most
213
+ likely cause, say whether the failure looks flaky or real, and write a
214
+ three-line summary for the PR thread.
215
+ claude_args: >-
216
+ --model claude-haiku-5-5
217
+ --max-turns 5
218
+ --allowedTools "Read"
219
+ --json-schema '{"type":"object","properties":{"summary":{"type":"string"}},"required":["summary"]}'
220
+ - name: Post the summary
221
+ env:
222
+ GH_TOKEN: ${{ github.token }}
223
+ PR_NUMBER: ${{ github.event.pull_request.number }}
224
+ REPOSITORY: ${{ github.repository }}
225
+ SUMMARY: ${{ fromJSON(steps.triage.outputs.structured_output).summary }}
226
+ run: gh pr comment "$PR_NUMBER" --repo "$REPOSITORY" --body "$SUMMARY"
227
+
179
228
  ci:
180
229
  name: All Checks
181
230
  if: always()
@@ -5,11 +5,6 @@ on:
5
5
  push:
6
6
  branches:
7
7
  - main
8
- paths-ignore:
9
- - "**/*.md"
10
- - ".agents/**"
11
- - ".claude/**"
12
- - ".cursor/**"
13
8
  schedule:
14
9
  - cron: "17 2 * * 1"
15
10