@atlashub/smartstack-cli 1.36.0 → 2.0.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/config/mcp-defaults.json +62 -0
- package/dist/index.js +57 -4
- package/dist/index.js.map +1 -1
- package/dist/mcp-entry.mjs +16984 -0
- package/dist/mcp-entry.mjs.map +1 -0
- package/package.json +14 -5
- package/templates/agents/gitflow/start.md +5 -4
- package/templates/agents/mcp-healthcheck.md +15 -13
- package/templates/mcp-scaffolding/component.tsx.hbs +298 -0
- package/templates/mcp-scaffolding/controller.cs.hbs +184 -0
- package/templates/mcp-scaffolding/entity-extension.cs.hbs +231 -0
- package/templates/mcp-scaffolding/frontend/api-client.ts.hbs +116 -0
- package/templates/mcp-scaffolding/frontend/nav-routes.ts.hbs +133 -0
- package/templates/mcp-scaffolding/frontend/routes.tsx.hbs +134 -0
- package/templates/mcp-scaffolding/migrations/seed-roles.cs.hbs +261 -0
- package/templates/mcp-scaffolding/service-extension.cs.hbs +53 -0
- package/templates/mcp-scaffolding/tests/controller.test.cs.hbs +413 -0
- package/templates/mcp-scaffolding/tests/entity.test.cs.hbs +239 -0
- package/templates/mcp-scaffolding/tests/repository.test.cs.hbs +441 -0
- package/templates/mcp-scaffolding/tests/security.test.cs.hbs +442 -0
- package/templates/mcp-scaffolding/tests/service.test.cs.hbs +390 -0
- package/templates/mcp-scaffolding/tests/validator.test.cs.hbs +428 -0
- package/templates/ralph/README.md +3 -3
- package/templates/ralph/ralph.config.yaml +2 -2
- package/templates/skills/admin/SKILL.md +42 -0
- package/templates/skills/application/steps/step-01-navigation.md +226 -43
- package/templates/skills/application/steps/step-03-roles.md +160 -38
- package/templates/skills/application/steps/step-04-backend.md +109 -2
- package/templates/skills/application/templates-seed.md +200 -1
- package/templates/skills/business-analyse/_shared.md +24 -1
- package/templates/skills/business-analyse/questionnaire/01-context.md +4 -4
- package/templates/skills/business-analyse/questionnaire/02-stakeholders.md +3 -3
- package/templates/skills/business-analyse/questionnaire/03-scope.md +4 -4
- package/templates/skills/business-analyse/questionnaire/04-data.md +7 -7
- package/templates/skills/business-analyse/questionnaire/05-integrations.md +1 -1
- package/templates/skills/business-analyse/questionnaire/06-security.md +3 -3
- package/templates/skills/business-analyse/questionnaire/07-ui.md +1 -1
- package/templates/skills/business-analyse/questionnaire/08-performance.md +3 -3
- package/templates/skills/business-analyse/questionnaire/09-constraints.md +4 -4
- package/templates/skills/business-analyse/questionnaire/10-documentation.md +2 -2
- package/templates/skills/business-analyse/questionnaire/11-data-lifecycle.md +2 -2
- package/templates/skills/business-analyse/questionnaire/12-migration.md +1 -1
- package/templates/skills/business-analyse/questionnaire/13-cross-module.md +2 -2
- package/templates/skills/business-analyse/steps/step-01-discover.md +50 -25
- package/templates/skills/business-analyse/steps/step-05-handoff.md +133 -34
- package/templates/skills/cc-agent/SKILL.md +129 -0
- package/templates/skills/cc-agent/references/agent-frontmatter.md +213 -0
- package/templates/skills/cc-agent/references/permission-modes.md +102 -0
- package/templates/skills/cc-agent/references/tools-reference.md +144 -0
- package/templates/skills/cc-agent/steps/step-00-init.md +134 -0
- package/templates/skills/cc-agent/steps/step-01-design.md +186 -0
- package/templates/skills/cc-agent/steps/step-02-generate.md +204 -0
- package/templates/skills/cc-agent/steps/step-03-validate.md +130 -0
- package/templates/skills/cc-agent/templates/agent-categorized.md +67 -0
- package/templates/skills/cc-agent/templates/agent-standalone.md +56 -0
- package/templates/skills/cc-agent/templates/agent-with-skills.md +94 -0
- package/templates/skills/cc-audit/SKILL.md +108 -0
- package/templates/skills/cc-audit/references/agent-checklist.md +91 -0
- package/templates/skills/cc-audit/references/hook-checklist.md +110 -0
- package/templates/skills/cc-audit/references/skill-checklist.md +70 -0
- package/templates/skills/cc-audit/steps/step-00-init.md +98 -0
- package/templates/skills/cc-audit/steps/step-01-scan.md +142 -0
- package/templates/skills/cc-audit/steps/step-02-analyze.md +158 -0
- package/templates/skills/cc-audit/steps/step-03-report.md +142 -0
- package/templates/skills/cc-skill/SKILL.md +134 -0
- package/templates/skills/cc-skill/references/best-practices.md +167 -0
- package/templates/skills/cc-skill/references/frontmatter-reference.md +182 -0
- package/templates/skills/cc-skill/references/skill-patterns.md +199 -0
- package/templates/skills/cc-skill/steps/step-00-init.md +119 -0
- package/templates/skills/cc-skill/steps/step-01-design.md +199 -0
- package/templates/skills/cc-skill/steps/step-02-generate.md +145 -0
- package/templates/skills/cc-skill/steps/step-03-steps.md +151 -0
- package/templates/skills/cc-skill/steps/step-04-validate.md +124 -0
- package/templates/skills/cc-skill/templates/skill-forked.md +85 -0
- package/templates/skills/cc-skill/templates/skill-progressive.md +102 -0
- package/templates/skills/cc-skill/templates/skill-simple.md +75 -0
- package/templates/skills/cc-skill/templates/step-template.md +82 -0
- package/templates/skills/check-version/SKILL.md +6 -0
- package/templates/skills/debug/SKILL.md +4 -0
- package/templates/skills/documentation/SKILL.md +1 -0
- package/templates/skills/efcore/SKILL.md +5 -0
- package/templates/skills/efcore/steps/db/step-deploy.md +26 -5
- package/templates/skills/efcore/steps/shared/step-00-init.md +21 -7
- package/templates/skills/explore/SKILL.md +28 -32
- package/templates/skills/feature-full/SKILL.md +1 -0
- package/templates/skills/gitflow/SKILL.md +8 -0
- package/templates/skills/gitflow/steps/step-start.md +45 -10
- package/templates/skills/mcp/SKILL.md +38 -18
- package/templates/skills/quick-search/SKILL.md +8 -1
- package/templates/skills/ralph-loop/SKILL.md +1 -1
- package/templates/skills/ralph-loop/steps/step-00-init.md +8 -68
- package/templates/skills/ralph-loop/steps/step-04-check.md +1 -1
- package/templates/skills/refactor/SKILL.md +1 -0
- package/templates/skills/review-code/SKILL.md +7 -1
- package/templates/skills/ui-components/SKILL.md +31 -438
- package/templates/skills/ui-components/accessibility.md +170 -0
- package/templates/skills/ui-components/patterns/data-table.md +39 -0
- package/templates/skills/ui-components/patterns/entity-card.md +77 -0
- package/templates/skills/ui-components/patterns/grid-layout.md +91 -0
- package/templates/skills/ui-components/patterns/kanban.md +43 -0
- package/templates/skills/ui-components/style-guide.md +86 -0
- package/templates/skills/utils/SKILL.md +1 -0
- package/templates/skills/validate/SKILL.md +1 -0
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
# Agent Frontmatter Reference
|
|
2
|
+
|
|
3
|
+
Complete reference for all agent .md YAML frontmatter fields, based on official Claude Code documentation.
|
|
4
|
+
|
|
5
|
+
Source: https://code.claude.com/docs/en/sub-agents
|
|
6
|
+
|
|
7
|
+
## Required Fields
|
|
8
|
+
|
|
9
|
+
### `name`
|
|
10
|
+
- **Type:** string
|
|
11
|
+
- **Required:** YES
|
|
12
|
+
- **Purpose:** Unique identifier for the agent. Used in `subagent_type` parameter of Task tool.
|
|
13
|
+
- **Examples:**
|
|
14
|
+
```yaml
|
|
15
|
+
name: code-reviewer
|
|
16
|
+
name: test-runner
|
|
17
|
+
name: db-migration
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### `description`
|
|
21
|
+
- **Type:** string (multi-line supported)
|
|
22
|
+
- **Required:** YES
|
|
23
|
+
- **Purpose:** Claude uses this to decide when to delegate tasks to this agent. Must be clear and specific.
|
|
24
|
+
- **Examples:**
|
|
25
|
+
```yaml
|
|
26
|
+
description: Expert code reviewer for PR analysis. Use when reviewing code changes for security, logic, clean code, or feature-specific behavior.
|
|
27
|
+
|
|
28
|
+
description: |
|
|
29
|
+
Fast agent specialized for exploring codebases.
|
|
30
|
+
Use this when you need to quickly find files by patterns,
|
|
31
|
+
search code for keywords, or answer questions about the codebase.
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Optional Fields
|
|
35
|
+
|
|
36
|
+
### `model`
|
|
37
|
+
- **Type:** string
|
|
38
|
+
- **Default:** inherit (uses parent's model)
|
|
39
|
+
- **Valid values:** haiku, sonnet, opus, inherit
|
|
40
|
+
- **Guidance:**
|
|
41
|
+
|
|
42
|
+
| Model | Best for | Cost | Speed |
|
|
43
|
+
|-------|----------|------|-------|
|
|
44
|
+
| `haiku` | Simple tasks, search, scan | Lowest | Fastest |
|
|
45
|
+
| `sonnet` | Most tasks, code generation | Medium | Medium |
|
|
46
|
+
| `opus` | Complex reasoning, planning | Highest | Slowest |
|
|
47
|
+
| `inherit` | When you don't want to override | Parent's | Parent's |
|
|
48
|
+
|
|
49
|
+
- **Example:**
|
|
50
|
+
```yaml
|
|
51
|
+
model: haiku
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### `tools`
|
|
55
|
+
- **Type:** string (comma-separated)
|
|
56
|
+
- **Default:** all tools inherited
|
|
57
|
+
- **Purpose:** Whitelist of tools this agent can use. If specified, ONLY these tools are available.
|
|
58
|
+
- **Example:**
|
|
59
|
+
```yaml
|
|
60
|
+
tools: "Read, Grep, Glob, Bash"
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### `disallowedTools`
|
|
64
|
+
- **Type:** string (comma-separated)
|
|
65
|
+
- **Default:** none
|
|
66
|
+
- **Purpose:** Blacklist of tools to remove from the agent's available tools.
|
|
67
|
+
- **Example:**
|
|
68
|
+
```yaml
|
|
69
|
+
disallowedTools: "Write, Edit, Bash"
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### `permissionMode`
|
|
73
|
+
- **Type:** string
|
|
74
|
+
- **Default:** default
|
|
75
|
+
- **Valid values:** default, acceptEdits, dontAsk, bypassPermissions, plan
|
|
76
|
+
- **Details:**
|
|
77
|
+
|
|
78
|
+
| Mode | Behavior | Risk Level |
|
|
79
|
+
|------|----------|------------|
|
|
80
|
+
| `default` | Standard permission prompts | Low |
|
|
81
|
+
| `acceptEdits` | Auto-accept file edit permissions | Medium |
|
|
82
|
+
| `dontAsk` | Auto-deny all permission prompts | Medium |
|
|
83
|
+
| `bypassPermissions` | Skip ALL permission checks | **HIGH** |
|
|
84
|
+
| `plan` | Read-only, no modifications | None |
|
|
85
|
+
|
|
86
|
+
- **Example:**
|
|
87
|
+
```yaml
|
|
88
|
+
permissionMode: acceptEdits
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### `skills`
|
|
92
|
+
- **Type:** list of strings
|
|
93
|
+
- **Default:** none
|
|
94
|
+
- **Purpose:** Skills to preload into the agent's context at startup. Full skill content is injected.
|
|
95
|
+
- **Example:**
|
|
96
|
+
```yaml
|
|
97
|
+
skills:
|
|
98
|
+
- review-code
|
|
99
|
+
- validate
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### `hooks`
|
|
103
|
+
- **Type:** object
|
|
104
|
+
- **Default:** none
|
|
105
|
+
- **Purpose:** Lifecycle hooks scoped to this agent only.
|
|
106
|
+
- **Example:**
|
|
107
|
+
```yaml
|
|
108
|
+
hooks:
|
|
109
|
+
PreToolUse:
|
|
110
|
+
- matcher: "Bash"
|
|
111
|
+
hooks:
|
|
112
|
+
- type: command
|
|
113
|
+
command: "./scripts/validate-command.sh"
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### `color`
|
|
117
|
+
- **Type:** string
|
|
118
|
+
- **Default:** none
|
|
119
|
+
- **Purpose:** Visual indicator color (displayed in some UI contexts).
|
|
120
|
+
- **Examples:** blue, yellow, purple, green, red, orange
|
|
121
|
+
|
|
122
|
+
## Available Tools
|
|
123
|
+
|
|
124
|
+
Tools that can be referenced in `tools` or `disallowedTools`:
|
|
125
|
+
|
|
126
|
+
### Core Tools
|
|
127
|
+
| Tool | Purpose |
|
|
128
|
+
|------|---------|
|
|
129
|
+
| `Read` | Read file contents |
|
|
130
|
+
| `Write` | Create/overwrite files |
|
|
131
|
+
| `Edit` | Edit existing files (find-and-replace) |
|
|
132
|
+
| `Bash` | Execute shell commands |
|
|
133
|
+
| `Glob` | Find files by pattern |
|
|
134
|
+
| `Grep` | Search file contents |
|
|
135
|
+
|
|
136
|
+
### Communication Tools
|
|
137
|
+
| Tool | Purpose |
|
|
138
|
+
|------|---------|
|
|
139
|
+
| `AskUserQuestion` | Ask user interactive questions |
|
|
140
|
+
| `TodoWrite` | Manage task lists |
|
|
141
|
+
|
|
142
|
+
### Agent Tools
|
|
143
|
+
| Tool | Purpose |
|
|
144
|
+
|------|---------|
|
|
145
|
+
| `Task` | Launch sub-agents |
|
|
146
|
+
| `Skill` | Invoke skills |
|
|
147
|
+
| `ToolSearch` | Discover deferred tools |
|
|
148
|
+
|
|
149
|
+
### Web Tools
|
|
150
|
+
| Tool | Purpose |
|
|
151
|
+
|------|---------|
|
|
152
|
+
| `WebFetch` | Fetch URL content |
|
|
153
|
+
| `WebSearch` | Search the web |
|
|
154
|
+
|
|
155
|
+
### Specialized Tools
|
|
156
|
+
| Tool | Purpose |
|
|
157
|
+
|------|---------|
|
|
158
|
+
| `NotebookEdit` | Edit Jupyter notebooks |
|
|
159
|
+
|
|
160
|
+
### MCP Tools
|
|
161
|
+
| Tool | Purpose |
|
|
162
|
+
|------|---------|
|
|
163
|
+
| `mcp__*` | Any MCP server tool (e.g., `mcp__smartstack__validate_conventions`) |
|
|
164
|
+
|
|
165
|
+
## Priority & Scope
|
|
166
|
+
|
|
167
|
+
Agents are loaded in priority order (higher overrides lower):
|
|
168
|
+
|
|
169
|
+
| Location | Priority | Scope |
|
|
170
|
+
|----------|----------|-------|
|
|
171
|
+
| `--agents` CLI flag | 1 (highest) | Session only |
|
|
172
|
+
| `.claude/agents/` | 2 | Project |
|
|
173
|
+
| `~/.claude/agents/` | 3 | User |
|
|
174
|
+
| Plugin agents | 4 (lowest) | Plugin |
|
|
175
|
+
|
|
176
|
+
## Examples
|
|
177
|
+
|
|
178
|
+
### Minimal Agent
|
|
179
|
+
```yaml
|
|
180
|
+
---
|
|
181
|
+
name: my-helper
|
|
182
|
+
description: Helps with basic tasks
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
You are a helpful assistant.
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### Read-Only Explorer
|
|
189
|
+
```yaml
|
|
190
|
+
---
|
|
191
|
+
name: codebase-explorer
|
|
192
|
+
description: Fast codebase search and analysis
|
|
193
|
+
model: haiku
|
|
194
|
+
tools: "Read, Grep, Glob"
|
|
195
|
+
permissionMode: plan
|
|
196
|
+
---
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
### Full-Featured Agent
|
|
200
|
+
```yaml
|
|
201
|
+
---
|
|
202
|
+
name: feature-builder
|
|
203
|
+
description: |
|
|
204
|
+
Builds complete features with tests.
|
|
205
|
+
Use when implementing new features from requirements.
|
|
206
|
+
model: sonnet
|
|
207
|
+
tools: "Read, Write, Edit, Bash, Grep, Glob"
|
|
208
|
+
permissionMode: acceptEdits
|
|
209
|
+
skills:
|
|
210
|
+
- validate
|
|
211
|
+
color: green
|
|
212
|
+
---
|
|
213
|
+
```
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# Permission Modes Reference
|
|
2
|
+
|
|
3
|
+
Complete reference for Claude Code agent permission modes.
|
|
4
|
+
|
|
5
|
+
Source: https://code.claude.com/docs/en/sub-agents
|
|
6
|
+
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
Permission modes control how an agent handles permission prompts (e.g., "Allow Edit to file?"). Choosing the right mode balances automation with safety.
|
|
10
|
+
|
|
11
|
+
## Modes
|
|
12
|
+
|
|
13
|
+
### `default`
|
|
14
|
+
- **Behavior:** Standard permission prompts for sensitive operations
|
|
15
|
+
- **User sees:** Permission dialogs for Write, Edit, Bash, etc.
|
|
16
|
+
- **Best for:** Interactive agents where user oversight is desired
|
|
17
|
+
- **Risk level:** Low
|
|
18
|
+
- **Example use cases:**
|
|
19
|
+
- General-purpose development agents
|
|
20
|
+
- Agents that might make unexpected changes
|
|
21
|
+
- First-time or untrusted agents
|
|
22
|
+
|
|
23
|
+
### `acceptEdits`
|
|
24
|
+
- **Behavior:** Auto-accept file edit permissions (Write, Edit)
|
|
25
|
+
- **User sees:** No prompts for file modifications; prompts still appear for Bash
|
|
26
|
+
- **Best for:** Code generation and modification agents
|
|
27
|
+
- **Risk level:** Medium
|
|
28
|
+
- **Example use cases:**
|
|
29
|
+
- Code scaffolding agents
|
|
30
|
+
- Refactoring agents
|
|
31
|
+
- File generation agents
|
|
32
|
+
|
|
33
|
+
### `dontAsk`
|
|
34
|
+
- **Behavior:** Auto-deny all permission prompts
|
|
35
|
+
- **User sees:** No prompts; sensitive operations silently fail
|
|
36
|
+
- **Best for:** Background tasks that should not interrupt the user
|
|
37
|
+
- **Risk level:** Medium (operations may fail silently)
|
|
38
|
+
- **Example use cases:**
|
|
39
|
+
- Background monitoring agents
|
|
40
|
+
- Read-only agents that might accidentally try to write
|
|
41
|
+
- Agents where failure is acceptable
|
|
42
|
+
|
|
43
|
+
### `bypassPermissions`
|
|
44
|
+
- **Behavior:** Skip ALL permission checks entirely
|
|
45
|
+
- **User sees:** Nothing; all operations proceed without any checks
|
|
46
|
+
- **Best for:** Fully trusted automation pipelines
|
|
47
|
+
- **Risk level:** **HIGH** - Use with extreme caution
|
|
48
|
+
- **Example use cases:**
|
|
49
|
+
- CI/CD pipeline agents
|
|
50
|
+
- Fully automated batch processing
|
|
51
|
+
- Testing harnesses
|
|
52
|
+
- **Warning:** This mode can execute ANY command without confirmation. Only use for agents you fully trust in controlled environments.
|
|
53
|
+
|
|
54
|
+
### `plan`
|
|
55
|
+
- **Behavior:** Read-only exploration mode; no modifications allowed
|
|
56
|
+
- **User sees:** No prompts; modification attempts are blocked
|
|
57
|
+
- **Best for:** Research and analysis agents
|
|
58
|
+
- **Risk level:** None
|
|
59
|
+
- **Example use cases:**
|
|
60
|
+
- Codebase exploration agents
|
|
61
|
+
- Documentation analysis agents
|
|
62
|
+
- Code review agents (read-only)
|
|
63
|
+
- Architecture analysis agents
|
|
64
|
+
|
|
65
|
+
## Decision Matrix
|
|
66
|
+
|
|
67
|
+
| Need | Mode |
|
|
68
|
+
|------|------|
|
|
69
|
+
| User should approve all changes | `default` |
|
|
70
|
+
| Agent modifies files autonomously | `acceptEdits` |
|
|
71
|
+
| Agent only reads, never writes | `plan` |
|
|
72
|
+
| Agent runs in background, no prompts | `dontAsk` |
|
|
73
|
+
| Full automation, no checks | `bypassPermissions` |
|
|
74
|
+
|
|
75
|
+
## Combining with Tools
|
|
76
|
+
|
|
77
|
+
Permission modes interact with the `tools` field:
|
|
78
|
+
|
|
79
|
+
| Scenario | Configuration |
|
|
80
|
+
|----------|---------------|
|
|
81
|
+
| Read-only agent | `permissionMode: plan` + `tools: "Read, Grep, Glob"` |
|
|
82
|
+
| File editor | `permissionMode: acceptEdits` + `tools: "Read, Write, Edit, Glob, Grep"` |
|
|
83
|
+
| Shell executor | `permissionMode: default` + `tools: "Bash, Read, Glob"` |
|
|
84
|
+
| Full automation | `permissionMode: bypassPermissions` + all tools |
|
|
85
|
+
|
|
86
|
+
## Best Practices
|
|
87
|
+
|
|
88
|
+
1. **Start with `default`** and escalate only if needed
|
|
89
|
+
2. **Use `plan` for research** - prevents accidental modifications
|
|
90
|
+
3. **Prefer `acceptEdits` over `bypassPermissions`** - still blocks dangerous Bash commands
|
|
91
|
+
4. **Never use `bypassPermissions` in production** without careful review
|
|
92
|
+
5. **Document why** a specific mode was chosen in the agent description
|
|
93
|
+
6. **Combine with tool restrictions** for defense in depth:
|
|
94
|
+
```yaml
|
|
95
|
+
# Safe: read-only mode + read-only tools
|
|
96
|
+
permissionMode: plan
|
|
97
|
+
tools: "Read, Grep, Glob"
|
|
98
|
+
|
|
99
|
+
# Dangerous: bypass + all tools (avoid)
|
|
100
|
+
permissionMode: bypassPermissions
|
|
101
|
+
# (no tools restriction = everything allowed)
|
|
102
|
+
```
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# Tools Reference
|
|
2
|
+
|
|
3
|
+
Complete reference of all tools available in Claude Code agents and skills.
|
|
4
|
+
|
|
5
|
+
Source: https://code.claude.com/docs/en/
|
|
6
|
+
|
|
7
|
+
## Core File Tools
|
|
8
|
+
|
|
9
|
+
### Read
|
|
10
|
+
- **Purpose:** Read file contents from the filesystem
|
|
11
|
+
- **Input:** file_path (absolute), optional offset and limit for large files
|
|
12
|
+
- **Capabilities:** Text files, images (PNG, JPG), PDFs, Jupyter notebooks
|
|
13
|
+
- **Risk:** None (read-only)
|
|
14
|
+
|
|
15
|
+
### Write
|
|
16
|
+
- **Purpose:** Create or overwrite files
|
|
17
|
+
- **Input:** file_path (absolute), content
|
|
18
|
+
- **Risk:** Medium (overwrites existing files)
|
|
19
|
+
- **Requirement:** Must Read file first if it exists
|
|
20
|
+
|
|
21
|
+
### Edit
|
|
22
|
+
- **Purpose:** Find-and-replace edits in existing files
|
|
23
|
+
- **Input:** file_path, old_string, new_string, optional replace_all
|
|
24
|
+
- **Risk:** Medium (modifies files)
|
|
25
|
+
- **Requirement:** Must Read file first; old_string must be unique
|
|
26
|
+
|
|
27
|
+
### Glob
|
|
28
|
+
- **Purpose:** Find files by glob pattern
|
|
29
|
+
- **Input:** pattern (e.g., `**/*.ts`), optional path
|
|
30
|
+
- **Risk:** None (read-only)
|
|
31
|
+
- **Use for:** File discovery by name pattern
|
|
32
|
+
|
|
33
|
+
### Grep
|
|
34
|
+
- **Purpose:** Search file contents using regex
|
|
35
|
+
- **Input:** pattern (regex), optional path, glob filter, output_mode
|
|
36
|
+
- **Risk:** None (read-only)
|
|
37
|
+
- **Use for:** Content search, finding implementations
|
|
38
|
+
|
|
39
|
+
## Execution Tools
|
|
40
|
+
|
|
41
|
+
### Bash
|
|
42
|
+
- **Purpose:** Execute shell commands
|
|
43
|
+
- **Input:** command, optional timeout, description
|
|
44
|
+
- **Risk:** High (can execute any command)
|
|
45
|
+
- **Notes:** Working directory persists, shell state does not
|
|
46
|
+
|
|
47
|
+
## Communication Tools
|
|
48
|
+
|
|
49
|
+
### AskUserQuestion
|
|
50
|
+
- **Purpose:** Ask the user interactive questions with options
|
|
51
|
+
- **Input:** questions array with options, headers, descriptions
|
|
52
|
+
- **Risk:** None (user interaction)
|
|
53
|
+
- **Notes:** Users can always select "Other" for custom input
|
|
54
|
+
|
|
55
|
+
### TodoWrite
|
|
56
|
+
- **Purpose:** Manage structured task lists
|
|
57
|
+
- **Input:** todos array with content, status, activeForm
|
|
58
|
+
- **Risk:** None (UI only)
|
|
59
|
+
|
|
60
|
+
## Agent Tools
|
|
61
|
+
|
|
62
|
+
### Task
|
|
63
|
+
- **Purpose:** Launch specialized sub-agents
|
|
64
|
+
- **Input:** prompt, subagent_type, optional model/max_turns
|
|
65
|
+
- **Risk:** Depends on agent configuration
|
|
66
|
+
- **Notes:** Agents run in isolated contexts
|
|
67
|
+
|
|
68
|
+
### Skill
|
|
69
|
+
- **Purpose:** Invoke skills (slash commands)
|
|
70
|
+
- **Input:** skill name, optional args
|
|
71
|
+
- **Risk:** Depends on skill
|
|
72
|
+
|
|
73
|
+
### ToolSearch
|
|
74
|
+
- **Purpose:** Discover and load deferred tools
|
|
75
|
+
- **Input:** query (keyword search or `select:tool_name`)
|
|
76
|
+
- **Risk:** None
|
|
77
|
+
|
|
78
|
+
## Web Tools
|
|
79
|
+
|
|
80
|
+
### WebFetch
|
|
81
|
+
- **Purpose:** Fetch and analyze web content
|
|
82
|
+
- **Input:** url, prompt
|
|
83
|
+
- **Risk:** None (read-only)
|
|
84
|
+
- **Notes:** Fails for authenticated URLs; use MCP tools instead
|
|
85
|
+
|
|
86
|
+
### WebSearch
|
|
87
|
+
- **Purpose:** Search the web
|
|
88
|
+
- **Input:** query, optional domain filters
|
|
89
|
+
- **Risk:** None (read-only)
|
|
90
|
+
|
|
91
|
+
## Specialized Tools
|
|
92
|
+
|
|
93
|
+
### NotebookEdit
|
|
94
|
+
- **Purpose:** Edit Jupyter notebook cells
|
|
95
|
+
- **Input:** notebook_path, cell_number, new_source
|
|
96
|
+
- **Risk:** Medium (modifies notebooks)
|
|
97
|
+
|
|
98
|
+
## MCP Tools
|
|
99
|
+
|
|
100
|
+
### Pattern: `mcp__{server}__{tool}`
|
|
101
|
+
- **Purpose:** Tools provided by MCP (Model Context Protocol) servers
|
|
102
|
+
- **Examples:**
|
|
103
|
+
- `mcp__smartstack__validate_conventions`
|
|
104
|
+
- `mcp__smartstack__scaffold_extension`
|
|
105
|
+
- `mcp__context7__query-docs`
|
|
106
|
+
- **Risk:** Varies by tool
|
|
107
|
+
- **Notes:** Must be loaded via ToolSearch first if deferred
|
|
108
|
+
|
|
109
|
+
## Tool Selection Guide
|
|
110
|
+
|
|
111
|
+
### By Risk Level
|
|
112
|
+
|
|
113
|
+
| Risk | Tools |
|
|
114
|
+
|------|-------|
|
|
115
|
+
| None | Read, Glob, Grep, WebFetch, WebSearch, AskUserQuestion, TodoWrite, ToolSearch |
|
|
116
|
+
| Medium | Write, Edit, NotebookEdit |
|
|
117
|
+
| High | Bash |
|
|
118
|
+
| Variable | Task, Skill, mcp__* |
|
|
119
|
+
|
|
120
|
+
### By Use Case
|
|
121
|
+
|
|
122
|
+
| Use Case | Recommended Tools |
|
|
123
|
+
|----------|-------------------|
|
|
124
|
+
| Exploration / Research | Read, Glob, Grep, WebSearch |
|
|
125
|
+
| Code Generation | Read, Write, Edit, Glob, Grep |
|
|
126
|
+
| Full Development | Read, Write, Edit, Bash, Glob, Grep |
|
|
127
|
+
| Testing | Bash, Read, Glob, Grep |
|
|
128
|
+
| Documentation | Read, Write, Glob, Grep, WebFetch |
|
|
129
|
+
| Validation | Read, Glob, Grep, mcp__* |
|
|
130
|
+
|
|
131
|
+
### Principle of Least Privilege
|
|
132
|
+
|
|
133
|
+
Always give agents the minimum tools needed:
|
|
134
|
+
|
|
135
|
+
```yaml
|
|
136
|
+
# Too broad
|
|
137
|
+
tools: "Read, Write, Edit, Bash, Glob, Grep, WebFetch, WebSearch, Task, Skill"
|
|
138
|
+
|
|
139
|
+
# Just right for an explorer
|
|
140
|
+
tools: "Read, Grep, Glob"
|
|
141
|
+
|
|
142
|
+
# Just right for a code modifier
|
|
143
|
+
tools: "Read, Write, Edit, Glob, Grep"
|
|
144
|
+
```
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: step-00-init
|
|
3
|
+
description: Parse subcommand, agent name, scope, category, and resolve target directory
|
|
4
|
+
next_step: steps/step-01-design.md
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Step 0: Initialization
|
|
8
|
+
|
|
9
|
+
## MANDATORY EXECUTION RULES:
|
|
10
|
+
- ALWAYS parse subcommand first (create or update)
|
|
11
|
+
- ALWAYS validate agent name uniqueness
|
|
12
|
+
- ALWAYS resolve target file path before proceeding
|
|
13
|
+
- For UPDATE: verify agent exists before continuing
|
|
14
|
+
|
|
15
|
+
## YOUR TASK:
|
|
16
|
+
Parse input arguments, validate the agent name, and resolve the target file path.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## EXECUTION SEQUENCE:
|
|
21
|
+
|
|
22
|
+
### 1. Parse Input
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
Arguments from $ARGUMENTS:
|
|
26
|
+
First word → {subcommand} ("create" or "update")
|
|
27
|
+
Second word → {agent_name} (unique identifier)
|
|
28
|
+
--scope X → {scope} (default: "project")
|
|
29
|
+
--category X → {category} (optional, for subdirectory)
|
|
30
|
+
|
|
31
|
+
Valid subcommands: create, update
|
|
32
|
+
Valid scopes: project, global, templates
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
If {subcommand} is missing or invalid:
|
|
36
|
+
|
|
37
|
+
```yaml
|
|
38
|
+
AskUserQuestion:
|
|
39
|
+
header: "Action"
|
|
40
|
+
question: "What do you want to do?"
|
|
41
|
+
options:
|
|
42
|
+
- label: "Create"
|
|
43
|
+
description: "Create a new agent from scratch"
|
|
44
|
+
- label: "Update"
|
|
45
|
+
description: "Update an existing agent"
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### 2. Validate Agent Name
|
|
49
|
+
|
|
50
|
+
If {agent_name} missing:
|
|
51
|
+
|
|
52
|
+
```yaml
|
|
53
|
+
AskUserQuestion:
|
|
54
|
+
header: "Name"
|
|
55
|
+
question: "What is the agent name? (unique identifier, kebab-case)"
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Validation rules:
|
|
59
|
+
- Kebab-case recommended (hyphens, no spaces)
|
|
60
|
+
- Must be unique within scope
|
|
61
|
+
- Must not conflict with built-in agents (Explore, Plan, general-purpose, Bash)
|
|
62
|
+
|
|
63
|
+
### 3. Resolve Target Path
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
Based on {scope} and {category}:
|
|
67
|
+
|
|
68
|
+
"project" →
|
|
69
|
+
No category: {target_path} = "{cwd}/.claude/agents/{agent_name}.md"
|
|
70
|
+
With category: {target_path} = "{cwd}/.claude/agents/{category}/{agent_name}.md"
|
|
71
|
+
|
|
72
|
+
"global" →
|
|
73
|
+
No category: {target_path} = "~/.claude/agents/{agent_name}.md"
|
|
74
|
+
With category: {target_path} = "~/.claude/agents/{category}/{agent_name}.md"
|
|
75
|
+
|
|
76
|
+
"templates" →
|
|
77
|
+
No category: {target_path} = "{cwd}/templates/agents/{agent_name}.md"
|
|
78
|
+
With category: {target_path} = "{cwd}/templates/agents/{category}/{agent_name}.md"
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### 4. Check Existing
|
|
82
|
+
|
|
83
|
+
**For CREATE:**
|
|
84
|
+
- Verify {target_path} does NOT already exist
|
|
85
|
+
- If exists: warn and ask to overwrite or switch to update
|
|
86
|
+
|
|
87
|
+
**For UPDATE:**
|
|
88
|
+
- Verify {target_path} exists
|
|
89
|
+
- If missing: search for agent in other locations, suggest correct path
|
|
90
|
+
- If found: read file and extract current frontmatter
|
|
91
|
+
|
|
92
|
+
### 5. List Existing Agents (for context)
|
|
93
|
+
|
|
94
|
+
Scan the target scope for existing agents:
|
|
95
|
+
```
|
|
96
|
+
Glob: "{target_dir}/*.md"
|
|
97
|
+
Glob: "{target_dir}/**/*.md"
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Display:
|
|
101
|
+
```
|
|
102
|
+
Existing agents in {scope}:
|
|
103
|
+
| Name | Category | Model |
|
|
104
|
+
|------|----------|-------|
|
|
105
|
+
| {name} | {cat} | {model} |
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### 6. Show Summary
|
|
109
|
+
|
|
110
|
+
```
|
|
111
|
+
Agent Configuration:
|
|
112
|
+
|
|
113
|
+
| Setting | Value |
|
|
114
|
+
|---------|-------|
|
|
115
|
+
| Action | {subcommand} |
|
|
116
|
+
| Name | {agent_name} |
|
|
117
|
+
| Scope | {scope} |
|
|
118
|
+
| Category | {category} |
|
|
119
|
+
| Target | {target_path} |
|
|
120
|
+
|
|
121
|
+
→ Designing agent...
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## SUCCESS METRICS:
|
|
127
|
+
- Subcommand correctly identified
|
|
128
|
+
- Agent name validated (unique, not built-in)
|
|
129
|
+
- Target path resolved and checked
|
|
130
|
+
- Existing agents listed for context
|
|
131
|
+
- Summary displayed
|
|
132
|
+
|
|
133
|
+
## NEXT STEP:
|
|
134
|
+
After showing summary, proceed directly to `./step-01-design.md`
|