crewforth 0.0.1 → 3.0.0-rc.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 (168) hide show
  1. package/CHANGELOG.md +3784 -0
  2. package/LICENSE +21 -0
  3. package/README.md +37 -7
  4. package/VERSION +1 -0
  5. package/adopt.sh +1670 -0
  6. package/bin/cli.js +497 -0
  7. package/kit/AGENT_TEMPLATE.md +92 -0
  8. package/kit/CLAUDE.md +228 -0
  9. package/kit/README.md +107 -0
  10. package/kit/agents/crew-backend-expert.md +95 -0
  11. package/kit/agents/crew-commit-agent.md +96 -0
  12. package/kit/agents/crew-database-expert.md +84 -0
  13. package/kit/agents/crew-devops-expert.md +82 -0
  14. package/kit/agents/crew-frontend-expert.md +85 -0
  15. package/kit/agents/crew-performance-expert.md +78 -0
  16. package/kit/agents/crew-planner.md +60 -0
  17. package/kit/agents/crew-privacy-agent.md +71 -0
  18. package/kit/agents/crew-review-agent.md +95 -0
  19. package/kit/agents/crew-security-expert.md +73 -0
  20. package/kit/agents/crew-session-manager.md +77 -0
  21. package/kit/agents/crew-test-expert.md +64 -0
  22. package/kit/eval/doctor.sh +465 -0
  23. package/kit/eval/gate-report.sh +137 -0
  24. package/kit/eval/golden-holdout.txt +53 -0
  25. package/kit/eval/golden-routing.txt +199 -0
  26. package/kit/eval/lib/crew-env.sh +14 -0
  27. package/kit/eval/lib/settings-json.awk +154 -0
  28. package/kit/eval/lib/star.sh +70 -0
  29. package/kit/eval/parser-conformance.sh +612 -0
  30. package/kit/eval/preflight.sh +186 -0
  31. package/kit/eval/routing-eval.sh +209 -0
  32. package/kit/eval/scan-skill.sh +162 -0
  33. package/kit/eval/smoke-test.sh +6693 -0
  34. package/kit/eval/update-guard.sh +81 -0
  35. package/kit/eval/utilization.sh +130 -0
  36. package/kit/hooks/board-sync.sh +106 -0
  37. package/kit/hooks/board.sh +962 -0
  38. package/kit/hooks/commit-msg +49 -0
  39. package/kit/hooks/context-usage.sh +353 -0
  40. package/kit/hooks/floor-blocklist.txt +124 -0
  41. package/kit/hooks/guard-bash.sh +1431 -0
  42. package/kit/hooks/guard-commit-scan.sh +511 -0
  43. package/kit/hooks/guard-write.sh +513 -0
  44. package/kit/hooks/pre-commit +577 -0
  45. package/kit/hooks/route-hint.sh +185 -0
  46. package/kit/hooks/secret-blocklist.txt +82 -0
  47. package/kit/hooks/session-guard.sh +149 -0
  48. package/kit/hooks/session-rehydrate.sh +41 -0
  49. package/kit/hooks/session-stats.sh +252 -0
  50. package/kit/hooks/session-update-check.sh +236 -0
  51. package/kit/hooks/skill-trust.sh +150 -0
  52. package/kit/hooks/trace-blocklist.txt +53 -0
  53. package/kit/settings.json +132 -0
  54. package/kit/skills/a11y/SKILL.md +44 -0
  55. package/kit/skills/adr/SKILL.md +74 -0
  56. package/kit/skills/api-design/SKILL.md +50 -0
  57. package/kit/skills/automode-policy/SKILL.md +91 -0
  58. package/kit/skills/automode-policy/references/policy.json +13 -0
  59. package/kit/skills/automode-policy/scripts/apply.sh +84 -0
  60. package/kit/skills/automode-policy/scripts/check.sh +102 -0
  61. package/kit/skills/backend-architecture/SKILL.md +103 -0
  62. package/kit/skills/brainstorm/SKILL.md +47 -0
  63. package/kit/skills/ci-pipeline/SKILL.md +38 -0
  64. package/kit/skills/commit-message/SKILL.md +82 -0
  65. package/kit/skills/commit-message/references/examples.md +8 -0
  66. package/kit/skills/confidence-check/SKILL.md +86 -0
  67. package/kit/skills/crew-board/SKILL.md +55 -0
  68. package/kit/skills/crew-brainstorm/SKILL.md +19 -0
  69. package/kit/skills/crew-code-review/SKILL.md +151 -0
  70. package/kit/skills/crew-code-review/references/history-search.md +19 -0
  71. package/kit/skills/crew-code-review/references/panel-mode.md +32 -0
  72. package/kit/skills/crew-code-review/references/receiving.md +23 -0
  73. package/kit/skills/crew-doctor/SKILL.md +36 -0
  74. package/kit/skills/crew-gates/SKILL.md +25 -0
  75. package/kit/skills/crew-handoff/SKILL.md +14 -0
  76. package/kit/skills/crew-plan/SKILL.md +18 -0
  77. package/kit/skills/crew-review/SKILL.md +23 -0
  78. package/kit/skills/crew-ship/SKILL.md +19 -0
  79. package/kit/skills/crew-skill/SKILL.md +61 -0
  80. package/kit/skills/crew-studio/SKILL.md +129 -0
  81. package/kit/skills/crew-update/SKILL.md +43 -0
  82. package/kit/skills/db-migration/SKILL.md +120 -0
  83. package/kit/skills/db-migration/references/backup-restore.md +33 -0
  84. package/kit/skills/db-migration/references/raw-sql.md +30 -0
  85. package/kit/skills/db-migration/references/tool-matrix.md +35 -0
  86. package/kit/skills/dependency-audit/SKILL.md +61 -0
  87. package/kit/skills/dependency-upgrade/SKILL.md +82 -0
  88. package/kit/skills/deploy/SKILL.md +100 -0
  89. package/kit/skills/deploy/references/proxy-ssl.md +56 -0
  90. package/kit/skills/deploy/references/rollback.md +18 -0
  91. package/kit/skills/deploy/references/scripts.md +9 -0
  92. package/kit/skills/deploy/references/topology-a.md +128 -0
  93. package/kit/skills/deploy/references/topology-b.md +44 -0
  94. package/kit/skills/docs-writer/SKILL.md +53 -0
  95. package/kit/skills/docs-writer/references/coauthoring.md +34 -0
  96. package/kit/skills/eval-grader/SKILL.md +75 -0
  97. package/kit/skills/eval-grader/references/method.md +51 -0
  98. package/kit/skills/frontend/SKILL.md +56 -0
  99. package/kit/skills/frontend/references/verify-contract.md +41 -0
  100. package/kit/skills/frontend-design/SKILL.md +71 -0
  101. package/kit/skills/frontend-design/references/design-review.md +34 -0
  102. package/kit/skills/frontend-rn-expo/SKILL.md +25 -0
  103. package/kit/skills/handoff/SKILL.md +71 -0
  104. package/kit/skills/handoff/references/cold-reader.md +51 -0
  105. package/kit/skills/i18n-integrity/SKILL.md +31 -0
  106. package/kit/skills/incident-runbook/SKILL.md +40 -0
  107. package/kit/skills/incident-runbook/references/postmortem.md +16 -0
  108. package/kit/skills/iterate/SKILL.md +40 -0
  109. package/kit/skills/mcp-builder/SKILL.md +54 -0
  110. package/kit/skills/mcp-builder/references/building.md +71 -0
  111. package/kit/skills/observability/SKILL.md +50 -0
  112. package/kit/skills/performance/SKILL.md +38 -0
  113. package/kit/skills/performance/references/bottlenecks.md +10 -0
  114. package/kit/skills/privacy-compliance/SKILL.md +75 -0
  115. package/kit/skills/red-team/SKILL.md +48 -0
  116. package/kit/skills/reflect/SKILL.md +57 -0
  117. package/kit/skills/release/SKILL.md +44 -0
  118. package/kit/skills/security-scan/SKILL.md +99 -0
  119. package/kit/skills/security-scan/references/ai-agents.md +107 -0
  120. package/kit/skills/security-scan/references/fronts.md +99 -0
  121. package/kit/skills/security-scan/references/prompting.md +23 -0
  122. package/kit/skills/security-scan/references/reporting.md +75 -0
  123. package/kit/skills/security-scan/references/verify.md +131 -0
  124. package/kit/skills/sonarqube-check/SKILL.md +108 -0
  125. package/kit/skills/sonarqube-check/references/local-engines.md +32 -0
  126. package/kit/skills/sonarqube-check/references/stand-up-server.md +25 -0
  127. package/kit/skills/spec-planning/SKILL.md +92 -0
  128. package/kit/skills/systematic-debugging/SKILL.md +57 -0
  129. package/kit/skills/systematic-debugging/references/techniques.md +44 -0
  130. package/kit/skills/teamboard/SKILL.md +88 -0
  131. package/kit/skills/teamboard/references/setup.md +37 -0
  132. package/kit/skills/testing/SKILL.md +49 -0
  133. package/kit/skills/testing/references/flaky-triage.md +51 -0
  134. package/kit/skills/threat-model/SKILL.md +57 -0
  135. package/kit/skills/threat-model/references/interview.md +51 -0
  136. package/kit/skills/threat-model/references/schema.md +42 -0
  137. package/kit/skills/token-budget/SKILL.md +51 -0
  138. package/kit/skills/trace-scan/SKILL.md +43 -0
  139. package/kit/skills/worktree/SKILL.md +40 -0
  140. package/kit/studio/README.md +266 -0
  141. package/kit/studio/ensure-node.sh +471 -0
  142. package/kit/studio/package.json +14 -0
  143. package/kit/studio/server/hooks/studio-gate.sh +169 -0
  144. package/kit/studio/server/index.js +902 -0
  145. package/kit/studio/server/lib/crew-env.js +11 -0
  146. package/kit/studio/server/lib/fleet.js +146 -0
  147. package/kit/studio/server/lib/graph.js +533 -0
  148. package/kit/studio/server/lib/instance.js +135 -0
  149. package/kit/studio/server/lib/kit-telemetry.js +182 -0
  150. package/kit/studio/server/lib/kit.js +158 -0
  151. package/kit/studio/server/lib/palette.js +118 -0
  152. package/kit/studio/server/lib/peers.js +72 -0
  153. package/kit/studio/server/lib/permissions.js +150 -0
  154. package/kit/studio/server/lib/projects.js +294 -0
  155. package/kit/studio/server/lib/roster.js +191 -0
  156. package/kit/studio/server/lib/session.js +309 -0
  157. package/kit/studio/server/lib/terminal.js +91 -0
  158. package/kit/studio/server/lib/transcript.js +100 -0
  159. package/kit/studio/web/app.js +1098 -0
  160. package/kit/studio/web/canvas.js +1179 -0
  161. package/kit/studio/web/chat.js +543 -0
  162. package/kit/studio/web/index.html +86 -0
  163. package/kit/studio/web/md.js +110 -0
  164. package/kit/studio/web/storage-migrate.js +23 -0
  165. package/kit/studio/web/style.css +1453 -0
  166. package/package.json +46 -8
  167. package/start.sh +748 -0
  168. package/bin/crewforth.js +0 -10
