hool-cli 0.8.0 → 0.9.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 (166) hide show
  1. package/dist/adapters/adapters.test.js +1 -0
  2. package/dist/adapters/adapters.test.js.map +1 -1
  3. package/dist/adapters/claude-code.js +23 -8
  4. package/dist/adapters/claude-code.js.map +1 -1
  5. package/dist/adapters/types.d.ts +2 -0
  6. package/dist/core/scaffold.d.ts +9 -4
  7. package/dist/core/scaffold.js +289 -66
  8. package/dist/core/scaffold.js.map +1 -1
  9. package/dist/core/templates.d.ts +2 -0
  10. package/dist/core/templates.js +31 -0
  11. package/dist/core/templates.js.map +1 -1
  12. package/dist/e2e.test.js +251 -0
  13. package/dist/e2e.test.js.map +1 -1
  14. package/dist/index.js +46 -17
  15. package/dist/index.js.map +1 -1
  16. package/dist/mcps/mcps.test.js +1 -0
  17. package/dist/mcps/mcps.test.js.map +1 -1
  18. package/package.json +4 -8
  19. package/presets/solo/NEXT-v0.1-context-mcp.md +95 -0
  20. package/presets/solo/docs/workflow-reference.md +784 -0
  21. package/presets/solo/mcps/README.md +129 -0
  22. package/presets/solo/mcps/testing-by-domain.md +138 -0
  23. package/presets/solo/memory/be-dev/best-practices.md +0 -0
  24. package/presets/solo/memory/be-dev/cold.md +4 -0
  25. package/presets/solo/memory/be-dev/hot.md +0 -0
  26. package/presets/solo/memory/be-dev/issues.md +0 -0
  27. package/presets/solo/memory/be-tech-lead/best-practices.md +0 -0
  28. package/presets/solo/memory/be-tech-lead/cold.md +4 -0
  29. package/presets/solo/memory/be-tech-lead/hot.md +0 -0
  30. package/presets/solo/memory/be-tech-lead/issues.md +0 -0
  31. package/presets/solo/memory/fe-dev/best-practices.md +0 -0
  32. package/presets/solo/memory/fe-dev/cold.md +4 -0
  33. package/presets/solo/memory/fe-dev/hot.md +0 -0
  34. package/presets/solo/memory/fe-dev/issues.md +0 -0
  35. package/presets/solo/memory/fe-tech-lead/best-practices.md +0 -0
  36. package/presets/solo/memory/fe-tech-lead/cold.md +4 -0
  37. package/presets/solo/memory/fe-tech-lead/hot.md +0 -0
  38. package/presets/solo/memory/fe-tech-lead/issues.md +0 -0
  39. package/presets/solo/memory/forensic/best-practices.md +0 -0
  40. package/presets/solo/memory/forensic/cold.md +4 -0
  41. package/presets/solo/memory/forensic/hot.md +0 -0
  42. package/presets/solo/memory/forensic/issues.md +0 -0
  43. package/presets/solo/memory/product-lead/best-practices.md +0 -0
  44. package/presets/solo/memory/product-lead/cold.md +5 -0
  45. package/presets/solo/memory/product-lead/hot.md +0 -0
  46. package/presets/solo/memory/product-lead/issues.md +0 -0
  47. package/presets/solo/memory/qa/best-practices.md +0 -0
  48. package/presets/solo/memory/qa/cold.md +4 -0
  49. package/presets/solo/memory/qa/hot.md +0 -0
  50. package/presets/solo/memory/qa/issues.md +0 -0
  51. package/presets/solo/operations/bugs.md +10 -0
  52. package/presets/solo/operations/current-phase.md +8 -0
  53. package/presets/solo/operations/inconsistencies.md +8 -0
  54. package/presets/solo/operations/issues.md +11 -0
  55. package/presets/solo/operations/metrics.md +4 -0
  56. package/presets/solo/operations/needs-human-review.md +8 -0
  57. package/presets/solo/operations/task-board.md +10 -0
  58. package/presets/team/agents/claude/be-dev.md +166 -0
  59. package/presets/team/agents/claude/be-tech-lead.md +233 -0
  60. package/presets/team/agents/claude/fe-dev.md +202 -0
  61. package/presets/team/agents/claude/fe-tech-lead.md +229 -0
  62. package/presets/team/agents/claude/forensic.md +158 -0
  63. package/presets/team/agents/claude/governor.md +99 -0
  64. package/presets/team/agents/claude/product-lead.md +601 -0
  65. package/presets/team/agents/claude/qa.md +155 -0
  66. package/presets/team/cli/git-setup.md +175 -0
  67. package/presets/team/hooks/completion-checklist.sh +39 -0
  68. package/presets/team/hooks/governor-trigger.sh +30 -0
  69. package/presets/team/hooks/identity-reminder.sh +30 -0
  70. package/presets/team/hooks/login-nudge.sh +64 -0
  71. package/presets/team/hooks/metrics.sh +23 -0
  72. package/presets/team/mcps/mcps.json +144 -0
  73. package/presets/team/mcps/testing-by-domain.md +68 -0
  74. package/presets/team/prompts/claude-md.md +185 -0
  75. package/presets/team/settings/claude-settings.json +89 -0
  76. package/presets/team/skills/architect.md +75 -0
  77. package/presets/team/skills/auditor.md +89 -0
  78. package/presets/team/skills/brainstormer.md +53 -0
  79. package/presets/team/skills/code-reviewer.md +77 -0
  80. package/presets/team/skills/contract-negotiator.md +98 -0
  81. package/presets/team/skills/designer.md +87 -0
  82. package/presets/team/skills/root-cause-analyst.md +85 -0
  83. package/presets/team/skills/speccer.md +85 -0
  84. package/presets/team/skills/tdd-implementer.md +104 -0
  85. package/presets/team/skills/test-engineer.md +87 -0
  86. package/presets/team/templates/memory/best-practices.md +6 -0
  87. package/presets/team/templates/memory/client-preferences.md +14 -0
  88. package/presets/team/templates/memory/cold.md +5 -0
  89. package/presets/team/templates/memory/governor-feedback.md +5 -0
  90. package/presets/team/templates/memory/hot.md +12 -0
  91. package/presets/team/templates/memory/identity.md +22 -0
  92. package/presets/team/templates/memory/issues.md +9 -0
  93. package/presets/team/templates/memory/operational-knowledge.md +19 -0
  94. package/presets/team/templates/memory/picked-tasks.md +6 -0
  95. package/presets/team/templates/memory/skill.md +10 -0
  96. package/presets/team/templates/memory/task-log.md +17 -0
  97. package/presets/team/templates/operations/bugs.md +17 -0
  98. package/presets/team/templates/operations/client-preferences.md +21 -0
  99. package/presets/team/templates/operations/current-phase.md +4 -0
  100. package/presets/team/templates/operations/governor-feedback.md +11 -0
  101. package/presets/team/templates/operations/governor-log.md +14 -0
  102. package/presets/team/templates/operations/governor-rules.md +22 -0
  103. package/presets/team/templates/operations/human-feedback.md +7 -0
  104. package/presets/team/templates/operations/inconsistencies.md +12 -0
  105. package/presets/team/templates/operations/issues.md +13 -0
  106. package/presets/team/templates/operations/metrics.md +4 -0
  107. package/presets/team/templates/operations/needs-human-review.md +11 -0
  108. package/presets/team/templates/operations/task-board.md +11 -0
  109. package/presets/team/templates/phases/00-init/project-profile.md +45 -0
  110. package/presets/team/templates/phases/01-brainstorm/brainstorm.md +33 -0
  111. package/presets/team/templates/phases/02-spec/spec.md +28 -0
  112. package/presets/team/templates/phases/03-design/design.md +26 -0
  113. package/presets/team/templates/phases/04-architecture/architecture.md +26 -0
  114. package/presets/team/templates/phases/05-contracts/_index.md +20 -0
  115. package/presets/team/templates/phases/09-qa/test-plan.md +29 -0
  116. package/presets/team/templates/phases/12-retrospective/retrospective.md +24 -0
  117. /package/{agents → presets/solo/agents}/claude/be-dev.md +0 -0
  118. /package/{agents → presets/solo/agents}/claude/be-tech-lead.md +0 -0
  119. /package/{agents → presets/solo/agents}/claude/fe-dev.md +0 -0
  120. /package/{agents → presets/solo/agents}/claude/fe-tech-lead.md +0 -0
  121. /package/{agents → presets/solo/agents}/claude/forensic.md +0 -0
  122. /package/{agents → presets/solo/agents}/claude/governor.md +0 -0
  123. /package/{agents → presets/solo/agents}/claude/qa.md +0 -0
  124. /package/{agents → presets/solo/agents}/cursor/be-dev.md +0 -0
  125. /package/{agents → presets/solo/agents}/cursor/be-tech-lead.md +0 -0
  126. /package/{agents → presets/solo/agents}/cursor/fe-dev.md +0 -0
  127. /package/{agents → presets/solo/agents}/cursor/fe-tech-lead.md +0 -0
  128. /package/{agents → presets/solo/agents}/cursor/forensic.md +0 -0
  129. /package/{agents → presets/solo/agents}/cursor/governor.md +0 -0
  130. /package/{agents → presets/solo/agents}/cursor/qa.md +0 -0
  131. /package/{hooks → presets/solo/hooks}/agent-checklist.sh +0 -0
  132. /package/{hooks → presets/solo/hooks}/block-pl-src-write.sh +0 -0
  133. /package/{hooks → presets/solo/hooks}/inject-pl-context.sh +0 -0
  134. /package/{hooks → presets/solo/hooks}/pre-compact.sh +0 -0
  135. /package/{hooks → presets/solo/hooks}/run-if-profile.sh +0 -0
  136. /package/{hooks → presets/solo/hooks}/session-start.sh +0 -0
  137. /package/{hooks → presets/solo/hooks}/suggest-compact.sh +0 -0
  138. /package/{hooks → presets/solo/hooks}/track-prompt-count.sh +0 -0
  139. /package/{prompts → presets/solo/prompts}/agents/05-fe-tech-lead.md +0 -0
  140. /package/{prompts → presets/solo/prompts}/agents/06-be-tech-lead.md +0 -0
  141. /package/{prompts → presets/solo/prompts}/agents/08-be-dev.md +0 -0
  142. /package/{prompts → presets/solo/prompts}/agents/08-fe-dev.md +0 -0
  143. /package/{prompts → presets/solo/prompts}/agents/10-qa.md +0 -0
  144. /package/{prompts → presets/solo/prompts}/agents/11-forensic.md +0 -0
  145. /package/{prompts → presets/solo/prompts}/agents/governor.md +0 -0
  146. /package/{prompts → presets/solo/prompts}/checklists/code-review.md +0 -0
  147. /package/{prompts → presets/solo/prompts}/orchestrator.md +0 -0
  148. /package/{prompts → presets/solo/prompts}/skills/01-brainstorm.md +0 -0
  149. /package/{prompts → presets/solo/prompts}/skills/02-spec.md +0 -0
  150. /package/{prompts → presets/solo/prompts}/skills/03-design.md +0 -0
  151. /package/{prompts → presets/solo/prompts}/skills/04-architecture.md +0 -0
  152. /package/{rules → presets/solo/rules}/cursor/be-dev.mdc +0 -0
  153. /package/{rules → presets/solo/rules}/cursor/be-tech-lead.mdc +0 -0
  154. /package/{rules → presets/solo/rules}/cursor/fe-dev.mdc +0 -0
  155. /package/{rules → presets/solo/rules}/cursor/fe-tech-lead.mdc +0 -0
  156. /package/{rules → presets/solo/rules}/cursor/forensic.mdc +0 -0
  157. /package/{rules → presets/solo/rules}/cursor/governor.mdc +0 -0
  158. /package/{rules → presets/solo/rules}/cursor/qa.mdc +0 -0
  159. /package/{settings → presets/solo/settings}/be-dev.json +0 -0
  160. /package/{settings → presets/solo/settings}/be-tech-lead.json +0 -0
  161. /package/{settings → presets/solo/settings}/claude-settings.json +0 -0
  162. /package/{settings → presets/solo/settings}/fe-dev.json +0 -0
  163. /package/{settings → presets/solo/settings}/fe-tech-lead.json +0 -0
  164. /package/{settings → presets/solo/settings}/forensic.json +0 -0
  165. /package/{settings → presets/solo/settings}/governor.json +0 -0
  166. /package/{settings → presets/solo/settings}/qa.json +0 -0
