@champpaba/claude-agent-kit 1.6.0 → 1.7.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/.claude/CHANGELOG-v1.1.1.md +259 -259
- package/.claude/CLAUDE.md +21 -6
- package/.claude/agents/01-integration.md +1 -1
- package/.claude/agents/02-uxui-frontend.md +1 -1
- package/.claude/agents/03-test-debug.md +1 -1
- package/.claude/agents/04-frontend.md +1 -1
- package/.claude/agents/05-backend.md +1 -1
- package/.claude/agents/06-database.md +1 -1
- package/.claude/commands/agentsetup.md +1464 -1464
- package/.claude/commands/cdev.md +3 -4
- package/.claude/commands/csetup.md +82 -3
- package/.claude/commands/cstatus.md +60 -60
- package/.claude/commands/cview.md +364 -364
- package/.claude/commands/psetup.md +101 -101
- package/.claude/contexts/design/accessibility.md +611 -611
- package/.claude/contexts/design/layout.md +400 -400
- package/.claude/contexts/design/responsive.md +551 -551
- package/.claude/contexts/design/shadows.md +522 -522
- package/.claude/contexts/design/typography.md +465 -465
- package/.claude/contexts/domain/README.md +164 -164
- package/.claude/contexts/patterns/agent-coordination.md +388 -388
- package/.claude/contexts/patterns/agent-discovery.md +182 -182
- package/.claude/contexts/patterns/change-workflow.md +538 -538
- package/.claude/contexts/patterns/code-standards.md +515 -515
- package/.claude/contexts/patterns/development-principles.md +513 -513
- package/.claude/contexts/patterns/error-handling.md +478 -478
- package/.claude/contexts/patterns/error-recovery.md +365 -365
- package/.claude/contexts/patterns/logging.md +424 -424
- package/.claude/contexts/patterns/task-breakdown.md +452 -452
- package/.claude/contexts/patterns/task-classification.md +523 -523
- package/.claude/contexts/patterns/tdd-classification.md +516 -516
- package/.claude/contexts/patterns/testing.md +413 -413
- package/.claude/contexts/patterns/validation-framework.md +776 -776
- package/.claude/lib/agent-executor.md +450 -1
- package/.claude/lib/agent-router.md +572 -572
- package/.claude/lib/detailed-guides/agent-system.md +11 -9
- package/.claude/lib/detailed-guides/incremental-testing.md +460 -0
- package/.claude/lib/flags-updater.md +469 -469
- package/.claude/lib/task-analyzer.md +398 -2
- package/.claude/lib/tdd-classifier.md +345 -345
- package/.claude/lib/validation-gates.md +484 -484
- package/.claude/settings.local.json +42 -42
- package/.claude/templates/context-template.md +45 -45
- package/.claude/templates/flags-template.json +42 -42
- package/.claude/templates/phase-templates.json +173 -124
- package/.claude/templates/phases-sections/accessibility-test.md +17 -17
- package/.claude/templates/phases-sections/api-design.md +37 -37
- package/.claude/templates/phases-sections/backend-tests.md +16 -16
- package/.claude/templates/phases-sections/backend.md +37 -37
- package/.claude/templates/phases-sections/business-logic-validation.md +16 -16
- package/.claude/templates/phases-sections/component-tests.md +17 -17
- package/.claude/templates/phases-sections/contract-backend.md +16 -16
- package/.claude/templates/phases-sections/contract-frontend.md +16 -16
- package/.claude/templates/phases-sections/database.md +35 -35
- package/.claude/templates/phases-sections/documentation.md +17 -17
- package/.claude/templates/phases-sections/e2e-tests.md +16 -16
- package/.claude/templates/phases-sections/fix-implementation.md +17 -17
- package/.claude/templates/phases-sections/frontend-integration.md +18 -18
- package/.claude/templates/phases-sections/frontend-mockup.md +123 -123
- package/.claude/templates/phases-sections/manual-flow-test.md +15 -15
- package/.claude/templates/phases-sections/manual-ux-test.md +16 -16
- package/.claude/templates/phases-sections/refactor-implementation.md +17 -17
- package/.claude/templates/phases-sections/refactor.md +16 -16
- package/.claude/templates/phases-sections/regression-tests.md +15 -15
- package/.claude/templates/phases-sections/report.md +16 -16
- package/.claude/templates/phases-sections/responsive-test.md +16 -16
- package/.claude/templates/phases-sections/script-implementation.md +43 -43
- package/.claude/templates/phases-sections/test-coverage.md +16 -16
- package/.claude/templates/phases-sections/user-approval.md +14 -14
- package/LICENSE +21 -21
- package/README.md +171 -35
- package/package.json +1 -1
|
@@ -1,182 +1,182 @@
|
|
|
1
|
-
# Agent Discovery Pattern
|
|
2
|
-
|
|
3
|
-
> **Standard 5-level project context discovery for ALL agents**
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## 🎯 Purpose
|
|
8
|
-
|
|
9
|
-
Every agent MUST discover project context before ANY work. This ensures agents have all necessary context loaded.
|
|
10
|
-
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
## 📋 Discovery Sequence
|
|
14
|
-
|
|
15
|
-
### Level 1: Find Current Project
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
Read: .claude/contexts/domain/index.md
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
**Extract:**
|
|
22
|
-
- Current project name
|
|
23
|
-
- Project location path
|
|
24
|
-
|
|
25
|
-
**If not found:** → Go to [Fallback Strategy](#fallback-strategy)
|
|
26
|
-
|
|
27
|
-
---
|
|
28
|
-
|
|
29
|
-
### Level 2: Load Project Overview
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
Read: .claude/contexts/domain/{project}/README.md
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
**Extract:**
|
|
36
|
-
- Tech stack summary (frameworks, versions)
|
|
37
|
-
- Package manager
|
|
38
|
-
- Available best practices files
|
|
39
|
-
|
|
40
|
-
**If not found:** → Go to [Fallback Strategy](#fallback-strategy)
|
|
41
|
-
|
|
42
|
-
---
|
|
43
|
-
|
|
44
|
-
### Level 3: Check Best Practices Index
|
|
45
|
-
|
|
46
|
-
```bash
|
|
47
|
-
Read: .claude/contexts/domain/{project}/best-practices/index.md
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
**Find section:** "For `{your-agent-type}` agent"
|
|
51
|
-
|
|
52
|
-
**Extract:** List of must-read files for your role
|
|
53
|
-
|
|
54
|
-
**If not found:** → Go to [Fallback Strategy](#fallback-strategy)
|
|
55
|
-
|
|
56
|
-
---
|
|
57
|
-
|
|
58
|
-
### Level 4: Load Relevant Best Practices
|
|
59
|
-
|
|
60
|
-
**Based on Level 3 index, read agent-specific best practices:**
|
|
61
|
-
|
|
62
|
-
```bash
|
|
63
|
-
# Example for backend agent:
|
|
64
|
-
Read: .claude/contexts/domain/{project}/best-practices/fastapi-*.md
|
|
65
|
-
Read: .claude/contexts/domain/{project}/best-practices/express-*.md
|
|
66
|
-
|
|
67
|
-
# Example for frontend agent:
|
|
68
|
-
Read: .claude/contexts/domain/{project}/best-practices/react-*.md
|
|
69
|
-
Read: .claude/contexts/domain/{project}/best-practices/nextjs-*.md
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
**Use glob to find files:**
|
|
73
|
-
```bash
|
|
74
|
-
Glob: ".claude/contexts/domain/{project}/best-practices/*.md"
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
---
|
|
78
|
-
|
|
79
|
-
### Level 5: Change Context (If Working on OpenSpec Change)
|
|
80
|
-
|
|
81
|
-
**Check if change-specific context exists:**
|
|
82
|
-
|
|
83
|
-
```bash
|
|
84
|
-
ls openspec/changes/{change-id}/.claude/
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
**If exists, read change context:**
|
|
88
|
-
|
|
89
|
-
1. **Change-specific tech & patterns:**
|
|
90
|
-
```bash
|
|
91
|
-
Read: openspec/changes/{change-id}/.claude/context.md
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
2. **Current progress:**
|
|
95
|
-
```bash
|
|
96
|
-
Read: openspec/changes/{change-id}/.claude/flags.json
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
3. **Current phase instructions:**
|
|
100
|
-
```bash
|
|
101
|
-
Read: openspec/changes/{change-id}/.claude/phases.md
|
|
102
|
-
```
|
|
103
|
-
Find current phase section only (based on flags.json)
|
|
104
|
-
|
|
105
|
-
4. **OpenSpec files:**
|
|
106
|
-
```bash
|
|
107
|
-
Read: openspec/changes/{change-id}/proposal.md
|
|
108
|
-
Read: openspec/changes/{change-id}/tasks.md
|
|
109
|
-
Read: openspec/changes/{change-id}/design.md # if exists
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
**If change context doesn't exist:**
|
|
113
|
-
- Skip Level 5 (working on general task, not OpenSpec change)
|
|
114
|
-
|
|
115
|
-
---
|
|
116
|
-
|
|
117
|
-
## ✅ Discovery Complete - Report
|
|
118
|
-
|
|
119
|
-
**After completing Levels 1-4, output:**
|
|
120
|
-
|
|
121
|
-
```
|
|
122
|
-
✅ Project Context Loaded
|
|
123
|
-
|
|
124
|
-
📁 Project: {project-name}
|
|
125
|
-
🛠️ Stack: {tech-stack-summary}
|
|
126
|
-
📚 Best Practices Loaded:
|
|
127
|
-
- {framework-1} ✓
|
|
128
|
-
- {framework-2} ✓
|
|
129
|
-
|
|
130
|
-
🎯 Ready to proceed!
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
---
|
|
134
|
-
|
|
135
|
-
## 🚨 Fallback Strategy
|
|
136
|
-
|
|
137
|
-
**If any level fails:**
|
|
138
|
-
|
|
139
|
-
1. **Try Glob Search:**
|
|
140
|
-
```bash
|
|
141
|
-
Glob: ".claude/contexts/domain/*/README.md"
|
|
142
|
-
```
|
|
143
|
-
- **Found 1:** Use it
|
|
144
|
-
- **Found multiple:** Ask user which project
|
|
145
|
-
- **Found 0:** Go to step 2
|
|
146
|
-
|
|
147
|
-
2. **Warn User:**
|
|
148
|
-
```
|
|
149
|
-
⚠️ No project context found!
|
|
150
|
-
|
|
151
|
-
It looks like you haven't run `/agentsetup` yet.
|
|
152
|
-
|
|
153
|
-
Options:
|
|
154
|
-
1. Run `/agentsetup` now (recommended)
|
|
155
|
-
2. Continue without best practices (universal patterns only)
|
|
156
|
-
|
|
157
|
-
Which would you like?
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
3. **If user chooses option 2:**
|
|
161
|
-
- Continue with universal patterns from `.claude/contexts/patterns/`
|
|
162
|
-
- Warn that code may not follow project-specific conventions
|
|
163
|
-
|
|
164
|
-
---
|
|
165
|
-
|
|
166
|
-
## 📖 Usage in Agent Files
|
|
167
|
-
|
|
168
|
-
**In each agent .md file, replace entire STEP 0 with:**
|
|
169
|
-
|
|
170
|
-
```markdown
|
|
171
|
-
## STEP 0: Discover Project Context (MANDATORY - DO THIS FIRST!)
|
|
172
|
-
|
|
173
|
-
**Follow standard agent discovery:**
|
|
174
|
-
→ See `.claude/contexts/patterns/agent-discovery.md`
|
|
175
|
-
|
|
176
|
-
**Report when complete:**
|
|
177
|
-
✅ Project Context Loaded
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
---
|
|
181
|
-
|
|
182
|
-
This pattern ensures ALL agents follow the same discovery flow consistently.
|
|
1
|
+
# Agent Discovery Pattern
|
|
2
|
+
|
|
3
|
+
> **Standard 5-level project context discovery for ALL agents**
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 🎯 Purpose
|
|
8
|
+
|
|
9
|
+
Every agent MUST discover project context before ANY work. This ensures agents have all necessary context loaded.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## 📋 Discovery Sequence
|
|
14
|
+
|
|
15
|
+
### Level 1: Find Current Project
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
Read: .claude/contexts/domain/index.md
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
**Extract:**
|
|
22
|
+
- Current project name
|
|
23
|
+
- Project location path
|
|
24
|
+
|
|
25
|
+
**If not found:** → Go to [Fallback Strategy](#fallback-strategy)
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
### Level 2: Load Project Overview
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
Read: .claude/contexts/domain/{project}/README.md
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
**Extract:**
|
|
36
|
+
- Tech stack summary (frameworks, versions)
|
|
37
|
+
- Package manager
|
|
38
|
+
- Available best practices files
|
|
39
|
+
|
|
40
|
+
**If not found:** → Go to [Fallback Strategy](#fallback-strategy)
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
### Level 3: Check Best Practices Index
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
Read: .claude/contexts/domain/{project}/best-practices/index.md
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
**Find section:** "For `{your-agent-type}` agent"
|
|
51
|
+
|
|
52
|
+
**Extract:** List of must-read files for your role
|
|
53
|
+
|
|
54
|
+
**If not found:** → Go to [Fallback Strategy](#fallback-strategy)
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
### Level 4: Load Relevant Best Practices
|
|
59
|
+
|
|
60
|
+
**Based on Level 3 index, read agent-specific best practices:**
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
# Example for backend agent:
|
|
64
|
+
Read: .claude/contexts/domain/{project}/best-practices/fastapi-*.md
|
|
65
|
+
Read: .claude/contexts/domain/{project}/best-practices/express-*.md
|
|
66
|
+
|
|
67
|
+
# Example for frontend agent:
|
|
68
|
+
Read: .claude/contexts/domain/{project}/best-practices/react-*.md
|
|
69
|
+
Read: .claude/contexts/domain/{project}/best-practices/nextjs-*.md
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
**Use glob to find files:**
|
|
73
|
+
```bash
|
|
74
|
+
Glob: ".claude/contexts/domain/{project}/best-practices/*.md"
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
### Level 5: Change Context (If Working on OpenSpec Change)
|
|
80
|
+
|
|
81
|
+
**Check if change-specific context exists:**
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
ls openspec/changes/{change-id}/.claude/
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
**If exists, read change context:**
|
|
88
|
+
|
|
89
|
+
1. **Change-specific tech & patterns:**
|
|
90
|
+
```bash
|
|
91
|
+
Read: openspec/changes/{change-id}/.claude/context.md
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
2. **Current progress:**
|
|
95
|
+
```bash
|
|
96
|
+
Read: openspec/changes/{change-id}/.claude/flags.json
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
3. **Current phase instructions:**
|
|
100
|
+
```bash
|
|
101
|
+
Read: openspec/changes/{change-id}/.claude/phases.md
|
|
102
|
+
```
|
|
103
|
+
Find current phase section only (based on flags.json)
|
|
104
|
+
|
|
105
|
+
4. **OpenSpec files:**
|
|
106
|
+
```bash
|
|
107
|
+
Read: openspec/changes/{change-id}/proposal.md
|
|
108
|
+
Read: openspec/changes/{change-id}/tasks.md
|
|
109
|
+
Read: openspec/changes/{change-id}/design.md # if exists
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
**If change context doesn't exist:**
|
|
113
|
+
- Skip Level 5 (working on general task, not OpenSpec change)
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## ✅ Discovery Complete - Report
|
|
118
|
+
|
|
119
|
+
**After completing Levels 1-4, output:**
|
|
120
|
+
|
|
121
|
+
```
|
|
122
|
+
✅ Project Context Loaded
|
|
123
|
+
|
|
124
|
+
📁 Project: {project-name}
|
|
125
|
+
🛠️ Stack: {tech-stack-summary}
|
|
126
|
+
📚 Best Practices Loaded:
|
|
127
|
+
- {framework-1} ✓
|
|
128
|
+
- {framework-2} ✓
|
|
129
|
+
|
|
130
|
+
🎯 Ready to proceed!
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## 🚨 Fallback Strategy
|
|
136
|
+
|
|
137
|
+
**If any level fails:**
|
|
138
|
+
|
|
139
|
+
1. **Try Glob Search:**
|
|
140
|
+
```bash
|
|
141
|
+
Glob: ".claude/contexts/domain/*/README.md"
|
|
142
|
+
```
|
|
143
|
+
- **Found 1:** Use it
|
|
144
|
+
- **Found multiple:** Ask user which project
|
|
145
|
+
- **Found 0:** Go to step 2
|
|
146
|
+
|
|
147
|
+
2. **Warn User:**
|
|
148
|
+
```
|
|
149
|
+
⚠️ No project context found!
|
|
150
|
+
|
|
151
|
+
It looks like you haven't run `/agentsetup` yet.
|
|
152
|
+
|
|
153
|
+
Options:
|
|
154
|
+
1. Run `/agentsetup` now (recommended)
|
|
155
|
+
2. Continue without best practices (universal patterns only)
|
|
156
|
+
|
|
157
|
+
Which would you like?
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
3. **If user chooses option 2:**
|
|
161
|
+
- Continue with universal patterns from `.claude/contexts/patterns/`
|
|
162
|
+
- Warn that code may not follow project-specific conventions
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
## 📖 Usage in Agent Files
|
|
167
|
+
|
|
168
|
+
**In each agent .md file, replace entire STEP 0 with:**
|
|
169
|
+
|
|
170
|
+
```markdown
|
|
171
|
+
## STEP 0: Discover Project Context (MANDATORY - DO THIS FIRST!)
|
|
172
|
+
|
|
173
|
+
**Follow standard agent discovery:**
|
|
174
|
+
→ See `.claude/contexts/patterns/agent-discovery.md`
|
|
175
|
+
|
|
176
|
+
**Report when complete:**
|
|
177
|
+
✅ Project Context Loaded
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
This pattern ensures ALL agents follow the same discovery flow consistently.
|