cohorte 2.10.1 → 3.0.0-dev.1

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 (213) hide show
  1. package/README.md +7 -0
  2. package/assets/manifest.json +193 -0
  3. package/assets/migrations/config/README.md +12 -0
  4. package/assets/migrations/state/0001_init.sql +154 -0
  5. package/assets/prompts/README.md +11 -0
  6. package/assets/prompts/agents/fixer.md +7 -0
  7. package/assets/prompts/agents/implementer.md +12 -0
  8. package/assets/prompts/agents/reviewer.md +8 -0
  9. package/assets/prompts/agents/security-reviewer.md +7 -0
  10. package/assets/prompts/phases/build.md +5 -0
  11. package/assets/prompts/phases/review.md +5 -0
  12. package/assets/prompts/phases/test.md +5 -0
  13. package/assets/prompts/system.md +11 -0
  14. package/assets/schemas/agent-output.schema.json +225 -0
  15. package/assets/schemas/auth-status.schema.json +87 -0
  16. package/assets/schemas/command-result.schema.json +192 -0
  17. package/assets/schemas/commands.schema.json +952 -0
  18. package/assets/schemas/config.schema.json +2259 -0
  19. package/assets/schemas/doctor-report.schema.json +104 -0
  20. package/assets/schemas/events.schema.json +8514 -0
  21. package/assets/schemas/fake-script.schema.json +549 -0
  22. package/assets/schemas/inspect.schema.json +3133 -0
  23. package/assets/schemas/manifest.schema.json +79 -0
  24. package/assets/schemas/ownership.schema.json +52 -0
  25. package/assets/schemas/policy-verdict.schema.json +282 -0
  26. package/assets/schemas/project-model.schema.json +783 -0
  27. package/assets/schemas/project-status.schema.json +217 -0
  28. package/assets/schemas/reconcile-plan.schema.json +154 -0
  29. package/assets/schemas/run-diff.schema.json +177 -0
  30. package/assets/schemas/run-snapshot-manifest.schema.json +2104 -0
  31. package/assets/schemas/run-state.schema.json +1755 -0
  32. package/assets/schemas/runtime-capabilities.schema.json +1545 -0
  33. package/assets/schemas/sandbox-capabilities.schema.json +116 -0
  34. package/assets/schemas/skill.schema.json +87 -0
  35. package/assets/schemas/spec.schema.json +202 -0
  36. package/assets/schemas/tool-catalogue.schema.json +655 -0
  37. package/assets/schemas/trust-record.schema.json +38 -0
  38. package/assets/skills/README.md +9 -0
  39. package/assets/skills/inspect-surface.md +4 -0
  40. package/dist/agent-host.mjs +2187 -0
  41. package/dist/agent-host.mjs.map +1 -0
  42. package/dist/bundle-manifest.json +104 -0
  43. package/dist/chunks/__host-DgGPyco9.mjs +18 -0
  44. package/dist/chunks/__host-DgGPyco9.mjs.map +1 -0
  45. package/dist/chunks/approve-Cv135UqI.mjs +19 -0
  46. package/dist/chunks/approve-Cv135UqI.mjs.map +1 -0
  47. package/dist/chunks/auth-BT5oVp76.mjs +132 -0
  48. package/dist/chunks/auth-BT5oVp76.mjs.map +1 -0
  49. package/dist/chunks/auth-CYOh60KG.mjs +93 -0
  50. package/dist/chunks/auth-CYOh60KG.mjs.map +1 -0
  51. package/dist/chunks/brainstorm-BwKA6yZP.mjs +7 -0
  52. package/dist/chunks/brainstorm-BwKA6yZP.mjs.map +1 -0
  53. package/dist/chunks/cancel-KV_cpsqS.mjs +15 -0
  54. package/dist/chunks/cancel-KV_cpsqS.mjs.map +1 -0
  55. package/dist/chunks/canonical-C8UxeEmB.mjs +57 -0
  56. package/dist/chunks/canonical-C8UxeEmB.mjs.map +1 -0
  57. package/dist/chunks/catalogue-BvwSrM_j.mjs +1549 -0
  58. package/dist/chunks/catalogue-BvwSrM_j.mjs.map +1 -0
  59. package/dist/chunks/compose-Dvxunpto.mjs +7307 -0
  60. package/dist/chunks/compose-Dvxunpto.mjs.map +1 -0
  61. package/dist/chunks/config-DefHA2Lw.mjs +96 -0
  62. package/dist/chunks/config-DefHA2Lw.mjs.map +1 -0
  63. package/dist/chunks/contract-BkMjU1kR.mjs +295 -0
  64. package/dist/chunks/contract-BkMjU1kR.mjs.map +1 -0
  65. package/dist/chunks/contract-bQ9FJl4N.mjs +123 -0
  66. package/dist/chunks/contract-bQ9FJl4N.mjs.map +1 -0
  67. package/dist/chunks/deny-ClTxSvHJ.mjs +15 -0
  68. package/dist/chunks/deny-ClTxSvHJ.mjs.map +1 -0
  69. package/dist/chunks/diff-Qw0II0sj.mjs +101 -0
  70. package/dist/chunks/diff-Qw0II0sj.mjs.map +1 -0
  71. package/dist/chunks/discover-eS01-me1.mjs +21 -0
  72. package/dist/chunks/discover-eS01-me1.mjs.map +1 -0
  73. package/dist/chunks/doctor-B-H2UK5e.mjs +222 -0
  74. package/dist/chunks/doctor-B-H2UK5e.mjs.map +1 -0
  75. package/dist/chunks/fix-D4Tj8RVA.mjs +18 -0
  76. package/dist/chunks/fix-D4Tj8RVA.mjs.map +1 -0
  77. package/dist/chunks/gc-BBXlBF5w.mjs +161 -0
  78. package/dist/chunks/gc-BBXlBF5w.mjs.map +1 -0
  79. package/dist/chunks/init-BUnzIkeE.mjs +63 -0
  80. package/dist/chunks/init-BUnzIkeE.mjs.map +1 -0
  81. package/dist/chunks/inspect-Buby4cQD.mjs +22 -0
  82. package/dist/chunks/inspect-Buby4cQD.mjs.map +1 -0
  83. package/dist/chunks/logs-Giq5sUau.mjs +25 -0
  84. package/dist/chunks/logs-Giq5sUau.mjs.map +1 -0
  85. package/dist/chunks/migrate-DybihKzZ.mjs +33 -0
  86. package/dist/chunks/migrate-DybihKzZ.mjs.map +1 -0
  87. package/dist/chunks/models-Btp6X2YZ.mjs +24 -0
  88. package/dist/chunks/models-Btp6X2YZ.mjs.map +1 -0
  89. package/dist/chunks/pause-BASBfKLO.mjs +16 -0
  90. package/dist/chunks/pause-BASBfKLO.mjs.map +1 -0
  91. package/dist/chunks/policy-DUIgzF3W.mjs +139 -0
  92. package/dist/chunks/policy-DUIgzF3W.mjs.map +1 -0
  93. package/dist/chunks/providers-Dx78imKj.mjs +19 -0
  94. package/dist/chunks/providers-Dx78imKj.mjs.map +1 -0
  95. package/dist/chunks/reconcile-Bhy3IIYo.mjs +50 -0
  96. package/dist/chunks/reconcile-Bhy3IIYo.mjs.map +1 -0
  97. package/dist/chunks/render-DyZr5Lgi.mjs +53 -0
  98. package/dist/chunks/render-DyZr5Lgi.mjs.map +1 -0
  99. package/dist/chunks/resume-GJQRb2Eb.mjs +15 -0
  100. package/dist/chunks/resume-GJQRb2Eb.mjs.map +1 -0
  101. package/dist/chunks/retry-CLrUem1H.mjs +15 -0
  102. package/dist/chunks/retry-CLrUem1H.mjs.map +1 -0
  103. package/dist/chunks/review-BDdjb6kB.mjs +17 -0
  104. package/dist/chunks/review-BDdjb6kB.mjs.map +1 -0
  105. package/dist/chunks/run-CgTWYlcd.mjs +82 -0
  106. package/dist/chunks/run-CgTWYlcd.mjs.map +1 -0
  107. package/dist/chunks/run-tool-C3rAv4XF.mjs +26 -0
  108. package/dist/chunks/run-tool-C3rAv4XF.mjs.map +1 -0
  109. package/dist/chunks/scan-8Gy_B6kI.mjs +122 -0
  110. package/dist/chunks/scan-8Gy_B6kI.mjs.map +1 -0
  111. package/dist/chunks/schema-C9QbUW4H.mjs +578 -0
  112. package/dist/chunks/schema-C9QbUW4H.mjs.map +1 -0
  113. package/dist/chunks/send-BdnJ85Nz.mjs +19 -0
  114. package/dist/chunks/send-BdnJ85Nz.mjs.map +1 -0
  115. package/dist/chunks/ship-DTuLGoaJ.mjs +19 -0
  116. package/dist/chunks/ship-DTuLGoaJ.mjs.map +1 -0
  117. package/dist/chunks/shutdown-BM92Iyv2.mjs +15 -0
  118. package/dist/chunks/shutdown-BM92Iyv2.mjs.map +1 -0
  119. package/dist/chunks/skip-DZG5kpcH.mjs +18 -0
  120. package/dist/chunks/skip-DZG5kpcH.mjs.map +1 -0
  121. package/dist/chunks/spec-Bq0P3jVh.mjs +20 -0
  122. package/dist/chunks/spec-Bq0P3jVh.mjs.map +1 -0
  123. package/dist/chunks/src-CId6kMsY.mjs +1689 -0
  124. package/dist/chunks/src-CId6kMsY.mjs.map +1 -0
  125. package/dist/chunks/src-CfAOde7C.mjs +5403 -0
  126. package/dist/chunks/src-CfAOde7C.mjs.map +1 -0
  127. package/dist/chunks/src-CmFjh4M0.mjs +928 -0
  128. package/dist/chunks/src-CmFjh4M0.mjs.map +1 -0
  129. package/dist/chunks/src-Cu3TxNob.mjs +783 -0
  130. package/dist/chunks/src-Cu3TxNob.mjs.map +1 -0
  131. package/dist/chunks/src-DcU4IXMe.mjs +117 -0
  132. package/dist/chunks/src-DcU4IXMe.mjs.map +1 -0
  133. package/dist/chunks/src-s7YRvk0t.mjs +2116 -0
  134. package/dist/chunks/src-s7YRvk0t.mjs.map +1 -0
  135. package/dist/chunks/status-SMjiOMYy.mjs +29 -0
  136. package/dist/chunks/status-SMjiOMYy.mjs.map +1 -0
  137. package/dist/chunks/tail-BuhT-2PH.mjs +25 -0
  138. package/dist/chunks/tail-BuhT-2PH.mjs.map +1 -0
  139. package/dist/chunks/update-BXIppsbi.mjs +16 -0
  140. package/dist/chunks/update-BXIppsbi.mjs.map +1 -0
  141. package/dist/cli.mjs +175 -0
  142. package/dist/cli.mjs.map +1 -0
  143. package/package.json +17 -32
  144. package/CHANGELOG.md +0 -1461
  145. package/bin/cli.js +0 -817
  146. package/bin/report.js +0 -141
  147. package/core/adapter/render.js +0 -415
  148. package/core/agents/implementer.template.md +0 -142
  149. package/core/agents/profile-reader.md +0 -50
  150. package/core/agents/release.md +0 -58
  151. package/core/agents/review.md +0 -179
  152. package/core/commands/cohorte-align-ds.md +0 -33
  153. package/core/commands/cohorte-audit.md +0 -58
  154. package/core/commands/cohorte-brainstorm.md +0 -70
  155. package/core/commands/cohorte-build.md +0 -219
  156. package/core/commands/cohorte-doctor.md +0 -194
  157. package/core/commands/cohorte-fix.md +0 -80
  158. package/core/commands/cohorte-fleet.md +0 -103
  159. package/core/commands/cohorte-init-pipeline.md +0 -31
  160. package/core/commands/cohorte-intake.md +0 -92
  161. package/core/commands/cohorte-patch.md +0 -118
  162. package/core/commands/cohorte-refactor.md +0 -59
  163. package/core/commands/cohorte-retro.md +0 -85
  164. package/core/commands/cohorte-review.md +0 -270
  165. package/core/commands/cohorte-ship.md +0 -122
  166. package/core/commands/cohorte-spec.md +0 -101
  167. package/core/commands/cohorte-update-pipeline.md +0 -165
  168. package/core/hooks/gate.py +0 -588
  169. package/core/runtimes/claude.json +0 -74
  170. package/core/runtimes/codex.json +0 -85
  171. package/core/runtimes/cursor.json +0 -76
  172. package/core/runtimes/gemini.json +0 -76
  173. package/core/runtimes/opencode.json +0 -73
  174. package/core/templates/agent-handoff.md +0 -34
  175. package/core/templates/brainstorm-return.md +0 -36
  176. package/core/templates/decisions.template.md +0 -42
  177. package/core/templates/design-brief.md +0 -44
  178. package/core/templates/patch.template.md +0 -86
  179. package/core/templates/pr-body.md +0 -25
  180. package/core/templates/review-feedback.md +0 -38
  181. package/core/templates/spec.template.md +0 -87
  182. package/core/templates/steps/init-pipeline/01-detect-stack.md +0 -44
  183. package/core/templates/steps/init-pipeline/02-interview-gaps.md +0 -55
  184. package/core/templates/steps/init-pipeline/03-draft-profile.md +0 -10
  185. package/core/templates/steps/init-pipeline/04-write-render.md +0 -145
  186. package/core/templates/steps/init-pipeline/05-report.md +0 -12
  187. package/core/workflows/audit.js +0 -240
  188. package/core/workflows/loop.js +0 -641
  189. package/core/workflows/refactor.js +0 -276
  190. package/core/workflows/review.js +0 -456
  191. package/install.ps1 +0 -103
  192. package/install.sh +0 -114
  193. package/lib/doctor.js +0 -534
  194. package/lib/runtime.js +0 -139
  195. package/lib/versions.js +0 -149
  196. package/lib/yaml.js +0 -129
  197. package/profile/PIPELINE.template.md +0 -259
  198. package/profile/SCHEMA.md +0 -735
  199. package/profile/cohorte.config.template.yaml +0 -43
  200. package/scripts/assert-gate-hook.mjs +0 -75
  201. package/scripts/kanban-move.sh +0 -313
  202. package/scripts/metrics/collect.mjs +0 -531
  203. package/scripts/metrics/prices.json +0 -42
  204. package/scripts/new-feature.sh.template +0 -98
  205. package/scripts/preflight.sh +0 -124
  206. package/scripts/remove-feature.sh.template +0 -56
  207. package/scripts/test-adapter.mjs +0 -437
  208. package/scripts/test-gate.mjs +0 -443
  209. package/scripts/test-kanban.mjs +0 -304
  210. package/scripts/test-lib.mjs +0 -356
  211. package/scripts/test-metrics.mjs +0 -156
  212. package/scripts/test-workflows.mjs +0 -758
  213. package/scripts/validate-core.mjs +0 -325
