aiblueprint-cli 1.3.0 → 1.3.2
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/README.md +18 -1
- package/claude-code-config/agents/explore-codebase.md +3 -1
- package/claude-code-config/agents/explore-docs.md +54 -58
- package/claude-code-config/agents/websearch.md +2 -2
- package/claude-code-config/commands/apex.md +109 -0
- package/claude-code-config/commands/explore.md +77 -32
- package/claude-code-config/commands/git/commit.md +60 -0
- package/claude-code-config/commands/{create-pull-request.md → git/create-pr.md} +12 -0
- package/claude-code-config/commands/{fix-pr-comments.md → git/fix-pr-comments.md} +10 -0
- package/claude-code-config/commands/oneshot.md +44 -44
- package/claude-code-config/commands/tasks/run-task.md +220 -0
- package/claude-code-config/commands/{watch-ci.md → utils/watch-ci.md} +4 -0
- package/dist/cli.js +555 -69
- package/package.json +1 -1
- package/claude-code-config/commands/commit.md +0 -47
- package/claude-code-config/commands/epct.md +0 -69
- package/claude-code-config/commands/run-tasks.md +0 -105
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
---
|
|
2
|
+
allowed-tools: Bash(gh :*), Bash(git :*)
|
|
3
|
+
argument-hint: <issue-number|issue-url|file-path>
|
|
4
|
+
description: Execute GitHub issues or task files with full EPCT workflow and PR creation
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<objective>
|
|
8
|
+
Execute #$ARGUMENTS using adaptive APEX workflow (Analyze → Plan → Execute → eXamine) with automatic PR creation.
|
|
9
|
+
|
|
10
|
+
This command handles any task input: GitHub issues, file paths, or direct descriptions. It adapts complexity based on task size - lightweight for bug fixes, comprehensive for features. Optimized for CI/automated environments.
|
|
11
|
+
</objective>
|
|
12
|
+
|
|
13
|
+
<context>
|
|
14
|
+
Current branch: !`git branch --show-current`
|
|
15
|
+
Git status: !`git status --short`
|
|
16
|
+
Recent commits: !`git log --oneline -5 2>/dev/null || echo "No commits yet"`
|
|
17
|
+
</context>
|
|
18
|
+
|
|
19
|
+
<process>
|
|
20
|
+
|
|
21
|
+
## 0. INITIALIZE
|
|
22
|
+
|
|
23
|
+
**Parse input and setup environment:**
|
|
24
|
+
|
|
25
|
+
1. **Detect input type** from #$ARGUMENTS:
|
|
26
|
+
- **Issue number** (e.g., `123`): Fetch with `gh issue view 123`
|
|
27
|
+
- **Issue URL** (e.g., `https://github.com/.../issues/123`): Extract number, fetch with `gh issue view`
|
|
28
|
+
- **File path** (e.g., `tasks/feature.md`): Read file content
|
|
29
|
+
- **Direct description**: Use as-is
|
|
30
|
+
|
|
31
|
+
2. **For GitHub issues**:
|
|
32
|
+
- Add processing label: `gh issue edit <number> --add-label "in-progress"`
|
|
33
|
+
- Extract: title, description, labels, comments
|
|
34
|
+
|
|
35
|
+
3. **Assess task complexity** (determines workflow depth):
|
|
36
|
+
- **Simple** (typo, config change, small fix): Skip to Execute phase
|
|
37
|
+
- **Medium** (bug fix, small feature): Light exploration + execute
|
|
38
|
+
- **Complex** (new feature, refactor): Full APEX workflow
|
|
39
|
+
|
|
40
|
+
4. **Setup branch**:
|
|
41
|
+
- If on `main`/`master`: Create branch `git checkout -b feat/<task-slug>`
|
|
42
|
+
- If on feature branch with uncommitted changes: Ask to continue or stash
|
|
43
|
+
- If on feature branch with commits: Ask to continue or create new branch
|
|
44
|
+
|
|
45
|
+
## 1. ANALYZE (skip for simple tasks)
|
|
46
|
+
|
|
47
|
+
**Goal**: Gather context efficiently
|
|
48
|
+
|
|
49
|
+
- Launch **parallel** `explore-codebase` agents for:
|
|
50
|
+
- Related files and patterns
|
|
51
|
+
- Similar implementations to use as examples
|
|
52
|
+
- Test file locations
|
|
53
|
+
- Use `explore-docs` agent if external library knowledge needed
|
|
54
|
+
- Use `websearch` agent only if truly necessary
|
|
55
|
+
|
|
56
|
+
**Output**: Mental map of files to modify and patterns to follow
|
|
57
|
+
|
|
58
|
+
## 2. PLAN (skip for simple tasks)
|
|
59
|
+
|
|
60
|
+
**Goal**: Define implementation strategy
|
|
61
|
+
|
|
62
|
+
1. Create concise implementation plan:
|
|
63
|
+
- Files to modify/create
|
|
64
|
+
- Key changes per file
|
|
65
|
+
- Test approach
|
|
66
|
+
|
|
67
|
+
2. **For GitHub issues**: Post plan as comment
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
gh issue comment <number> --body "## Implementation Plan
|
|
71
|
+
|
|
72
|
+
- [ ] Change 1
|
|
73
|
+
- [ ] Change 2
|
|
74
|
+
- [ ] Tests
|
|
75
|
+
|
|
76
|
+
Starting implementation..."
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
3. **If ambiguity exists**: Ask user ONE focused question, then proceed
|
|
80
|
+
|
|
81
|
+
## 3. EXECUTE
|
|
82
|
+
|
|
83
|
+
**Goal**: Implement changes following codebase patterns
|
|
84
|
+
|
|
85
|
+
1. **Create TodoWrite** with specific tasks (1 per file change)
|
|
86
|
+
|
|
87
|
+
2. **For each change**:
|
|
88
|
+
- Read target file first
|
|
89
|
+
- Match existing code style exactly
|
|
90
|
+
- Use clear names over comments
|
|
91
|
+
- Stay strictly in scope
|
|
92
|
+
|
|
93
|
+
3. **Code quality rules**:
|
|
94
|
+
- NO comments unless truly necessary
|
|
95
|
+
- NO refactoring beyond task scope
|
|
96
|
+
- NO extra features
|
|
97
|
+
- Run formatters after changes
|
|
98
|
+
|
|
99
|
+
## 4. EXAMINE
|
|
100
|
+
|
|
101
|
+
**Goal**: Validate implementation
|
|
102
|
+
|
|
103
|
+
1. **Check package.json** for available scripts
|
|
104
|
+
|
|
105
|
+
2. **Run validation** (in order, stop on failure):
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
npm run format 2>/dev/null || true
|
|
109
|
+
npm run lint
|
|
110
|
+
npm run typecheck
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
3. **Run relevant tests only**:
|
|
114
|
+
- Find test file for modified code
|
|
115
|
+
- Run: `npm test -- --testPathPattern="<pattern>"` or equivalent
|
|
116
|
+
- Don't run full suite unless necessary
|
|
117
|
+
|
|
118
|
+
4. **If validation fails**:
|
|
119
|
+
- Fix errors immediately
|
|
120
|
+
- Re-run validation
|
|
121
|
+
- If stuck after 2 attempts: report blocker to user
|
|
122
|
+
|
|
123
|
+
## 5. FINALIZE (always execute)
|
|
124
|
+
|
|
125
|
+
**Goal**: Create PR and update tracking
|
|
126
|
+
|
|
127
|
+
1. **Stage and commit**:
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
git add -A
|
|
131
|
+
git commit -m "<type>(<scope>): <description>
|
|
132
|
+
|
|
133
|
+
<body if needed>
|
|
134
|
+
|
|
135
|
+
Closes #<issue-number>"
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Commit types: `feat`, `fix`, `refactor`, `docs`, `test`, `chore`
|
|
139
|
+
|
|
140
|
+
2. **Push and create PR**:
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
git push -u origin HEAD
|
|
144
|
+
gh pr create --fill --body "## Summary
|
|
145
|
+
<what was done>
|
|
146
|
+
|
|
147
|
+
## Changes
|
|
148
|
+
- <change 1>
|
|
149
|
+
- <change 2>
|
|
150
|
+
|
|
151
|
+
## Test Plan
|
|
152
|
+
- [x] Lint passes
|
|
153
|
+
- [x] Types pass
|
|
154
|
+
- [x] Relevant tests pass
|
|
155
|
+
|
|
156
|
+
Closes #<issue-number>"
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
3. **Update GitHub issue** (if applicable):
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
gh issue comment <number> --body "✅ Implementation complete
|
|
163
|
+
|
|
164
|
+
**PR**: <pr-url>
|
|
165
|
+
**Changes**: <brief summary>
|
|
166
|
+
|
|
167
|
+
Ready for review."
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
4. **Return PR URL** to user
|
|
171
|
+
|
|
172
|
+
</process>
|
|
173
|
+
|
|
174
|
+
<adaptive_behavior>
|
|
175
|
+
**Task size detection heuristics:**
|
|
176
|
+
|
|
177
|
+
| Signal | Likely Simple | Likely Complex |
|
|
178
|
+
| ------------------ | ------------------------------- | -------------------------------------- |
|
|
179
|
+
| Keywords | "typo", "rename", "update text" | "implement", "add feature", "refactor" |
|
|
180
|
+
| Scope | Single file mentioned | Multiple components |
|
|
181
|
+
| Issue labels | `bug`, `docs`, `chore` | `feature`, `enhancement` |
|
|
182
|
+
| Description length | < 100 chars | > 500 chars |
|
|
183
|
+
|
|
184
|
+
**Workflow adaptation:**
|
|
185
|
+
|
|
186
|
+
- Simple: Initialize → Execute → Examine → Finalize
|
|
187
|
+
- Medium: Initialize → Light Analyze → Execute → Examine → Finalize
|
|
188
|
+
- Complex: Full workflow with all phases
|
|
189
|
+
</adaptive_behavior>
|
|
190
|
+
|
|
191
|
+
<error_handling>
|
|
192
|
+
**Common blockers and responses:**
|
|
193
|
+
|
|
194
|
+
- **Lint/type errors**: Fix immediately, max 3 attempts
|
|
195
|
+
- **Test failures**: Debug, fix, document if unfixable
|
|
196
|
+
- **Merge conflicts**: Report to user, don't auto-resolve
|
|
197
|
+
- **Missing context**: Use explore agents, ask user if still unclear
|
|
198
|
+
- **CI blocked**: Wait and retry once, then report
|
|
199
|
+
|
|
200
|
+
**If blocked**: Report clearly what's blocking and what's needed
|
|
201
|
+
</error_handling>
|
|
202
|
+
|
|
203
|
+
<success_criteria>
|
|
204
|
+
|
|
205
|
+
- Task requirements fully addressed
|
|
206
|
+
- Code passes lint, typecheck, relevant tests
|
|
207
|
+
- PR created with clear description
|
|
208
|
+
- GitHub issue updated (if applicable)
|
|
209
|
+
- PR URL returned to user
|
|
210
|
+
</success_criteria>
|
|
211
|
+
|
|
212
|
+
<execution_rules>
|
|
213
|
+
|
|
214
|
+
- **ULTRA THINK** at phase transitions
|
|
215
|
+
- **Parallel execution** for speed (agents, independent commands)
|
|
216
|
+
- **Stay in scope** - implement exactly what's requested
|
|
217
|
+
- **Always create PR** - even for small fixes
|
|
218
|
+
- **Priority**: Correctness > Completeness > Speed
|
|
219
|
+
- **Automated-friendly**: Minimize user prompts, proceed with sensible defaults
|
|
220
|
+
</execution_rules>
|