@atlashub/smartstack-cli 1.4.0 → 1.5.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/.documentation/agents.html +8 -4
- package/.documentation/apex.html +8 -4
- package/.documentation/business-analyse.html +833 -406
- package/.documentation/commands.html +8 -4
- package/.documentation/css/styles.css +153 -15
- package/.documentation/efcore.html +8 -4
- package/.documentation/gitflow.html +795 -230
- package/.documentation/hooks.html +8 -4
- package/.documentation/index.html +13 -9
- package/.documentation/installation.html +23 -19
- package/.documentation/ralph-loop.html +530 -0
- package/.documentation/test-web.html +8 -4
- package/README.md +52 -10
- package/dist/index.js +813 -283
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/templates/agents/efcore/conflicts.md +44 -17
- package/templates/agents/efcore/db-status.md +27 -6
- package/templates/agents/efcore/scan.md +43 -13
- package/templates/commands/ai-prompt.md +315 -315
- package/templates/commands/application/create.md +362 -362
- package/templates/commands/controller/create.md +216 -216
- package/templates/commands/controller.md +59 -0
- package/templates/commands/create/agent.md +138 -0
- package/templates/commands/create/command.md +166 -0
- package/templates/commands/create/hook.md +234 -0
- package/templates/commands/create/plugin.md +329 -0
- package/templates/commands/create/project.md +507 -0
- package/templates/commands/create/skill.md +199 -0
- package/templates/commands/create.md +220 -0
- package/templates/commands/documentation/module.md +202 -202
- package/templates/commands/efcore/_env-check.md +153 -153
- package/templates/commands/efcore/conflicts.md +109 -192
- package/templates/commands/efcore/db-status.md +101 -89
- package/templates/commands/efcore/migration.md +23 -11
- package/templates/commands/efcore/scan.md +115 -119
- package/templates/commands/efcore.md +54 -6
- package/templates/commands/feature-full.md +267 -267
- package/templates/commands/gitflow/11-finish.md +145 -11
- package/templates/commands/gitflow/13-sync.md +216 -216
- package/templates/commands/gitflow/14-rebase.md +251 -251
- package/templates/commands/gitflow/2-status.md +120 -10
- package/templates/commands/gitflow/3-commit.md +150 -0
- package/templates/commands/gitflow/7-pull-request.md +134 -5
- package/templates/commands/gitflow/9-merge.md +142 -1
- package/templates/commands/implement.md +663 -663
- package/templates/commands/init.md +562 -0
- package/templates/commands/mcp-integration.md +330 -0
- package/templates/commands/notification.md +129 -129
- package/templates/commands/validate.md +233 -0
- package/templates/commands/workflow.md +193 -193
- package/templates/skills/ai-prompt/SKILL.md +778 -778
- package/templates/skills/application/SKILL.md +563 -563
- package/templates/skills/application/templates-backend.md +450 -450
- package/templates/skills/application/templates-frontend.md +531 -531
- package/templates/skills/application/templates-i18n.md +520 -520
- package/templates/skills/application/templates-seed.md +647 -647
- package/templates/skills/controller/SKILL.md +240 -240
- package/templates/skills/controller/postman-templates.md +614 -614
- package/templates/skills/controller/templates.md +1468 -1468
- package/templates/skills/documentation/SKILL.md +133 -133
- package/templates/skills/documentation/templates.md +476 -476
- package/templates/skills/feature-full/SKILL.md +838 -838
- package/templates/skills/notification/SKILL.md +555 -555
- package/templates/skills/ui-components/SKILL.md +870 -870
- package/templates/skills/workflow/SKILL.md +582 -582
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Create a SmartStack command extension project
|
|
3
|
+
argument-hint: <name> [description]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Create Command Extension
|
|
7
|
+
|
|
8
|
+
Scaffold a complete SmartStack **command** extension project.
|
|
9
|
+
|
|
10
|
+
## What is a Command?
|
|
11
|
+
|
|
12
|
+
A command is a slash command that users invoke in Claude Code:
|
|
13
|
+
- `/my-command <args>` - Executes the command with arguments
|
|
14
|
+
- Defined in markdown with YAML frontmatter
|
|
15
|
+
- Contains workflow, rules, and execution logic
|
|
16
|
+
|
|
17
|
+
## Arguments
|
|
18
|
+
|
|
19
|
+
Parse from `$ARGUMENTS`:
|
|
20
|
+
- **name** (required): Command name in kebab-case
|
|
21
|
+
- **description** (optional): What the command does
|
|
22
|
+
|
|
23
|
+
## Project Structure
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
smartstack-{name}/
|
|
27
|
+
├── package.json
|
|
28
|
+
├── tsconfig.json
|
|
29
|
+
├── tsup.config.ts
|
|
30
|
+
├── README.md
|
|
31
|
+
├── .gitignore
|
|
32
|
+
├── src/
|
|
33
|
+
│ └── index.ts
|
|
34
|
+
└── templates/
|
|
35
|
+
└── commands/
|
|
36
|
+
└── {name}.md # Main command template
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Generated Command Template
|
|
40
|
+
|
|
41
|
+
Create `templates/commands/{name}.md`:
|
|
42
|
+
|
|
43
|
+
```markdown
|
|
44
|
+
---
|
|
45
|
+
description: {description}
|
|
46
|
+
argument-hint: <task-description>
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
# {PascalCaseName}
|
|
50
|
+
|
|
51
|
+
{description}
|
|
52
|
+
|
|
53
|
+
## Workflow
|
|
54
|
+
|
|
55
|
+
### 1. UNDERSTAND
|
|
56
|
+
- Parse user arguments: `$ARGUMENTS`
|
|
57
|
+
- Identify the task scope
|
|
58
|
+
- Gather necessary context
|
|
59
|
+
|
|
60
|
+
### 2. ANALYZE
|
|
61
|
+
- Explore relevant codebase areas
|
|
62
|
+
- Identify patterns and constraints
|
|
63
|
+
- Document findings
|
|
64
|
+
|
|
65
|
+
### 3. PLAN
|
|
66
|
+
- Design the approach
|
|
67
|
+
- Consider edge cases
|
|
68
|
+
- Validate against requirements
|
|
69
|
+
|
|
70
|
+
### 4. EXECUTE
|
|
71
|
+
- Implement step by step
|
|
72
|
+
- Follow existing patterns
|
|
73
|
+
- Write clean code
|
|
74
|
+
|
|
75
|
+
### 5. VERIFY
|
|
76
|
+
- Test the implementation
|
|
77
|
+
- Ensure no regressions
|
|
78
|
+
- Validate completeness
|
|
79
|
+
|
|
80
|
+
## Execution Rules
|
|
81
|
+
|
|
82
|
+
1. **ULTRA THINK** before each phase
|
|
83
|
+
2. Use parallel agents when beneficial
|
|
84
|
+
3. Document all decisions
|
|
85
|
+
4. **MINIMAL CHANGES**: Only what's needed
|
|
86
|
+
5. Test before declaring complete
|
|
87
|
+
|
|
88
|
+
## Agent Usage
|
|
89
|
+
|
|
90
|
+
For exploration, launch agents:
|
|
91
|
+
- `explore-codebase` - Find relevant files
|
|
92
|
+
- `websearch` - Research solutions
|
|
93
|
+
|
|
94
|
+
## Priority
|
|
95
|
+
|
|
96
|
+
Understanding > Correctness > Speed
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
User: $ARGUMENTS
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Generated Files
|
|
104
|
+
|
|
105
|
+
### package.json
|
|
106
|
+
|
|
107
|
+
```json
|
|
108
|
+
{
|
|
109
|
+
"name": "@smartstack/{name}",
|
|
110
|
+
"version": "1.0.0",
|
|
111
|
+
"description": "{description}",
|
|
112
|
+
"private": false,
|
|
113
|
+
"type": "module",
|
|
114
|
+
"main": "./dist/index.js",
|
|
115
|
+
"files": ["dist", "templates"],
|
|
116
|
+
"scripts": {
|
|
117
|
+
"build": "tsup",
|
|
118
|
+
"dev": "tsup --watch"
|
|
119
|
+
},
|
|
120
|
+
"peerDependencies": {
|
|
121
|
+
"@atlashub/smartstack-cli": ">=1.0.0"
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### src/index.ts
|
|
127
|
+
|
|
128
|
+
```typescript
|
|
129
|
+
import * as path from 'path';
|
|
130
|
+
import * as fs from 'fs';
|
|
131
|
+
|
|
132
|
+
export function getTemplatesPath(): string {
|
|
133
|
+
return path.join(__dirname, '..', 'templates');
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export async function install(targetDir: string): Promise<void> {
|
|
137
|
+
const src = path.join(getTemplatesPath(), 'commands');
|
|
138
|
+
const dest = path.join(targetDir, 'commands');
|
|
139
|
+
// Copy command templates
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export const metadata = {
|
|
143
|
+
name: '{name}',
|
|
144
|
+
version: '1.0.0',
|
|
145
|
+
description: '{description}',
|
|
146
|
+
type: 'command'
|
|
147
|
+
};
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
## Workflow
|
|
151
|
+
|
|
152
|
+
1. Parse name and description from `$ARGUMENTS`
|
|
153
|
+
2. Validate name is kebab-case
|
|
154
|
+
3. Create project directory
|
|
155
|
+
4. Generate all files using Write tool
|
|
156
|
+
5. Display success message with next steps
|
|
157
|
+
|
|
158
|
+
## Validation
|
|
159
|
+
|
|
160
|
+
- Name must match: `^[a-z][a-z0-9-]*$`
|
|
161
|
+
- Directory must not exist
|
|
162
|
+
- Description should be meaningful
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
User: $ARGUMENTS
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Create a SmartStack hook extension project
|
|
3
|
+
argument-hint: <name> [trigger] [description]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Create Hook Extension
|
|
7
|
+
|
|
8
|
+
Scaffold a complete SmartStack **hook** extension project.
|
|
9
|
+
|
|
10
|
+
## What is a Hook?
|
|
11
|
+
|
|
12
|
+
A hook is a validation/action trigger:
|
|
13
|
+
- Runs automatically at specific points (pre-commit, pre-merge, etc.)
|
|
14
|
+
- Can block operations if issues detected
|
|
15
|
+
- Defined in markdown with detection patterns
|
|
16
|
+
- Integrates with GitFlow workflow
|
|
17
|
+
|
|
18
|
+
## Arguments
|
|
19
|
+
|
|
20
|
+
Parse from `$ARGUMENTS`:
|
|
21
|
+
- **name** (required): Hook name in kebab-case
|
|
22
|
+
- **trigger** (optional): pre-commit | pre-merge | pre-push | post-commit
|
|
23
|
+
- **description** (optional): What the hook validates
|
|
24
|
+
|
|
25
|
+
## Project Structure
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
smartstack-{name}/
|
|
29
|
+
├── package.json
|
|
30
|
+
├── tsconfig.json
|
|
31
|
+
├── tsup.config.ts
|
|
32
|
+
├── README.md
|
|
33
|
+
├── .gitignore
|
|
34
|
+
├── src/
|
|
35
|
+
│ └── index.ts
|
|
36
|
+
└── templates/
|
|
37
|
+
└── hooks/
|
|
38
|
+
└── {name}.md # Hook template
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Generated Hook Template
|
|
42
|
+
|
|
43
|
+
```markdown
|
|
44
|
+
---
|
|
45
|
+
description: {description}
|
|
46
|
+
trigger: {trigger}
|
|
47
|
+
blocking: true
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
# {PascalCaseName} Hook
|
|
51
|
+
|
|
52
|
+
{description}
|
|
53
|
+
|
|
54
|
+
## Purpose
|
|
55
|
+
|
|
56
|
+
This hook validates [what it validates] before allowing [the action].
|
|
57
|
+
|
|
58
|
+
## Trigger Points
|
|
59
|
+
|
|
60
|
+
| Trigger | When | Blocking |
|
|
61
|
+
|---------|------|----------|
|
|
62
|
+
| pre-commit | Before git commit | Yes |
|
|
63
|
+
| pre-merge | Before branch merge | Yes |
|
|
64
|
+
| pre-push | Before git push | Yes |
|
|
65
|
+
| post-commit | After git commit | No |
|
|
66
|
+
|
|
67
|
+
Current trigger: **{trigger}**
|
|
68
|
+
|
|
69
|
+
## Detection Patterns
|
|
70
|
+
|
|
71
|
+
### BLOCKING Patterns
|
|
72
|
+
|
|
73
|
+
These patterns will **prevent** the operation:
|
|
74
|
+
|
|
75
|
+
| Pattern | File Types | Risk Level | Reason |
|
|
76
|
+
|---------|-----------|------------|--------|
|
|
77
|
+
| `PATTERN_ONE` | *.ts, *.js | Critical | Description |
|
|
78
|
+
| `PATTERN_TWO` | *.sql | High | Description |
|
|
79
|
+
| `PATTERN_THREE` | * | Medium | Description |
|
|
80
|
+
|
|
81
|
+
### WARNING Patterns
|
|
82
|
+
|
|
83
|
+
These patterns will **warn** but allow:
|
|
84
|
+
|
|
85
|
+
| Pattern | File Types | Reason |
|
|
86
|
+
|---------|-----------|--------|
|
|
87
|
+
| `WARN_PATTERN` | *.ts | Description |
|
|
88
|
+
|
|
89
|
+
## Detection Script
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
#!/bin/bash
|
|
93
|
+
# {PascalCaseName} Hook
|
|
94
|
+
# {description}
|
|
95
|
+
|
|
96
|
+
set -e
|
|
97
|
+
|
|
98
|
+
echo "🔍 Running {name} check..."
|
|
99
|
+
|
|
100
|
+
# Configuration
|
|
101
|
+
BLOCKING_PATTERNS=(
|
|
102
|
+
"PATTERN_ONE"
|
|
103
|
+
"PATTERN_TWO"
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
WARNING_PATTERNS=(
|
|
107
|
+
"WARN_PATTERN"
|
|
108
|
+
)
|
|
109
|
+
|
|
110
|
+
FILE_TYPES="*.ts *.js *.tsx *.jsx"
|
|
111
|
+
|
|
112
|
+
FOUND_BLOCKING=0
|
|
113
|
+
FOUND_WARNING=0
|
|
114
|
+
|
|
115
|
+
# Check blocking patterns
|
|
116
|
+
for pattern in "${BLOCKING_PATTERNS[@]}"; do
|
|
117
|
+
if grep -rn "$pattern" --include="$FILE_TYPES" . 2>/dev/null; then
|
|
118
|
+
echo "❌ BLOCKING: Found '$pattern'"
|
|
119
|
+
FOUND_BLOCKING=$((FOUND_BLOCKING + 1))
|
|
120
|
+
fi
|
|
121
|
+
done
|
|
122
|
+
|
|
123
|
+
# Check warning patterns
|
|
124
|
+
for pattern in "${WARNING_PATTERNS[@]}"; do
|
|
125
|
+
if grep -rn "$pattern" --include="$FILE_TYPES" . 2>/dev/null; then
|
|
126
|
+
echo "⚠️ WARNING: Found '$pattern'"
|
|
127
|
+
FOUND_WARNING=$((FOUND_WARNING + 1))
|
|
128
|
+
fi
|
|
129
|
+
done
|
|
130
|
+
|
|
131
|
+
# Results
|
|
132
|
+
if [ $FOUND_BLOCKING -gt 0 ]; then
|
|
133
|
+
echo ""
|
|
134
|
+
echo "╔═══════════════════════════════════════════╗"
|
|
135
|
+
echo "║ ❌ HOOK BLOCKED: $FOUND_BLOCKING issues found ║"
|
|
136
|
+
echo "╚═══════════════════════════════════════════╝"
|
|
137
|
+
echo ""
|
|
138
|
+
echo "Fix the issues above or bypass with:"
|
|
139
|
+
echo " SKIP_{NAME_UPPER}_HOOK=1 git commit -m 'message'"
|
|
140
|
+
exit 1
|
|
141
|
+
fi
|
|
142
|
+
|
|
143
|
+
if [ $FOUND_WARNING -gt 0 ]; then
|
|
144
|
+
echo ""
|
|
145
|
+
echo "⚠️ $FOUND_WARNING warnings found (non-blocking)"
|
|
146
|
+
fi
|
|
147
|
+
|
|
148
|
+
echo "✅ Hook PASSED"
|
|
149
|
+
exit 0
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
## Integration
|
|
153
|
+
|
|
154
|
+
### With GitFlow
|
|
155
|
+
|
|
156
|
+
In `/gitflow:3-commit`, this hook runs automatically:
|
|
157
|
+
|
|
158
|
+
1. User initiates commit
|
|
159
|
+
2. Hook executes detection script
|
|
160
|
+
3. If blocking patterns found → commit rejected
|
|
161
|
+
4. User must fix or explicitly bypass
|
|
162
|
+
|
|
163
|
+
### Manual Execution
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
# Run hook manually
|
|
167
|
+
./.claude/hooks/{name}.sh
|
|
168
|
+
|
|
169
|
+
# Check specific files
|
|
170
|
+
./.claude/hooks/{name}.sh src/specific-file.ts
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
## Bypass (Emergency Only)
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
# Use with extreme caution!
|
|
177
|
+
SKIP_{NAME_UPPER}_HOOK=1 git commit -m "message"
|
|
178
|
+
|
|
179
|
+
# Or in environment
|
|
180
|
+
export SKIP_{NAME_UPPER}_HOOK=1
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
**WARNING**: Bypassing should be documented and justified.
|
|
184
|
+
|
|
185
|
+
## Logging
|
|
186
|
+
|
|
187
|
+
All detections logged to:
|
|
188
|
+
`~/.claude/gitflow/logs/{name}.json`
|
|
189
|
+
|
|
190
|
+
```json
|
|
191
|
+
{
|
|
192
|
+
"timestamp": "2024-01-15T10:30:00Z",
|
|
193
|
+
"hook": "{name}",
|
|
194
|
+
"trigger": "{trigger}",
|
|
195
|
+
"result": "blocked|passed|warning",
|
|
196
|
+
"blocking_issues": [],
|
|
197
|
+
"warnings": [],
|
|
198
|
+
"branch": "feature/xxx",
|
|
199
|
+
"user": "username"
|
|
200
|
+
}
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
## Customization
|
|
204
|
+
|
|
205
|
+
Edit patterns in the hook file:
|
|
206
|
+
- Add new blocking patterns
|
|
207
|
+
- Adjust file type filters
|
|
208
|
+
- Customize error messages
|
|
209
|
+
|
|
210
|
+
## Priority
|
|
211
|
+
|
|
212
|
+
Security > Correctness > Speed
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
## Trigger Options
|
|
216
|
+
|
|
217
|
+
| Trigger | Use Case |
|
|
218
|
+
|---------|----------|
|
|
219
|
+
| `pre-commit` | Validate before local commit |
|
|
220
|
+
| `pre-merge` | Validate before branch merge |
|
|
221
|
+
| `pre-push` | Validate before pushing to remote |
|
|
222
|
+
| `post-commit` | Log/notify after commit |
|
|
223
|
+
|
|
224
|
+
## Workflow
|
|
225
|
+
|
|
226
|
+
1. Parse arguments (name, trigger, description)
|
|
227
|
+
2. Validate name format
|
|
228
|
+
3. Create project directory
|
|
229
|
+
4. Generate hook template with proper trigger
|
|
230
|
+
5. Display success message
|
|
231
|
+
|
|
232
|
+
---
|
|
233
|
+
|
|
234
|
+
User: $ARGUMENTS
|
|
@@ -0,0 +1,329 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Create a complete SmartStack plugin with all extension types
|
|
3
|
+
argument-hint: <name> [description]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Create Plugin Extension
|
|
7
|
+
|
|
8
|
+
Scaffold a complete SmartStack **plugin** with command, agent, skill, and hook.
|
|
9
|
+
|
|
10
|
+
## What is a Plugin?
|
|
11
|
+
|
|
12
|
+
A plugin is a full-featured extension package containing:
|
|
13
|
+
- **Command**: Main entry point for users
|
|
14
|
+
- **Agent**: Specialized execution unit
|
|
15
|
+
- **Skill**: Multi-phase workflow
|
|
16
|
+
- **Hook**: Validation trigger
|
|
17
|
+
|
|
18
|
+
## Arguments
|
|
19
|
+
|
|
20
|
+
Parse from `$ARGUMENTS`:
|
|
21
|
+
- **name** (required): Plugin name in kebab-case
|
|
22
|
+
- **description** (optional): What the plugin does
|
|
23
|
+
|
|
24
|
+
## Project Structure
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
smartstack-{name}/
|
|
28
|
+
├── package.json
|
|
29
|
+
├── tsconfig.json
|
|
30
|
+
├── tsup.config.ts
|
|
31
|
+
├── README.md
|
|
32
|
+
├── .gitignore
|
|
33
|
+
├── LICENSE
|
|
34
|
+
├── src/
|
|
35
|
+
│ └── index.ts
|
|
36
|
+
├── templates/
|
|
37
|
+
│ ├── commands/
|
|
38
|
+
│ │ ├── {name}.md # Main command
|
|
39
|
+
│ │ └── {name}/
|
|
40
|
+
│ │ ├── analyze.md # Sub-command
|
|
41
|
+
│ │ └── execute.md # Sub-command
|
|
42
|
+
│ ├── agents/
|
|
43
|
+
│ │ └── {name}.md # Plugin agent
|
|
44
|
+
│ ├── skills/
|
|
45
|
+
│ │ └── {name}/
|
|
46
|
+
│ │ ├── SKILL.md # Skill definition
|
|
47
|
+
│ │ ├── 1-setup.md
|
|
48
|
+
│ │ ├── 2-analyze.md
|
|
49
|
+
│ │ ├── 3-execute.md
|
|
50
|
+
│ │ └── templates.md
|
|
51
|
+
│ └── hooks/
|
|
52
|
+
│ └── {name}-check.md # Plugin hook
|
|
53
|
+
└── examples/
|
|
54
|
+
└── usage.md # Usage examples
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Generated Files
|
|
58
|
+
|
|
59
|
+
### Main Command (templates/commands/{name}.md)
|
|
60
|
+
|
|
61
|
+
```markdown
|
|
62
|
+
---
|
|
63
|
+
description: {description}
|
|
64
|
+
argument-hint: <task> [options]
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
# {PascalCaseName}
|
|
68
|
+
|
|
69
|
+
{description}
|
|
70
|
+
|
|
71
|
+
## Available Sub-Commands
|
|
72
|
+
|
|
73
|
+
| Command | Description |
|
|
74
|
+
|---------|-------------|
|
|
75
|
+
| `/{name}` | Run default workflow |
|
|
76
|
+
| `/{name}:analyze` | Analysis only |
|
|
77
|
+
| `/{name}:execute` | Execution only |
|
|
78
|
+
|
|
79
|
+
## Quick Start
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
/{name} <your-task>
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Workflow
|
|
86
|
+
|
|
87
|
+
### 1. ANALYZE
|
|
88
|
+
Launch `{name}` agent for exploration.
|
|
89
|
+
|
|
90
|
+
### 2. PLAN
|
|
91
|
+
Design approach based on analysis.
|
|
92
|
+
|
|
93
|
+
### 3. EXECUTE
|
|
94
|
+
Implement using skill phases.
|
|
95
|
+
|
|
96
|
+
### 4. VALIDATE
|
|
97
|
+
Verify with `{name}-check` hook.
|
|
98
|
+
|
|
99
|
+
## Priority
|
|
100
|
+
|
|
101
|
+
Quality > Speed > Cost
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
User: $ARGUMENTS
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### Plugin Agent (templates/agents/{name}.md)
|
|
109
|
+
|
|
110
|
+
```markdown
|
|
111
|
+
---
|
|
112
|
+
name: {name}
|
|
113
|
+
description: Agent for {name} operations
|
|
114
|
+
color: cyan
|
|
115
|
+
model: sonnet
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
# {PascalCaseName} Agent
|
|
119
|
+
|
|
120
|
+
Specialized agent for {name} analysis and execution.
|
|
121
|
+
|
|
122
|
+
## Capabilities
|
|
123
|
+
|
|
124
|
+
1. **Discovery**: Find relevant files and patterns
|
|
125
|
+
2. **Analysis**: Deep code analysis
|
|
126
|
+
3. **Recommendations**: Actionable suggestions
|
|
127
|
+
|
|
128
|
+
## Search Strategy
|
|
129
|
+
|
|
130
|
+
1. Use `Glob` for file discovery
|
|
131
|
+
2. Use `Grep` for pattern matching
|
|
132
|
+
3. Use `Read` for detailed analysis
|
|
133
|
+
|
|
134
|
+
## Output Format
|
|
135
|
+
|
|
136
|
+
### Analysis Report
|
|
137
|
+
|
|
138
|
+
#### Files Analyzed
|
|
139
|
+
[List of relevant files]
|
|
140
|
+
|
|
141
|
+
#### Findings
|
|
142
|
+
[Detailed findings]
|
|
143
|
+
|
|
144
|
+
#### Recommendations
|
|
145
|
+
[Actionable recommendations]
|
|
146
|
+
|
|
147
|
+
## Priority
|
|
148
|
+
|
|
149
|
+
Accuracy > Completeness > Speed
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### Plugin Skill (templates/skills/{name}/SKILL.md)
|
|
153
|
+
|
|
154
|
+
```markdown
|
|
155
|
+
---
|
|
156
|
+
name: {name}
|
|
157
|
+
description: Multi-phase workflow for {name}
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
# {PascalCaseName} Skill
|
|
161
|
+
|
|
162
|
+
## Phases
|
|
163
|
+
|
|
164
|
+
| Phase | Command | Model | Cost |
|
|
165
|
+
|-------|---------|-------|------|
|
|
166
|
+
| 1 | `/{name}:1-setup` | Haiku | ~$0.02 |
|
|
167
|
+
| 2 | `/{name}:2-analyze` | Sonnet | ~$0.10 |
|
|
168
|
+
| 3 | `/{name}:3-execute` | Opus | ~$0.30 |
|
|
169
|
+
|
|
170
|
+
## Workflow
|
|
171
|
+
|
|
172
|
+
```
|
|
173
|
+
┌──────────┐ ┌──────────┐ ┌──────────┐
|
|
174
|
+
│ SETUP │ ──▶ │ ANALYZE │ ──▶ │ EXECUTE │
|
|
175
|
+
└──────────┘ └──────────┘ └──────────┘
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
## Usage
|
|
179
|
+
|
|
180
|
+
```
|
|
181
|
+
/{name} # Full workflow
|
|
182
|
+
/{name}:1-setup # Setup only
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
## Priority
|
|
186
|
+
|
|
187
|
+
Quality > Cost > Speed
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
### Plugin Hook (templates/hooks/{name}-check.md)
|
|
191
|
+
|
|
192
|
+
```markdown
|
|
193
|
+
---
|
|
194
|
+
description: Validation hook for {name}
|
|
195
|
+
trigger: pre-commit
|
|
196
|
+
blocking: true
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
# {PascalCaseName} Check Hook
|
|
200
|
+
|
|
201
|
+
Validates {name} operations before commit.
|
|
202
|
+
|
|
203
|
+
## Patterns
|
|
204
|
+
|
|
205
|
+
### BLOCKING
|
|
206
|
+
- `DANGEROUS_PATTERN` - Prevents commit
|
|
207
|
+
|
|
208
|
+
### WARNING
|
|
209
|
+
- `MILD_CONCERN` - Logs warning
|
|
210
|
+
|
|
211
|
+
## Integration
|
|
212
|
+
|
|
213
|
+
Runs automatically in `/gitflow:3-commit`.
|
|
214
|
+
|
|
215
|
+
## Bypass
|
|
216
|
+
|
|
217
|
+
```bash
|
|
218
|
+
SKIP_{NAME_UPPER}_CHECK_HOOK=1 git commit
|
|
219
|
+
```
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
### package.json
|
|
223
|
+
|
|
224
|
+
```json
|
|
225
|
+
{
|
|
226
|
+
"name": "@smartstack/{name}",
|
|
227
|
+
"version": "1.0.0",
|
|
228
|
+
"description": "{description}",
|
|
229
|
+
"author": "AtlasHub",
|
|
230
|
+
"license": "MIT",
|
|
231
|
+
"type": "module",
|
|
232
|
+
"main": "./dist/index.js",
|
|
233
|
+
"files": ["dist", "templates"],
|
|
234
|
+
"scripts": {
|
|
235
|
+
"build": "tsup",
|
|
236
|
+
"dev": "tsup --watch"
|
|
237
|
+
},
|
|
238
|
+
"peerDependencies": {
|
|
239
|
+
"@atlashub/smartstack-cli": ">=1.0.0"
|
|
240
|
+
},
|
|
241
|
+
"keywords": ["smartstack", "claude", "extension", "{name}"]
|
|
242
|
+
}
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
### README.md
|
|
246
|
+
|
|
247
|
+
```markdown
|
|
248
|
+
# SmartStack {PascalCaseName} Plugin
|
|
249
|
+
|
|
250
|
+
{description}
|
|
251
|
+
|
|
252
|
+
## Installation
|
|
253
|
+
|
|
254
|
+
```bash
|
|
255
|
+
npm install @smartstack/{name}
|
|
256
|
+
smartstack install --extension @smartstack/{name}
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
## Components
|
|
260
|
+
|
|
261
|
+
| Type | Command | Description |
|
|
262
|
+
|------|---------|-------------|
|
|
263
|
+
| Command | `/{name}` | Main entry point |
|
|
264
|
+
| Agent | `{name}` | Analysis agent |
|
|
265
|
+
| Skill | `/{name}:*` | Multi-phase workflow |
|
|
266
|
+
| Hook | `{name}-check` | Validation |
|
|
267
|
+
|
|
268
|
+
## Usage
|
|
269
|
+
|
|
270
|
+
```
|
|
271
|
+
/{name} <your-task>
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
## License
|
|
275
|
+
|
|
276
|
+
MIT
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
## Workflow
|
|
280
|
+
|
|
281
|
+
1. Parse name and description from `$ARGUMENTS`
|
|
282
|
+
2. Validate name format (kebab-case)
|
|
283
|
+
3. Create complete directory structure
|
|
284
|
+
4. Generate all component files:
|
|
285
|
+
- Command + sub-commands
|
|
286
|
+
- Agent
|
|
287
|
+
- Skill + phases
|
|
288
|
+
- Hook
|
|
289
|
+
5. Generate package.json, README, etc.
|
|
290
|
+
6. Display success message with component list
|
|
291
|
+
|
|
292
|
+
## Validation
|
|
293
|
+
|
|
294
|
+
Before creating:
|
|
295
|
+
- Name must be kebab-case
|
|
296
|
+
- Directory must not exist
|
|
297
|
+
- All paths must be valid
|
|
298
|
+
|
|
299
|
+
## Success Output
|
|
300
|
+
|
|
301
|
+
```
|
|
302
|
+
╔═══════════════════════════════════════════════════════════╗
|
|
303
|
+
║ SMARTSTACK PLUGIN CREATED ║
|
|
304
|
+
╠═══════════════════════════════════════════════════════════╣
|
|
305
|
+
║ Name: smartstack-{name} ║
|
|
306
|
+
║ Type: Full Plugin ║
|
|
307
|
+
╠═══════════════════════════════════════════════════════════╣
|
|
308
|
+
║ Components: ║
|
|
309
|
+
║ ✓ Command: /{name} ║
|
|
310
|
+
║ ✓ Agent: {name} ║
|
|
311
|
+
║ ✓ Skill: /{name}:* (3 phases) ║
|
|
312
|
+
║ ✓ Hook: {name}-check ║
|
|
313
|
+
╠═══════════════════════════════════════════════════════════╣
|
|
314
|
+
║ Next steps: ║
|
|
315
|
+
║ 1. cd smartstack-{name} ║
|
|
316
|
+
║ 2. npm install ║
|
|
317
|
+
║ 3. Customize templates ║
|
|
318
|
+
║ 4. npm run build ║
|
|
319
|
+
║ 5. npm publish ║
|
|
320
|
+
╚═══════════════════════════════════════════════════════════╝
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
## Priority
|
|
324
|
+
|
|
325
|
+
Completeness > Quality > Speed
|
|
326
|
+
|
|
327
|
+
---
|
|
328
|
+
|
|
329
|
+
User: $ARGUMENTS
|