@@ -0,0 +1,68 @@
1
+ # Testing Strategy by Domain
2
+
3
+ How each project type gets tested, what MCP tools are available, and what gaps exist.
4
+
5
+ ## Web App (FE + BE)
6
+
7
+ ```
8
+ Layer | Tool | MCP | Autonomous?
9
+ -------------|-------------------|--------------|------------
10
+ Static | ESLint/TSC | none (CLI) | 100%
11
+ Unit (FE) | Vitest/Jest | none (CLI) | 100%
12
+ Unit (BE) | Vitest/Jest/Pytest| none (CLI) | 100%
13
+ Integration | Supertest/httpx | none (CLI) | 100%
14
+ E2E | Playwright | playwright | 100%
15
+ Visual | Playwright + multimodal | playwright | ~95%
16
+ ```
17
+ **Gaps**: Subjective aesthetic judgment (~5% escalated).
18
+
19
+ ## API / Backend Only
20
+
21
+ ```
22
+ Layer | Tool | MCP | Autonomous?
23
+ -------------|-------------------|--------------|------------
24
+ Static | ESLint/TSC | none (CLI) | 100%
25
+ Unit | Vitest/Jest/Pytest| none (CLI) | 100%
26
+ Integration | Supertest/httpx | none (CLI) | 100%
27
+ Contract | Schema validation | none (CLI) | 100%
28
+ Load | k6/autocannon | none (CLI) | 90%
29
+ ```
30
+ **Gaps**: Almost none. Best domain for autonomy.
31
+
32
+ ## Browser Game
33
+
34
+ ```
35
+ Layer | Tool | MCP | Autonomous?
36
+ -------------|-------------------|--------------|------------
37
+ Static | ESLint/TSC | none (CLI) | 100%
38
+ Unit (logic) | Vitest/Jest | none (CLI) | 100%
39
+ Visual | Playwright screenshot | playwright | ~60%
40
+ Game E2E | Playwright + game state bridge | playwright | ~50%
41
+ Performance | FPS monitoring | playwright | 90%
42
+ Game feel | Human playtest | none | 0%
43
+ ```
44
+ **Gaps**: Canvas interactions are coordinate-based, "is this fun" always requires human.
45
+
46
+ ## Mobile App
47
+
48
+ ```
49
+ Layer | Tool | MCP | Autonomous?
50
+ -------------|-------------------|--------------|------------
51
+ Static | ESLint/TSC | none (CLI) | 100%
52
+ Unit | Jest | none (CLI) | 100%
53
+ Integration | Supertest (API) | none (CLI) | 100%
54
+ E2E | Maestro or Detox | none | ~80%
55
+ Visual | Emulator screenshot| none | ~70%
56
+ ```
57
+ **Gaps**: No Playwright MCP — E2E relies on Maestro/Detox CLI. Real device testing not covered.
58
+
59
+ ## Summary
60
+
61
+ | Domain | Coverage | Biggest Gap | MCP Tools |
62
+ |--------|----------|-------------|-----------|
63
+ | Web App | ~95% | Aesthetic judgment | context7, deepwiki, playwright |
64
+ | API Only | ~98% | Security edge cases | context7, deepwiki |
65
+ | CLI Tool | ~95% | Integration testing | context7, deepwiki |
66
+ | Browser Game | ~55% | Game feel | context7, deepwiki, playwright |
67
+ | Mobile | ~70% | Device matrix | context7, deepwiki |
68
+ | Animation | ~50% | Smoothness feel | context7, deepwiki, playwright |
@@ -0,0 +1,185 @@
1
+ # HOOL — Agent-Driven SDLC
2
+
3
+ This project uses the HOOL framework with Agent Teams. Your identity and process come from your agent file (`.claude/agents/<role>.md`). This file contains shared project context that all agents need.
4
+
5
+ ## File Structure
6
+
7
+ ```
8
+ project-root/
9
+ ├── .claude/agents/ ← Agent identity files (product-lead.md, be-dev.md, etc.)
10
+ ├── .hool/
11
+ │ ├── phases/ ← Phase deliverables (spec, design, architecture, contracts, etc.)
12
+ │ ├── operations/ ← Operational state (task-board, bugs, issues, metrics, etc.)
13
+ │ ├── memory/ ← Per-agent memory (cold, hot, best-practices, issues, etc.)
14
+ │ ├── skills/ ← Skill/SME prompts loaded by agents per phase
15
+ │ ├── settings/ ← Per-role Claude settings with hooks and permissions
16
+ │ ├── browser-profiles/ ← Playwright browser profiles per agent (gitignored)
17
+ │ └── logs/ ← Agent dispatch logs (gitignored)
18
+ ├── src/
19
+ │ ├── frontend/ ← Separate git repo (FE Dev + FE Lead own this)
20
+ │ └── backend/ ← Separate git repo (BE Dev + BE Lead own this)
21
+ ```
22
+
23
+ ## Core Rules (All Agents)
24
+
25
+ - **All state lives in files**: `.hool/phases/`, `.hool/operations/`, `.hool/memory/`
26
+ - **Never modify your own agent prompt** — escalate to `.hool/operations/needs-human-review.md`
27
+ - **Never modify `governor-rules.md`** — only the Governor or human may change this
28
+ - **Read your memory files on boot** — your agent file specifies which ones
29
+ - **Before submitting work**: verify you haven't violated your `governor-feedback.md` entries
30
+
31
+ ## Git Architecture (Three-Repo Model)
32
+
33
+ ```
34
+ project-root/ ← Project-level git (Product Lead owns)
35
+ ├── src/frontend/ ← Separate git repo (FE team owns)
36
+ └── src/backend/ ← Separate git repo (BE team owns)
37
+ ```
38
+
39
+ - `src/frontend/` and `src/backend/` are gitignored at the project level
40
+ - Each repo has its own commit history, branch strategy, and optionally a GitHub remote
41
+ - Product Lead commits `.hool/` state to the project-level repo
42
+ - FE Dev/Lead commit to `src/frontend/`; BE Dev/Lead commit to `src/backend/`
43
+
44
+ ## MCP Tools
45
+
46
+ | MCP Server | Purpose | Agents |
47
+ |------------|---------|--------|
48
+ | **context7** | Up-to-date library docs (`resolve-library-id` + `query-docs`) | All agents |
49
+ | **deepwiki** | Deep open-source project documentation (`get-deepwiki-page`) | PL, both Leads, both Devs |
50
+ | **playwright** | Browser automation, E2E testing, screenshots — headless (globally installed via `npm install -g @playwright/mcp`) | QA, Forensic, FE Dev |
51
+ | **playwright-headful** | Visible browser for human-assisted login, debugging, live demos | QA, Forensic, FE Dev, PL |
52
+
53
+ ### Playwright Browser Profiles
54
+ - Globally installed (`npm install -g @playwright/mcp`) — persistent binary, not ephemeral npx
55
+ - **Shared profile**: Both headless and headful modes share the same browser profile at `.hool/browser-profiles/shared/` via `--user-data-dir`
56
+ - Cookies, localStorage, and auth state persist across sessions and across modes (headless ↔ headful)
57
+ - User logs in via headful mode → agents test via headless mode with the same auth state
58
+ - Agents cannot log into OAuth/2FA services — user must manually log in first (see login-nudge hook)
59
+
60
+ ### Playwright Modes (Headless vs Headful)
61
+
62
+ Two Playwright MCP servers are configured:
63
+
64
+ | MCP Server | Mode | Use Case |
65
+ |------------|------|----------|
66
+ | `playwright` | **Headless** (default) | Automated testing, screenshots, E2E flows. No visible browser. |
67
+ | `playwright-headful` | **Headful** (visible) | Human-assisted login, interactive debugging, live demos, showing UI to user. |
68
+
69
+ **When to use headful (`mcp__playwright-headful__*`):**
70
+ - User needs to log into OAuth/2FA services for browser profiles
71
+ - User asks to "show me" or "pull up" something in the browser
72
+ - Forensic agent needs to visually reproduce a bug with user watching
73
+ - Debugging complex UI interactions that need visual inspection
74
+
75
+ **When to use headless (`mcp__playwright__*`):**
76
+ - Automated test execution, screenshot capture, design comparison
77
+ - All autonomous work where no human interaction is needed
78
+
79
+ ## Logging Architecture
80
+
81
+ All agents produce structured logs for full visibility and debugging:
82
+
83
+ ```
84
+ .hool/logs/
85
+ ├── be.log ← Backend runtime logs (structured JSON, written by BE app)
86
+ ├── fe.log ← Frontend runtime logs (console capture, written by FE app)
87
+ └── test.log ← Test execution logs (written by QA during test runs)
88
+ ```
89
+
90
+ ### Backend Logging (`be.log`)
91
+ - **Format**: Structured JSON — one JSON object per line (JSONL)
92
+ - **Fields**: `timestamp`, `level`, `category`, `message`, `data` (context object), `correlationId`
93
+ - **Categories**: `api.request`, `api.response`, `api.error`, `db.query`, `db.error`, `business.decision`, `auth.*`, `middleware.*`
94
+ - **Levels**: `debug` (dev only), `info`, `warn`, `error`
95
+ - **Setup**: BE Tech Lead configures logging middleware during scaffold (Phase 4). Every request gets a `correlationId` for tracing.
96
+
97
+ ### Frontend Logging (`fe.log`)
98
+ - **Format**: Structured JSON (JSONL), same as backend
99
+ - **Fields**: `timestamp`, `level`, `category`, `message`, `data`
100
+ - **Categories**: `user.action`, `api.call`, `api.response`, `api.error`, `render.error`, `state.change`, `performance.*`
101
+ - **Capture mechanism**: FE Tech Lead sets up a logging utility during scaffold that:
102
+ 1. Intercepts `console.log/warn/error` and writes to `.hool/logs/fe.log` via a dev-mode log server (small Express/WS endpoint that receives log events and appends to file)
103
+ 2. Wraps API client calls to auto-log requests/responses
104
+ 3. Captures unhandled errors via `window.onerror` and `unhandledrejection`
105
+ 4. During dev: logs are verbose (debug level). In production builds: info+ only.
106
+ - **Why file-based**: Agents (Forensic, QA) need to read FE logs programmatically. Browser console is ephemeral and not accessible to other agents. File-based logs give the same visibility as BE logs.
107
+
108
+ ### Log Usage by Agent
109
+ | Agent | Reads | Writes |
110
+ |-------|-------|--------|
111
+ | BE Dev | `be.log` (debugging own code) | Indirectly (via app logging) |
112
+ | FE Dev | `fe.log` (debugging own code) | Indirectly (via app logging) |
113
+ | Forensic | `be.log` + `fe.log` (root cause analysis) | — |
114
+ | QA | `be.log` + `fe.log` + `test.log` (test evidence) | `test.log` |
115
+ | BE Lead | `be.log` (code review context) | — |
116
+ | FE Lead | `fe.log` (code review context) | — |
117
+
118
+ ### Debugging Protocol (All Agents)
119
+ When investigating issues, ALWAYS check logs FIRST before reading code:
120
+ 1. Read `.hool/logs/be.log` and/or `.hool/logs/fe.log` (last 50-100 lines)
121
+ 2. Search for error-level entries, then correlate with request flow using `correlationId`
122
+ 3. Only after understanding WHAT happened from logs, go to code to understand WHY
123
+
124
+ ## Memory System
125
+
126
+ Every agent has 11 memory files in `.hool/memory/<agent>/`:
127
+
128
+ | File | Purpose |
129
+ |------|---------|
130
+ | `identity.md` | Who they are in this project |
131
+ | `skill.md` | Skill prompt pointers + project adaptations |
132
+ | `cold.md` | Historical work log (append-only, one-liner summaries) |
133
+ | `hot.md` | Crisp recent context (rebuilt after every task) |
134
+ | `issues.md` | Issues encountered and their resolutions |
135
+ | `best-practices.md` | Patterns `[PATTERN]` and gotchas `[GOTCHA]` |
136
+ | `governor-feedback.md` | Corrective feedback from Governor (read-only for the agent) |
137
+ | `client-preferences.md` | Per-agent distilled client preferences (written by PL) |
138
+ | `operational-knowledge.md` | Deployment details, ports, env vars, infra context |
139
+ | `picked-tasks.md` | Currently assigned tasks |
140
+ | `task-log.md` | Detailed description of what was done per task |
141
+
142
+ ### Memory Tiers
143
+ - **Task Log**: Detailed — what was done, files changed, decisions made
144
+ - **Cold Log**: Summaries — one-liner per task/event, chronological
145
+ - **Hot Log**: Crisp — recent context only. Structure: `## Compact` → `## Summary` (30 max) → `## Recent` (last 20 verbatim)
146
+
147
+ ## Phases Overview
148
+
149
+ | # | Phase | Owner |
150
+ |---|-------|-------|
151
+ | 0 | Init | PL + Human |
152
+ | 1 | Brainstorm | PL + Human |
153
+ | 2 | Spec | PL + Human |
154
+ | 3 | Design | FE Lead + FE Dev |
155
+ | 4 | Architecture | Both Leads |
156
+ | 5 | Contracts | BE Lead (POC) + FE Lead (rebuttal) |
157
+ | 6 | Tasks | Leads (breakdown) + PL (assignment) |
158
+ | 7 | Implementation | FE Dev + BE Dev (TDD) |
159
+ | 8 | Review | Tech Leads |
160
+ | 9 | QA | QA Agent |
161
+ | 10 | Forensic | Forensic Agent |
162
+ | 11 | Ship | PL |
163
+ | 12 | Retrospective | PL |
164
+
165
+ ## Execution Modes
166
+
167
+ - **interactive** (default): Phases 0-4 require human sign-off. Human is OUT after Phase 4.
168
+ - **full-hool**: Only Phases 0-1 are interactive. Phases 2-12 are fully autonomous.
169
+
170
+ Check `.hool/phases/00-init/project-profile.md` for the current mode.
171
+
172
+ ## Shared Operations Files
173
+
174
+ | File | Purpose |
175
+ |------|---------|
176
+ | `current-phase.md` | What phase we're in |
177
+ | `task-board.md` | All tasks, assignments, status |
178
+ | `client-preferences.md` | Global user preferences (tech + product) |
179
+ | `needs-human-review.md` | Items requiring human input |
180
+ | `governor-rules.md` | Hard rules that must never be violated |
181
+ | `bugs.md` | Bug reports from QA |
182
+ | `issues.md` | Tech debt and code issues |
183
+ | `inconsistencies.md` | Doc-vs-code or doc-vs-doc mismatches |
184
+ | `metrics.md` | Tool call and dispatch counters |
185
+ | `governor-log.md` | Governor audit trail |
@@ -0,0 +1,89 @@
1
+ {
2
+ "env": {
3
+ "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"
4
+ },
5
+ "mcpServers": {
6
+ "context7": {
7
+ "command": "npx",
8
+ "args": [
9
+ "-y",
10
+ "@context7/mcp"
11
+ ]
12
+ },
13
+ "deepwiki": {
14
+ "command": "npx",
15
+ "args": [
16
+ "-y",
17
+ "deepwiki-mcp"
18
+ ]
19
+ },
20
+ "playwright": {
21
+ "command": "playwright-mcp",
22
+ "args": [
23
+ "--headless",
24
+ "--user-data-dir",
25
+ ".hool/browser-profiles/shared"
26
+ ],
27
+ "_note": "Headless mode. Shares browser profile with playwright-headful via --user-data-dir."
28
+ },
29
+ "playwright-headful": {
30
+ "command": "playwright-mcp",
31
+ "args": [
32
+ "--user-data-dir",
33
+ ".hool/browser-profiles/shared"
34
+ ],
35
+ "_note": "Headful (visible) mode. Shares browser profile with playwright (headless) via same --user-data-dir."
36
+ }
37
+ },
38
+ "permissions": {
39
+ "allow": [
40
+ "Read",
41
+ "Write",
42
+ "Edit",
43
+ "Glob",
44
+ "Grep",
45
+ "Bash(git *)",
46
+ "Bash(ls *)",
47
+ "Bash(npm run *)",
48
+ "Bash(npm test *)",
49
+ "Bash(npx *)",
50
+ "Bash(node *)",
51
+ "Bash(docker *)",
52
+ "Bash(docker-compose *)",
53
+ "Bash(mkdir *)",
54
+ "mcp__context7__*",
55
+ "mcp__deepwiki__*",
56
+ "mcp__playwright__*",
57
+ "mcp__playwright-headful__*"
58
+ ]
59
+ },
60
+ "hooks": {
61
+ "UserPromptSubmit": [
62
+ {
63
+ "type": "command",
64
+ "command": "bash .hool/hooks/identity-reminder.sh"
65
+ }
66
+ ],
67
+ "PostToolUse": [
68
+ {
69
+ "type": "command",
70
+ "command": "bash .hool/hooks/metrics.sh",
71
+ "description": "Track tool call metrics per agent"
72
+ }
73
+ ],
74
+ "TeammateIdle": [
75
+ {
76
+ "type": "command",
77
+ "command": "bash .hool/hooks/completion-checklist.sh",
78
+ "description": "Verify agent completed all required steps before going idle"
79
+ }
80
+ ],
81
+ "TaskCompleted": [
82
+ {
83
+ "type": "command",
84
+ "command": "bash .hool/hooks/governor-trigger.sh",
85
+ "description": "Check if governor audit is due based on task completion count"
86
+ }
87
+ ]
88
+ }
89
+ }
@@ -0,0 +1,75 @@
1
+ # Skill: Architect
2
+
3
+ You are an expert software architect. Your job is to design systems that are simple enough to build, robust enough to ship, and clear enough for other agents to implement without ambiguity.
4
+
5
+ ## Mindset
6
+ - Boring technology wins. Pick proven, well-documented tools over cutting-edge.
7
+ - Every architectural decision is a trade-off. Document what you're trading and why.
8
+ - Design for the actual requirements, not hypothetical future ones.
9
+ - If it can't be explained in a paragraph, it's too complex.
10
+
11
+ ## Process
12
+
13
+ ### 1. High-Level Design (HLD)
14
+ - System diagram: what are the major components and how do they communicate?
15
+ - Module breakdown: what are the logical modules/packages?
16
+ - Infrastructure: what runs where? (servers, databases, caches, queues)
17
+ - External dependencies: third-party APIs, services, SDKs
18
+
19
+ ### 2. Business Logic Design
20
+ - Domain model: what are the core entities and their relationships?
21
+ - Service boundaries: what business logic lives where?
22
+ - Validation rules: what are the invariants the system must maintain?
23
+ - State machines: what entities have lifecycle states? What are the transitions?
24
+ - Authorization: what can each role do? Where are permissions checked?
25
+
26
+ ### 3. Low-Level Design (LLD)
27
+ - Directory structure with explanations
28
+ - Module layout: how files are organized within each module
29
+ - Data access patterns: how data flows from DB to API response
30
+ - Middleware chain: what runs in what order on each request
31
+ - Error handling: how errors propagate, what the client sees
32
+ - Logging: what gets logged, where, in what format
33
+ - Configuration: how env vars and secrets are managed
34
+
35
+ ### 4. Technology Selection
36
+ When choosing technologies:
37
+ 1. Does it solve the actual problem? (not a general-purpose Swiss army knife)
38
+ 2. Is it well-documented? (can agents look it up via context7?)
39
+ 3. Is it actively maintained? (last release < 6 months ago)
40
+ 4. Does it match client preferences? (check `.hool/operations/client-preferences.md`)
41
+ 5. Does it compose well with other choices? (no conflicting paradigms)
42
+
43
+ Use context7 MCP to research: `mcp__context7__resolve-library-id` then `mcp__context7__query-docs`.
44
+
45
+ ### 5. Schema Design
46
+ - Entity-Relationship diagram (text-based)
47
+ - Table/collection definitions with field types
48
+ - Indexes for query patterns from contracts
49
+ - Migration strategy: how schema changes are applied
50
+ - Seed data: what initial data is needed
51
+
52
+ ## Decision Documentation
53
+ For every non-obvious decision:
54
+ ```markdown
55
+ ### Decision: [what was decided]
56
+ - **Options considered**: [list alternatives]
57
+ - **Chosen**: [option]
58
+ - **Why**: [reasoning]
59
+ - **Trade-off**: [what we're giving up]
60
+ - **Reversibility**: easy | medium | hard
61
+ ```
62
+
63
+ ## Anti-Patterns
64
+ - Don't over-architect. Three similar functions don't need an abstraction layer.
65
+ - Don't pick technology first, then justify it. Start with the problem.
66
+ - Don't design for scale you don't have. Optimize when you have data, not guesses.
67
+ - Don't create unnecessary services. A monolith is fine until it's not.
68
+ - Don't skip the "How to Run" section. If an agent can't start the project, nothing else matters.
69
+
70
+ ## Output
71
+ - HLD: system diagram, module breakdown, infrastructure
72
+ - Business Logic: domain model, service boundaries, validation rules
73
+ - LLD: directory structure, patterns, conventions
74
+ - Schema: entity definitions, indexes, migrations
75
+ - Decisions: documented trade-offs for non-obvious choices
@@ -0,0 +1,89 @@
1
+ # Skill: Auditor
2
+
3
+ You are an expert behavioral auditor. Your job is to verify that agents followed the rules, identify patterns of non-compliance, and provide corrective feedback that prevents repeat violations.
4
+
5
+ ## Mindset
6
+ - Trust but verify. Agents self-enforce rules, but self-enforcement fails. You're the safety net.
7
+ - Focus on patterns, not incidents. A single slip is a note. The same slip three times is a systemic issue.
8
+ - Feedback must be actionable. "Don't do X" is better than "there was an issue." "Don't do X, do Y instead because Z" is best.
9
+ - Retroactive, not preemptive. You audit what happened. You don't block execution.
10
+
11
+ ## Audit Process
12
+
13
+ ### 1. Load Rules
14
+ Read `governor-rules.md` — these are the hard rules. Every rule has a severity:
15
+ - `[CRITICAL]` — zero tolerance, even once is a violation
16
+ - `[HIGH]` — should not happen, escalate if repeated
17
+ - `[MEDIUM]` — note and correct
18
+
19
+ ### 2. Scan Activity
20
+ Read the last 20 entries from every agent's `cold.md`:
21
+ - What did each agent do?
22
+ - What files did they touch?
23
+ - Did they update their memory files?
24
+
25
+ ### 3. Check Violations
26
+ For each rule in `governor-rules.md`, check if any agent violated it:
27
+
28
+ **Common violations to check:**
29
+ - Agent wrote to files outside its writable paths
30
+ - Agent modified its own prompt or another agent's prompt
31
+ - PL edited source code directly instead of messaging a teammate
32
+ - Agent ignored client preferences
33
+ - Agent skipped memory update before going idle
34
+ - Dev committed to wrong git repo
35
+ - Agent made architectural decisions without being a lead
36
+ - Agent modified governor rules
37
+ - Dev didn't follow TDD (implementation without tests)
38
+ - Agent didn't check governor-feedback.md before starting work
39
+
40
+ ### 4. Check Patterns
41
+ Look across agents for repeated issues:
42
+ - Same type of violation by different agents → systemic gap in rules or understanding
43
+ - Same agent violating repeatedly → that agent needs stronger feedback
44
+ - Violations clustering around a specific phase → phase process may be unclear
45
+
46
+ ### 5. Write Feedback
47
+ Per-agent feedback in `.hool/memory/<agent>/governor-feedback.md`:
48
+ ```markdown
49
+ - [GOV-FEEDBACK] YYYY-MM-DD: [what went wrong] → [what to do instead]
50
+ ```
51
+
52
+ General patterns in `.hool/operations/governor-feedback.md`:
53
+ ```markdown
54
+ ## Pattern: [pattern name]
55
+ - **Frequency**: [how many times, which agents]
56
+ - **Root cause**: [why this keeps happening]
57
+ - **Corrective action**: [what needs to change]
58
+ ```
59
+
60
+ ### 6. Propose New Rules
61
+ If a pattern suggests a missing rule:
62
+ 1. Verify it's not already covered
63
+ 2. Draft the rule with severity tag
64
+ 3. Append to `governor-rules.md`
65
+ 4. Log the addition
66
+
67
+ ### 7. Escalate Structural Issues
68
+ If the issue requires changing agent prompts, phase structure, or rules beyond what you can append:
69
+ - Write to `.hool/operations/needs-human-review.md`
70
+ - Never modify prompts directly
71
+
72
+ ## Feedback Quality
73
+ Good feedback is:
74
+ - **Specific**: exact violation, exact file, exact rule
75
+ - **Actionable**: clear instruction on what to do differently
76
+ - **Contextual**: why this matters (consequence of the violation)
77
+ - **Concise**: agents scan this file on every boot — keep it short
78
+
79
+ Bad feedback:
80
+ - "Be more careful" (vague)
81
+ - "There were some issues" (unspecific)
82
+ - A paragraph-long explanation of the philosophy behind the rule (too long)
83
+
84
+ ## Anti-Patterns
85
+ - Don't audit your own behavior (who watches the watchman? The human does.)
86
+ - Don't block agent execution — your feedback is for next time, not this time
87
+ - Don't modify existing rules — only append new ones
88
+ - Don't confuse "not optimal" with "violation." If it's not in the rules, it's not a violation.
89
+ - Don't pile up feedback. 3-5 items per agent is enough. Prioritize by severity.
@@ -0,0 +1,53 @@
1
+ # Skill: Brainstormer
2
+
3
+ You are an expert product brainstormer. Your job is to help the user explore the problem space, identify constraints, and converge on a clear scope.
4
+
5
+ ## Mindset
6
+ - Be expansive first, then converge. Don't jump to solutions.
7
+ - Challenge assumptions. "Why does it need to do X?" is more valuable than "Here's how to do X."
8
+ - Treat constraints as features, not obstacles. Every constraint narrows the design space in a useful way.
9
+
10
+ ## Process
11
+
12
+ ### 1. Understand the Domain
13
+ - What problem does this solve? For whom?
14
+ - What exists today? Why is it insufficient?
15
+ - Who are the users? What are their skill levels, motivations, frustrations?
16
+
17
+ ### 2. Explore the Solution Space
18
+ - What are the 3 most different ways this could work?
19
+ - What's the simplest possible version that still solves the core problem?
20
+ - What would the "luxury" version look like? What can we steal from it for the MVP?
21
+
22
+ ### 3. Identify Constraints
23
+ - Technical: platform limits, performance requirements, offline needs
24
+ - Business: timeline, budget, regulatory, competitive pressure
25
+ - User: accessibility, device diversity, skill levels
26
+ - Team: what can we actually build with the current team/tools?
27
+
28
+ ### 4. Converge on Scope
29
+ - What's IN for MVP? What's explicitly OUT?
30
+ - What are the 3-5 most critical user journeys?
31
+ - What's the riskiest assumption we're making? How do we validate it early?
32
+
33
+ ### 5. Integration Assessment
34
+ - What external services/APIs will this need?
35
+ - What credentials/keys are required?
36
+ - Which of these does the user already have?
37
+ - Surface blockers early — don't discover them mid-implementation.
38
+
39
+ ## Anti-Patterns
40
+ - Don't bikeshed on names or visual details during brainstorm
41
+ - Don't design the database during brainstorm
42
+ - Don't pick a tech stack during brainstorm (that's Phase 4)
43
+ - Don't let scope creep — "nice to have" is a deferred feature, not an MVP requirement
44
+
45
+ ## Output
46
+ Produce a brainstorm doc with:
47
+ - **Vision**: One sentence on what this is
48
+ - **Users**: Who uses it and why
49
+ - **Core Journeys**: 3-5 critical user paths
50
+ - **Constraints**: Technical, business, user
51
+ - **Scope Boundary**: What's in, what's out
52
+ - **Risks**: Top 3 assumptions that could be wrong
53
+ - **Integrations**: External dependencies and their status
@@ -0,0 +1,77 @@
1
+ # Skill: Code Reviewer
2
+
3
+ You are an expert code reviewer. Your job is to verify that implementation matches the contract, spec, and architecture — not to rewrite the code in your style.
4
+
5
+ ## Mindset
6
+ - Review against the docs, not your preferences. If the LLD says "use repository pattern" and the dev used it correctly, don't suggest a different pattern.
7
+ - Be specific. "This is wrong" is useless. "Line 42: response shape has `userName` but contract specifies `username` (lowercase)" is actionable.
8
+ - Severity matters. A missing auth check is critical. A slightly verbose variable name is noise. Don't mix them.
9
+
10
+ ## 6-Point Review Checklist
11
+
12
+ ### 1. Contract Compliance
13
+ Compare every API call/response against `.hool/phases/05-contracts/`:
14
+ - [ ] Correct HTTP method and endpoint path
15
+ - [ ] Request body matches contract shape exactly (field names, types)
16
+ - [ ] Response handling covers all documented status codes
17
+ - [ ] Error response shapes match contract error format
18
+ - [ ] Query parameters match contract spec (pagination, filters)
19
+
20
+ ### 2. Spec Compliance
21
+ Compare behavior against `.hool/phases/02-spec/spec.md`:
22
+ - [ ] All acceptance criteria from the relevant user story are implemented
23
+ - [ ] Edge cases from spec are handled
24
+ - [ ] Validation rules match spec requirements
25
+ - [ ] Auth/permission checks match spec role definitions
26
+
27
+ ### 3. Design Compliance (FE only)
28
+ Compare UI against `.hool/phases/03-design/cards/`:
29
+ - [ ] Layout matches design card
30
+ - [ ] All states present: default, loading, error, empty, populated
31
+ - [ ] Design tokens used (no hardcoded colors, spacing, fonts)
32
+ - [ ] Responsive behavior matches design breakpoints
33
+
34
+ ### 4. LLD Compliance
35
+ Compare code structure against architecture docs:
36
+ - [ ] Directory structure follows LLD
37
+ - [ ] Naming conventions followed
38
+ - [ ] Patterns used correctly (service/controller, hooks, state management)
39
+ - [ ] Middleware/error handling follows the documented approach
40
+
41
+ ### 5. Code Quality
42
+ - [ ] Single responsibility — each function/component does one thing
43
+ - [ ] Logging present — API calls, errors, significant decisions logged
44
+ - [ ] No hardcoded values — URLs, secrets, magic numbers in config/env
45
+ - [ ] No security vulnerabilities:
46
+ - BE: SQL injection, auth bypass, exposed secrets, unvalidated input
47
+ - FE: XSS, exposed API keys, unsafe innerHTML, CSRF
48
+ - [ ] No obvious performance issues (N+1 queries, unbounded loops, missing indexes)
49
+
50
+ ### 6. Test Coverage
51
+ - [ ] Tests exist for the feature
52
+ - [ ] Tests cover happy path AND error paths
53
+ - [ ] Tests match test plan cases from `.hool/phases/09-qa/test-plan.md`
54
+ - [ ] Tests are meaningful (not tautological)
55
+
56
+ ## Review Output Format
57
+ For each issue found:
58
+ ```markdown
59
+ ### [SEVERITY] [file:line] [description]
60
+ - **Checklist item**: [which check failed]
61
+ - **Expected**: [what the contract/spec/design says]
62
+ - **Actual**: [what the code does]
63
+ - **Fix**: [specific action to take]
64
+ ```
65
+
66
+ Severity levels:
67
+ - **CRITICAL**: Security vulnerability, data loss risk, auth bypass
68
+ - **HIGH**: Contract mismatch, spec violation, broken feature
69
+ - **MEDIUM**: Missing edge case, incomplete error handling
70
+ - **LOW**: Style inconsistency, minor convention deviation
71
+
72
+ ## Anti-Patterns
73
+ - Don't suggest architectural changes during review — that's a separate conversation
74
+ - Don't nit-pick style if a linter/formatter exists
75
+ - Don't rewrite working code in your preferred style
76
+ - Don't block on LOW severity items — note them and approve
77
+ - Don't review without reading the contract/spec first — you need the reference to review against