start-vibing 1.1.3 → 1.1.4
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/package.json +1 -1
- package/template/.claude/README.md +126 -135
- package/template/.claude/agents/orchestrator.md +37 -23
- package/template/.claude/agents/research.md +51 -3
- package/template/.claude/agents/ui-ux-reviewer.md +80 -10
- package/template/.claude/config/project-config.json +4 -7
- package/template/.claude/hooks/user-prompt-submit.py +384 -37
- package/template/.claude/settings.json +228 -39
- package/template/.claude/skills/codebase-knowledge/SKILL.md +111 -37
- package/template/.claude/skills/codebase-knowledge/domains/claude-system.md +216 -10
- package/template/.claude/skills/docs-tracker/SKILL.md +206 -30
- package/template/.claude/skills/final-check/SKILL.md +252 -40
- package/template/.claude/skills/quality-gate/SKILL.md +238 -31
- package/template/.claude/skills/research-cache/SKILL.md +162 -28
- package/template/.claude/skills/security-scan/SKILL.md +165 -34
- package/template/.claude/skills/test-coverage/SKILL.md +416 -41
- package/template/.claude/skills/ui-ux-audit/SKILL.md +222 -36
- package/template/.claude/config/domain-mapping.json +0 -55
|
@@ -2,12 +2,6 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$comment": "Project-specific configuration. Agents read this to adapt to your project.",
|
|
4
4
|
|
|
5
|
-
"project": {
|
|
6
|
-
"name": "my-project",
|
|
7
|
-
"description": "Project description here",
|
|
8
|
-
"type": "monorepo"
|
|
9
|
-
},
|
|
10
|
-
|
|
11
5
|
"stack": {
|
|
12
6
|
"runtime": "bun",
|
|
13
7
|
"language": "typescript",
|
|
@@ -29,7 +23,10 @@
|
|
|
29
23
|
"pathAliases": {
|
|
30
24
|
"$types/*": "./types/*",
|
|
31
25
|
"@common/*": "./common/*",
|
|
32
|
-
"@common": "./common/index.ts"
|
|
26
|
+
"@common": "./common/index.ts",
|
|
27
|
+
"@db/*": "./common/db/*",
|
|
28
|
+
"@db": "./common/db/index.ts",
|
|
29
|
+
"@apps/*": "./apps/*"
|
|
33
30
|
},
|
|
34
31
|
|
|
35
32
|
"commands": {
|
|
@@ -1,68 +1,415 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
2
|
"""
|
|
3
|
-
UserPromptSubmit Hook -
|
|
4
|
-
|
|
3
|
+
UserPromptSubmit Hook - STRICT Workflow Enforcement
|
|
4
|
+
|
|
5
|
+
This hook runs BEFORE Claude processes any user prompt and ENFORCES:
|
|
6
|
+
1. MANDATORY detailed todo list creation from prompt
|
|
7
|
+
2. MANDATORY research agent for new features
|
|
8
|
+
3. STRICT workflow: audit -> branch -> implement -> document -> quality -> PR
|
|
9
|
+
4. Separate UI for mobile/tablet/desktop (NOT just responsive)
|
|
10
|
+
5. NRY patterns (Never Repeat Yourself - common Claude mistakes)
|
|
11
|
+
|
|
12
|
+
Output is sent to Claude as context before processing the user's request.
|
|
13
|
+
|
|
14
|
+
Based on official Claude Code documentation:
|
|
15
|
+
https://code.claude.com/docs/en/hooks.md
|
|
5
16
|
"""
|
|
6
17
|
|
|
7
18
|
import json
|
|
8
19
|
import sys
|
|
20
|
+
import os
|
|
21
|
+
import re
|
|
22
|
+
from pathlib import Path
|
|
23
|
+
|
|
24
|
+
PROJECT_DIR = os.environ.get('CLAUDE_PROJECT_DIR', os.getcwd())
|
|
25
|
+
WORKFLOW_STATE_PATH = Path(PROJECT_DIR) / '.claude' / 'workflow-state.json'
|
|
26
|
+
SETTINGS_PATH = Path(PROJECT_DIR) / '.claude' / 'settings.json'
|
|
27
|
+
|
|
28
|
+
# STRICT WORKFLOW SEQUENCE (MANDATORY)
|
|
29
|
+
STRICT_WORKFLOW = """
|
|
30
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
31
|
+
│ STRICT WORKFLOW (MANDATORY) │
|
|
32
|
+
├─────────────────────────────────────────────────────────────────┤
|
|
33
|
+
│ 1. TODO LIST → Create DETAILED todo list from prompt │
|
|
34
|
+
│ 2. RESEARCH → Run research agent for NEW features │
|
|
35
|
+
│ 3. AUDIT → Check last audit docs OR run fresh audit │
|
|
36
|
+
│ 4. BRANCH → Create feature/ | fix/ | refactor/ | test/ │
|
|
37
|
+
│ 5. IMPLEMENT → Follow rules + analyzer approval │
|
|
38
|
+
│ 6. DOCUMENT → Document results, bugs, solutions (with hash)│
|
|
39
|
+
│ 7. QUALITY → typecheck + lint + test (Husky enforced) │
|
|
40
|
+
│ 8. PR → Create PR to main with doc references │
|
|
41
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
42
|
+
"""
|
|
43
|
+
|
|
44
|
+
# Agent definitions with triggers
|
|
45
|
+
AGENTS = {
|
|
46
|
+
'orchestrator': {
|
|
47
|
+
'description': 'Coordinates entire development flow',
|
|
48
|
+
'triggers': ['implement feature', 'build', 'create', 'fix and test', 'full workflow', 'multi-step'],
|
|
49
|
+
'priority': 1,
|
|
50
|
+
'when': 'Task requires >2 agents or touches >3 files'
|
|
51
|
+
},
|
|
52
|
+
'analyzer': {
|
|
53
|
+
'description': 'Analyzes impact before code modification',
|
|
54
|
+
'triggers': ['implement', 'add feature', 'fix bug', 'refactor', 'change', 'modify', 'update code'],
|
|
55
|
+
'priority': 2,
|
|
56
|
+
'when': 'BEFORE any Edit/Write to source files'
|
|
57
|
+
},
|
|
58
|
+
'research': {
|
|
59
|
+
'description': 'Researches best practices (2024-2025) - MANDATORY for new features',
|
|
60
|
+
'triggers': ['research', 'investigate', 'study', 'best practice', 'how to', 'pattern', 'new feature', 'implement'],
|
|
61
|
+
'priority': 3,
|
|
62
|
+
'when': 'MANDATORY for ANY new feature or complex bug fix',
|
|
63
|
+
'mandatory_for': ['feature', 'fix']
|
|
64
|
+
},
|
|
65
|
+
'ui-ux-reviewer': {
|
|
66
|
+
'description': 'Reviews UI/UX - ENFORCES separate mobile/tablet/desktop UIs',
|
|
67
|
+
'triggers': ['ui', 'component', 'page', 'design', 'layout', 'style', 'frontend', 'mobile', 'desktop'],
|
|
68
|
+
'priority': 3,
|
|
69
|
+
'when': 'Files in components/, app/, or .tsx with JSX',
|
|
70
|
+
'enforces': 'SEPARATE UIs for each platform (NOT just responsive)'
|
|
71
|
+
},
|
|
72
|
+
'documenter': {
|
|
73
|
+
'description': 'Documents results with commit hash references',
|
|
74
|
+
'triggers': ['document', 'readme', 'docs', 'explain'],
|
|
75
|
+
'priority': 4,
|
|
76
|
+
'when': 'After implementation - MUST include commit hash for audit trail'
|
|
77
|
+
},
|
|
78
|
+
'tester': {
|
|
79
|
+
'description': 'Creates unit tests (Vitest) and E2E tests (Playwright)',
|
|
80
|
+
'triggers': ['test', 'coverage', 'spec', 'e2e'],
|
|
81
|
+
'priority': 5,
|
|
82
|
+
'when': 'After any code implementation'
|
|
83
|
+
},
|
|
84
|
+
'security-auditor': {
|
|
85
|
+
'description': 'Audits security (CAN VETO)',
|
|
86
|
+
'triggers': ['auth', 'session', 'password', 'token', 'api', 'database', 'user data', 'security'],
|
|
87
|
+
'priority': 6,
|
|
88
|
+
'when': 'Code touches auth/, api/, server/, or sensitive data',
|
|
89
|
+
'can_veto': True
|
|
90
|
+
},
|
|
91
|
+
'quality-checker': {
|
|
92
|
+
'description': 'Runs typecheck, lint, test, build (Husky pre-commit)',
|
|
93
|
+
'triggers': ['check', 'verify', 'validate', 'run tests', 'quality'],
|
|
94
|
+
'priority': 7,
|
|
95
|
+
'when': 'BEFORE any commit - Husky enforces this'
|
|
96
|
+
},
|
|
97
|
+
'final-validator': {
|
|
98
|
+
'description': 'Final validation before commit (CAN VETO)',
|
|
99
|
+
'triggers': ['final', 'commit ready', 'approve'],
|
|
100
|
+
'priority': 8,
|
|
101
|
+
'when': 'Before any commit operation',
|
|
102
|
+
'can_veto': True
|
|
103
|
+
},
|
|
104
|
+
'commit-manager': {
|
|
105
|
+
'description': 'Creates conventional commits and completes workflow',
|
|
106
|
+
'triggers': ['commit', 'save changes', 'push', 'finalize', 'git'],
|
|
107
|
+
'priority': 10,
|
|
108
|
+
'when': 'FINAL step - after domain-updater, runs complete-task'
|
|
109
|
+
},
|
|
110
|
+
'domain-updater': {
|
|
111
|
+
'description': 'Updates domain knowledge with session learnings',
|
|
112
|
+
'triggers': ['update domain', 'document learnings', 'session end'],
|
|
113
|
+
'priority': 9,
|
|
114
|
+
'when': 'BEFORE commit-manager - updates domains so git stays clean'
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
# Workflow sequences (research after analyzer, domain-updater BEFORE commit-manager for clean git)
|
|
119
|
+
WORKFLOWS = {
|
|
120
|
+
'feature': ['analyzer', 'research', 'ui-ux-reviewer', 'documenter', 'tester', 'security-auditor', 'quality-checker', 'final-validator', 'domain-updater', 'commit-manager'],
|
|
121
|
+
'fix': ['analyzer', 'research', 'tester', 'security-auditor', 'quality-checker', 'final-validator', 'domain-updater', 'commit-manager'],
|
|
122
|
+
'refactor': ['analyzer', 'tester', 'quality-checker', 'final-validator', 'domain-updater', 'commit-manager'],
|
|
123
|
+
'config': ['quality-checker', 'domain-updater', 'commit-manager']
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
def load_workflow_state():
|
|
128
|
+
"""Load current workflow state"""
|
|
129
|
+
if not WORKFLOW_STATE_PATH.exists():
|
|
130
|
+
return None
|
|
131
|
+
try:
|
|
132
|
+
with open(WORKFLOW_STATE_PATH) as f:
|
|
133
|
+
return json.load(f)
|
|
134
|
+
except (json.JSONDecodeError, IOError):
|
|
135
|
+
return None
|
|
136
|
+
|
|
9
137
|
|
|
10
138
|
def detect_task_type(prompt: str) -> str:
|
|
11
|
-
"""Detect task type from prompt
|
|
12
|
-
|
|
13
|
-
|
|
139
|
+
"""Detect task type from prompt"""
|
|
140
|
+
prompt_lower = prompt.lower()
|
|
141
|
+
|
|
142
|
+
if any(word in prompt_lower for word in ['bug', 'fix', 'error', 'broken', 'not working', 'issue']):
|
|
14
143
|
return 'fix'
|
|
15
|
-
|
|
144
|
+
elif any(word in prompt_lower for word in ['refactor', 'restructure', 'reorganize', 'clean up']):
|
|
16
145
|
return 'refactor'
|
|
17
|
-
|
|
146
|
+
elif any(word in prompt_lower for word in ['config', 'setting', 'env', 'package.json', 'tsconfig']):
|
|
18
147
|
return 'config'
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
148
|
+
else:
|
|
149
|
+
return 'feature'
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
def detect_best_agent(prompt: str) -> tuple[str, str]:
|
|
153
|
+
"""Detect best agent for the task"""
|
|
154
|
+
prompt_lower = prompt.lower()
|
|
155
|
+
|
|
156
|
+
# Check for multi-step tasks first
|
|
157
|
+
multi_step_indicators = ['and then', 'after that', 'also', 'implement', 'build', 'create feature']
|
|
158
|
+
if any(indicator in prompt_lower for indicator in multi_step_indicators):
|
|
159
|
+
return 'orchestrator', 'Multi-step task detected - orchestrator will coordinate all agents'
|
|
160
|
+
|
|
161
|
+
# Check each agent's triggers
|
|
162
|
+
matches = []
|
|
163
|
+
for agent_name, agent_info in AGENTS.items():
|
|
164
|
+
for trigger in agent_info['triggers']:
|
|
165
|
+
if trigger in prompt_lower:
|
|
166
|
+
matches.append((agent_name, agent_info['priority'], trigger))
|
|
167
|
+
|
|
168
|
+
if matches:
|
|
169
|
+
# Sort by priority (lower is better)
|
|
170
|
+
matches.sort(key=lambda x: x[1])
|
|
171
|
+
best = matches[0]
|
|
172
|
+
return best[0], f"Matched trigger '{best[2]}'"
|
|
173
|
+
|
|
174
|
+
# Default to orchestrator for unknown tasks
|
|
175
|
+
return 'orchestrator', 'No specific trigger matched - orchestrator will analyze'
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
def format_agent_list() -> str:
|
|
179
|
+
"""Format agent list for display"""
|
|
180
|
+
lines = []
|
|
181
|
+
for name, info in sorted(AGENTS.items(), key=lambda x: x[1]['priority']):
|
|
182
|
+
veto = ' [CAN VETO]' if info.get('can_veto') else ''
|
|
183
|
+
lines.append(f" - {name}: {info['description']}{veto}")
|
|
184
|
+
return '\n'.join(lines)
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
def format_workflow_status(state: dict) -> str:
|
|
188
|
+
"""Format current workflow status"""
|
|
189
|
+
if not state or not state.get('currentTask'):
|
|
190
|
+
return "STATUS: No active task. Start with orchestrator agent"
|
|
191
|
+
|
|
192
|
+
task = state['currentTask']
|
|
193
|
+
agents = task.get('agents', {})
|
|
194
|
+
|
|
195
|
+
executed = [name for name, status in agents.items() if status.get('executed')]
|
|
196
|
+
pending = [name for name, status in agents.items() if not status.get('executed')]
|
|
197
|
+
|
|
198
|
+
return f"""STATUS: Task active
|
|
199
|
+
ID: {task.get('id', 'unknown')}
|
|
200
|
+
Type: {task.get('type', 'unknown')}
|
|
201
|
+
Description: {task.get('description', 'unknown')}
|
|
202
|
+
Executed: {', '.join(executed) if executed else 'none'}
|
|
203
|
+
Pending: {', '.join(pending) if pending else 'none'}
|
|
204
|
+
Approved files: {len(task.get('approvedFiles', []))}"""
|
|
205
|
+
|
|
30
206
|
|
|
31
207
|
def main():
|
|
208
|
+
# Read hook input from stdin
|
|
32
209
|
try:
|
|
33
210
|
hook_input = json.load(sys.stdin)
|
|
34
211
|
except json.JSONDecodeError:
|
|
35
|
-
|
|
212
|
+
hook_input = {}
|
|
213
|
+
|
|
214
|
+
# Get user prompt (may not be available in all hook contexts)
|
|
215
|
+
prompt = hook_input.get('user_prompt', hook_input.get('prompt', ''))
|
|
216
|
+
|
|
217
|
+
# Load current state
|
|
218
|
+
state = load_workflow_state()
|
|
219
|
+
|
|
220
|
+
# Detect task type and best agent
|
|
221
|
+
task_type = detect_task_type(prompt) if prompt else 'unknown'
|
|
222
|
+
best_agent, reason = detect_best_agent(prompt) if prompt else ('orchestrator', 'Default')
|
|
36
223
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
224
|
+
# Check if task is new feature (requires research)
|
|
225
|
+
is_new_feature = task_type in ['feature'] or any(word in prompt.lower() for word in ['new', 'implement', 'create', 'add'])
|
|
226
|
+
is_ui_task = any(word in prompt.lower() for word in ['ui', 'component', 'page', 'design', 'layout', 'mobile', 'desktop', 'tablet'])
|
|
40
227
|
|
|
41
|
-
|
|
42
|
-
|
|
228
|
+
# Build output message
|
|
229
|
+
output = f"""
|
|
230
|
+
================================================================================
|
|
231
|
+
STRICT WORKFLOW ENFORCEMENT - UserPromptSubmit Hook
|
|
232
|
+
================================================================================
|
|
233
|
+
{STRICT_WORKFLOW}
|
|
43
234
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
Workflow: {' → '.join(workflow)}
|
|
235
|
+
{"⚠️ NEW FEATURE DETECTED - RESEARCH AGENT IS MANDATORY!" if is_new_feature else ""}
|
|
236
|
+
{"⚠️ UI TASK DETECTED - SEPARATE UIs FOR MOBILE/TABLET/DESKTOP REQUIRED!" if is_ui_task else ""}
|
|
47
237
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
- UPDATE: domain-updater before commit
|
|
52
|
-
- END: commit-manager commits and merges to main
|
|
238
|
+
================================================================================
|
|
239
|
+
STEP 1: CREATE DETAILED TODO LIST (MANDATORY)
|
|
240
|
+
================================================================================
|
|
53
241
|
|
|
54
|
-
|
|
242
|
+
BEFORE doing anything, you MUST use TodoWrite to create a detailed todo list.
|
|
243
|
+
Break down the user's prompt into specific, actionable items.
|
|
55
244
|
|
|
245
|
+
Example:
|
|
246
|
+
User prompt: "Add login feature"
|
|
247
|
+
Todo list:
|
|
248
|
+
1. Research login best practices 2024-2025
|
|
249
|
+
2. Check existing auth documentation
|
|
250
|
+
3. Create feature/login branch
|
|
251
|
+
4. Implement login form (mobile UI)
|
|
252
|
+
5. Implement login form (tablet UI)
|
|
253
|
+
6. Implement login form (desktop UI)
|
|
254
|
+
7. Add validation with visual feedback
|
|
255
|
+
8. Create unit tests
|
|
256
|
+
9. Create E2E tests
|
|
257
|
+
10. Document implementation with commit hash
|
|
258
|
+
11. Run quality gates
|
|
259
|
+
12. Create PR to main
|
|
260
|
+
|
|
261
|
+
================================================================================
|
|
262
|
+
AVAILABLE AGENTS:
|
|
263
|
+
{format_agent_list()}
|
|
264
|
+
|
|
265
|
+
TASK ANALYSIS:
|
|
266
|
+
Detected type: {task_type}
|
|
267
|
+
Recommended agent: {best_agent}
|
|
268
|
+
Reason: {reason}
|
|
269
|
+
Research required: {"YES (MANDATORY)" if is_new_feature else "Optional"}
|
|
270
|
+
Separate UIs required: {"YES (MANDATORY)" if is_ui_task else "N/A"}
|
|
271
|
+
Workflow sequence: {' -> '.join(WORKFLOWS.get(task_type, WORKFLOWS['feature']))}
|
|
272
|
+
|
|
273
|
+
{format_workflow_status(state)}
|
|
274
|
+
|
|
275
|
+
================================================================================
|
|
276
|
+
UI ARCHITECTURE RULES (MANDATORY FOR WEB APPS)
|
|
277
|
+
================================================================================
|
|
278
|
+
|
|
279
|
+
❌ DO NOT make "responsive" UI only
|
|
280
|
+
✅ CREATE SEPARATE UIs for each platform:
|
|
281
|
+
|
|
282
|
+
MOBILE (375px):
|
|
283
|
+
- Bottom navigation bar
|
|
284
|
+
- Full-screen modal for search (closable)
|
|
285
|
+
- Pull-to-refresh
|
|
286
|
+
- Touch targets 44x44px minimum
|
|
287
|
+
|
|
288
|
+
TABLET (768px):
|
|
289
|
+
- Condensed data in dropdowns
|
|
290
|
+
- Hybrid collapsible sidebar
|
|
291
|
+
- Adapted touch/click
|
|
292
|
+
|
|
293
|
+
DESKTOP (1280px+):
|
|
294
|
+
- Left sidebar: notifications, profile, nav
|
|
295
|
+
- Top navbar: centered Levenshtein search
|
|
296
|
+
- High information density
|
|
297
|
+
|
|
298
|
+
SHARED:
|
|
299
|
+
- Featured carousel section
|
|
300
|
+
- Hidden scrollbars (but scroll works)
|
|
301
|
+
- Scroll indicators (arrows)
|
|
302
|
+
- Framer Motion transitions
|
|
303
|
+
|
|
304
|
+
================================================================================
|
|
305
|
+
INPUT VALIDATION RULES (ALL INPUTS)
|
|
306
|
+
================================================================================
|
|
307
|
+
|
|
308
|
+
Every input MUST have:
|
|
309
|
+
- Real-time visual feedback (green/red borders)
|
|
310
|
+
- Error checklist below input (disappears when fixed)
|
|
311
|
+
- Autofill validation (prevent email in nickname field)
|
|
312
|
+
- onInput + onAnimationStart for autofill detection
|
|
313
|
+
|
|
314
|
+
================================================================================
|
|
315
|
+
NRY - NEVER REPEAT YOURSELF (Common Claude Mistakes)
|
|
316
|
+
================================================================================
|
|
317
|
+
|
|
318
|
+
❌ Multi-line bash with backslash (breaks permissions)
|
|
319
|
+
❌ Relative paths in permissions
|
|
320
|
+
❌ Ignoring context size (use /compact)
|
|
321
|
+
❌ Relying on undo for critical code
|
|
322
|
+
❌ Executing agent logic manually
|
|
323
|
+
❌ Using bash for file operations (cat, echo >)
|
|
324
|
+
|
|
325
|
+
✅ Single-line commands with &&
|
|
326
|
+
✅ Absolute paths in permissions
|
|
327
|
+
✅ Commit to git before major changes
|
|
328
|
+
✅ Use Task tool to invoke agents
|
|
329
|
+
✅ Use Read/Write/Edit for files
|
|
330
|
+
|
|
331
|
+
================================================================================
|
|
332
|
+
AGENT INVOCATION (VIA TASK TOOL ONLY)
|
|
333
|
+
================================================================================
|
|
334
|
+
|
|
335
|
+
You MUST use the Task tool with subagent_type to invoke agents.
|
|
336
|
+
DO NOT execute agent logic manually - INVOKE the agent properly.
|
|
337
|
+
|
|
338
|
+
AGENTS INVOCABLE VIA TASK TOOL:
|
|
339
|
+
- research: Task(subagent_type="research", prompt="...") {"<-- MANDATORY FOR THIS TASK" if is_new_feature else ""}
|
|
340
|
+
- analyzer: Task(subagent_type="analyzer", prompt="...")
|
|
341
|
+
- ui-ux-reviewer: Task(subagent_type="ui-ux-reviewer", prompt="...") {"<-- MANDATORY FOR THIS TASK" if is_ui_task else ""}
|
|
342
|
+
- tester: Task(subagent_type="tester", prompt="...")
|
|
343
|
+
- security-auditor: Task(subagent_type="security-auditor", prompt="...")
|
|
344
|
+
- quality-checker: Task(subagent_type="quality-checker", prompt="...")
|
|
345
|
+
- final-validator: Task(subagent_type="final-validator", prompt="...")
|
|
346
|
+
- documenter: Task(subagent_type="documenter", prompt="...")
|
|
347
|
+
- commit-manager: Task(subagent_type="commit-manager", prompt="...")
|
|
348
|
+
- orchestrator: Task(subagent_type="orchestrator", prompt="...")
|
|
349
|
+
|
|
350
|
+
================================================================================
|
|
351
|
+
MANDATORY RULES CHECKLIST:
|
|
352
|
+
================================================================================
|
|
353
|
+
|
|
354
|
+
[ ] 1. I WILL create a DETAILED todo list using TodoWrite FIRST
|
|
355
|
+
[ ] 2. I WILL run research agent for new features (MANDATORY)
|
|
356
|
+
[ ] 3. I WILL check/create audit documentation
|
|
357
|
+
[ ] 4. I WILL create proper branch (feature/fix/refactor/test)
|
|
358
|
+
[ ] 5. I WILL create SEPARATE UIs for mobile/tablet/desktop (if UI task)
|
|
359
|
+
[ ] 6. I WILL add real-time validation to ALL inputs
|
|
360
|
+
[ ] 7. I WILL document with commit hash references
|
|
361
|
+
[ ] 8. I WILL run quality gates before commit (Husky enforced)
|
|
362
|
+
[ ] 9. I WILL create PR to main with doc references
|
|
363
|
+
[ ] 10. I WILL use Task tool to invoke agents (NOT manually)
|
|
364
|
+
|
|
365
|
+
================================================================================
|
|
366
|
+
COMPONENT DESIGN RULES (SELF-AWARE RESPONSIVE):
|
|
367
|
+
================================================================================
|
|
368
|
+
|
|
369
|
+
Components CAN be responsive internally (detect their own device type).
|
|
370
|
+
But layouts MUST be separate for each platform.
|
|
371
|
+
|
|
372
|
+
CARD COMPONENTS:
|
|
373
|
+
- NO BORDERS - Use shadows and backgrounds instead
|
|
374
|
+
- Use useDeviceType() hook for self-awareness
|
|
375
|
+
- Adapt padding/layout based on device
|
|
376
|
+
- Desktop: hover effects (scale, shadow)
|
|
377
|
+
- Mobile: touch-optimized (44px targets)
|
|
378
|
+
|
|
379
|
+
```typescript
|
|
380
|
+
// GOOD - Self-aware component
|
|
381
|
+
const device = useDeviceType();
|
|
382
|
+
<div className={cn(
|
|
383
|
+
'rounded-2xl shadow-lg', // NO borders
|
|
384
|
+
device === 'mobile' ? 'p-4' : 'p-6 hover:scale-[1.02]'
|
|
385
|
+
)} />
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
================================================================================
|
|
389
|
+
END OF WORKFLOW MANDATORY:
|
|
390
|
+
================================================================================
|
|
391
|
+
|
|
392
|
+
After completing any task, you MUST:
|
|
393
|
+
|
|
394
|
+
1. Run commit-manager agent via Task tool
|
|
395
|
+
2. Commit all changes with conventional commit format
|
|
396
|
+
3. Create PR to main if on feature/fix branch
|
|
397
|
+
4. NEVER leave uncommitted changes
|
|
398
|
+
|
|
399
|
+
This is MANDATORY - workflow is NOT complete until committed.
|
|
400
|
+
|
|
401
|
+
================================================================================
|
|
402
|
+
"""
|
|
403
|
+
|
|
404
|
+
# Return as JSON with decision to continue
|
|
56
405
|
result = {
|
|
57
406
|
"continue": True,
|
|
58
|
-
"
|
|
59
|
-
"hookEventName": "UserPromptSubmit",
|
|
60
|
-
"additionalContext": context
|
|
61
|
-
}
|
|
407
|
+
"systemMessage": output
|
|
62
408
|
}
|
|
63
409
|
|
|
64
410
|
print(json.dumps(result))
|
|
65
411
|
sys.exit(0)
|
|
66
412
|
|
|
413
|
+
|
|
67
414
|
if __name__ == '__main__':
|
|
68
415
|
main()
|