@@ -0,0 +1,103 @@
1
+ ---
2
+ name: backend-architecture
3
+ description: |
4
+ Decide, record and apply the backend stack and architecture pattern.
5
+ Use when backend work starts with no recorded stack, or a framework/DB/pattern must be chosen.
6
+ ---
7
+
8
+ # Backend Architecture (stack resolution + pattern)
9
+
10
+ <!-- routing-eval reads the next line; why it sits in the body: AGENT_TEMPLATE.md -->
11
+ Trigger phrases: "tech stack", "which framework", "choose a database", "backend pattern", "project structure", "new api", "new handler", "write a command", "add a query", "validator", "which stack should", "set up the project structure", "language or framework", "layered or", "vertical slice", "hexagonal", "clean architecture"
12
+
13
+ The "how" behind `crew-backend-expert`, and the stack step `crew-planner` and `crew-database-expert` rely on.
14
+ **Model discipline, not a gate:** no hook checks that the stack was resolved before code was written.
15
+
16
+ ## When
17
+ - A backend task starts and `CLAUDE.md ## Stack` is empty or silent on the part the task needs.
18
+ - Someone asks which language, framework, database or pattern to use.
19
+ - A new service, API, module or handler is being shaped and the pattern is not obvious from neighbouring code.
20
+
21
+ ## 1 · Stack resolution — in this order, stop at the first answer
22
+ 1. **The request says it.** "Add a Go service…" is an answer. Use it; record it if the section was empty.
23
+ 2. **`CLAUDE.md ## Stack` says it.** The project's own section (below Crewforth's `@.claude/DISCIPLINE.md` import),
24
+ not `DISCIPLINE.md`. A filled section is a decision: follow it.
25
+ 3. **The repo says it.** Look for manifests at the root and one level down (`backend/`, `server/`, `src/`, `apps/*`):
26
+
27
+ | Manifest | Runtime |
28
+ |:--|:--|
29
+ | `package.json` | Node (TypeScript if `tsconfig.json`) |
30
+ | `go.mod` | Go |
31
+ | `pyproject.toml` / `requirements.txt` | Python |
32
+ | `*.csproj` / `*.sln` | .NET |
33
+ | `pom.xml` / `build.gradle*` | JVM (Java/Kotlin) |
34
+ | `Cargo.toml` | Rust |
35
+ | `composer.json` | PHP |
36
+ | `Gemfile` | Ruby |
37
+
38
+ The framework and database usually follow from the same manifest's dependencies and from config files
39
+ (`docker-compose*.yml`, connection-string env names, migration folders). Two backends in one repo is a
40
+ monorepo, not an ambiguity: record each with its path.
41
+ 4. **Still open (a greenfield repo) → ask, once.** Use `AskUserQuestion` with **at most four** questions, only for
42
+ what is still unknown: runtime/language · web framework · database · architecture pattern. **Every question has
43
+ exactly one option whose label ends with `(Recommended)`** (its description gives the one-line reason) **and
44
+ exactly one option labelled `Decide for me`, verbatim** — the user's way to hand the choice back to you.
45
+ No `AskUserQuestion` in this session (headless, or the tool is off)? Write the same questions as text, with the
46
+ same two labels on every question, and stop there.
47
+
48
+ **Record it.** Write the answer into the `## Stack` section of the project's `CLAUDE.md` (Runtime · Web framework ·
49
+ Database + migration tool · Architecture pattern), then record the choice with the `adr` skill (and `board.sh decide`
50
+ when the team board is in use). If "Decide for me" was picked, the ADR says so: *chosen by the agent at the user's
51
+ request*, with the reason for each pick.
52
+
53
+ **Never ask twice.** A recorded stack is followed, not re-litigated. It changes only when the user explicitly asks;
54
+ then update the section and supersede the ADR. Headless / non-interactive and nobody to ask → stop and report the
55
+ open question; do not guess a stack and start writing code.
56
+
57
+ ## 2 · Pattern menu — default to the simplest one that fits (YAGNI)
58
+ | Pattern | Fits | Too much when |
59
+ |:--|:--|:--|
60
+ | **Layered** (controller → service → repository) | CRUD-heavy services, small teams, most first versions | rules sprawl across services and every change touches every layer |
61
+ | **Clean / hexagonal** (domain core, ports, adapters) | rich domain rules, several delivery channels or swappable infrastructure | the "domain" is mostly forms over tables |
62
+ | **Vertical slice** (one folder per feature, request → handler → response) | many independent features, teams owning features end to end | features share most of their logic |
63
+ | **CQRS** (separate command and query paths) | reads and writes that differ sharply in shape, load or consistency | reads and writes look the same — it doubles the code for no gain |
64
+
65
+ Existing code wins over this table: a repo already on a pattern keeps it, even where the table would pick another.
66
+ A change of pattern is an architecture decision → design summary + ADR, never a side effect of a feature.
67
+
68
+ ## 3 · Rules that hold in any language
69
+ - **One error contract.** Every endpoint returns failures in the same envelope (e.g. RFC 9457 problem details or the
70
+ project's own shape) with the correct status: 400 invalid input · 401 unauthenticated · 403 forbidden · 404 not
71
+ found (also for another tenant's resource — do not leak existence) · 409 conflict · 422 rule violated · 5xx only for
72
+ the server's own fault. No raw exceptions or stack traces in responses.
73
+ - **Validate at the edge.** Parse and validate input where it enters (request DTO + schema/validator), so the core
74
+ only sees valid values. Business rules stay out of controllers/routes.
75
+ - **Cross-cutting concerns in one place** — logging, auth, transactions, caching, rate limits live in
76
+ middleware / decorators / pipeline behaviours, not copied into each handler.
77
+ - **Dependencies are injected**, not constructed inside handlers; the composition root is the only place that knows
78
+ concrete types.
79
+ - **Transaction boundaries are explicit**: one use case, one unit of work. No remote call inside an open DB transaction.
80
+ - **Idempotency** for anything a client may retry (payments, webhooks, create-with-client-id): an idempotency key or a
81
+ natural unique constraint.
82
+ - **Secrets and personal data are never logged** — see `observability` for what to log and `privacy-compliance` for
83
+ personal data.
84
+
85
+ ## 4 · Ecosystem map — common choices, not requirements
86
+ | Runtime | Web | Validation | Data / migrations |
87
+ |:--|:--|:--|:--|
88
+ | .NET | ASP.NET Core (MediatR optional) | FluentValidation | EF Core |
89
+ | Node | NestJS / Fastify | zod | Prisma / Drizzle |
90
+ | Go | chi / echo | go-playground/validator | sqlc / GORM |
91
+ | Python | FastAPI | pydantic | SQLAlchemy / Alembic |
92
+ | JVM | Spring Boot | Bean Validation | JPA / Flyway |
93
+
94
+ The project's recorded choices beat this table. Adding a dependency that is not already in the repo → `dependency-audit`.
95
+
96
+ ## 5 · Project override
97
+ A pattern skill the project ships under `.claude/skills/` wins over sections 2-4 — for example a `cqrs-aop-module`
98
+ kept from an older install, or one the team wrote (format: `.claude/AGENT_TEMPLATE.md`). Section 1 still applies:
99
+ the stack is resolved and recorded the same way.
100
+
101
+ ## Not here — the single source is elsewhere
102
+ Schema and migrations → `db-migration` · tests → `testing` · review → `crew-code-review` · contracts and
103
+ versioning → `api-design` · logs/traces → `observability`.
@@ -0,0 +1,47 @@
1
+ ---
2
+ name: brainstorm
3
+ description: |
4
+ Divergent discovery BEFORE planning: turn a fuzzy ask into 2–4 scoped options + named unknowns, pick a
5
+ direction, hand to spec-planning. Bounded; converges to explicit choices, never guesses.
6
+ ---
7
+
8
+ # Brainstorm — diverge before you converge
9
+
10
+ <!-- routing-eval reads the next line; why it sits in the body: AGENT_TEMPLATE.md -->
11
+ Trigger phrases: "brainstorm", "explore options", "not sure what we want", "help me scope", "ideate"
12
+
13
+ ## When
14
+ The ask is **under-defined**: the goal, the users, or the shape of the solution aren't clear yet, so jumping
15
+ straight to `spec-planning` would just plan the wrong thing. This is the front-end of planning, not a
16
+ replacement — brainstorm *diverges* (widens the option space), spec-planning *converges* (breaks the chosen
17
+ option into tasks). If scope is already clear, skip this and go straight to [[spec-planning]].
18
+
19
+ ## The loop
20
+ 1. **Frame the real problem** — restate the request as the underlying need in one sentence ("the user wants
21
+ X so that Y"). Separate the stated solution from the goal; often the solution is negotiable, the goal isn't.
22
+ 2. **Diverge — generate distinct directions.** Produce **2–4 genuinely different** approaches, not variations
23
+ of one. For each: the core idea, who it serves, the main trade-off. Include a deliberately cheap/minimal
24
+ option (fight gold-plating early).
25
+ 3. **Surface the unknowns** — list assumptions and open questions that would change the answer. Mark which are
26
+ **blocking** (must resolve before planning) vs. deferrable.
27
+ 4. **Converge — ask, don't guess.** Present the directions as **explicit numbered options** and let the user
28
+ choose (CLAUDE.md discipline: a decision point = multiple choice, never a prose either/or). Record the
29
+ chosen direction + the rejected ones with the one-line reason they lost.
30
+ 5. **Hand off.** The chosen direction + resolved constraints flow into `spec-planning`; a lasting
31
+ architectural choice made here is recorded with [[adr]].
32
+
33
+ ## Guardrails
34
+ - **Bounded, not open-ended.** Divergence has a stop: 2–4 options, then converge. Endless ideation with no
35
+ decision is the failure mode, not thoroughness.
36
+ - **No premature convergence either.** Don't collapse to the first idea to look decisive — the point is that
37
+ the option space was actually explored before a direction was picked.
38
+ - **Evidence over invention.** Read the existing code/data and state assumptions explicitly; a plausible guess
39
+ presented as fact is worse than a named unknown.
40
+ - **Token discipline** ([[token-budget]]): the options + the decision are a short summary to the main thread;
41
+ push a long exploration to `docs/DISCOVERY.md` and return the option headings + the choice.
42
+
43
+ ## DoD (this skill's contribution)
44
+ - The real goal is stated separately from the requested solution.
45
+ - 2–4 distinct directions exist, each with its trade-off, including a minimal option.
46
+ - Blocking unknowns are named and were asked as explicit options — nothing ambiguous was filled by guessing.
47
+ - A direction is chosen and ready to enter [[spec-planning]] (rejected options logged with their reason).
@@ -0,0 +1,38 @@
1
+ ---
2
+ name: ci-pipeline
3
+ description: |
4
+ CI pipeline discipline: lint→build→test→quality→security, fail-fast, deterministic build, secret handling, PR gates.
5
+ ---
6
+
7
+ # CI Pipeline
8
+
9
+ <!-- routing-eval reads the next line; why it sits in the body: AGENT_TEMPLATE.md -->
10
+ Trigger phrases: "ci", "pipeline", "github actions", "jenkins", "build pipeline", "pr gate", "pr check", "build fail", "build broke", "ci is failing", "workflow"
11
+
12
+ ## Stages (fail-fast — stop if it breaks early)
13
+ 1. **Lint / format** — style and static analysis
14
+ 2. **Build** — 0 warnings / 0 errors
15
+ 3. **Test** — unit + integration, coverage collected
16
+ 4. **Quality** — `sonarqube-check` quality gate
17
+ 5. **Security** — `dependency-audit` + `security-scan` (where applicable)
18
+ 6. **Artifact / packaging** — (deployment is separate, `deploy`)
19
+
20
+ ## Principles
21
+ - **Deterministic:** dependencies pinned, cache keyed correctly; no "it worked on my machine".
22
+ - **Secret management:** CI secret store; NO plaintext secrets in the repo/logs (overlaps with trace scan).
23
+ - **PR gate:** quality gate + tests must pass; a red build is not merged.
24
+ - **Branch protection:** direct push to main is disabled; PR + review required.
25
+
26
+ ## When a stage fails
27
+ 1. **Fetch the failing job's log first** — `gh run view --log-failed`, `glab ci trace`, `jenkins-cli console <job>`,
28
+ whichever this project's host provides — and quote the failing lines: a status icon names which job broke, never why.
29
+ Log unreachable (no access, retention expired, the job never started) → report exactly that; never infer the cause.
30
+ 2. **Reproduce with the exact command the pipeline runs**, copied out of the CI config — same flags, same env, same
31
+ versions. Green locally is not a pass: the environment difference is now the defect, so take it to `systematic-debugging`.
32
+ 3. **A re-run is not a fix.** Re-running until it passes hides the cause; re-run only to establish that a failure is
33
+ intermittent — and an intermittent failure in this repo's own suite is a bug (`testing`), not a retry.
34
+ 4. **Say which failures aren't yours.** A required check owned by another change, or an external service that was
35
+ down, is reported out of scope with the job named — silence about it reads as a clean run.
36
+
37
+ ## DoD
38
+ - All stages green; PR gates enforced; no secret leakage; build reproducible.
@@ -0,0 +1,82 @@
1
+ ---
2
+ name: commit-message
3
+ description: |
4
+ Conventional Commits: reads the staged diff and proposes `type(scope): summary`, with body/footer when needed.
5
+ One logical change = one commit. crew-commit-agent applies it.
6
+ ---
7
+
8
+ # Commit Message (Conventional Commits v1.0.0)
9
+
10
+ <!-- routing-eval reads the next line; why it sits in the body: AGENT_TEMPLATE.md -->
11
+ Trigger phrases: "commit message", "make a commit", "conventional commit", "write a commit", "git commit"
12
+
13
+ Format: `type(scope): summary` + (optional blank line + body) + (optional footer).
14
+
15
+ ## The project decides the format and the language — read that FIRST
16
+ Conventional Commits below is the **default**, not a law. Before writing anything, read `./CLAUDE.md` for a
17
+ `## Conventions` section (`Commit language:` / `Commit format:`). A declared format REPLACES the shape below —
18
+ ticket-prefixed subjects, smart-commit trailers (`#comment`, `#time`), gitmoji, whatever the team runs on. A
19
+ declared language replaces "the project's established language" guess. Nothing declared → the defaults here.
20
+
21
+ **Whatever the request hands you verbatim — a ticket id, a `#time 1d`, a required prefix — goes into the
22
+ message EXACTLY as given.** Rewriting a literal someone typed is the worst failure this skill has: it looks
23
+ correct and books the wrong number. If a literal contradicts the format, say so and ask; never silently adjust
24
+ it. Same rule for the rest of the message: everything else is yours to word, the literals are not.
25
+
26
+
27
+ ## Type (required)
28
+ - `feat` — new feature · `fix` — bug fix
29
+ - `docs` — docs only · `refactor` — restructure with no behavior change
30
+ - `perf` — performance · `test` — add/fix tests
31
+ - `build` — build/dependency · `ci` — CI configuration
32
+ - `chore` — maintenance/automated · `revert` — revert a previous commit
33
+ - `style` — formatting (no logic)
34
+
35
+ ### Which type? (deciding when ambiguous)
36
+ - A new capability for the user? → `feat`. Fixing an existing wrong behavior? → `fix`.
37
+ - Behavior the same, only the structure changed? → `refactor` (if behavior changed it's `feat`/`fix`, not refactor).
38
+ - Touched only tests/docs/formatting? → `test`/`docs`/`style` (don't touch code logic).
39
+
40
+ ## Scope (optional, preferred)
41
+ The affected area/module: `auth`, `api`, `backend`, `db`, `frontend`, `session`, `agent`, etc.
42
+ One word, consistent with the project's module name.
43
+
44
+ ## Summary line
45
+ - **In the project's established language** (English by default for open source), imperative/summary mood, start lowercase, NO period at the end, ≤ ~72 characters.
46
+ - Say **what it does**, not how; avoid vague words ("fix", "update", "wip").
47
+ ✅ `feat(auth): one-time code TTL + brute-force limit`
48
+ ❌ `fix: bug` · ❌ `update` · ❌ `changes`
49
+
50
+ ## Body (optional — recommended for meaningful changes)
51
+ After a blank line: the **WHY** (motivation) + notable consequences/tradeoffs. Wrap at ~72 characters.
52
+ Leave context for the future reader who opens git-blame — the diff already shows the "what"; you write the "why".
53
+
54
+ ## Footer (optional)
55
+ - `BREAKING CHANGE: <description>` — a backward-incompatible breaking change (triggers SemVer MAJOR, `release` skill).
56
+ - `Refs: #<issue>` / `Closes #<issue>`.
57
+
58
+ ## Atomic commit — splitting a mixed diff
59
+ If a diff contains several logical changes, **split it**; don't cram it into one commit:
60
+ ```bash
61
+ git add -p # pick hunk by hunk; stage related changes separately
62
+ git add <specific/file>
63
+ ```
64
+ Each commit focused on a single topic; "feat + fix + refactor" doesn't belong in one commit.
65
+
66
+ ## Good / bad
67
+
68
+ Worked good-vs-bad commit examples: **`references/examples.md`**.
69
+
70
+ ## Rules
71
+ - **Atomic:** one logical change = one commit.
72
+ - **No commit without DoD:** don't propose a message until `/simplify` + tests green + (if SonarQube is used) `sonarqube-check` 0/0/0/0 pass.
73
+ - If there is no staged diff, warn; ask the user about the `git add` scope with explicit options.
74
+ - Don't run `git commit` silently; propose the message, **wait for approval**.
75
+
76
+ ## Prohibitions (absolute — see CLAUDE.md §4)
77
+ - **No AI trace:** no co-author trailer, auto-generation footer, or robot emoji in the subject/body;
78
+ words naming an AI assistant, model, or coding tool, and the `.claude` name, do not appear in the message.
79
+ - **No vendor name:** the third-party template/skeleton name and any "vendor copy / cleanup" disclosure are not written in the message (§4.2).
80
+ - **Human, natural language:** the message is natural, technical, and in the project's established language (English by default for open source).
81
+ - **Approval:** commit only when the user says "commit"; "done" is not approval (§4.4).
82
+ - **Destructive:** amend / reset / force / `--no-verify` only on an explicit request; the hook is not skipped (§4.5).
@@ -0,0 +1,8 @@
1
+ # Good / bad commit examples
2
+
3
+ | ✅ Good | ❌ Bad |
4
+ |---|---|
5
+ | `fix(db): return 404 instead of 403 on IDOR (prevent entity leak)` | `fix: db issue` |
6
+ | `refactor(api): consolidate query handlers into one contract` | `refactor stuff` |
7
+ | `feat(session): session-health line + threshold rule` | `feat: added new stuff` |
8
+ | `revert: "feat(auth): code TTL"` (sha) | `reverted it` |
@@ -0,0 +1,86 @@
1
+ ---
2
+ name: confidence-check
3
+ description: |
4
+ Readiness gate BEFORE writing implementation code: does this already exist, does it fit the project's
5
+ architecture, is the API claim actually checked, is there a working reference, is the root cause known.
6
+ ---
7
+
8
+ # Confidence Check — earn the right to start
9
+
10
+ <!-- routing-eval reads the next line; why it sits in the body: AGENT_TEMPLATE.md -->
11
+ Trigger phrases: "confidence check", "ready to implement", "before I start", "am I sure enough", "readiness"
12
+
13
+ ## When
14
+ Right before implementation code gets written for anything beyond a one-line change, and *after* the scope is
15
+ clear ([[spec-planning]] / planner). Every other gate in Crewforth fires at the end — review, DoD, the commit
16
+ approval. Those catch bad code. None of them catch **good code that should never have been written**: the
17
+ duplicate of a helper that already exists, the pattern that fights the project's architecture, the call built
18
+ against an API that behaves differently than remembered. That waste is invisible to a reviewer, because what
19
+ they see is a clean diff.
20
+
21
+ ## The six checks
22
+ Each is answered with **evidence**, not with a feeling. Name what you ran or read.
23
+
24
+ | # | Check | How it is actually answered |
25
+ |---|---|---|
26
+ | 1 | **Does it already exist?** | Grep/Glob the codebase for the behaviour *and* its likely other names. A near-duplicate counts. |
27
+ | 2 | **Does it fit this project?** | Read `CLAUDE.md` + the relevant project skill. Same stack, same pattern, no new dependency smuggled in. |
28
+ | 3 | **Is the external claim verified?** | The API / library / config behaviour you are relying on: read the real docs or the installed source. Recalled API shapes are the single most common wrong assumption. |
29
+ | 4 | **Is there a working reference?** | An existing call site in this repo, or a known-good implementation. "It should work like this" is not one. |
30
+ | 5 | **Is the root cause known?** | For a fix: the *cause*, not the symptom. Unknown → this is a [[systematic-debugging]] task, not an implementation task. |
31
+ | 6 | **Can it be PROVEN when it is done — with what is running right now?** | Name the thing that will show it works — the suite, a migration applied to a real database, a request against a running service — and confirm it is reachable *before* starting, not after. One command. Measured: an agent spent 44 minutes and 167k tokens producing a migration, then found the database daemon was down and returned unverified. A precondition discovered at the end costs the whole run. |
32
+
33
+ ## The verdict is not a score
34
+ The tempting form is a weighted score with a threshold. It is theatre: with six checks and any sane bar, a
35
+ single failure sinks it anyway, so the weights only decorate a decision that was already binary. So: **any "no"
36
+ is a stop.** Say which check failed and do the one thing that answers it — search, read the doc, find the
37
+ reference, debug the cause — then start. If the user wants to proceed with a known gap, that is their call to
38
+ make explicitly, and it gets written down as an assumption, not swallowed.
39
+
40
+ Checks 3–6 do not apply to every task (a pure refactor has no external claim and no bug; a change the suite alone
41
+ proves needs nothing brought up). Mark those **n/a**
42
+ with a reason — n/a is a judgement you are stating, not a check you are skipping.
43
+
44
+ An ambiguity you cannot resolve is not a failed check — it is a `[NEEDS CLARIFICATION: …]` marker
45
+ ([[spec-planning]]) carried into the plan. Guessing it and passing check 2 is the failure mode this gate exists
46
+ to catch.
47
+
48
+ ## A bypassed gate leaves a record
49
+ Gates get bypassed, legitimately: the user accepts a known gap, a DoD item is deferred, scope is trimmed under
50
+ time pressure. What must not happen is the bypass being *spoken and forgotten* — three weeks later nobody can
51
+ say whether a rule was weighed and overridden or simply missed, and those two are indistinguishable from the
52
+ code. That gap is the missing half of "rule → gate": Crewforth enforces the rule at the tool level, and this line is
53
+ the record of a human deliberately stepping past it.
54
+
55
+ So when a gate is knowingly bypassed, write one line where the decision lives — the ADR for anything lasting
56
+ ([[adr]]), otherwise the plan's assumptions section:
57
+
58
+ `BYPASSED <gate> — <why> — asked by <who> — revisit: <condition or date>`
59
+
60
+ The `revisit` field is what separates a decision from a leak: a bypass with no condition attached is permanent
61
+ by default, and nobody chose that. Never write this on the model's own authority — a bypass is the user's call,
62
+ so the line records *their* decision, and its absence means the gate was not bypassed at all.
63
+
64
+ ## Output
65
+ Six lines, one per check: `✅ <what was run/read>` or `❌ <what is missing>` or `n/a — <why>`. Then either
66
+ "starting" or the single action that unblocks it. Keep it to the main thread; it is a handful of lines, not a
67
+ document.
68
+
69
+ ## Fix the deciding rule before you see the options
70
+ When this check ends in a choice — which approach, which library, which of three designs — write down what would
71
+ make an option **win**, and what would **disqualify** one, *before* generating or evaluating any. A criterion
72
+ chosen after the options exist is a criterion shaped by them: it will quietly favour the one already preferred,
73
+ and nothing in the output will show that it did.
74
+
75
+ Write the **kill criterion** in the same breath: what would make you abandon the whole approach. An option set
76
+ with no losing condition is a preference wearing an analysis.
77
+
78
+ > Honest boundary: this one is discipline, not a gate. Nothing can check whether the rule was written before the
79
+ > options or backfilled after them — the value is that the user can see the rule stated first and argue with it,
80
+ > which is impossible when the criterion never leaves your head. Treat it as cheap insurance, not as proof.
81
+
82
+ ## DoD (this skill's contribution)
83
+ - Every check is answered with a named command, file, or document — never with a recollection.
84
+ - Any "no" was resolved before implementation started, or is recorded as a user-accepted assumption.
85
+ - Check 1 was answered by an actual search, not by "I don't think we have one".
86
+ - A fix with an unknown cause went to [[systematic-debugging]] instead of being implemented on a guess.
@@ -0,0 +1,55 @@
1
+ ---
2
+ name: crew-board
3
+ description: Experimental: team board — claim an item, hand it over, complete it.
4
+ argument-hint: "[claim <id> | done <id> | drop <id> | add <id> <title> | init | sync]"
5
+ disable-model-invocation: true
6
+ metadata:
7
+ kind: command
8
+ experimental: true
9
+ ---
10
+ # /crew-board
11
+ Argument: $ARGUMENTS
12
+
13
+ Apply the `teamboard` skill. The engine is `bash .claude/hooks/board.sh`; never hand-edit the board.
14
+
15
+ **Never make the user learn the syntax.** They should be able to run `/crew-board` and answer questions from
16
+ there; `claim 3` and `done 3` are yours to type, not theirs. Every step below ends in a question with explicit
17
+ options, not an instruction to go and type something.
18
+
19
+ - **no argument** → `board.sh status`, plus `board.sh decisions` when the session-start line says decisions are
20
+ unread. Report: who holds what and for how long, what is claimable, what is blocked by which item, any STALE
21
+ claim, and any unread team decision. Then **ask which item to take, as options** (the claimable ones, each
22
+ labelled with its title and why it is a sensible next pick, plus "just looking"). On their answer, claim it —
23
+ do not tell them to run a claim command. If nothing is claimable, say what would unblock what, and stop.
24
+ - **`claim <id>`** → `board.sh claim <id>`. A refusal is an answer, not an error: name who holds it and offer the
25
+ claimable alternatives. Never work around a refusal. On success it prints the **connected work** — what each
26
+ dependency actually delivered, and which items are waiting on this one. Read that back to the user before
27
+ writing anything; it is the context the previous person had and you do not.
28
+ - **`done <id>`** → ask for what shipped (commit/PR), then `board.sh done <id> "<note>"`, tell the user which
29
+ items this unblocked, and **immediately offer the next item as options** — closing one and picking the next is
30
+ one movement, not two commands to remember.
31
+ - **`decide "<what>"`** → `board.sh decide`. Anything that changes how OTHER work must be done — a contract, a
32
+ rejected approach, a constraint discovered the hard way — goes here the moment it is settled, while the reason
33
+ is still in the session. It reaches every teammate's next session opening; a decision that stays in this chat
34
+ reaches nobody. Write what was decided, why, and what it means for other items; name the items it affects.
35
+ - **`decisions`** → list them, or read one. Read these before planning anything.
36
+ - **`drop <id>`** → write the handover note FIRST — exactly where it stands, which files, and why the discarded
37
+ approach was discarded — then `board.sh drop <id> "<note>"`. The engine refuses an empty note.
38
+ - **`add <id> <title> [deps]`** → add items. From `docs/PLAN.md`, carry each task's dependency edges across.
39
+ - **no board in this repo yet** → do not tell the user to run `init`; that is the syntax they should never have to
40
+ learn. Say plainly what a board is for (a teammate's in-progress work is invisible without one) and **ask, with
41
+ options**: set one up on this repo's own remote · set one up in a separate repository (they give the URL — for a
42
+ board shared across repos, or people who cannot push to the code) · not now, this is solo work. On "not now",
43
+ drop it and do not raise it again unprompted. On a yes, run `init` yourself, then offer to fill it from
44
+ `docs/PLAN.md` if one exists, or ask for the items. Report what the server accepted (custom ref namespace or the
45
+ orphan-branch fallback) in one line — the user should know where their board lives without having to ask.
46
+ - **`init`** → the same thing when asked for directly. `init --remote <url>` puts the board in a separate
47
+ repository. Run by ONE person, once — everyone else configures nothing and the board reaches them on its own.
48
+ If a board already exists this fetches it rather than creating a second.
49
+ - **`sync`** → fetch and re-read; use it when the board looks stale or a gate message disagrees with reality.
50
+ - **`off` / `on`** → release every board gate for this repo (`off --global` for all of them) and put them back.
51
+ The board is untouched either way. A repo that never ran `init` has no gates to begin with — never imply the
52
+ user must turn something off to work alone.
53
+
54
+ Before writing any code for an item, confirm this user holds it. Commits are gated: `[#<id>]` for a held item,
55
+ `[chore]` otherwise. Strip secrets from anything written to the board — it is pushed to the whole team.
@@ -0,0 +1,19 @@
1
+ ---
2
+ name: crew-brainstorm
3
+ description: Diverge before planning — turn a fuzzy ask into scoped options and a chosen direction.
4
+ argument-hint: "[fuzzy idea / problem to explore]"
5
+ disable-model-invocation: true
6
+ metadata:
7
+ kind: command
8
+ ---
9
+ # /crew-brainstorm
10
+ Argument: $ARGUMENTS
11
+
12
+ Delegate to the @agent-crew-planner agent applying the **brainstorm** skill. For an under-defined ask:
13
+ 1. Restate the real goal separately from the requested solution.
14
+ 2. Generate **2–4 genuinely different** directions (include a cheap/minimal one); give each its trade-off.
15
+ 3. Surface assumptions + open questions; mark which are blocking.
16
+ 4. Ask the user to choose WITH **explicit numbered options**; log the rejected directions + why.
17
+
18
+ Write a long exploration to `docs/DISCOVERY.md`; return the option headings + the chosen direction (token-budget).
19
+ Do NOT write code — this is discovery. Once a direction is chosen, hand off to `/crew-plan` (spec-planning).
@@ -0,0 +1,151 @@
1
+ ---
2
+ name: crew-code-review
3
+ description: |
4
+ Code review discipline: review only what changed, rank each finding by severity and category, and
5
+ fact-check it first. crew-review-agent applies it.
6
+ Use when reviewing a change set, and when acting on a review someone else wrote.
7
+ ---
8
+
9
+ # Code Review
10
+
11
+ <!-- routing-eval reads the next line; why it sits in the body: AGENT_TEMPLATE.md -->
12
+ Trigger phrases: "code-review", "review the code", "review the PR", "review my changes", "do a review"
13
+
14
+ > **Crewforth adaptation (local, .claude/):** applied by `crew-review-agent` (read-only). §4 applies, and no
15
+ > vendor or template name reaches an artifact (§4.2).
16
+
17
+ A review runs in four steps — **group, plan, review, fact-check** — and reports few findings that are right rather
18
+ than many that might be. Every step below says what it produces.
19
+
20
+ ## 1. Scope
21
+ - **Review the lines this change adds or edits.** Deleted code is context for understanding them, not a target.
22
+ - Code that is correct, or that the change did not touch, gets no comment.
23
+ - **An empty result is a result.** Do not invent findings to show the review happened.
24
+ - **Be sure before you write.** A finding you are not sure of is not a finding yet: read the surrounding code until
25
+ you are. A false alarm costs more than a small miss — it spends the attention the next real problem needs.
26
+
27
+ ## 2. Group the files
28
+ Read together what has to be understood together: an interface and its implementations, the code that produces
29
+ something and the code that consumes it, the same resource in its language or environment variants. Look across
30
+ each group for a contract that broke between two files, or an update that reached one of them and not the other.
31
+ Then look at **every file in the group on its own** — a small or secondary file is where a missed update hides.
32
+
33
+ ## 3. Plan before you comment
34
+ Before the first finding, write two things down:
35
+ - **What changed**, in one line.
36
+ - **The risks**, ordered by severity, each with what you will read to confirm or dismiss it ("the callers of
37
+ `settle()`", "the migration's down step"). No risk worth checking → write `(none)` and say so.
38
+
39
+ The plan is what keeps the review on the change instead of on whatever the eye lands on first.
40
+
41
+ ## 4. Severity and category
42
+ Every finding carries one severity and one category.
43
+
44
+ | Severity | What it is | Blocks the commit? |
45
+ |---|---|---|
46
+ | `critical` | a security hole, lost or corrupted data, a crash | **yes** |
47
+ | `high` | a core function stops working, or works wrongly | **yes** |
48
+ | `medium` | performance, maintainability, an unhandled edge case | no |
49
+ | `low` | readability and style | no |
50
+
51
+ Category: `bug` · `security` · `performance` · `maintainability` · `test` · `style` · `docs`.
52
+
53
+ **A blocker is a `critical` or `high` finding** — nothing else stops the commit, and the review is clean when none
54
+ is left open.
55
+
56
+ ## 5. Style, names and code comments
57
+ - Style and naming are `low`, never block, and fit in one sentence.
58
+ - **Code comments are out of scope unless asked for**, with one exception: a comment that says something **false**
59
+ about what the code does is a `low` / `docs` finding, because the next reader will believe it.
60
+
61
+ ## 6. Finding format
62
+ `file:line · severity · category · what you observed · what to do instead`
63
+
64
+ What to do instead is the reason the finding exists; a finding without it is an opinion.
65
+
66
+ ## 7. What a change must not quietly do
67
+ **Verifier integrity:** flag any change that makes a check pass by *weakening the check* — deleting or loosening
68
+ an assertion, lowering a threshold, skipping a test, editing the test instead of the code — rather than fixing
69
+ the behavior. A test or gate that grades itself lax is worse than none; a verifier must stay external and grounded.
70
+
71
+ **Subject integrity:** the inverse case — the check is untouched, but what it checked is gone. Flag a change that
72
+ deletes or stubs the code path, so the check passes over behavior that no longer runs; narrows the run to a
73
+ subset (fewer cases, one platform, a filtered input set) where the property happens to hold; turns an all-of
74
+ requirement into an any-of one; or relaxes the rule the code is there to enforce — a widened type, a dropped
75
+ uniqueness or referential constraint, an exception list holding exactly the failing case. Ask not "does it pass
76
+ now" but **"does the system still do what this check was protecting"**. Retiring a genuinely obsolete check is
77
+ legitimate: say so in the diff and name what covers it now.
78
+
79
+ ## 8. Two-stage verdict (fact-check before you report)
80
+ Finding a problem and confirming it are two acts. A first-pass "this looks wrong" is a **candidate**, not a verdict.
81
+ Before a finding is reported — especially a blocker — run a second pass that tries to *disprove* it:
82
+ - Does it hold on the real code, or did the first read miss context (a guard upstream, a caller that never reaches
83
+ this path, a framework default)? Re-read the surrounding code; do not rank on the snippet alone.
84
+ - Is the severity honest, or is a `low` dressed up as a blocker?
85
+ - For any **"fixed" / "passes" claim**: the *real* check ran and passed — test exit code, build, lint/quality gate —
86
+ not "I re-read it and it looks fixed". A verifier that is the model's own say-so is not a verifier (§7, Verifier
87
+ integrity). Cite the evidence: which check, what result.
88
+
89
+ **The disprove pass is asymmetric.**
90
+ - **Only evidence removes a finding.** It is dropped when the code shows it is wrong. "I could not confirm it",
91
+ "it seems unlikely" or "it is not worth it" lower its severity; they do not delete it.
92
+ - **Some findings are never dropped in this pass:** memory safety; concurrency; a declaration that does not match
93
+ its definition; a change in behaviour or compatibility — a message, field, status or default that callers
94
+ used to get and now silently lose; a parameter that is accepted and then ignored. In these, the model's
95
+ confidence that all is well is the signal least worth trusting.
96
+
97
+ **"Independent" costs a separate context.** A second pass in the same context has already read the first one's
98
+ reasoning, so it cannot be blind to it — and its agreement is the first pass nodding at itself. For a **blocker**,
99
+ run the disprove pass as its own subagent, handed the claim and the `file:line` but not your argument. If you did
100
+ not isolate it, label the verdict as a single pass rather than calling it independent. The full contract —
101
+ isolation, one lens per verifier, and why unanimity for the same reason is a monoculture — lives in
102
+ `security-scan/references/verify.md`; it is one discipline, not two.
103
+
104
+ ## 9. Check the history before you call a finding new
105
+ A confirmed finding may still not be new, and one that was fixed once and came back needs a different fix. Search
106
+ **by code, not by commit message** — a message states intent, not content. The exact git forms (`-S` vs `-G`, the
107
+ `merge-base` bound, why `--follow` does not combine): **`references/history-search.md`**.
108
+
109
+ If a commit removed the guard, check, or test this diff would restore, the finding is a **re-introduced regression** —
110
+ the question becomes "what removed the fix, and does that reason still hold", the removing commit is cited in the
111
+ finding, and the deleted test is restored rather than a new one written.
112
+
113
+ ## Panel mode (high-stakes decisions only)
114
+ For hard-to-reverse calls (architecture, public API, security boundary), run several independent adversarial
115
+ lenses then synthesize. Full method: **`references/panel-mode.md`**.
116
+
117
+ ## When you and the author disagree
118
+ Settle it with the code's behaviour and a check that can be run. If that does not settle it, take it to the user
119
+ rather than blocking in silence.
120
+
121
+ ## Triage — a finding that is only reported is a finding that is lost
122
+ Reviewing and *disposing of* what the review found are two acts, and only the first one is habitual. Every finding
123
+ that survives the disprove pass leaves the review with an explicit disposition — never an unanswered comment and
124
+ never a silent drop:
125
+
126
+ | Disposition | Means | Where it goes |
127
+ |---|---|---|
128
+ | **fixed now** | the owning specialist changed the code | the diff; re-review the change |
129
+ | **tracked** | real, not for this change | an issue/task with the file:line — cite the id in the review |
130
+ | **accepted** | a real cost the team is choosing to carry | an `adr` when it is architectural, a code comment when local |
131
+ | **dropped** | disproved by the code | say so; a candidate that vanishes unexplained reads as an oversight |
132
+
133
+ A blocker (`critical` / `high`) may only be `fixed now` or `tracked`. "Accepted" needs the user's decision — an
134
+ agent does not grant it to itself. Close the review by stating the counts per severity and per disposition; an
135
+ unreported finding is indistinguishable from one that was never made, which is exactly the state a review exists
136
+ to leave behind.
137
+
138
+ ## Receiving a review — an inbound comment is a candidate, not an instruction
139
+ When the review is someone else's and the code is yours, **read every item before changing any line**, group by
140
+ cause rather than patching per symptom, and give each item the same disprove pass as a finding of your own. The
141
+ five questions that decide *answer in the thread* vs *edit the code*: **`references/receiving.md`**. Every inbound
142
+ item leaves with a disposition from the triage table above — a reasoned refusal is an answer, silence is not.
143
+
144
+ ## DoD (this skill's contribution)
145
+ - The plan (what changed, the risks) came before the findings; every file in each group was read.
146
+ - Every finding has a severity, a category and a reason, in the finding format above.
147
+ - Scope creep and hidden complexity are flagged.
148
+ - Each reported blocker survived an independent disprove pass; any "fixed"/"passes" claim is backed by the real check
149
+ having actually run, not self-assessment.
150
+ - **Every finding has a disposition** (fixed / tracked / accepted / dropped) and no blocker is left merely reported.
151
+ - For a high-stakes decision, multiple independent lenses were applied and their objections synthesized, not averaged.
@@ -0,0 +1,19 @@
1
+ # Searching the history by code — the exact git forms
2
+
3
+ Read this when a confirmed finding needs its history checked. The rule is in SKILL.md: search by **code**, not by
4
+ commit message. This file is the mechanics.
5
+
6
+ Bounded at the branch point and scoped to the diff's paths, so it stays cheap per finding:
7
+
8
+ ```bash
9
+ git log -S'<exact token from the changed line>' "$(git merge-base HEAD <target-branch>)" -- <paths in the diff>
10
+ ```
11
+
12
+ `-S` lists the commits where the NUMBER OF OCCURRENCES of that string changed — added or deleted. A commit that
13
+ removes it in one place and adds it back in another leaves the count unchanged and does not appear, which is
14
+ exactly the "was the guard moved?" case: reach for `-G'<regex>'` there, which matches added or removed lines
15
+ against a regular expression regardless of count. `--follow` continues across renames but works on a single
16
+ path only, so it does not combine with the multi-path form above.
17
+
18
+ **`--grep` does not answer this.** A commit message states intent, not content: it misses fixes worded differently
19
+ and matches commits that changed nothing relevant. Use it only to read a commit you already found by content.