@@ -1,259 +0,0 @@
1
- # PIPELINE.md — <PROJECT_NAME> profile
2
-
3
- > **Generated by `/cohorte-init-pipeline`.** This is the project profile: the single place the
4
- > portable multi-agent pipeline reads for everything stack-specific. The pipeline core
5
- > in the pipeline core is generic and references THIS file by section — keep project facts
6
- > here, never hardcoded into agent prompts. Kept current by `/cohorte-update-pipeline` (reconcile:
7
- > new fields are topped up, your values never overwritten). Rendered agent files are
8
- > regenerated from this profile on every reconcile — customize agents through §Conventions
9
- > here, never by editing the agent files. Free-form notes belong in `CLAUDE.md`.
10
- >
11
- > **Machine block first, prose after.** The fenced `yaml pipeline-profile` block below is
12
- > the deterministic contract (flags, surfaces, commands) — commands parse it and branch on
13
- > it. The prose sections carry conventions agents read.
14
-
15
- ```yaml pipeline-profile
16
- # ── identity ────────────────────────────────────────────────────────────────
17
- name: <PROJECT_NAME>
18
- one_liner: <one sentence: what this product is>
19
- ui_language: <English | French | …> # language of ALL user-facing copy
20
- package_manager: <pnpm | npm | yarn | bun | pip | cargo | go>
21
-
22
- # ── vcs ─────────────────────────────────────────────────────────────────────
23
- vcs:
24
- host: <github | gitlab | none>
25
- remote: <owner/repo> # e.g. acme/webapp
26
- default_branch: <main>
27
- feature_branch_prefix: feature/ # branch = <prefix><feature_id>
28
- patch_branch_prefix: fix/ # same, for /cohorte-patch specs (kind: patch)
29
-
30
- # ── repo shape ──────────────────────────────────────────────────────────────
31
- repo:
32
- layout: <monorepo | single>
33
- workspace_tool: <turborepo | nx | none>
34
-
35
- # ── code retrieval (semantic navigation — cuts agent read time) ─────────────
36
- # Agents prefer symbol/graph MCP queries over grep-and-read when a provider is
37
- # wired. serena = live LSP symbol navigation (default, no index to maintain);
38
- # graphify = persistent tree-sitter knowledge graph over code + docs (needs an
39
- # index step + rescans); none = agents fall back to Grep/Glob/Read.
40
- # Registered by /cohorte-init-pipeline in the runtime's project MCP configuration.
41
- retrieval:
42
- provider: serena # serena | graphify | none
43
-
44
- # ── surfaces ────────────────────────────────────────────────────────────────
45
- # One entry per independently-implemented code area. /cohorte-build dispatches ONE
46
- # implementer agent per surface, in parallel. Each surface is rendered by
47
- # /cohorte-init-pipeline into its own agent file (agent field) with the tools listed.
48
- # This list GROWS automatically: /cohorte-build §1.5 adds a surface (and renders its
49
- # agent) when a spec touches a tree no surface owns, or splits a bottleneck
50
- # surface into specialized sub-surfaces. Keep one owner per tree; shared code
51
- # (routing/state/DS) is its own single-owner surface. See SCHEMA.md §Specialization.
52
- surfaces:
53
- - key: backend # short id, used as agent name + scope
54
- path: apps/api # the ONLY tree this surface's agent may touch
55
- label: backend (AdonisJS)
56
- agent: backend # rendered in the runtime's project agents dir
57
- tools: [Read, Write, Edit, Bash, Grep, Glob, mcp__serena] # mcp__<provider> mirrors retrieval.provider
58
- <!-- cohorte:if runtime:codex -->
59
- model: inherit # omit the TOML model pin; explicit Codex models also allowed
60
- <!-- cohorte:else -->
61
- model: sonnet # frontmatter model tier: sonnet | haiku | inherit
62
- # sonnet = default (applies the frozen contract — cheap
63
- # vs the Opus lead); haiku = purely mechanical scaffolding;
64
- # inherit = only for surfaces with real design decisions
65
- <!-- cohorte:endif -->
66
- test_cmd: pnpm --filter api test
67
- # Bridled variants — what agents actually RUN (dot reporter / failures-only /
68
- # --quiet), so a green run costs lines, not pages. "" ⇒ callers fall back to
69
- # `<cmd> 2>&1 | tail -40`. /cohorte-init-pipeline asks for these; never store a bare
70
- # `pnpm test` as the thing agents execute.
71
- test_quiet_cmd: pnpm --filter api test --reporter=dot
72
- lint_cmd: pnpm --filter api lint
73
- lint_quiet_cmd: pnpm --filter api lint --quiet
74
- format_cmd: pnpm --filter api format
75
- typecheck_cmd: pnpm --filter api exec tsc --noEmit
76
- build_cmd: ""
77
- uses_design: false
78
- - key: frontend
79
- path: apps/web
80
- label: frontend (React/TanStack)
81
- agent: frontend
82
- tools: [Read, Write, Edit, Bash, Grep, Glob, DesignSync, mcp__serena]
83
- <!-- cohorte:if runtime:codex -->
84
- model: inherit # use the session model unless explicitly configured
85
- <!-- cohorte:else -->
86
- model: sonnet # default even for design surfaces — designs + contract are
87
- # frozen inputs the agent applies; `inherit` (bills at the
88
- # lead's tier, often Opus) ONLY if this surface must make
89
- # novel design decisions
90
- <!-- cohorte:endif -->
91
- test_cmd: pnpm --filter web test
92
- test_quiet_cmd: pnpm --filter web test --reporter=dot
93
- lint_cmd: pnpm --filter web lint
94
- lint_quiet_cmd: pnpm --filter web lint --quiet
95
- format_cmd: pnpm --filter web format
96
- typecheck_cmd: pnpm check-types
97
- build_cmd: pnpm --filter web build
98
- uses_design: true
99
-
100
- # ── contract (the only cross-surface sync channel) ──────────────────────────
101
- contract:
102
- enabled: <true | false> # false ⇒ no shared contract; skip §2 of /cohorte-build
103
- mechanism: <shared-types-zod | openapi | protobuf | json-schema | none>
104
- path: packages/shared-types/src # where <feature_id>.<ext> is authored
105
- ext: ts
106
- index: packages/shared-types/src/index.ts # barrel to export from, or "" if none
107
- authored_by: lead # NEVER the implementer agents
108
-
109
- # ── release notes (optional) ────────────────────────────────────────────────
110
- # A per-feature release note the project's versioning tool consumes. When
111
- # enabled, /cohorte-ship authors it BEFORE dispatching the release agent, so it
112
- # ships inside the release commit. Repos whose CI fails a PR that lacks one
113
- # (Changesets' `changeset` job) MUST set this — otherwise every ship goes red.
114
- release_notes:
115
- enabled: <true | false> # false ⇒ /cohorte-ship §2b is a no-op
116
- tool: <changesets | none> # what consumes the file
117
- dir: .changeset # where the note is authored
118
- filename: "<feature_id>.md" # one file per feature
119
- anchor_package: shared-types # sole key in the front-matter; a lockstep/fixed group propagates the bump
120
- language: <ui_language | English> # language of the note's prose
121
- forbid_levels: [] # bumps project policy refuses, e.g. [major] while 0.x
122
- empty_cmd: "pnpm changeset --empty" # when no version should move; "" if the tool has no such escape hatch
123
- ci_job: changeset # CI job that fails when the note is missing (name it so /cohorte-ship §5 recognizes the red)
124
- guidance: | # rules the lead follows when writing the note (project policy)
125
- major = the deploy needs an operator action; minor = a user-visible capability;
126
- patch = fix/perf/refactor with no change of use. No client names, no internal
127
- paths, no exploitable attack vector.
128
-
129
- # ── repo-wide commands (root unless noted) ──────────────────────────────────
130
- commands:
131
- install: pnpm install
132
- dev: pnpm dev
133
- lint: pnpm lint
134
- lint_quiet: pnpm lint --quiet # bridled variant (see surfaces[].*_quiet_cmd)
135
- format: pnpm format
136
- typecheck: pnpm check-types
137
- test: pnpm test
138
- test_quiet: pnpm test --reporter=dot # bridled variant — what the /cohorte-review preflight runs
139
- # migration commands — omit / leave "" if the project has no DB migrations
140
- migrate: "cd apps/api && node ace migration:run"
141
- make_migration: "cd apps/api && node ace make:migration"
142
-
143
- # ── rbac (optional) ─────────────────────────────────────────────────────────
144
- rbac:
145
- enabled: <true | false>
146
- hierarchy: [super-admin, admin, editor, member] # highest → lowest, or []
147
- note: "the platform must serve EVERY role, not just admins"
148
-
149
- # ── design system (optional) ────────────────────────────────────────────────
150
- design:
151
- enabled: <true | false> # false ⇒ /cohorte-align-ds + design gates are no-ops
152
- provider: <claude-design | figma | none>
153
- design_system_project: <uuid-or-id> # the UI-kit source of truth
154
- design_project: none # legacy fallback for bare-filename design_files only; keep `none` — new specs use full links that carry their own project, so nothing here goes stale on a DS rebuild
155
- snapshot_dir: apps/web/design-reference # committed DS snapshot for /cohorte-align-ds diff
156
- direction: design-to-code # NEVER push code→design for a curated DS
157
- ui_kit_path: apps/web/src/components/ui
158
- tokens_path: apps/web/src/index.css
159
-
160
- # ── isolation / parallelism (optional) ──────────────────────────────────────
161
- isolation:
162
- enabled: <true | false> # false ⇒ features run in the main checkout
163
- unit: git-worktree
164
- db_per_worktree: <true | false>
165
- db_name_pattern: "<name>_<id>" # e.g. myapp_<id>
166
- port_base: { api: 3333, web: 5173 } # each worktree gets base+slot
167
- compose_file: docker-compose.yml
168
- registry: .worktrees/slots.tsv
169
-
170
- # ── gate (drives the pipeline gate hook + permissions) ─────────────────────
171
- # Confirm-first or hard-deny on dangerous Bash, inspecting the FULL command
172
- # string (so chained `cd x && …` forms are caught).
173
- gate:
174
- # Three tiers. `deny` = always hard-blocked. `ask` = always confirm (branch-independent risk).
175
- # `ask_on_default_branch` = confirm ONLY when the checked-out branch is `default_branch`; on
176
- # feature branches these run freely. gate.py resolves the branch at run time (git rev-parse);
177
- # unknown branch (no repo / detached) ⇒ gated, to stay safe. Keep git + docker here so agents
178
- # move fast on feature branches but main stays protected.
179
- default_branch: main # the protected branch (mirror vcs.default_branch)
180
- deny: # never allowed, on any branch
181
- - "node ace migration:fresh"
182
- - "node ace migration:reset"
183
- - "node ace migration:rollback"
184
- - "node ace db:wipe"
185
- ask: # always confirm, on any branch
186
- - "node ace migration:run"
187
- - "node ace db:"
188
- - "psql"
189
- ask_on_default_branch: # free on feature branches, confirm on default_branch
190
- - "git commit"
191
- - "git push"
192
- - "git merge"
193
- - "git rebase"
194
- - "git reset"
195
- - "docker compose"
196
- # Phase gate: review dispatches require a fresh `preflight.ok` stamp,
197
- # written by pipeline/scripts/preflight.sh when typecheck+lint+tests are green —
198
- # gate.py "ask"s the dispatch when the stamp is missing, stale, or the code changed since.
199
- # The stamp is local: keep `preflight.ok` gitignored, never committed.
200
- preflight:
201
- enabled: true
202
- agents: [review] # subagent_types the stamp gates
203
- max_age_minutes: 30
204
-
205
- ```
206
-
207
- > **Note.** The **kanban** board link is **user-scoped** — NOT configured here. Its facts live in the
208
- > consolidated user config (`~/.claude/cohorte.config.yaml`, or `~/.cohorte/cohorte.config.yaml` on
209
- > a non-Claude runtime), read at runtime (the kanban board is keyed by this
210
- > profile's `name`). This project profile only governs the dev pipeline (`/cohorte-brainstorm…/cohorte-ship`).
211
-
212
- ---
213
-
214
- ## Conventions
215
-
216
- > Read by the implementer + review agents. Keep these terse and rule-shaped; the machine
217
- > block above holds the paths/commands they enforce against.
218
-
219
- ### Shared
220
-
221
- - User-facing copy (API messages, UI text) in **<ui_language>**.
222
- - <e.g. Zod v4 syntax `z.email()`/`z.uuid()`; ESM `.js` import extensions — project-specific>
223
-
224
- ### Surface: `backend` (`apps/api`)
225
-
226
- - <one-action controllers · validator on every write · standardized response envelope · base model / UUID PK · `#`-alias imports · additive-only migrations · …>
227
-
228
- ### Surface: `frontend` (`apps/web`)
229
-
230
- - <file-based routes with loaders/guards · domain `lib/api` modules over the shared client · design-system primitives, `cn()`+CVA · **mobile-first, fully responsive** · consume contract types, never redefine · …>
231
-
232
- ### Testing — strict TDD (red → green → refactor)
233
-
234
- - <backend test runner + what a contract test must cover (status, validation, auth, payload) · DB isolation per test>
235
- - <frontend test runner + what to cover (hooks, api modules, component behavior); note layout is not unit-testable>
236
-
237
- ---
238
-
239
- ## Design brief note (feeds `/cohorte-spec` §8 and Claude Design)
240
-
241
- - <design system name + primitives to use · mobile-first · copy language · brand/theming constraints>
242
- - A feature lists its design pages in the spec front-matter `design_files` as **full links** of the form
243
- `https://claude.ai/design/p/<projectId>?file=<file>` — each carries its own project (`/p/<projectId>`)
244
- and page (`?file=`), so an agent extracts both and reads it via `DesignSync get_file(<projectId>,
245
- <file>)`. Paste the link at `/cohorte-build`'s design gate. No stored project id ⇒ a design-system rebuild
246
- (new project) just means pasting the new links. (Bare file names are legacy, resolved in `design_project`.)
247
-
248
- ---
249
-
250
- ## Personas for `/cohorte-brainstorm` (optional — the panel)
251
-
252
- <Panel members with a job AND a personality who challenge the idea from their angle and
253
- disagree with each other. Include a role-coverage guard if `rbac.enabled`. Example:>
254
-
255
- - **PM** (pragmatic, scope-cutting) — real value? what do we drop?
256
- - **Skeptical senior engineer** (blunt) — feasibility, edge cases, tech debt.
257
- - **UX/product designer** — mobile-first flows, accessibility, empty/error states.
258
- - **Security & RBAC** (paranoid) — permission leaks, cross-tenant exposure, least privilege.
259
- - <one persona per RBAC role so the feature serves every role, not just admins>