buildcrew 1.8.6 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +129 -1
- package/agents/architect.md +26 -0
- package/agents/browser-qa.md +29 -0
- package/agents/buildcrew.md +33 -4
- package/agents/canary-monitor.md +22 -0
- package/agents/coherence-auditor.md +347 -0
- package/agents/design-reviewer.md +36 -0
- package/agents/designer.md +56 -1
- package/agents/developer.md +34 -0
- package/agents/health-checker.md +23 -0
- package/agents/investigator.md +39 -0
- package/agents/planner.md +26 -0
- package/agents/qa-auditor.md +32 -0
- package/agents/qa-tester.md +29 -0
- package/agents/reviewer.md +35 -0
- package/agents/security-auditor.md +23 -0
- package/agents/shipper.md +23 -0
- package/agents/thinker.md +32 -0
- package/bin/hook.js +17 -0
- package/bin/setup.js +69 -5
- package/bin/watch.js +473 -0
- package/lib/hook.js +230 -0
- package/lib/install-hooks.js +165 -0
- package/package.json +7 -3
|
@@ -226,6 +226,42 @@ Before completing, verify:
|
|
|
226
226
|
|
|
227
227
|
---
|
|
228
228
|
|
|
229
|
+
## Handoff Record (Required at end of every output file)
|
|
230
|
+
|
|
231
|
+
design-reviewer 특화 필드 (Design §5.5):
|
|
232
|
+
|
|
233
|
+
```markdown
|
|
234
|
+
## Handoff Record
|
|
235
|
+
|
|
236
|
+
### Inputs consumed
|
|
237
|
+
- Live URL: {url} → screenshots at 3 breakpoints
|
|
238
|
+
- `harness/design-system.md` → tokens for compliance check
|
|
239
|
+
- `02-design.md` (if exists) → compared rendered vs. spec
|
|
240
|
+
|
|
241
|
+
### Outputs for next agents
|
|
242
|
+
- `design-review.md#scores` → user / developer (per dimension)
|
|
243
|
+
- `design-review.md#top-3-fixes` → developer (highest impact)
|
|
244
|
+
- `design-review.md#wcag-violations` → developer + browser-qa
|
|
245
|
+
|
|
246
|
+
### Decisions NOT covered by inputs
|
|
247
|
+
- {dimension priority}. Reason: {why this matters most}
|
|
248
|
+
|
|
249
|
+
### UX score provenance (Required for design-reviewer)
|
|
250
|
+
- Score: {N}/10 across {dimensions: hierarchy, contrast, motion, ...}
|
|
251
|
+
- Dimension breakdown cited from:
|
|
252
|
+
- Hierarchy {N}/10 → screenshot at {url}, line {file:line} CSS
|
|
253
|
+
- Contrast {N}/10 → measurement: {ratio}:1 (browser dev tools)
|
|
254
|
+
- Motion {N}/10 → reference {file:line} or "no motion observed"
|
|
255
|
+
- Low-scoring dimensions specifics:
|
|
256
|
+
- {dim} → fix at {file:line}: {one-line fix}
|
|
257
|
+
|
|
258
|
+
### Coordination signals (optional)
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
> 점수 옆에 항상 측정 근거. "low contrast"는 의견, "3.2:1"은 사실.
|
|
262
|
+
|
|
263
|
+
---
|
|
264
|
+
|
|
229
265
|
## Rules
|
|
230
266
|
|
|
231
267
|
1. **Screenshot everything** — scores without visual evidence are opinions. Take screenshots at each breakpoint.
|
package/agents/designer.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: designer
|
|
3
3
|
description: UI/UX designer & motion engineer (opus) - researches references, designs with Figma MCP, builds production components with animations, scroll effects, gestures, and interactive elements
|
|
4
4
|
model: opus
|
|
5
|
-
version: 1.8.
|
|
5
|
+
version: 1.8.7
|
|
6
6
|
tools:
|
|
7
7
|
- Read
|
|
8
8
|
- Write
|
|
@@ -56,6 +56,32 @@ You are a **Senior UI/UX Designer, Motion Engineer & Front-end Developer** who r
|
|
|
56
56
|
|
|
57
57
|
---
|
|
58
58
|
|
|
59
|
+
## Pre-Flight: Playwright MCP Check (Required)
|
|
60
|
+
|
|
61
|
+
Before starting ANY work, verify Playwright MCP is available by attempting to use `mcp__playwright__browser_navigate`.
|
|
62
|
+
|
|
63
|
+
**If Playwright MCP is not installed:** Stop immediately and tell the user:
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
🎨 DESIGNER — Cannot start without Playwright MCP.
|
|
67
|
+
|
|
68
|
+
Playwright is required for:
|
|
69
|
+
• Phase 1: Browsing reference sites and taking screenshots
|
|
70
|
+
• Phase 4: Validating the final result against references
|
|
71
|
+
|
|
72
|
+
Without Playwright, the designer produces generic output with no real-world research —
|
|
73
|
+
this is the #1 cause of "AI slop" designs.
|
|
74
|
+
|
|
75
|
+
Install now:
|
|
76
|
+
claude mcp add playwright -- npx @anthropic-ai/mcp-server-playwright
|
|
77
|
+
|
|
78
|
+
Then re-run the designer.
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Do NOT proceed without Playwright. Do NOT fall back to "code-only mode". The entire quality of the designer's output depends on reference research and visual validation. Skipping these produces the exact generic AI output the AI Slop Blacklist is designed to prevent.
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
59
85
|
## What You Produce
|
|
60
86
|
|
|
61
87
|
| Output | Purpose | File |
|
|
@@ -551,6 +577,35 @@ const animation = prefersReducedMotion
|
|
|
551
577
|
|
|
552
578
|
---
|
|
553
579
|
|
|
580
|
+
## Handoff Record (Required at end of every output file)
|
|
581
|
+
|
|
582
|
+
당신의 출력(`02-design.md`) 마지막에 반드시:
|
|
583
|
+
|
|
584
|
+
```markdown
|
|
585
|
+
## Handoff Record
|
|
586
|
+
|
|
587
|
+
### Inputs consumed
|
|
588
|
+
- `01-plan.md#user-stories` → designed UI per story
|
|
589
|
+
- `01-plan.md#scope-in-out-deferred` → respected scope boundaries
|
|
590
|
+
- `harness/design-system.md#tokens` → applied existing tokens
|
|
591
|
+
- `harness/user-flow.md#{flow}` → followed flow
|
|
592
|
+
|
|
593
|
+
### Outputs for next agents
|
|
594
|
+
- `02-design.md#components` → developer (component specs)
|
|
595
|
+
- `02-design.md#motion-spec` → developer (animation requirements)
|
|
596
|
+
- `02-design.md#error-states` → developer + qa-tester
|
|
597
|
+
- `02-design.md#accessibility-notes` → developer + browser-qa
|
|
598
|
+
|
|
599
|
+
### Decisions NOT covered by inputs
|
|
600
|
+
- {design decision}. Reason: {1-2 lines}
|
|
601
|
+
|
|
602
|
+
### Coordination signals (optional)
|
|
603
|
+
```
|
|
604
|
+
|
|
605
|
+
> Anchors must match GFM-normalized headings present in 02-design.md. Coherence-auditor verifies.
|
|
606
|
+
|
|
607
|
+
---
|
|
608
|
+
|
|
554
609
|
## Rules
|
|
555
610
|
|
|
556
611
|
1. **Research before designing** — no component gets built without at least 2 references looked at
|
package/agents/developer.md
CHANGED
|
@@ -289,6 +289,40 @@ When fixing issues found during QA/review iteration:
|
|
|
289
289
|
|
|
290
290
|
---
|
|
291
291
|
|
|
292
|
+
# Handoff Record (Required at end of every output file)
|
|
293
|
+
|
|
294
|
+
당신의 출력(`03-impl.md` + 변경한 소스 파일) 마지막에 반드시:
|
|
295
|
+
|
|
296
|
+
```markdown
|
|
297
|
+
## Handoff Record
|
|
298
|
+
|
|
299
|
+
### Inputs consumed
|
|
300
|
+
- `01-plan.md#acceptance-criteria` → implemented at src/{file}.tsx:LXX-LYY
|
|
301
|
+
- `01-plan.md#technical-approach` → followed
|
|
302
|
+
- `02-design.md#components` → built per spec
|
|
303
|
+
- `02-design.md#motion-spec` → animations applied at src/{file}.tsx:LXX
|
|
304
|
+
- `02-design.md#accessibility-notes` → aria-labels at src/{file}.tsx:LXX
|
|
305
|
+
- `harness/architecture.md#{pattern}` → adopted
|
|
306
|
+
- `harness/api-spec.md#{endpoint}` → wired
|
|
307
|
+
|
|
308
|
+
### Outputs for next agents
|
|
309
|
+
- `03-impl.md#components` → qa-tester (list of files changed)
|
|
310
|
+
- `03-impl.md#tests-needed` → qa-tester (edge cases)
|
|
311
|
+
- `03-impl.md#error-handling-map` → qa-tester + reviewer
|
|
312
|
+
- Source files: src/{file}.tsx, lib/{util}.ts (changed/created)
|
|
313
|
+
|
|
314
|
+
### Decisions NOT covered by inputs
|
|
315
|
+
- {non-trivial choice}. Reason: {citing harness or precedent}
|
|
316
|
+
|
|
317
|
+
### Coordination signals (optional)
|
|
318
|
+
- Conflicted with planner on {topic} — resolved by {how}
|
|
319
|
+
- Deferred {topic} to next iteration
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
> **Critical for developer**: coherence-auditor reads your cited source files (Q3 code cross-verification) and judges CONFIRMED/PARTIAL/MISSING_IN_CODE per planner requirement. Cite line ranges precisely. Honest evidence prevents fabrication flags.
|
|
323
|
+
|
|
324
|
+
---
|
|
325
|
+
|
|
292
326
|
# Rules
|
|
293
327
|
|
|
294
328
|
1. **Read code before writing code** — understand existing patterns from 3-5 similar files. Don't guess. Don't introduce new patterns without justification.
|
package/agents/health-checker.md
CHANGED
|
@@ -205,6 +205,29 @@ Write to `.claude/pipeline/health/health-report.md`:
|
|
|
205
205
|
|
|
206
206
|
---
|
|
207
207
|
|
|
208
|
+
## Handoff Record (Required at end of every output file)
|
|
209
|
+
|
|
210
|
+
당신은 보통 Mode 6 standalone으로 실행되지만, Feature 모드의 일부로도 호출 가능. 출력 마지막에:
|
|
211
|
+
|
|
212
|
+
```markdown
|
|
213
|
+
## Handoff Record
|
|
214
|
+
|
|
215
|
+
### Inputs consumed
|
|
216
|
+
- Repo state at {commit} → ran type/lint/build/dead-code/shellcheck
|
|
217
|
+
- `harness/project.md#stack` → adjusted weights for stack
|
|
218
|
+
|
|
219
|
+
### Outputs for next agents
|
|
220
|
+
- `health-report.md#score` → user (0-10 composite)
|
|
221
|
+
- `health-report.md#top-5-actionable` → user (or developer if used in iteration)
|
|
222
|
+
|
|
223
|
+
### Decisions NOT covered by inputs
|
|
224
|
+
- {weight adjustment}. Reason: {why}
|
|
225
|
+
|
|
226
|
+
### Coordination signals (optional)
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
---
|
|
230
|
+
|
|
208
231
|
## Rules
|
|
209
232
|
1. **Run real commands** — don't guess at numbers
|
|
210
233
|
2. **Count precisely** — parse output for exact error/warning counts
|
package/agents/investigator.md
CHANGED
|
@@ -286,6 +286,45 @@ Write to `.claude/pipeline/{context}/investigation.md`:
|
|
|
286
286
|
|
|
287
287
|
---
|
|
288
288
|
|
|
289
|
+
## Handoff Record (Required at end of every output file)
|
|
290
|
+
|
|
291
|
+
investigator 특화 필드 (Design §5.2):
|
|
292
|
+
|
|
293
|
+
```markdown
|
|
294
|
+
## Handoff Record
|
|
295
|
+
|
|
296
|
+
### Inputs consumed
|
|
297
|
+
- Bug report from user → reproduction steps
|
|
298
|
+
- `harness/architecture.md` → component context
|
|
299
|
+
- `harness/erd.md` → data model context
|
|
300
|
+
- Source files: src/{file}.tsx (read for hypotheses)
|
|
301
|
+
- Logs / errors → evidence collected
|
|
302
|
+
|
|
303
|
+
### Outputs for next agents
|
|
304
|
+
- `investigation.md#root-cause` → developer (fix target)
|
|
305
|
+
- `investigation.md#test-coverage-gap` → qa-tester (regression test)
|
|
306
|
+
- `investigation.md#fix` → developer (if minimal fix included)
|
|
307
|
+
|
|
308
|
+
### Decisions NOT covered by inputs
|
|
309
|
+
- {scope of fix}. Reason: {why minimal vs. broader}
|
|
310
|
+
|
|
311
|
+
### Root cause trace (Required for investigator)
|
|
312
|
+
- Hypothesis: {one-sentence claim}
|
|
313
|
+
- Evidence collected:
|
|
314
|
+
- {file:line} → {what observation supports}
|
|
315
|
+
- (repeat — minimum 3 evidence points before settling on a root cause)
|
|
316
|
+
- Disproved hypotheses:
|
|
317
|
+
- H_disproved_1 → {evidence that ruled out}
|
|
318
|
+
- Final root cause: {statement} anchored at {file:line}
|
|
319
|
+
- Confidence: {N}/10
|
|
320
|
+
|
|
321
|
+
### Coordination signals (optional)
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
> 모든 evidence는 file:line으로 anchored. "I think"는 evidence 아님.
|
|
325
|
+
|
|
326
|
+
---
|
|
327
|
+
|
|
289
328
|
## Rules
|
|
290
329
|
|
|
291
330
|
1. **Never guess** — every fix traces to a confirmed root cause. If you can't explain WHY the bug happens, you haven't found the cause.
|
package/agents/planner.md
CHANGED
|
@@ -246,8 +246,34 @@ Write to `.claude/pipeline/{feature-name}/01-plan.md`:
|
|
|
246
246
|
|
|
247
247
|
## Handoff Notes
|
|
248
248
|
[What the designer needs to know — key constraints, non-obvious decisions, UX pitfalls to avoid]
|
|
249
|
+
|
|
250
|
+
## Handoff Record
|
|
251
|
+
|
|
252
|
+
### Inputs consumed
|
|
253
|
+
<!-- Each line: `<path>#<anchor>` → <how it shaped your plan>. Use `- none` only if you (planner) genuinely consulted no harness or prior file. Most plans should reference at least project.md and rules.md. -->
|
|
254
|
+
- `harness/project.md#stack` → confirmed tech stack constrains my Technical Approach
|
|
255
|
+
- `harness/rules.md#conventions` → applied to acceptance criteria phrasing
|
|
256
|
+
- (add more as relevant — glossary, user-flow, etc.)
|
|
257
|
+
|
|
258
|
+
### Outputs for next agents
|
|
259
|
+
<!-- What you produced, addressed to the downstream role. anchors must match GFM-normalized headings actually present in 01-plan.md above. -->
|
|
260
|
+
- `01-plan.md#user-stories` → designer (UI scope per story)
|
|
261
|
+
- `01-plan.md#acceptance-criteria` → developer + qa-tester (testable specs)
|
|
262
|
+
- `01-plan.md#technical-approach` → developer (architecture constraints)
|
|
263
|
+
- `01-plan.md#scope-in-out-deferred` → designer + developer (what NOT to build)
|
|
264
|
+
|
|
265
|
+
### Decisions NOT covered by inputs
|
|
266
|
+
<!-- Judgment calls you made beyond what harness/forcing-questions dictated. List with reasons. `- none` allowed if you made no autonomous calls (rare). -->
|
|
267
|
+
- {decision}. Reason: {1-2 lines}.
|
|
268
|
+
- (add more as needed)
|
|
269
|
+
|
|
270
|
+
### Coordination signals (optional)
|
|
271
|
+
<!-- Cross-references, conflicts, deferrals. Omit this section if nothing applies. -->
|
|
272
|
+
- (none typically for planner — first in pipeline)
|
|
249
273
|
```
|
|
250
274
|
|
|
275
|
+
> **Why this matters**: `coherence-auditor` runs at the end of the pipeline and parses every Handoff Record. Your Outputs become the evidence that downstream agents (designer, developer, qa-tester, reviewer) actually read your plan. If your Outputs declare anchors that don't exist as headings in 01-plan.md, that's a Fabrication. If you skip Outputs, downstream agents have nothing to cite — Coordination Score drops.
|
|
276
|
+
|
|
251
277
|
---
|
|
252
278
|
|
|
253
279
|
# Mode 2: Project Discovery
|
package/agents/qa-auditor.md
CHANGED
|
@@ -302,6 +302,38 @@ If score < 7, suggest: "Consider fixing HIGH/MEDIUM issues before shipping."
|
|
|
302
302
|
|
|
303
303
|
---
|
|
304
304
|
|
|
305
|
+
## Handoff Record (Required at end of every output file)
|
|
306
|
+
|
|
307
|
+
qa-auditor 특화 필드 (Design §5.4):
|
|
308
|
+
|
|
309
|
+
```markdown
|
|
310
|
+
## Handoff Record
|
|
311
|
+
|
|
312
|
+
### Inputs consumed
|
|
313
|
+
- Git diff vs. base → 3 parallel subagent scope
|
|
314
|
+
- `harness/rules.md` → audit standards
|
|
315
|
+
- Source files: src/{files} (changed in diff)
|
|
316
|
+
|
|
317
|
+
### Outputs for next agents
|
|
318
|
+
- `qa-report.md#findings` → developer (HIGH/MEDIUM/LOW issues)
|
|
319
|
+
- `qa-report.md#score` → user (0-10)
|
|
320
|
+
|
|
321
|
+
### Decisions NOT covered by inputs
|
|
322
|
+
- {validation choice}. Reason: {why included/excluded}
|
|
323
|
+
|
|
324
|
+
### Subagent findings consolidation (Required for qa-auditor)
|
|
325
|
+
- Subagent 1 (correctness): {N findings}, top: {summary}
|
|
326
|
+
- Subagent 2 (performance): {N findings}, top: {summary}
|
|
327
|
+
- Subagent 3 (security): {N findings}, top: {summary}
|
|
328
|
+
- Cross-subagent conflicts: {none | list with resolution}
|
|
329
|
+
|
|
330
|
+
### Coordination signals (optional)
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
> 3개 subagent 결과를 별도 항목으로 보존. 충돌 발견 시 해결 방식 명시.
|
|
334
|
+
|
|
335
|
+
---
|
|
336
|
+
|
|
305
337
|
## Rules
|
|
306
338
|
|
|
307
339
|
1. **Always run all 3 subagents in parallel** — never sequential
|
package/agents/qa-tester.md
CHANGED
|
@@ -301,6 +301,35 @@ After developer fixes issues from a previous QA round:
|
|
|
301
301
|
|
|
302
302
|
---
|
|
303
303
|
|
|
304
|
+
# Handoff Record (Required at end of every output file)
|
|
305
|
+
|
|
306
|
+
당신의 출력(`04-qa.md`) 마지막에 반드시:
|
|
307
|
+
|
|
308
|
+
```markdown
|
|
309
|
+
## Handoff Record
|
|
310
|
+
|
|
311
|
+
### Inputs consumed
|
|
312
|
+
- `01-plan.md#acceptance-criteria` → built test map from these
|
|
313
|
+
- `03-impl.md#components` → tested these files
|
|
314
|
+
- `03-impl.md#tests-needed` → covered listed edge cases
|
|
315
|
+
- `03-impl.md#error-handling-map` → verified each entry
|
|
316
|
+
- Source files: src/{file}.tsx (read for FAIL evidence)
|
|
317
|
+
|
|
318
|
+
### Outputs for next agents
|
|
319
|
+
- `04-qa.md#findings` → reviewer (bugs to verify fix)
|
|
320
|
+
- `04-qa.md#test-map` → browser-qa (UI test plan)
|
|
321
|
+
- `04-qa.md#severity-summary` → reviewer (priority order)
|
|
322
|
+
|
|
323
|
+
### Decisions NOT covered by inputs
|
|
324
|
+
- {test scope decision}. Reason: {why beyond plan}
|
|
325
|
+
|
|
326
|
+
### Coordination signals (optional)
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
> qa-tester가 `03-impl.md#components` 인용 안 하면 testing-without-reading-impl으로 flag.
|
|
330
|
+
|
|
331
|
+
---
|
|
332
|
+
|
|
304
333
|
# Rules
|
|
305
334
|
|
|
306
335
|
1. **Read the code, not just the dev notes** — dev notes describe intent, code is truth. Always verify claims against actual implementation.
|
package/agents/reviewer.md
CHANGED
|
@@ -255,6 +255,41 @@ Write to `.claude/pipeline/{feature-name}/06-review.md`:
|
|
|
255
255
|
|
|
256
256
|
---
|
|
257
257
|
|
|
258
|
+
## Handoff Record (Required at end of every output file)
|
|
259
|
+
|
|
260
|
+
당신의 출력(`06-review.md`) 마지막에 반드시. **reviewer는 특화 필드 추가** (Design §5.1 — 이전 에이전트 Handoff 검증 책임):
|
|
261
|
+
|
|
262
|
+
```markdown
|
|
263
|
+
## Handoff Record
|
|
264
|
+
|
|
265
|
+
### Inputs consumed
|
|
266
|
+
- `01-plan.md#acceptance-criteria` → verified each met
|
|
267
|
+
- `02-design.md#components` → checked dev followed spec
|
|
268
|
+
- `03-impl.md#components` → reviewed each cited file
|
|
269
|
+
- `03-impl.md#error-handling-map` → audited each error path
|
|
270
|
+
- `04-qa.md#findings` → confirmed fixes / re-flagged
|
|
271
|
+
- Source files: src/{files} (full diff review)
|
|
272
|
+
|
|
273
|
+
### Outputs for next agents
|
|
274
|
+
- `06-review.md#verdict` → user (APPROVE/REQUEST CHANGES/BLOCK)
|
|
275
|
+
- `06-review.md#findings` → developer (if iteration needed)
|
|
276
|
+
|
|
277
|
+
### Decisions NOT covered by inputs
|
|
278
|
+
- {scope/priority call}. Reason: {why}
|
|
279
|
+
|
|
280
|
+
### Coordination signals (Required for reviewer — 2중 방어)
|
|
281
|
+
- Verified Handoff Records of: planner, designer, developer, qa-tester (and browser-qa if UI)
|
|
282
|
+
- Fabrication candidates found: {N or 0}
|
|
283
|
+
- {if N>0}: list each — "{agent}#{anchor} cited but {evidence}"
|
|
284
|
+
- Suspicious citations flagged: {N or 0}
|
|
285
|
+
- {if N>0}: list each
|
|
286
|
+
- Handoff Record compliance issues observed: {none | list}
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
> **reviewer의 2중 방어 역할**: coherence-auditor(LLM 파서)가 markdown+code 검증을 하지만, reviewer(사람-급 LLM)는 더 깊은 의도 검증을 한다. fabrication 후보 발견 시 명시적으로 기록하라. 둘이 합쳐서 fabrication에 대한 2중 방어막.
|
|
290
|
+
|
|
291
|
+
---
|
|
292
|
+
|
|
258
293
|
## Rules
|
|
259
294
|
|
|
260
295
|
1. **Read the whole diff** — don't skim. One missed SQL injection is worth more than 20 style nits.
|
|
@@ -129,6 +129,29 @@ Write to `.claude/pipeline/{context}/security-audit.md`:
|
|
|
129
129
|
|
|
130
130
|
---
|
|
131
131
|
|
|
132
|
+
## Handoff Record (Required at end of every output file)
|
|
133
|
+
|
|
134
|
+
```markdown
|
|
135
|
+
## Handoff Record
|
|
136
|
+
|
|
137
|
+
### Inputs consumed
|
|
138
|
+
- Source tree → OWASP/STRIDE scan
|
|
139
|
+
- `harness/architecture.md#trust-boundaries` → defined attack surface
|
|
140
|
+
- `harness/api-spec.md` → audited endpoints
|
|
141
|
+
|
|
142
|
+
### Outputs for next agents
|
|
143
|
+
- `security-audit.md#findings` → developer (remediation tasks)
|
|
144
|
+
- `security-audit.md#owasp-coverage` → user
|
|
145
|
+
- `security-audit.md#stride-coverage` → user
|
|
146
|
+
|
|
147
|
+
### Decisions NOT covered by inputs
|
|
148
|
+
- {scoping choice}. Reason: {why}
|
|
149
|
+
|
|
150
|
+
### Coordination signals (optional)
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
132
155
|
## Rules
|
|
133
156
|
1. Verify before reporting — trace the code path
|
|
134
157
|
2. Every finding needs proof — include the code snippet
|
package/agents/shipper.md
CHANGED
|
@@ -283,6 +283,29 @@ Write to `.claude/pipeline/{feature-name}/07-ship.md`:
|
|
|
283
283
|
|
|
284
284
|
---
|
|
285
285
|
|
|
286
|
+
## Handoff Record (Required at end of every output file)
|
|
287
|
+
|
|
288
|
+
```markdown
|
|
289
|
+
## Handoff Record
|
|
290
|
+
|
|
291
|
+
### Inputs consumed
|
|
292
|
+
- Pre-flight: type/lint/build → all pass
|
|
293
|
+
- `06-review.md#verdict` → APPROVE confirmed
|
|
294
|
+
- `coherence-report.md#verdict` → reviewed (if available)
|
|
295
|
+
- Git diff vs. main → semver determined
|
|
296
|
+
|
|
297
|
+
### Outputs for next agents
|
|
298
|
+
- PR URL → user
|
|
299
|
+
- Suggested next: canary-monitor
|
|
300
|
+
|
|
301
|
+
### Decisions NOT covered by inputs
|
|
302
|
+
- semver bump rationale: {MAJOR/MINOR/PATCH}. Reason: {breaking? new? fix?}
|
|
303
|
+
|
|
304
|
+
### Coordination signals (optional)
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
---
|
|
308
|
+
|
|
286
309
|
## Rules
|
|
287
310
|
|
|
288
311
|
1. **Never ship from main** — always from a feature branch.
|
package/agents/thinker.md
CHANGED
|
@@ -226,6 +226,38 @@ Before completing, verify:
|
|
|
226
226
|
|
|
227
227
|
---
|
|
228
228
|
|
|
229
|
+
## Handoff Record (Required at end of every output file)
|
|
230
|
+
|
|
231
|
+
thinker는 보통 standalone(Mode 11). 출력 design doc 마지막에. **thinker 특화 필드** (Design §5.3):
|
|
232
|
+
|
|
233
|
+
```markdown
|
|
234
|
+
## Handoff Record
|
|
235
|
+
|
|
236
|
+
### Inputs consumed
|
|
237
|
+
- User conversation → 6 forcing questions answers
|
|
238
|
+
- `harness/project.md` → tech context (if relevant)
|
|
239
|
+
- `harness/glossary.md` → terminology
|
|
240
|
+
|
|
241
|
+
### Outputs for next agents
|
|
242
|
+
- `design-doc.md#problem-statement` → user / planner (if escalates to Feature mode)
|
|
243
|
+
- `design-doc.md#recommendation` → user
|
|
244
|
+
|
|
245
|
+
### Decisions NOT covered by inputs
|
|
246
|
+
- {scope/recommendation}. Reason: {why this wedge}
|
|
247
|
+
|
|
248
|
+
### Assumption chain (Required for thinker)
|
|
249
|
+
- A1: {assumption}. If false: {consequence}
|
|
250
|
+
- A2: {assumption}. If false: {consequence}
|
|
251
|
+
- Verified externally: {list with sources}
|
|
252
|
+
- Unverified: {list — explicitly mark these}
|
|
253
|
+
|
|
254
|
+
### Coordination signals (optional)
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
> thinker는 chain of assumption을 명시적으로 노출해야 한다. 다른 에이전트가 인용할 때 어느 가정 위에 서있는지 추적 가능.
|
|
258
|
+
|
|
259
|
+
---
|
|
260
|
+
|
|
229
261
|
## Rules
|
|
230
262
|
|
|
231
263
|
1. **Challenge, don't validate** — your job is to push back, not agree. The user has plenty of agreement bias already.
|
package/bin/hook.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* buildcrew-hook — thin CLI proxy for lib/hook.js.
|
|
4
|
+
*
|
|
5
|
+
* Installed as a bin entry so `npx buildcrew-hook <kind>` resolves
|
|
6
|
+
* the correct path regardless of where the package lives on disk.
|
|
7
|
+
* This keeps settings.json hook commands stable across reinstalls.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { fileURLToPath } from "node:url";
|
|
11
|
+
import path from "node:path";
|
|
12
|
+
|
|
13
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
14
|
+
const __dirname = path.dirname(__filename);
|
|
15
|
+
const emitPath = path.resolve(__dirname, "..", "lib", "hook.js");
|
|
16
|
+
|
|
17
|
+
await import(emitPath);
|
package/bin/setup.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { readdir, copyFile, mkdir, readFile, writeFile, access } from "fs/promises";
|
|
4
|
-
import { join, dirname } from "path";
|
|
4
|
+
import { join, dirname, resolve } from "path";
|
|
5
5
|
import { fileURLToPath } from "url";
|
|
6
6
|
|
|
7
7
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
@@ -9,6 +9,7 @@ const AGENTS_SRC = join(__dirname, "..", "agents");
|
|
|
9
9
|
const TEMPLATES_SRC = join(__dirname, "..", "templates");
|
|
10
10
|
const TARGET_DIR = join(process.cwd(), ".claude", "agents");
|
|
11
11
|
const HARNESS_DIR = join(process.cwd(), ".claude", "harness");
|
|
12
|
+
// (HOOK_SCRIPT path no longer needed — hooks use `npx buildcrew-hook` bin)
|
|
12
13
|
const PKG = JSON.parse(await readFile(join(__dirname, "..", "package.json"), "utf-8"));
|
|
13
14
|
const VERSION = PKG.version;
|
|
14
15
|
|
|
@@ -556,6 +557,39 @@ async function runInstall(force) {
|
|
|
556
557
|
}
|
|
557
558
|
}
|
|
558
559
|
|
|
560
|
+
// ─── Step 2d: CC hooks (agent lifecycle banners + events.jsonl) ───
|
|
561
|
+
try {
|
|
562
|
+
const hooksInstalled = await areHooksInstalled();
|
|
563
|
+
if (hooksInstalled) {
|
|
564
|
+
log(` ${GREEN}Hooks:${RESET} installed ✓\n`);
|
|
565
|
+
} else {
|
|
566
|
+
log(` ${YELLOW}Hooks${RESET} print a colored banner to your terminal whenever an`);
|
|
567
|
+
log(` agent starts/completes or a file is written. Also feeds ${BOLD}npx buildcrew watch${RESET}.`);
|
|
568
|
+
log(` ${DIM}Writes .claude/settings.json (+ recommended permissions)${RESET}\n`);
|
|
569
|
+
const answer = await ask(` Install hooks? ${BOLD}(Y/n)${RESET} `);
|
|
570
|
+
if (answer === "" || answer === "y" || answer === "yes") {
|
|
571
|
+
try {
|
|
572
|
+
const { install } = await import("../lib/install-hooks.js");
|
|
573
|
+
const result = await install({
|
|
574
|
+
scope: "project",
|
|
575
|
+
cwd: process.cwd(),
|
|
576
|
+
withPermissions: true,
|
|
577
|
+
});
|
|
578
|
+
log(`\n ${GREEN}${BOLD}Hooks installed!${RESET}`);
|
|
579
|
+
log(` ${DIM} hooks: ${result.settingsPath}${RESET}`);
|
|
580
|
+
if (result.permissions?.permPath) {
|
|
581
|
+
log(` ${DIM} permissions: ${result.permissions.permPath}${RESET}`);
|
|
582
|
+
}
|
|
583
|
+
log(`\n ${BOLD}Live monitor:${RESET} ${CYAN}npx buildcrew watch${RESET} ${DIM}(in a separate pane)${RESET}\n`);
|
|
584
|
+
} catch (err) {
|
|
585
|
+
log(`\n ${RED}Hook install failed:${RESET} ${err.message}\n`);
|
|
586
|
+
}
|
|
587
|
+
} else {
|
|
588
|
+
log(`\n ${DIM}Skipped. Hooks not installed.${RESET}\n`);
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
} catch { /* ignore, non-fatal */ }
|
|
592
|
+
|
|
559
593
|
// ─── Step 3: Project harness ───
|
|
560
594
|
if (!(await exists(join(HARNESS_DIR, "project.md")))) {
|
|
561
595
|
const initAnswer = await ask(` Generate project harness? ${DIM}(auto-detects your stack)${RESET} ${BOLD}(Y/n)${RESET} `);
|
|
@@ -588,6 +622,33 @@ async function runList() {
|
|
|
588
622
|
log("");
|
|
589
623
|
}
|
|
590
624
|
|
|
625
|
+
async function areHooksInstalled() {
|
|
626
|
+
try {
|
|
627
|
+
const settingsPath = join(process.cwd(), ".claude", "settings.json");
|
|
628
|
+
const content = await readFile(settingsPath, "utf-8");
|
|
629
|
+
return content.includes("buildcrew-hook");
|
|
630
|
+
} catch {
|
|
631
|
+
return false;
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
async function runWatch() {
|
|
636
|
+
// Pass through to bin/watch.js — the terminal-native live monitor.
|
|
637
|
+
const watchEntry = resolve(__dirname, "watch.js");
|
|
638
|
+
const passthrough = process.argv.slice(3);
|
|
639
|
+
const { spawn } = await import("child_process");
|
|
640
|
+
const child = spawn(process.execPath, [watchEntry, ...passthrough], {
|
|
641
|
+
stdio: "inherit",
|
|
642
|
+
cwd: process.cwd(),
|
|
643
|
+
env: process.env,
|
|
644
|
+
});
|
|
645
|
+
child.on("exit", (code) => process.exit(code ?? 0));
|
|
646
|
+
child.on("error", (err) => {
|
|
647
|
+
console.error(`${RED}Watch failed to start:${RESET} ${err.message}`);
|
|
648
|
+
process.exit(1);
|
|
649
|
+
});
|
|
650
|
+
}
|
|
651
|
+
|
|
591
652
|
async function runUninstall() {
|
|
592
653
|
const files = (await readdir(AGENTS_SRC)).filter(f => f.endsWith(".md"));
|
|
593
654
|
if (!(await exists(TARGET_DIR))) { log(`${YELLOW}No agents found.${RESET}`); return; }
|
|
@@ -614,11 +675,12 @@ async function main() {
|
|
|
614
675
|
${BOLD}buildcrew${RESET} v${VERSION} — 15 AI agents for Claude Code
|
|
615
676
|
|
|
616
677
|
${BOLD}Commands:${RESET}
|
|
617
|
-
npx buildcrew Install agents
|
|
678
|
+
npx buildcrew Install agents (also offers hooks + harness)
|
|
618
679
|
npx buildcrew init Auto-generate project harness (zero questions)
|
|
619
680
|
npx buildcrew add List harness templates
|
|
620
681
|
npx buildcrew add <name> Add a harness template
|
|
621
682
|
npx buildcrew harness Show harness file status
|
|
683
|
+
npx buildcrew watch Live terminal monitor (stays in your shell)
|
|
622
684
|
|
|
623
685
|
${BOLD}Options:${RESET}
|
|
624
686
|
--force, -f Overwrite existing files
|
|
@@ -627,10 +689,11 @@ async function main() {
|
|
|
627
689
|
--version Show version
|
|
628
690
|
|
|
629
691
|
${BOLD}Setup:${RESET}
|
|
630
|
-
${GREEN}1.${RESET} npx buildcrew
|
|
631
|
-
${GREEN}2.${RESET} npx buildcrew init
|
|
692
|
+
${GREEN}1.${RESET} npx buildcrew ${DIM}Install agents + optional hooks${RESET}
|
|
693
|
+
${GREEN}2.${RESET} npx buildcrew init ${DIM}Auto-generate harness from codebase${RESET}
|
|
632
694
|
${GREEN}3.${RESET} Edit .claude/harness/ ${DIM}Customize (replace <!-- comments -->)${RESET}
|
|
633
|
-
${GREEN}4.${RESET}
|
|
695
|
+
${GREEN}4.${RESET} npx buildcrew watch ${DIM}(optional) live terminal monitor${RESET}
|
|
696
|
+
${GREEN}5.${RESET} @buildcrew [task] ${DIM}Start working${RESET}
|
|
634
697
|
|
|
635
698
|
${BOLD}More info:${RESET} https://github.com/z1nun/buildcrew
|
|
636
699
|
`);
|
|
@@ -642,6 +705,7 @@ async function main() {
|
|
|
642
705
|
if (command === "init") return runInit(force);
|
|
643
706
|
if (command === "add") return runAdd(subcommand, force);
|
|
644
707
|
if (command === "harness") return runHarnessStatus();
|
|
708
|
+
if (command === "watch") return runWatch();
|
|
645
709
|
|
|
646
710
|
return runInstall(force);
|
|
647
711
|
}
|