@dedesfr/prompter 0.9.0 ā 1.1.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/CHANGELOG.md +35 -0
- package/README.md +105 -77
- package/dist/cli/index.js +25 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +35 -9
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/login.d.ts +4 -0
- package/dist/commands/login.d.ts.map +1 -0
- package/dist/commands/login.js +56 -0
- package/dist/commands/login.js.map +1 -0
- package/dist/commands/logout.d.ts +4 -0
- package/dist/commands/logout.d.ts.map +1 -0
- package/dist/commands/logout.js +14 -0
- package/dist/commands/logout.js.map +1 -0
- package/dist/commands/update.d.ts +0 -2
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +19 -48
- package/dist/commands/update.js.map +1 -1
- package/dist/commands/whoami.d.ts +4 -0
- package/dist/commands/whoami.d.ts.map +1 -0
- package/dist/commands/whoami.js +42 -0
- package/dist/commands/whoami.js.map +1 -0
- package/dist/core/auth-store.d.ts +10 -0
- package/dist/core/auth-store.d.ts.map +1 -0
- package/dist/core/auth-store.js +39 -0
- package/dist/core/auth-store.js.map +1 -0
- package/dist/core/config.d.ts +0 -7
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +0 -128
- package/dist/core/config.js.map +1 -1
- package/dist/core/registry.d.ts +18 -0
- package/dist/core/registry.d.ts.map +1 -0
- package/dist/core/registry.js +94 -0
- package/dist/core/registry.js.map +1 -0
- package/package.json +7 -1
- package/AGENTS.md +0 -123
- package/CLAUDE.md +0 -17
- package/build.js +0 -20
- package/convex-setup.md +0 -403
- package/dist/core/prompt-templates.d.ts +0 -23
- package/dist/core/prompt-templates.d.ts.map +0 -1
- package/dist/core/prompt-templates.js +0 -3485
- package/dist/core/prompt-templates.js.map +0 -1
- package/prompt/ai-humanizer.md +0 -45
- package/prompt/api-contract-generator.md +0 -234
- package/prompt/apply.md +0 -17
- package/prompt/archive.md +0 -21
- package/prompt/design-system.md +0 -210
- package/prompt/document-explainer.md +0 -149
- package/prompt/epic-generator.md +0 -198
- package/prompt/epic-single.md +0 -47
- package/prompt/erd-generator.md +0 -130
- package/prompt/fsd-generator.md +0 -157
- package/prompt/prd-agent-generator.md +0 -147
- package/prompt/prd-generator.md +0 -195
- package/prompt/product-brief.md +0 -289
- package/prompt/proposal.md +0 -22
- package/prompt/qa-test-scenario.md +0 -133
- package/prompt/skill-creator.md +0 -350
- package/prompt/story-generator.md +0 -278
- package/prompt/story-single.md +0 -70
- package/prompt/tdd-generator.md +0 -294
- package/prompt/tdd-lite-generator.md +0 -224
- package/prompt/wireframe-generator.md +0 -219
- package/skills/ai-context-generator/SKILL.md +0 -54
- package/skills/ai-context-generator/references/AGENTS.template.md +0 -83
- package/skills/ai-context-generator/references/CLAUDE.template.md +0 -39
- package/skills/ai-context-generator/references/behavioral-guidelines.md +0 -71
- package/skills/ai-context-generator/references/discovery-checklist.md +0 -40
- package/skills/ai-context-generator/references/examples/AGENTS.good.md +0 -103
- package/skills/ai-context-generator/references/extraction-checklist.md +0 -23
- package/skills/ai-context-generator/references/overlays/laravel.md +0 -44
- package/skills/ai-humanizer/SKILL.md +0 -50
- package/skills/api-contract-generator/SKILL.md +0 -243
- package/skills/apply/SKILL.md +0 -23
- package/skills/archive/SKILL.md +0 -27
- package/skills/cerebro/SKILL.md +0 -187
- package/skills/cerebro/references/agents.md +0 -213
- package/skills/code-review/SKILL.md +0 -373
- package/skills/code-review/assets/report-template-agent.md +0 -212
- package/skills/code-review/assets/report-template-compact.md +0 -81
- package/skills/code-review/assets/report-template-full.md +0 -264
- package/skills/code-review/assets/report-template-human.md +0 -168
- package/skills/code-review/references/universal-patterns.md +0 -495
- package/skills/design-md/README.md +0 -34
- package/skills/design-md/SKILL.md +0 -172
- package/skills/design-md/examples/DESIGN.md +0 -154
- package/skills/design-system/SKILL.md +0 -216
- package/skills/design-system-generator/SKILL.md +0 -324
- package/skills/design-system-generator/assets/design-system-template.md +0 -348
- package/skills/design-system-generator/references/extraction-patterns.md +0 -321
- package/skills/doc-builder/SKILL.md +0 -115
- package/skills/doc-builder/references/ui-patterns.md +0 -394
- package/skills/document-explainer/SKILL.md +0 -155
- package/skills/document-translator/SKILL.md +0 -58
- package/skills/enhance/SKILL.md +0 -47
- package/skills/enhance-prompt/README.md +0 -34
- package/skills/enhance-prompt/SKILL.md +0 -204
- package/skills/enhance-prompt/references/KEYWORDS.md +0 -114
- package/skills/epic-generator/SKILL.md +0 -204
- package/skills/epic-single/SKILL.md +0 -63
- package/skills/erd-generator/SKILL.md +0 -138
- package/skills/feature-planner/SKILL.md +0 -305
- package/skills/feature-planner/assets/implementation-plan-template.md +0 -85
- package/skills/frontend-design/LICENSE.txt +0 -177
- package/skills/frontend-design/SKILL.md +0 -42
- package/skills/fsd-generator/SKILL.md +0 -163
- package/skills/gamma-builder/SKILL.md +0 -134
- package/skills/laravel-code-review/SKILL.md +0 -383
- package/skills/laravel-code-review/assets/report-template-agent.md +0 -195
- package/skills/laravel-code-review/assets/report-template-compact.md +0 -79
- package/skills/laravel-code-review/assets/report-template-full.md +0 -253
- package/skills/laravel-code-review/assets/report-template-human.md +0 -159
- package/skills/laravel-code-review/references/laravel-patterns.md +0 -571
- package/skills/laravel-code-review/references/php84-features.md +0 -442
- package/skills/mcp-builder/LICENSE.txt +0 -202
- package/skills/mcp-builder/SKILL.md +0 -236
- package/skills/mcp-builder/reference/evaluation.md +0 -602
- package/skills/mcp-builder/reference/mcp_best_practices.md +0 -249
- package/skills/mcp-builder/reference/node_mcp_server.md +0 -970
- package/skills/mcp-builder/reference/python_mcp_server.md +0 -719
- package/skills/mcp-builder/scripts/connections.py +0 -151
- package/skills/mcp-builder/scripts/evaluation.py +0 -373
- package/skills/mcp-builder/scripts/example_evaluation.xml +0 -22
- package/skills/mcp-builder/scripts/requirements.txt +0 -2
- package/skills/meeting-notes/SKILL.md +0 -159
- package/skills/meeting-notes/evals/evals.json +0 -23
- package/skills/prd-agent-generator/SKILL.md +0 -132
- package/skills/prd-generator/SKILL.md +0 -211
- package/skills/product-brief/SKILL.md +0 -141
- package/skills/project-orchestrator/SKILL.md +0 -487
- package/skills/project-orchestrator/assets/caddy-vps-setup.md +0 -180
- package/skills/project-orchestrator/assets/plan-summary-template.md +0 -159
- package/skills/prompter-specs/SKILL.md +0 -115
- package/skills/prompter-workflow/SKILL.md +0 -166
- package/skills/prompter-workflow/evals/evals.json +0 -89
- package/skills/proposal/SKILL.md +0 -28
- package/skills/qa-test-scenario/SKILL.md +0 -149
- package/skills/skill-creator/SKILL.md +0 -173
- package/skills/sph-generator/SKILL.md +0 -488
- package/skills/story-generator/SKILL.md +0 -285
- package/skills/story-single/SKILL.md +0 -86
- package/skills/tdd-generator/SKILL.md +0 -300
- package/skills/tdd-lite-generator/SKILL.md +0 -230
- package/skills/ui-ux-pro/SKILL.md +0 -199
- package/skills/ui-ux-pro/assets/design-spec-template.md +0 -173
- package/skills/ui-ux-pro/references/component-patterns.md +0 -255
- package/skills/ui-ux-pro/references/design-principles.md +0 -167
- package/skills/wireframe-generator/SKILL.md +0 -227
- package/src/cli/index.ts +0 -223
- package/src/commands/archive.ts +0 -302
- package/src/commands/change.ts +0 -292
- package/src/commands/config.ts +0 -233
- package/src/commands/guide.ts +0 -50
- package/src/commands/init.ts +0 -597
- package/src/commands/list.ts +0 -194
- package/src/commands/show.ts +0 -138
- package/src/commands/spec.ts +0 -251
- package/src/commands/update.ts +0 -129
- package/src/commands/upgrade.ts +0 -30
- package/src/commands/validate.ts +0 -326
- package/src/core/artifact-graph/graph.ts +0 -167
- package/src/core/artifact-graph/index.ts +0 -44
- package/src/core/artifact-graph/instruction-loader.ts +0 -302
- package/src/core/artifact-graph/resolver.ts +0 -226
- package/src/core/artifact-graph/schema.ts +0 -124
- package/src/core/artifact-graph/state.ts +0 -64
- package/src/core/artifact-graph/types.ts +0 -65
- package/src/core/completions/command-registry.ts +0 -382
- package/src/core/completions/completion-provider.ts +0 -128
- package/src/core/completions/generators/bash-generator.ts +0 -191
- package/src/core/completions/generators/fish-generator.ts +0 -188
- package/src/core/completions/generators/powershell-generator.ts +0 -223
- package/src/core/completions/generators/zsh-generator.ts +0 -281
- package/src/core/completions/templates/bash-templates.ts +0 -24
- package/src/core/completions/templates/fish-templates.ts +0 -40
- package/src/core/completions/templates/powershell-templates.ts +0 -25
- package/src/core/completions/templates/zsh-templates.ts +0 -36
- package/src/core/completions/types.ts +0 -90
- package/src/core/config-schema.ts +0 -230
- package/src/core/config.ts +0 -181
- package/src/core/configurators/slash/antigravity.ts +0 -10
- package/src/core/configurators/slash/base.ts +0 -109
- package/src/core/configurators/slash/claude.ts +0 -10
- package/src/core/configurators/slash/codex.ts +0 -10
- package/src/core/configurators/slash/droid.ts +0 -10
- package/src/core/configurators/slash/forge.ts +0 -10
- package/src/core/configurators/slash/github-copilot.ts +0 -10
- package/src/core/configurators/slash/index.ts +0 -10
- package/src/core/configurators/slash/kilocode.ts +0 -10
- package/src/core/configurators/slash/opencode.ts +0 -10
- package/src/core/configurators/slash/registry.ts +0 -51
- package/src/core/converters/json-converter.ts +0 -62
- package/src/core/global-config.ts +0 -136
- package/src/core/parsers/change-parser.ts +0 -234
- package/src/core/parsers/markdown-parser.ts +0 -237
- package/src/core/parsers/requirement-blocks.ts +0 -234
- package/src/core/prompt-templates.ts +0 -3504
- package/src/core/schemas/base.schema.ts +0 -20
- package/src/core/schemas/change.schema.ts +0 -42
- package/src/core/schemas/index.ts +0 -20
- package/src/core/schemas/spec.schema.ts +0 -17
- package/src/core/skill-discovery.ts +0 -68
- package/src/core/specs-apply.ts +0 -483
- package/src/core/styles/palette.ts +0 -8
- package/src/core/templates/agents-template.ts +0 -459
- package/src/core/templates/claude-template.ts +0 -2
- package/src/core/templates/index.ts +0 -3
- package/src/core/templates/project-template.ts +0 -32
- package/src/core/validation/constants.ts +0 -48
- package/src/core/validation/types.ts +0 -19
- package/src/core/validation/validator.ts +0 -449
- package/src/core/view.ts +0 -219
- package/src/index.ts +0 -1
- package/src/utils/change-metadata.ts +0 -171
- package/src/utils/change-utils.ts +0 -131
- package/src/utils/file-system.ts +0 -252
- package/src/utils/index.ts +0 -12
- package/src/utils/interactive.ts +0 -29
- package/src/utils/item-discovery.ts +0 -66
- package/src/utils/match.ts +0 -26
- package/src/utils/shell-detection.ts +0 -62
- package/src/utils/task-progress.ts +0 -43
- package/tsconfig.json +0 -28
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
# Per-Agent MCP Configuration Reference
|
|
2
|
-
|
|
3
|
-
## Token
|
|
4
|
-
|
|
5
|
-
Generate a token at your Cerebro instance ā **Settings ā Agent Tokens**. Enter a name (e.g. "My Computer"), click **Issue token**, and copy it immediately ā it won't be shown again.
|
|
6
|
-
|
|
7
|
-
Tokens are **user-scoped**: one token grants read+write access to all projects, including ones created later.
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
## Per-agent details
|
|
12
|
-
|
|
13
|
-
### Claude Code
|
|
14
|
-
|
|
15
|
-
- **Transport**: HTTP (no binary needed)
|
|
16
|
-
- **Config**: `claude mcp add` CLI (preferred), or add to `~/.claude/settings.json`
|
|
17
|
-
- **Restart needed?** No
|
|
18
|
-
|
|
19
|
-
```bash
|
|
20
|
-
claude mcp add --transport http --scope user cerebro \
|
|
21
|
-
http://localhost:3000/api/mcp \
|
|
22
|
-
--header "Authorization: Bearer YOUR_TOKEN"
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
Verify: `claude mcp list` ā expect `cerebro connected`.
|
|
26
|
-
|
|
27
|
-
---
|
|
28
|
-
|
|
29
|
-
### OpenCode
|
|
30
|
-
|
|
31
|
-
- **Transport**: remote HTTP (no binary needed)
|
|
32
|
-
- **Config**: `~/.config/opencode/opencode.json` or project-root `opencode.json`
|
|
33
|
-
- **Restart needed?** No
|
|
34
|
-
|
|
35
|
-
```jsonc
|
|
36
|
-
{
|
|
37
|
-
"$schema": "https://opencode.ai/config.json",
|
|
38
|
-
"mcp": {
|
|
39
|
-
"cerebro": {
|
|
40
|
-
"type": "remote",
|
|
41
|
-
"url": "http://localhost:3000/api/mcp",
|
|
42
|
-
"headers": { "Authorization": "Bearer YOUR_TOKEN" },
|
|
43
|
-
"enabled": true
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
Verify: `opencode mcp list`
|
|
50
|
-
|
|
51
|
-
---
|
|
52
|
-
|
|
53
|
-
### Cursor
|
|
54
|
-
|
|
55
|
-
- **Transport**: stdio (requires built binary)
|
|
56
|
-
- **Config**: `~/.cursor/mcp.json`
|
|
57
|
-
- **Restart needed?** **Yes** ā full Cursor restart
|
|
58
|
-
|
|
59
|
-
```json
|
|
60
|
-
{
|
|
61
|
-
"mcpServers": {
|
|
62
|
-
"cerebro": {
|
|
63
|
-
"command": "node",
|
|
64
|
-
"args": ["/path/to/cerebro-mcp-server/dist/index.js"],
|
|
65
|
-
"env": {
|
|
66
|
-
"CEREBRO_URL": "http://localhost:3000",
|
|
67
|
-
"CEREBRO_TOKEN": "YOUR_TOKEN"
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
---
|
|
75
|
-
|
|
76
|
-
### VS Code (GitHub Copilot / Copilot Chat)
|
|
77
|
-
|
|
78
|
-
- **Transport**: stdio (requires built binary)
|
|
79
|
-
- **Requires**: VS Code 1.99+ with Copilot extension
|
|
80
|
-
- **Config**: `.vscode/mcp.json` (workspace) or user MCP config via Command Palette ā **MCP: Open User Configuration**
|
|
81
|
-
- **Restart needed?** Yes
|
|
82
|
-
|
|
83
|
-
```json
|
|
84
|
-
{
|
|
85
|
-
"servers": {
|
|
86
|
-
"cerebro": {
|
|
87
|
-
"type": "stdio",
|
|
88
|
-
"command": "node",
|
|
89
|
-
"args": ["/path/to/cerebro-mcp-server/dist/index.js"],
|
|
90
|
-
"env": {
|
|
91
|
-
"CEREBRO_URL": "http://localhost:3000",
|
|
92
|
-
"CEREBRO_TOKEN": "YOUR_TOKEN"
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
---
|
|
100
|
-
|
|
101
|
-
### Windsurf
|
|
102
|
-
|
|
103
|
-
- **Transport**: stdio (requires built binary)
|
|
104
|
-
- **Config**: `~/.codeium/windsurf/mcp_config.json`
|
|
105
|
-
- **Restart needed?** **Yes** ā full Windsurf restart
|
|
106
|
-
|
|
107
|
-
```json
|
|
108
|
-
{
|
|
109
|
-
"mcpServers": {
|
|
110
|
-
"cerebro": {
|
|
111
|
-
"command": "node",
|
|
112
|
-
"args": ["/path/to/cerebro-mcp-server/dist/index.js"],
|
|
113
|
-
"env": {
|
|
114
|
-
"CEREBRO_URL": "http://localhost:3000",
|
|
115
|
-
"CEREBRO_TOKEN": "YOUR_TOKEN"
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
---
|
|
123
|
-
|
|
124
|
-
### Claude Desktop
|
|
125
|
-
|
|
126
|
-
- **Transport**: stdio (requires built binary)
|
|
127
|
-
- **Config**:
|
|
128
|
-
- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
129
|
-
- Windows: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
130
|
-
- **Restart needed?** **Yes**
|
|
131
|
-
|
|
132
|
-
```json
|
|
133
|
-
{
|
|
134
|
-
"mcpServers": {
|
|
135
|
-
"cerebro": {
|
|
136
|
-
"command": "node",
|
|
137
|
-
"args": ["/path/to/cerebro-mcp-server/dist/index.js"],
|
|
138
|
-
"env": {
|
|
139
|
-
"CEREBRO_URL": "http://localhost:3000",
|
|
140
|
-
"CEREBRO_TOKEN": "YOUR_TOKEN"
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
---
|
|
148
|
-
|
|
149
|
-
### Codex CLI
|
|
150
|
-
|
|
151
|
-
- **Transport**: stdio (requires built binary)
|
|
152
|
-
- **Config**: `~/.codex/config.json`
|
|
153
|
-
- **Restart needed?** No
|
|
154
|
-
|
|
155
|
-
```json
|
|
156
|
-
{
|
|
157
|
-
"mcpServers": {
|
|
158
|
-
"cerebro": {
|
|
159
|
-
"command": "node",
|
|
160
|
-
"args": ["/path/to/cerebro-mcp-server/dist/index.js"],
|
|
161
|
-
"env": {
|
|
162
|
-
"CEREBRO_URL": "http://localhost:3000",
|
|
163
|
-
"CEREBRO_TOKEN": "YOUR_TOKEN"
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
---
|
|
171
|
-
|
|
172
|
-
## Building the stdio binary
|
|
173
|
-
|
|
174
|
-
Required for all stdio-transport agents (Cursor, VS Code, Windsurf, Claude Desktop, Codex CLI):
|
|
175
|
-
|
|
176
|
-
```bash
|
|
177
|
-
cd /path/to/cerebro-mcp-server
|
|
178
|
-
npm install && npm run build
|
|
179
|
-
# produces dist/index.js ā use its absolute path in configs above
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
---
|
|
183
|
-
|
|
184
|
-
## Available tools
|
|
185
|
-
|
|
186
|
-
| Tool | What it does |
|
|
187
|
-
|---|---|
|
|
188
|
-
| `project_list` | List all projects (name, slug, ID) |
|
|
189
|
-
| `project_create` | Create a new project |
|
|
190
|
-
| `memory_create` | Create a memory in a project |
|
|
191
|
-
| `memory_get` | Fetch a memory by ID only ā no project needed |
|
|
192
|
-
| `memory_update` | Update an existing memory |
|
|
193
|
-
| `memory_delete` | Delete a memory permanently |
|
|
194
|
-
| `memory_list` | List all memories in a project |
|
|
195
|
-
| `memory_search` | Full-text search across a project's memories |
|
|
196
|
-
|
|
197
|
-
---
|
|
198
|
-
|
|
199
|
-
## Verifying after install
|
|
200
|
-
|
|
201
|
-
In Claude Code:
|
|
202
|
-
```bash
|
|
203
|
-
claude mcp list
|
|
204
|
-
```
|
|
205
|
-
Expect `cerebro` with status `connected`.
|
|
206
|
-
|
|
207
|
-
In OpenCode:
|
|
208
|
-
```bash
|
|
209
|
-
opencode mcp list
|
|
210
|
-
opencode mcp debug cerebro
|
|
211
|
-
```
|
|
212
|
-
|
|
213
|
-
In stdio-transport agents (Cursor, VS Code, Windsurf, Claude Desktop), check the tool list (hammer icon) for the 8 tools above after restarting.
|
|
@@ -1,373 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: code-review
|
|
3
|
-
description: Perform static code review on git staged files for any programming language, framework, or project type. Dynamically adapts to the project by reading AGENTS.md for tech stack, conventions, and architecture context. Identifies security vulnerabilities, performance issues, bugs, anti-patterns, and code style violations. Outputs structured Markdown report to test-hunter/ folder. Use when reviewing code before commit, or with /code-review command.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Universal Code Review
|
|
7
|
-
|
|
8
|
-
Perform static code review on staged git files. Adapts to any language, framework, or project type by reading the project's `AGENTS.md` for context.
|
|
9
|
-
|
|
10
|
-
## Quick Start
|
|
11
|
-
|
|
12
|
-
1. **READ PROJECT CONTEXT** from `AGENTS.md` at the project root (required)
|
|
13
|
-
2. **ASK USER** which review style to use (Strict/Balanced/Lenient) ā default: Balanced
|
|
14
|
-
3. **ASK USER** which report format to use (Full/Human/Compact/Agent)
|
|
15
|
-
4. Get staged files: `git diff --cached --name-only`
|
|
16
|
-
5. Detect project tech stack from file extensions, config files, and `AGENTS.md`
|
|
17
|
-
6. Analyze each file based on review style, tech stack, and project conventions
|
|
18
|
-
7. Generate report to `test-hunter/review-<timestamp>.md`
|
|
19
|
-
|
|
20
|
-
---
|
|
21
|
-
|
|
22
|
-
## Step 0: Read Project Context (REQUIRED)
|
|
23
|
-
|
|
24
|
-
Before any analysis, read the project's `AGENTS.md` file from the repository root:
|
|
25
|
-
|
|
26
|
-
```bash
|
|
27
|
-
cat AGENTS.md
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
Extract the following from `AGENTS.md` (if present):
|
|
31
|
-
- **Tech stack** ā languages, frameworks, versions
|
|
32
|
-
- **Architecture patterns** ā MVC, microservices, monorepo, etc.
|
|
33
|
-
- **Code conventions** ā naming, formatting, structure rules
|
|
34
|
-
- **Testing strategy** ā unit, integration, e2e expectations
|
|
35
|
-
- **Domain context** ā business logic constraints
|
|
36
|
-
- **Important constraints** ā regulatory, performance, security requirements
|
|
37
|
-
|
|
38
|
-
If `AGENTS.md` is missing or incomplete, infer context from:
|
|
39
|
-
1. Config files: `package.json`, `composer.json`, `Cargo.toml`, `pyproject.toml`, `go.mod`, `Gemfile`, etc.
|
|
40
|
-
2. File extensions in staged files
|
|
41
|
-
3. Directory structure patterns
|
|
42
|
-
|
|
43
|
-
Store the detected context as your **Project Profile** for the review session.
|
|
44
|
-
|
|
45
|
-
---
|
|
46
|
-
|
|
47
|
-
## Step 1: Ask User for Review Style (REQUIRED)
|
|
48
|
-
|
|
49
|
-
Present the following options:
|
|
50
|
-
|
|
51
|
-
```
|
|
52
|
-
Which review style would you like? (Default: Balanced)
|
|
53
|
-
|
|
54
|
-
1. **Strict** š
|
|
55
|
-
Flag all potential issues, prioritize quality and security
|
|
56
|
-
|
|
57
|
-
Focus Areas:
|
|
58
|
-
ā
Security vulnerabilities
|
|
59
|
-
ā
Performance issues
|
|
60
|
-
ā
Bug detection
|
|
61
|
-
ā
Code style & conventions
|
|
62
|
-
ā
Test coverage
|
|
63
|
-
ā
Documentation
|
|
64
|
-
|
|
65
|
-
2. **Balanced** āļø (Default)
|
|
66
|
-
Focus on high-confidence issues, balance thoroughness with practicality
|
|
67
|
-
|
|
68
|
-
Focus Areas:
|
|
69
|
-
ā
Security vulnerabilities
|
|
70
|
-
ā
Performance issues
|
|
71
|
-
ā
Bug detection
|
|
72
|
-
āŖ Code style (major violations only)
|
|
73
|
-
āŖ Test coverage (critical paths only)
|
|
74
|
-
ā Documentation
|
|
75
|
-
|
|
76
|
-
3. **Lenient** š
|
|
77
|
-
Only critical bugs and security issues, be encouraging
|
|
78
|
-
|
|
79
|
-
Focus Areas:
|
|
80
|
-
ā
Security vulnerabilities (critical only)
|
|
81
|
-
āŖ Performance issues (severe bottlenecks only)
|
|
82
|
-
ā
Bug detection (critical bugs only)
|
|
83
|
-
ā Code style
|
|
84
|
-
ā Test coverage
|
|
85
|
-
ā Documentation
|
|
86
|
-
|
|
87
|
-
Please select (1-3) or type the style name, or press Enter for Balanced:
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
Wait for user response. Default to Balanced if no response.
|
|
91
|
-
|
|
92
|
-
### Review Style Configuration
|
|
93
|
-
|
|
94
|
-
| Focus Area | Strict | Balanced | Lenient |
|
|
95
|
-
| ----------------- | -------------- | ---------------- | ------------------ |
|
|
96
|
-
| Security | All issues | All issues | Critical only |
|
|
97
|
-
| Performance | All issues | All issues | Severe bottlenecks |
|
|
98
|
-
| Bug detection | All issues | High confidence | Critical only |
|
|
99
|
-
| Code style | All issues | Major violations | ā Skip |
|
|
100
|
-
| Test coverage | All issues | Critical paths | ā Skip |
|
|
101
|
-
| Documentation | All issues | ā Skip | ā Skip |
|
|
102
|
-
|
|
103
|
-
### Severity Threshold by Style
|
|
104
|
-
|
|
105
|
-
| Style | Report Threshold | Tone |
|
|
106
|
-
| -------- | ---------------------- | ----------------------- |
|
|
107
|
-
| Strict | All severities (š“š š”šµ) | Direct, thorough |
|
|
108
|
-
| Balanced | Warning+ (š“š š”) | Constructive, practical |
|
|
109
|
-
| Lenient | Critical only (š“) | Encouraging, supportive |
|
|
110
|
-
|
|
111
|
-
---
|
|
112
|
-
|
|
113
|
-
## Step 2: Ask User for Report Format (REQUIRED)
|
|
114
|
-
|
|
115
|
-
```
|
|
116
|
-
Which report format would you like?
|
|
117
|
-
|
|
118
|
-
1. **Full** - Complete detailed analysis (~200-300 lines per file)
|
|
119
|
-
2. **Human** - Optimized for readability (~50-80 lines per file)
|
|
120
|
-
3. **Compact** - Condensed summary (~15-25 lines per file)
|
|
121
|
-
4. **Agent** - Machine-readable for AI tools (~30-50 lines per file)
|
|
122
|
-
|
|
123
|
-
Please select (1-4) or type the format name:
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
Wait for user response.
|
|
127
|
-
|
|
128
|
-
---
|
|
129
|
-
|
|
130
|
-
## Workflow
|
|
131
|
-
|
|
132
|
-
### Step 3: Retrieve Staged Files
|
|
133
|
-
|
|
134
|
-
```bash
|
|
135
|
-
git diff --cached --name-only
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
### Step 4: Detect Tech Stack & Categorize Files
|
|
139
|
-
|
|
140
|
-
Identify the project's tech stack from staged files and project context. Group files by logical component based on the detected stack.
|
|
141
|
-
|
|
142
|
-
**Auto-detection signals:**
|
|
143
|
-
|
|
144
|
-
| Signal | Tech Stack |
|
|
145
|
-
| --- | --- |
|
|
146
|
-
| `*.py`, `pyproject.toml`, `requirements.txt` | Python |
|
|
147
|
-
| `*.ts`, `*.tsx`, `package.json` | TypeScript/JavaScript |
|
|
148
|
-
| `*.php`, `composer.json` | PHP |
|
|
149
|
-
| `*.go`, `go.mod` | Go |
|
|
150
|
-
| `*.rs`, `Cargo.toml` | Rust |
|
|
151
|
-
| `*.java`, `pom.xml`, `build.gradle` | Java |
|
|
152
|
-
| `*.rb`, `Gemfile` | Ruby |
|
|
153
|
-
| `*.cs`, `*.csproj` | C# / .NET |
|
|
154
|
-
| `*.swift`, `Package.swift` | Swift |
|
|
155
|
-
| `*.kt`, `build.gradle.kts` | Kotlin |
|
|
156
|
-
| `*.dart`, `pubspec.yaml` | Dart/Flutter |
|
|
157
|
-
| `*.vue`, `*.svelte` | Vue/Svelte SFC |
|
|
158
|
-
| `*.blade.php` | Laravel Blade |
|
|
159
|
-
| `*.erb`, `*.haml` | Ruby templates |
|
|
160
|
-
| `Dockerfile`, `docker-compose.yml` | Docker/Infrastructure |
|
|
161
|
-
| `*.yaml`, `*.yml`, `*.toml`, `*.json` | Configuration |
|
|
162
|
-
| `*.sql` | Database |
|
|
163
|
-
| `*.sh`, `*.bash`, `*.zsh` | Shell scripts |
|
|
164
|
-
|
|
165
|
-
**Framework detection (from config files and AGENTS.md):**
|
|
166
|
-
|
|
167
|
-
| Signal | Framework |
|
|
168
|
-
| --- | --- |
|
|
169
|
-
| `next.config.*`, `app/layout.tsx` | Next.js |
|
|
170
|
-
| `nuxt.config.*` | Nuxt |
|
|
171
|
-
| `svelte.config.*` | SvelteKit |
|
|
172
|
-
| `angular.json` | Angular |
|
|
173
|
-
| `artisan`, `app/Http/Controllers/` | Laravel |
|
|
174
|
-
| `manage.py`, `settings.py` | Django |
|
|
175
|
-
| `Gemfile` + `config/routes.rb` | Rails |
|
|
176
|
-
| `main.go` + `go.mod` | Go (stdlib/framework) |
|
|
177
|
-
| `Cargo.toml` + `src/main.rs` | Rust |
|
|
178
|
-
| `pom.xml` + `src/main/java` | Spring Boot / Java |
|
|
179
|
-
| `pubspec.yaml` + `lib/main.dart` | Flutter |
|
|
180
|
-
|
|
181
|
-
Categorize staged files into logical groups:
|
|
182
|
-
- **Source code** ā application logic
|
|
183
|
-
- **Tests** ā test files (review only, no execution)
|
|
184
|
-
- **Configuration** ā config files, env, CI/CD
|
|
185
|
-
- **Infrastructure** ā Docker, deployment, IaC
|
|
186
|
-
- **Documentation** ā README, docs, comments
|
|
187
|
-
- **Database** ā migrations, schemas, seeds
|
|
188
|
-
- **Templates/Views** ā UI templates, components
|
|
189
|
-
|
|
190
|
-
### Step 5: Analyze Each File
|
|
191
|
-
|
|
192
|
-
**Apply Review Style Filter** based on the user's selection from Step 1.
|
|
193
|
-
|
|
194
|
-
Review for these universal issue categories (filtered by review style):
|
|
195
|
-
|
|
196
|
-
#### š“ Critical Issues
|
|
197
|
-
|
|
198
|
-
**Security Vulnerabilities (all languages):**
|
|
199
|
-
- Injection flaws (SQL, command, template, LDAP, XPath)
|
|
200
|
-
- Cross-site scripting (XSS) ā unescaped user input in output
|
|
201
|
-
- Authentication/authorization bypasses
|
|
202
|
-
- Hardcoded secrets, API keys, credentials
|
|
203
|
-
- Insecure deserialization
|
|
204
|
-
- Path traversal / directory traversal
|
|
205
|
-
- Insecure cryptography (weak algorithms, hardcoded keys)
|
|
206
|
-
- Missing input validation/sanitization
|
|
207
|
-
- CSRF vulnerabilities in web frameworks
|
|
208
|
-
- Mass assignment / over-posting
|
|
209
|
-
- Exposed sensitive data in responses or logs
|
|
210
|
-
|
|
211
|
-
**Runtime Errors:**
|
|
212
|
-
- Null/undefined reference errors
|
|
213
|
-
- Unhandled exceptions in critical paths
|
|
214
|
-
- Type mismatches in dynamically typed languages
|
|
215
|
-
- Missing error handling for I/O operations
|
|
216
|
-
- Race conditions in concurrent code
|
|
217
|
-
- Resource leaks (unclosed connections, file handles, streams)
|
|
218
|
-
- Buffer overflows (C/C++/Rust unsafe blocks)
|
|
219
|
-
|
|
220
|
-
#### š Warning Issues
|
|
221
|
-
|
|
222
|
-
**Performance Anti-patterns:**
|
|
223
|
-
- N+1 query problems (ORM/database)
|
|
224
|
-
- Missing pagination for large datasets
|
|
225
|
-
- Synchronous operations that should be async
|
|
226
|
-
- Inefficient algorithms (O(n²) where O(n) is possible)
|
|
227
|
-
- Missing caching for repeated expensive operations
|
|
228
|
-
- Unnecessary memory allocations in hot paths
|
|
229
|
-
- Loading full objects when only subset is needed
|
|
230
|
-
- Missing database indexes for frequently queried columns
|
|
231
|
-
- Blocking the main/event thread
|
|
232
|
-
|
|
233
|
-
**Architecture & Design:**
|
|
234
|
-
- God objects / classes with too many responsibilities
|
|
235
|
-
- Tight coupling between unrelated modules
|
|
236
|
-
- Business logic in wrong layer (e.g., in controllers, views, templates)
|
|
237
|
-
- Missing abstraction for repeated patterns
|
|
238
|
-
- Circular dependencies
|
|
239
|
-
- Violation of project's stated architecture patterns (from `AGENTS.md`)
|
|
240
|
-
|
|
241
|
-
**Error Handling:**
|
|
242
|
-
- Swallowed exceptions (empty catch blocks)
|
|
243
|
-
- Overly broad exception catching
|
|
244
|
-
- Missing error propagation
|
|
245
|
-
- Inconsistent error handling patterns
|
|
246
|
-
|
|
247
|
-
#### š” Optimization Issues
|
|
248
|
-
|
|
249
|
-
**Resource Efficiency:**
|
|
250
|
-
- Redundant computations
|
|
251
|
-
- Missing lazy loading / eager loading (context-dependent)
|
|
252
|
-
- Suboptimal data structures
|
|
253
|
-
- Unnecessary network calls
|
|
254
|
-
- Missing connection pooling
|
|
255
|
-
- Redundant database queries
|
|
256
|
-
|
|
257
|
-
**Code Duplication:**
|
|
258
|
-
- Copy-pasted logic that should be extracted
|
|
259
|
-
- Repeated patterns across files
|
|
260
|
-
- Magic numbers/strings that should be constants
|
|
261
|
-
|
|
262
|
-
#### šµ Code Quality Issues
|
|
263
|
-
|
|
264
|
-
**Language Best Practices:**
|
|
265
|
-
- Not using modern language features (based on detected version)
|
|
266
|
-
- Missing type annotations (TypeScript, Python, PHP 8+)
|
|
267
|
-
- Deprecated API usage
|
|
268
|
-
- Inconsistent naming conventions
|
|
269
|
-
- Dead code / unreachable branches
|
|
270
|
-
- Overly complex expressions (cyclomatic complexity)
|
|
271
|
-
- Missing return types
|
|
272
|
-
|
|
273
|
-
**Project Convention Violations (from AGENTS.md):**
|
|
274
|
-
- Naming convention violations
|
|
275
|
-
- File organization violations
|
|
276
|
-
- Architecture pattern deviations
|
|
277
|
-
- Testing strategy violations
|
|
278
|
-
|
|
279
|
-
**Documentation:**
|
|
280
|
-
- Missing function/method documentation for public APIs
|
|
281
|
-
- Outdated or misleading comments
|
|
282
|
-
- TODO/FIXME/HACK markers that need attention
|
|
283
|
-
|
|
284
|
-
### Step 6: Apply Project-Specific Rules
|
|
285
|
-
|
|
286
|
-
Based on the **Project Profile** from `AGENTS.md`, apply additional checks:
|
|
287
|
-
|
|
288
|
-
1. **If AGENTS.md specifies coding standards** ā validate against them
|
|
289
|
-
2. **If AGENTS.md specifies architecture** ā check layer violations
|
|
290
|
-
3. **If AGENTS.md specifies testing requirements** ā check test coverage
|
|
291
|
-
4. **If AGENTS.md specifies naming conventions** ā validate names
|
|
292
|
-
5. **If AGENTS.md specifies security constraints** ā apply stricter security checks
|
|
293
|
-
|
|
294
|
-
For deeper language/framework-specific patterns, load the appropriate reference:
|
|
295
|
-
- See `references/universal-patterns.md` for cross-language detection patterns
|
|
296
|
-
|
|
297
|
-
### Step 7: Generate Report
|
|
298
|
-
|
|
299
|
-
```bash
|
|
300
|
-
mkdir -p test-hunter
|
|
301
|
-
```
|
|
302
|
-
|
|
303
|
-
Filename: `review-YYYY-MM-DD-HHMMSS.md`
|
|
304
|
-
|
|
305
|
-
### Step 8: Write Report
|
|
306
|
-
|
|
307
|
-
Use the selected report format template from `assets/`:
|
|
308
|
-
|
|
309
|
-
| Format | Template File | Use Case |
|
|
310
|
-
| ------- | ----------------------------------- | -------------------------- |
|
|
311
|
-
| Full | `assets/report-template-full.md` | Comprehensive review |
|
|
312
|
-
| Human | `assets/report-template-human.md` | Developer-friendly reading |
|
|
313
|
-
| Compact | `assets/report-template-compact.md` | Quick summary |
|
|
314
|
-
| Agent | `assets/report-template-agent.md` | CI/CD & AI integration |
|
|
315
|
-
|
|
316
|
-
---
|
|
317
|
-
|
|
318
|
-
## Issue Categories Reference
|
|
319
|
-
|
|
320
|
-
### Security
|
|
321
|
-
- `injection` ā SQL, command, template injection
|
|
322
|
-
- `xss` ā Cross-site scripting
|
|
323
|
-
- `auth-bypass` ā Authentication/authorization issues
|
|
324
|
-
- `secrets` ā Hardcoded credentials, exposed keys
|
|
325
|
-
- `csrf` ā Cross-site request forgery
|
|
326
|
-
- `mass-assignment` ā Over-posting / mass assignment
|
|
327
|
-
- `insecure-crypto` ā Weak cryptography
|
|
328
|
-
- `path-traversal` ā Directory traversal
|
|
329
|
-
|
|
330
|
-
### Performance
|
|
331
|
-
- `n-plus-one` ā N+1 query problem
|
|
332
|
-
- `blocking-io` ā Synchronous blocking in async context
|
|
333
|
-
- `missing-index` ā Missing database index
|
|
334
|
-
- `inefficient-algorithm` ā Suboptimal algorithm complexity
|
|
335
|
-
- `missing-cache` ā Missing caching opportunity
|
|
336
|
-
- `memory-leak` ā Resource/memory leak
|
|
337
|
-
- `unnecessary-load` ā Loading more data than needed
|
|
338
|
-
|
|
339
|
-
### Architecture
|
|
340
|
-
- `god-object` ā Class with too many responsibilities
|
|
341
|
-
- `wrong-layer` ā Logic in the wrong architectural layer
|
|
342
|
-
- `tight-coupling` ā Unnecessary coupling between modules
|
|
343
|
-
- `circular-dependency` ā Circular import/dependency
|
|
344
|
-
- `code-duplication` ā Duplicated logic
|
|
345
|
-
|
|
346
|
-
### Language & Framework
|
|
347
|
-
- `deprecated-api` ā Using deprecated features
|
|
348
|
-
- `missing-types` ā Missing type annotations
|
|
349
|
-
- `modern-syntax` ā Not using modern language features
|
|
350
|
-
- `convention-violation` ā Project convention violations
|
|
351
|
-
- `dead-code` ā Unreachable or unused code
|
|
352
|
-
|
|
353
|
-
### Error Handling
|
|
354
|
-
- `swallowed-exception` ā Empty catch block
|
|
355
|
-
- `missing-error-handling` ā Unhandled error case
|
|
356
|
-
- `broad-catch` ā Catching too broad an exception type
|
|
357
|
-
|
|
358
|
-
## Severity Classification
|
|
359
|
-
|
|
360
|
-
| Severity | Emoji | Criteria |
|
|
361
|
-
| ------------ | ----- | ----------------------------------------------------- |
|
|
362
|
-
| Critical | š“ | Security vulnerabilities, data loss risks, crashes |
|
|
363
|
-
| Warning | š | Performance issues, design flaws, error handling gaps |
|
|
364
|
-
| Optimization | š” | Efficiency improvements, code duplication |
|
|
365
|
-
| Quality | šµ | Best practices, conventions, modern syntax, docs |
|
|
366
|
-
|
|
367
|
-
## Output Location
|
|
368
|
-
|
|
369
|
-
Save to: `<project-root>/test-hunter/review-<timestamp>.md`
|
|
370
|
-
|
|
371
|
-
## Resources
|
|
372
|
-
|
|
373
|
-
- See `references/universal-patterns.md` for cross-language detection patterns
|