spets 0.1.78 → 0.1.80
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 +46 -2
- package/assets/github/workflows/spets.yml +54 -1
- package/dist/index.js +908 -150
- package/package.json +1 -1
- package/templates/knowledge/guide.md +37 -0
package/README.md
CHANGED
|
@@ -20,6 +20,11 @@ npx spets init
|
|
|
20
20
|
# 워크플로우 시작
|
|
21
21
|
npx spets start "TODO 앱 만들어줘"
|
|
22
22
|
|
|
23
|
+
# 다른 AI 에이전트 사용
|
|
24
|
+
npx spets start "task" --agent gemini # Google Gemini CLI
|
|
25
|
+
npx spets start "task" --agent codex # OpenAI Codex CLI
|
|
26
|
+
npx spets start "task" --agent opencode # OpenCode CLI
|
|
27
|
+
|
|
23
28
|
# 상태 확인
|
|
24
29
|
npx spets status
|
|
25
30
|
|
|
@@ -110,7 +115,11 @@ Issue/PR 코멘트로 워크플로우를 제어합니다:
|
|
|
110
115
|
Repository Secrets에 추가:
|
|
111
116
|
- `CLAUDE_CODE_OAUTH_TOKEN` - Claude 인증 토큰 (`claude setup-token`으로 생성)
|
|
112
117
|
|
|
113
|
-
##
|
|
118
|
+
## AI CLI Plugins
|
|
119
|
+
|
|
120
|
+
Spets provides skill/command definitions for use within AI CLI sessions:
|
|
121
|
+
|
|
122
|
+
### Claude Code
|
|
114
123
|
|
|
115
124
|
```bash
|
|
116
125
|
# Claude Code 스킬 설치
|
|
@@ -120,6 +129,20 @@ npx spets plugin install claude
|
|
|
120
129
|
/spets start "task description"
|
|
121
130
|
```
|
|
122
131
|
|
|
132
|
+
### Gemini CLI
|
|
133
|
+
|
|
134
|
+
The Gemini CLI skill is included at `.gemini/commands/spets.md`. Use it within a Gemini CLI session.
|
|
135
|
+
|
|
136
|
+
### Codex CLI
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
# Codex 스킬 설치
|
|
140
|
+
npx spets plugin install codex
|
|
141
|
+
|
|
142
|
+
# Codex에서 사용
|
|
143
|
+
/spets start "task description"
|
|
144
|
+
```
|
|
145
|
+
|
|
123
146
|
## Configuration
|
|
124
147
|
|
|
125
148
|
`.spets/config.yml`:
|
|
@@ -162,10 +185,31 @@ The `cleanup-branch.sh` hook is automatically created by `spets init`.
|
|
|
162
185
|
- `SPETS_BRANCH` - Current git branch name
|
|
163
186
|
- `SPETS_CWD` - Working directory
|
|
164
187
|
|
|
188
|
+
## Supported AI Agents
|
|
189
|
+
|
|
190
|
+
Spets supports multiple AI agents via the `--agent` flag:
|
|
191
|
+
|
|
192
|
+
| Agent | Command | Auto-approve Flag |
|
|
193
|
+
|-------|---------|-------------------|
|
|
194
|
+
| Claude (default) | `claude` | `--permission-mode bypassPermissions` |
|
|
195
|
+
| Gemini | `gemini` | `--yolo` |
|
|
196
|
+
| Codex | `codex` | `exec --full-auto` |
|
|
197
|
+
| OpenCode | `opencode` | `run` |
|
|
198
|
+
|
|
199
|
+
```bash
|
|
200
|
+
# Set default agent in config
|
|
201
|
+
# .spets/config.yml
|
|
202
|
+
agent: gemini # or claude, codex, opencode
|
|
203
|
+
```
|
|
204
|
+
|
|
165
205
|
## Requirements
|
|
166
206
|
|
|
167
207
|
- Node.js >= 18
|
|
168
|
-
-
|
|
208
|
+
- One of the following AI CLIs:
|
|
209
|
+
- Claude CLI (`claude` command) - default
|
|
210
|
+
- Gemini CLI (`gemini` command) - `--agent gemini`
|
|
211
|
+
- Codex CLI (`codex` command) - `--agent codex`
|
|
212
|
+
- OpenCode CLI (`opencode` command) - `--agent opencode`
|
|
169
213
|
- GitHub CLI (`gh`) - GitHub 연동 사용 시
|
|
170
214
|
|
|
171
215
|
## License
|
|
@@ -5,9 +5,11 @@ name: Spets Workflow
|
|
|
5
5
|
|
|
6
6
|
on:
|
|
7
7
|
issues:
|
|
8
|
-
types: [opened]
|
|
8
|
+
types: [opened, closed]
|
|
9
9
|
issue_comment:
|
|
10
10
|
types: [created]
|
|
11
|
+
pull_request:
|
|
12
|
+
types: [closed]
|
|
11
13
|
|
|
12
14
|
permissions:
|
|
13
15
|
contents: write
|
|
@@ -189,3 +191,54 @@ jobs:
|
|
|
189
191
|
git add -A
|
|
190
192
|
git diff --staged --quiet || git commit -m "Spets: Update from #${{ github.event.issue.number }}"
|
|
191
193
|
git push
|
|
194
|
+
|
|
195
|
+
# Cleanup branch when Issue is closed
|
|
196
|
+
cleanup-branch-on-issue-close:
|
|
197
|
+
if: github.event.action == 'closed' && github.event_name == 'issues' && contains(github.event.issue.labels.*.name, 'spets')
|
|
198
|
+
runs-on: ubuntu-latest
|
|
199
|
+
|
|
200
|
+
steps:
|
|
201
|
+
- name: Find and delete branch
|
|
202
|
+
env:
|
|
203
|
+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
204
|
+
run: |
|
|
205
|
+
# Parse branch name from Issue body (same logic as start-workflow)
|
|
206
|
+
ISSUE_BODY=$(gh api repos/${{ github.repository }}/issues/${{ github.event.issue.number }} --jq '.body')
|
|
207
|
+
CUSTOM_BRANCH=$(echo "$ISSUE_BODY" | sed -n '/### Branch Name/,/###/{/###/!p;}' | sed '/^$/d' | head -1)
|
|
208
|
+
|
|
209
|
+
if [ -n "$CUSTOM_BRANCH" ]; then
|
|
210
|
+
BRANCH="$CUSTOM_BRANCH"
|
|
211
|
+
else
|
|
212
|
+
BRANCH="spets/${{ github.event.issue.number }}"
|
|
213
|
+
fi
|
|
214
|
+
|
|
215
|
+
echo "Attempting to delete branch: $BRANCH"
|
|
216
|
+
|
|
217
|
+
# Delete branch if it exists (ignore errors if already deleted)
|
|
218
|
+
if gh api "repos/${{ github.repository }}/branches/$BRANCH" --silent 2>/dev/null; then
|
|
219
|
+
gh api -X DELETE "repos/${{ github.repository }}/git/refs/heads/$BRANCH" || echo "Branch already deleted or protected"
|
|
220
|
+
echo "Branch $BRANCH deleted"
|
|
221
|
+
else
|
|
222
|
+
echo "Branch $BRANCH not found, skipping"
|
|
223
|
+
fi
|
|
224
|
+
|
|
225
|
+
# Cleanup branch when PR is merged
|
|
226
|
+
cleanup-branch-on-pr-merge:
|
|
227
|
+
if: github.event.action == 'closed' && github.event_name == 'pull_request' && github.event.pull_request.merged == true
|
|
228
|
+
runs-on: ubuntu-latest
|
|
229
|
+
|
|
230
|
+
steps:
|
|
231
|
+
- name: Delete merged branch
|
|
232
|
+
env:
|
|
233
|
+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
234
|
+
run: |
|
|
235
|
+
BRANCH="${{ github.event.pull_request.head.ref }}"
|
|
236
|
+
echo "Attempting to delete merged branch: $BRANCH"
|
|
237
|
+
|
|
238
|
+
# Delete branch if it exists (ignore errors if already deleted)
|
|
239
|
+
if gh api "repos/${{ github.repository }}/branches/$BRANCH" --silent 2>/dev/null; then
|
|
240
|
+
gh api -X DELETE "repos/${{ github.repository }}/git/refs/heads/$BRANCH" || echo "Branch already deleted or protected"
|
|
241
|
+
echo "Branch $BRANCH deleted"
|
|
242
|
+
else
|
|
243
|
+
echo "Branch $BRANCH not found, skipping"
|
|
244
|
+
fi
|