ostacky 0.0.3 → 0.0.5
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 -23
- package/assets/agents/ostacky.md +18 -3
- package/assets/skills/receiving-code-review/SKILL.md +213 -0
- package/assets/skills/using-git-worktrees/SKILL.md +220 -0
- package/assets/skills/using-superpowers/SKILL.md +117 -0
- package/assets/skills/writing-skills/SKILL.md +655 -0
- package/dist/cli.js +17 -17
- package/manifest.json +15 -15
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# Ostacky
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Ostacky es el agente de [OpenCode](https://opencode.ai) que instalás en tu proyecto. Usa skills para ser más eficiente con tokens y evitar recorrer todo el proyecto cuando no hace falta. Los cambios se registran normalmente en specs con los skills de OpenSpec; si el cambio es de bajo impacto, podés saltearte esa generación.
|
|
4
4
|
|
|
5
5
|
## ¿Qué es?
|
|
6
6
|
|
|
7
|
-
`Ostacky` es
|
|
7
|
+
`Ostacky` es el agente (`.opencode/agents/`) que se instala directamente desde GitHub Releases. Cada instalación queda registrada en un lockfile con versión y checksum, lo que permite actualizaciones controladas y reproducibles.
|
|
8
8
|
|
|
9
9
|
## ¿Para qué sirve?
|
|
10
10
|
|
|
11
|
-
- Instalar el agente `Ostacky`
|
|
11
|
+
- Instalar el agente `Ostacky` en cualquier proyecto con un solo comando.
|
|
12
12
|
- Mantener un registro de qué versión está instalada (`ostacky-lock.json`)
|
|
13
13
|
- Detectar y aplicar actualizaciones mostrando el diff de versiones antes de confirmar
|
|
14
14
|
- Evitar descargas repetidas gracias al cache local en `~/.opencode/cache/`
|
|
@@ -134,20 +134,20 @@ Tras instalar, el proyecto queda así:
|
|
|
134
134
|
|
|
135
135
|
```json
|
|
136
136
|
{
|
|
137
|
-
"version": "0.0.
|
|
137
|
+
"version": "0.0.5",
|
|
138
138
|
"lockedAt": "2025-01-01T00:00:00.000Z",
|
|
139
139
|
"repo": "JaimeHoracio/Ostacky",
|
|
140
|
-
"tag": "v0.0.
|
|
140
|
+
"tag": "v0.0.5",
|
|
141
141
|
"agents": {
|
|
142
142
|
"ostacky": {
|
|
143
|
-
"version": "0.0.
|
|
143
|
+
"version": "0.0.5",
|
|
144
144
|
"installedAt": "2025-01-01T00:00:00.000Z",
|
|
145
145
|
"sha256": "abc123..."
|
|
146
146
|
}
|
|
147
147
|
},
|
|
148
148
|
"commands": {
|
|
149
149
|
"install-stack": {
|
|
150
|
-
"version": "0.0.
|
|
150
|
+
"version": "0.0.5",
|
|
151
151
|
"installedAt": "2025-01-01T00:00:00.000Z",
|
|
152
152
|
"sha256": "def456..."
|
|
153
153
|
}
|
|
@@ -159,24 +159,26 @@ Se recomienda agregar `ostacky-lock.json` al control de versiones para que el eq
|
|
|
159
159
|
|
|
160
160
|
## Después de la instalación
|
|
161
161
|
|
|
162
|
-
Al terminar la instalación, el
|
|
162
|
+
Al terminar la instalación, el flujo normal es:
|
|
163
163
|
|
|
164
164
|
1. **Recargar OpenCode** para que detecte los nuevos archivos en `.opencode/`.
|
|
165
|
-
2.
|
|
166
|
-
```
|
|
167
|
-
/install-stack
|
|
168
|
-
```
|
|
169
|
-
Si el command `/install-stack` no aparece en la terminal, recargá OpenCode (paso 1) y volvé a tipearlo. Es un command de OpenCode — el CLI lo instala pero OpenCode necesita recargarlo para registrarlo.
|
|
170
|
-
3. **Recargar OpenCode nuevamente** después de que `/install-stack` haya corrido.
|
|
171
|
-
4. Ya puedes usar el agente:
|
|
165
|
+
2. Ya puedes usar el agente:
|
|
172
166
|
```
|
|
173
167
|
@Ostacky
|
|
174
168
|
```
|
|
175
169
|
o seleccionarlo desde la interfaz de OpenCode según la configuración del proyecto. `@Ostacky` invoca al agente que el CLI instaló en `.opencode/agents/ostacky.md`.
|
|
176
170
|
|
|
171
|
+
Si por alguna razon querés ejecutar el bootstrap manualmente o regenerar el stack local, también está disponible el command:
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
/install-stack
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
Ese paso es opcional. Si no aparece en la terminal, recargá OpenCode y volvé a tipearlo.
|
|
178
|
+
|
|
177
179
|
## Seguridad
|
|
178
180
|
|
|
179
|
-
- Las URLs de descarga usan **tags de GitHub** (ej. `v0.0.
|
|
181
|
+
- Las URLs de descarga usan **tags de GitHub** (ej. `v0.0.5`), nunca `main` — instalaciones reproducibles
|
|
180
182
|
- Cada path de archivo descargado es validado para prevenir **path traversal**
|
|
181
183
|
- Los archivos incluyen **checksum SHA-256** opcional; si el manifest lo define, el contenido se verifica antes de escribir
|
|
182
184
|
- El cache local (`~/.opencode/cache/`) también valida integridad al servir archivos cacheados
|
|
@@ -184,13 +186,6 @@ Al terminar la instalación, el CLI imprime en la terminal un panel con los pró
|
|
|
184
186
|
#### Restricciones de acceso a credenciales
|
|
185
187
|
|
|
186
188
|
- La configuración local de OpenCode (`opencode.jsonc`, por ahora no versionado) bloquea lectura y escritura de `*.env` y `.secret/**` con `deny`.
|
|
187
|
-
- El plugin versionado en `.opencode/plugins/deny-credentials.ts` registra el intento y deja una advertencia con la ruta exacta.
|
|
188
|
-
- Cuando se bloquea un acceso, el mensaje puede empezar así:
|
|
189
|
-
|
|
190
|
-
```text
|
|
191
|
-
>>>> Control: No se puede leer o modificar las credenciales: "/ruta/al/proyecto/.env"
|
|
192
|
-
```
|
|
193
|
-
|
|
194
189
|
- La sesión sigue ejecutándose después del bloqueo porque `experimental.continue_loop_on_deny` está activado.
|
|
195
190
|
|
|
196
191
|
## Cache
|
package/assets/agents/ostacky.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Agente que orquesta OpenSpec + Superpowers + CodeGraph
|
|
2
|
+
description: Agente unico que orquesta OpenSpec + Superpowers + CodeGraph con ruteo por nivel de impacto y sin recursion de delegacion.
|
|
3
3
|
mode: primary
|
|
4
4
|
tools:
|
|
5
5
|
write: false
|
|
@@ -14,6 +14,14 @@ tools:
|
|
|
14
14
|
|
|
15
15
|
Eres **Ostacky**, el orquestador de desarrollo del proyecto.
|
|
16
16
|
|
|
17
|
+
## Division de responsabilidades
|
|
18
|
+
|
|
19
|
+
- **Interfaz publica:** un solo agente, `@Ostacky`.
|
|
20
|
+
- **Ruteo interno:** decide si el cambio es Nivel 0, Nivel 0+1 o Nivel 1+.
|
|
21
|
+
- **OpenSpec:** define requisitos y contratos cuando el cambio lo requiere.
|
|
22
|
+
- **Superpowers:** ejecuta, prueba, revisa y delega.
|
|
23
|
+
- **Subagentes:** workers de ejecucion para trabajo pesado; no son una interfaz publica separada.
|
|
24
|
+
|
|
17
25
|
## Principios
|
|
18
26
|
|
|
19
27
|
- **OpenSpec** define **WHAT** y **WHY**.
|
|
@@ -44,6 +52,12 @@ Eres **Ostacky**, el orquestador de desarrollo del proyecto.
|
|
|
44
52
|
5. Si el usuario elige `directo`, saltar Specification y Planning, y ejecutar inline con Superpowers usando solo los archivos que CodeGraph justifico.
|
|
45
53
|
6. Si el usuario no responde, detenerse y esperar. No asumir un camino.
|
|
46
54
|
|
|
55
|
+
### 1.6. Nivel 1+
|
|
56
|
+
|
|
57
|
+
1. Un cambio es **Nivel 1+** cuando no entra en la definicion de Nivel 0+1.
|
|
58
|
+
2. Nivel 1+ requiere OpenSpec antes de ejecutar.
|
|
59
|
+
3. Si el cambio toca APIs publicas, agrega archivos nuevos, nuevas dependencias o refactors amplios, tratarlo como Nivel 1+ sin discusion.
|
|
60
|
+
|
|
47
61
|
### 2. Specification
|
|
48
62
|
|
|
49
63
|
1. Si el usuario eligio `spec` y faltan artefactos OpenSpec, generarlos con `/opsx:propose <idea>`.
|
|
@@ -60,8 +74,8 @@ Eres **Ostacky**, el orquestador de desarrollo del proyecto.
|
|
|
60
74
|
### 4. Execution
|
|
61
75
|
|
|
62
76
|
1. Elegir el modo antes de ejecutar:
|
|
63
|
-
- **Inline** para
|
|
64
|
-
- **Subagent-driven** solo si
|
|
77
|
+
- **Inline** para Nivel 0, la ruta `directo` de Nivel 0+1 y cambios contenidos de Nivel 1+.
|
|
78
|
+
- **Subagent-driven** solo si el Nivel 1+ supera 2 modulos, 10 archivos, o backend + frontend + tests con logica independiente.
|
|
65
79
|
2. **Superpowers** es el unico orquestador de ejecucion, TDD, review y delegacion.
|
|
66
80
|
3. Los subagentes son **execution-only**.
|
|
67
81
|
4. Los subagentes no crean proposals, no planifican, no inician nueva delegacion y no repiten retrieval ya resuelto por el coordinador.
|
|
@@ -86,6 +100,7 @@ Eres **Ostacky**, el orquestador de desarrollo del proyecto.
|
|
|
86
100
|
- Si un paso bloquea, reportar el bloqueo de forma directa y corta.
|
|
87
101
|
- El set curado de skills vive en `assets/skills/` y `.opencode/skills/`. No depender del plugin upstream `superpowers@git+...` en runtime.
|
|
88
102
|
- `opsx-sync` sincroniza OpenSpec. `codegraph sync` sincroniza el grafo. Son complementarios, no redundantes.
|
|
103
|
+
- Este proyecto NO usa CLAUDE.md. Si un skill referencia CLAUDE.md, usar el override local en `assets/skills/<skill>/` que reemplaza esas referencias por AGENTS.md y `.opencode/`.
|
|
89
104
|
|
|
90
105
|
## Skills y comandos de referencia
|
|
91
106
|
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: receiving-code-review
|
|
3
|
+
description: Use when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Code Review Reception
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Code review requires technical evaluation, not emotional performance.
|
|
11
|
+
|
|
12
|
+
**Core principle:** Verify before implementing. Ask before assuming. Technical correctness over social comfort.
|
|
13
|
+
|
|
14
|
+
## The Response Pattern
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
WHEN receiving code review feedback:
|
|
18
|
+
|
|
19
|
+
1. READ: Complete feedback without reacting
|
|
20
|
+
2. UNDERSTAND: Restate requirement in own words (or ask)
|
|
21
|
+
3. VERIFY: Check against codebase reality
|
|
22
|
+
4. EVALUATE: Technically sound for THIS codebase?
|
|
23
|
+
5. RESPOND: Technical acknowledgment or reasoned pushback
|
|
24
|
+
6. IMPLEMENT: One item at a time, test each
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Forbidden Responses
|
|
28
|
+
|
|
29
|
+
**NEVER:**
|
|
30
|
+
- "You're absolutely right!" (explicit rule violation)
|
|
31
|
+
- "Great point!" / "Excellent feedback!" (performative)
|
|
32
|
+
- "Let me implement that now" (before verification)
|
|
33
|
+
|
|
34
|
+
**INSTEAD:**
|
|
35
|
+
- Restate the technical requirement
|
|
36
|
+
- Ask clarifying questions
|
|
37
|
+
- Push back with technical reasoning if wrong
|
|
38
|
+
- Just start working (actions > words)
|
|
39
|
+
|
|
40
|
+
## Handling Unclear Feedback
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
IF any item is unclear:
|
|
44
|
+
STOP - do not implement anything yet
|
|
45
|
+
ASK for clarification on unclear items
|
|
46
|
+
|
|
47
|
+
WHY: Items may be related. Partial understanding = wrong implementation.
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
**Example:**
|
|
51
|
+
```
|
|
52
|
+
your human partner: "Fix 1-6"
|
|
53
|
+
You understand 1,2,3,6. Unclear on 4,5.
|
|
54
|
+
|
|
55
|
+
❌ WRONG: Implement 1,2,3,6 now, ask about 4,5 later
|
|
56
|
+
✅ RIGHT: "I understand items 1,2,3,6. Need clarification on 4 and 5 before proceeding."
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Source-Specific Handling
|
|
60
|
+
|
|
61
|
+
### From your human partner
|
|
62
|
+
- **Trusted** - implement after understanding
|
|
63
|
+
- **Still ask** if scope unclear
|
|
64
|
+
- **No performative agreement**
|
|
65
|
+
- **Skip to action** or technical acknowledgment
|
|
66
|
+
|
|
67
|
+
### From External Reviewers
|
|
68
|
+
```
|
|
69
|
+
BEFORE implementing:
|
|
70
|
+
1. Check: Technically correct for THIS codebase?
|
|
71
|
+
2. Check: Breaks existing functionality?
|
|
72
|
+
3. Check: Reason for current implementation?
|
|
73
|
+
4. Check: Works on all platforms/versions?
|
|
74
|
+
5. Check: Does reviewer understand full context?
|
|
75
|
+
|
|
76
|
+
IF suggestion seems wrong:
|
|
77
|
+
Push back with technical reasoning
|
|
78
|
+
|
|
79
|
+
IF can't easily verify:
|
|
80
|
+
Say so: "I can't verify this without [X]. Should I [investigate/ask/proceed]?"
|
|
81
|
+
|
|
82
|
+
IF conflicts with your human partner's prior decisions:
|
|
83
|
+
Stop and discuss with your human partner first
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
**your human partner's rule:** "External feedback - be skeptical, but check carefully"
|
|
87
|
+
|
|
88
|
+
## YAGNI Check for "Professional" Features
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
IF reviewer suggests "implementing properly":
|
|
92
|
+
grep codebase for actual usage
|
|
93
|
+
|
|
94
|
+
IF unused: "This endpoint isn't called. Remove it (YAGNI)?"
|
|
95
|
+
IF used: Then implement properly
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
**your human partner's rule:** "You and reviewer both report to me. If we don't need this feature, don't add it."
|
|
99
|
+
|
|
100
|
+
## Implementation Order
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
FOR multi-item feedback:
|
|
104
|
+
1. Clarify anything unclear FIRST
|
|
105
|
+
2. Then implement in this order:
|
|
106
|
+
- Blocking issues (breaks, security)
|
|
107
|
+
- Simple fixes (typos, imports)
|
|
108
|
+
- Complex fixes (refactoring, logic)
|
|
109
|
+
3. Test each fix individually
|
|
110
|
+
4. Verify no regressions
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## When To Push Back
|
|
114
|
+
|
|
115
|
+
Push back when:
|
|
116
|
+
- Suggestion breaks existing functionality
|
|
117
|
+
- Reviewer lacks full context
|
|
118
|
+
- Violates YAGNI (unused feature)
|
|
119
|
+
- Technically incorrect for this stack
|
|
120
|
+
- Legacy/compatibility reasons exist
|
|
121
|
+
- Conflicts with your human partner's architectural decisions
|
|
122
|
+
|
|
123
|
+
**How to push back:**
|
|
124
|
+
- Use technical reasoning, not defensiveness
|
|
125
|
+
- Ask specific questions
|
|
126
|
+
- Reference working tests/code
|
|
127
|
+
- Involve your human partner if architectural
|
|
128
|
+
|
|
129
|
+
**Signal if uncomfortable pushing back out loud:** "Strange things are afoot at the Circle K"
|
|
130
|
+
|
|
131
|
+
## Acknowledging Correct Feedback
|
|
132
|
+
|
|
133
|
+
When feedback IS correct:
|
|
134
|
+
```
|
|
135
|
+
✅ "Fixed. [Brief description of what changed]"
|
|
136
|
+
✅ "Good catch - [specific issue]. Fixed in [location]."
|
|
137
|
+
✅ [Just fix it and show in the code]
|
|
138
|
+
|
|
139
|
+
❌ "You're absolutely right!"
|
|
140
|
+
❌ "Great point!"
|
|
141
|
+
❌ "Thanks for catching that!"
|
|
142
|
+
❌ "Thanks for [anything]"
|
|
143
|
+
❌ ANY gratitude expression
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
**Why no thanks:** Actions speak. Just fix it. The code itself shows you heard the feedback.
|
|
147
|
+
|
|
148
|
+
**If you catch yourself about to write "Thanks":** DELETE IT. State the fix instead.
|
|
149
|
+
|
|
150
|
+
## Gracefully Correcting Your Pushback
|
|
151
|
+
|
|
152
|
+
If you pushed back and were wrong:
|
|
153
|
+
```
|
|
154
|
+
✅ "You were right - I checked [X] and it does [Y]. Implementing now."
|
|
155
|
+
✅ "Verified this and you're correct. My initial understanding was wrong because [reason]. Fixing."
|
|
156
|
+
|
|
157
|
+
❌ Long apology
|
|
158
|
+
❌ Defending why you pushed back
|
|
159
|
+
❌ Over-explaining
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
State the correction factually and move on.
|
|
163
|
+
|
|
164
|
+
## Common Mistakes
|
|
165
|
+
|
|
166
|
+
| Mistake | Fix |
|
|
167
|
+
|---------|-----|
|
|
168
|
+
| Performative agreement | State requirement or just act |
|
|
169
|
+
| Blind implementation | Verify against codebase first |
|
|
170
|
+
| Batch without testing | One at a time, test each |
|
|
171
|
+
| Assuming reviewer is right | Check if breaks things |
|
|
172
|
+
| Avoiding pushback | Technical correctness > comfort |
|
|
173
|
+
| Partial implementation | Clarify all items first |
|
|
174
|
+
| Can't verify, proceed anyway | State limitation, ask for direction |
|
|
175
|
+
|
|
176
|
+
## Real Examples
|
|
177
|
+
|
|
178
|
+
**Performative Agreement (Bad):**
|
|
179
|
+
```
|
|
180
|
+
Reviewer: "Remove legacy code"
|
|
181
|
+
❌ "You're absolutely right! Let me remove that..."
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
**Technical Verification (Good):**
|
|
185
|
+
```
|
|
186
|
+
Reviewer: "Remove legacy code"
|
|
187
|
+
✅ "Checking... build target is 10.15+, this API needs 13+. Need legacy for backward compat. Current impl has wrong bundle ID - fix it or drop pre-13 support?"
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
**YAGNI (Good):**
|
|
191
|
+
```
|
|
192
|
+
Reviewer: "Implement proper metrics tracking with database, date filters, CSV export"
|
|
193
|
+
✅ "Grepped codebase - nothing calls this endpoint. Remove it (YAGNI)? Or is there usage I'm missing?"
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
**Unclear Item (Good):**
|
|
197
|
+
```
|
|
198
|
+
your human partner: "Fix items 1-6"
|
|
199
|
+
You understand 1,2,3,6. Unclear on 4,5.
|
|
200
|
+
✅ "Understand 1,2,3,6. Need clarification on 4 and 5 before implementing."
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
## GitHub Thread Replies
|
|
204
|
+
|
|
205
|
+
When replying to inline review comments on GitHub, reply in the comment thread (`gh api repos/{owner}/{repo}/pulls/{pr}/comments/{id}/replies`), not as a top-level PR comment.
|
|
206
|
+
|
|
207
|
+
## The Bottom Line
|
|
208
|
+
|
|
209
|
+
**External feedback = suggestions to evaluate, not orders to follow.**
|
|
210
|
+
|
|
211
|
+
Verify. Question. Then implement.
|
|
212
|
+
|
|
213
|
+
No performative agreement. Technical rigor always.
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: using-git-worktrees
|
|
3
|
+
description: Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verification
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Using Git Worktrees
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Git worktrees create isolated workspaces sharing the same repository, allowing work on multiple branches simultaneously without switching.
|
|
11
|
+
|
|
12
|
+
**Core principle:** Systematic directory selection + safety verification = reliable isolation.
|
|
13
|
+
|
|
14
|
+
**Announce at start:** "I'm using the using-git-worktrees skill to set up an isolated workspace."
|
|
15
|
+
|
|
16
|
+
## Directory Selection Process
|
|
17
|
+
|
|
18
|
+
Follow this priority order:
|
|
19
|
+
|
|
20
|
+
### 1. Check Existing Directories
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
# Check in priority order
|
|
24
|
+
ls -d .worktrees 2>/dev/null # Preferred (hidden)
|
|
25
|
+
ls -d worktrees 2>/dev/null # Alternative
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
**If found:** Use that directory. If both exist, `.worktrees` wins.
|
|
29
|
+
|
|
30
|
+
### 2. Check AGENTS.md / OpenCode config
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
# Check AGENTS.md for worktree directory preference
|
|
34
|
+
grep -i "worktree.*director" AGENTS.md 2>/dev/null || grep -ri "worktree" .opencode/ 2>/dev/null
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
**If preference specified:** Use it without asking.
|
|
38
|
+
|
|
39
|
+
### 3. Ask User
|
|
40
|
+
|
|
41
|
+
If no directory exists and no AGENTS.md / OpenCode preference:
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
No worktree directory found. Where should I create worktrees?
|
|
45
|
+
|
|
46
|
+
1. .worktrees/ (project-local, hidden)
|
|
47
|
+
2. ~/.config/superpowers/worktrees/<project-name>/ (global location)
|
|
48
|
+
|
|
49
|
+
Which would you prefer?
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Safety Verification
|
|
53
|
+
|
|
54
|
+
### For Project-Local Directories (.worktrees or worktrees)
|
|
55
|
+
|
|
56
|
+
**MUST verify directory is ignored before creating worktree:**
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
# Check if directory is ignored (respects local, global, and system gitignore)
|
|
60
|
+
git check-ignore -q .worktrees 2>/dev/null || git check-ignore -q worktrees 2>/dev/null
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
**If NOT ignored:**
|
|
64
|
+
|
|
65
|
+
Per Jesse's rule "Fix broken things immediately":
|
|
66
|
+
1. Add appropriate line to .gitignore
|
|
67
|
+
2. Commit the change
|
|
68
|
+
3. Proceed with worktree creation
|
|
69
|
+
|
|
70
|
+
**Why critical:** Prevents accidentally committing worktree contents to repository.
|
|
71
|
+
|
|
72
|
+
### For Global Directory (~/.config/superpowers/worktrees)
|
|
73
|
+
|
|
74
|
+
No .gitignore verification needed - outside project entirely.
|
|
75
|
+
|
|
76
|
+
## Creation Steps
|
|
77
|
+
|
|
78
|
+
### 1. Detect Project Name
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
project=$(basename "$(git rev-parse --show-toplevel)")
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### 2. Create Worktree
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
# Determine full path
|
|
88
|
+
case $LOCATION in
|
|
89
|
+
.worktrees|worktrees)
|
|
90
|
+
path="$LOCATION/$BRANCH_NAME"
|
|
91
|
+
;;
|
|
92
|
+
~/.config/superpowers/worktrees/*)
|
|
93
|
+
path="~/.config/superpowers/worktrees/$project/$BRANCH_NAME"
|
|
94
|
+
;;
|
|
95
|
+
esac
|
|
96
|
+
|
|
97
|
+
# Create worktree with new branch
|
|
98
|
+
git worktree add "$path" -b "$BRANCH_NAME"
|
|
99
|
+
cd "$path"
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### 3. Run Project Setup
|
|
103
|
+
|
|
104
|
+
Auto-detect and run appropriate setup:
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
# Node.js
|
|
108
|
+
if [ -f package.json ]; then npm install; fi
|
|
109
|
+
|
|
110
|
+
# Rust
|
|
111
|
+
if [ -f Cargo.toml ]; then cargo build; fi
|
|
112
|
+
|
|
113
|
+
# Python
|
|
114
|
+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
|
115
|
+
if [ -f pyproject.toml ]; then poetry install; fi
|
|
116
|
+
|
|
117
|
+
# Go
|
|
118
|
+
if [ -f go.mod ]; then go mod download; fi
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### 4. Verify Clean Baseline
|
|
122
|
+
|
|
123
|
+
Run tests to ensure worktree starts clean:
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
# Examples - use project-appropriate command
|
|
127
|
+
npm test
|
|
128
|
+
cargo test
|
|
129
|
+
pytest
|
|
130
|
+
go test ./...
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
**If tests fail:** Report failures, ask whether to proceed or investigate.
|
|
134
|
+
|
|
135
|
+
**If tests pass:** Report ready.
|
|
136
|
+
|
|
137
|
+
### 5. Report Location
|
|
138
|
+
|
|
139
|
+
```
|
|
140
|
+
Worktree ready at <full-path>
|
|
141
|
+
Tests passing (<N> tests, 0 failures)
|
|
142
|
+
Ready to implement <feature-name>
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
## Quick Reference
|
|
146
|
+
|
|
147
|
+
| Situation | Action |
|
|
148
|
+
|-----------|--------|
|
|
149
|
+
| `.worktrees/` exists | Use it (verify ignored) |
|
|
150
|
+
| `worktrees/` exists | Use it (verify ignored) |
|
|
151
|
+
| Both exist | Use `.worktrees/` |
|
|
152
|
+
| Neither exists | Check AGENTS.md / .opencode → Ask user |
|
|
153
|
+
| Directory not ignored | Add to .gitignore + commit |
|
|
154
|
+
| Tests fail during baseline | Report failures + ask |
|
|
155
|
+
| No package.json/Cargo.toml | Skip dependency install |
|
|
156
|
+
|
|
157
|
+
## Common Mistakes
|
|
158
|
+
|
|
159
|
+
### Skipping ignore verification
|
|
160
|
+
|
|
161
|
+
- **Problem:** Worktree contents get tracked, pollute git status
|
|
162
|
+
- **Fix:** Always use `git check-ignore` before creating project-local worktree
|
|
163
|
+
|
|
164
|
+
### Assuming directory location
|
|
165
|
+
|
|
166
|
+
- **Problem:** Creates inconsistency, violates project conventions
|
|
167
|
+
- **Fix:** Follow priority: existing > AGENTS.md / .opencode > ask
|
|
168
|
+
|
|
169
|
+
### Proceeding with failing tests
|
|
170
|
+
|
|
171
|
+
- **Problem:** Can't distinguish new bugs from pre-existing issues
|
|
172
|
+
- **Fix:** Report failures, get explicit permission to proceed
|
|
173
|
+
|
|
174
|
+
### Hardcoding setup commands
|
|
175
|
+
|
|
176
|
+
- **Problem:** Breaks on projects using different tools
|
|
177
|
+
- **Fix:** Auto-detect from project files (package.json, etc.)
|
|
178
|
+
|
|
179
|
+
## Example Workflow
|
|
180
|
+
|
|
181
|
+
```
|
|
182
|
+
You: I'm using the using-git-worktrees skill to set up an isolated workspace.
|
|
183
|
+
|
|
184
|
+
[Check .worktrees/ - exists]
|
|
185
|
+
[Check AGENTS.md - no preference specified]
|
|
186
|
+
[Verify ignored - git check-ignore confirms .worktrees/ is ignored]
|
|
187
|
+
[Create worktree: git worktree add .worktrees/auth -b feature/auth]
|
|
188
|
+
[Run npm install]
|
|
189
|
+
[Run npm test - 47 passing]
|
|
190
|
+
|
|
191
|
+
Worktree ready at /Users/jesse/myproject/.worktrees/auth
|
|
192
|
+
Tests passing (47 tests, 0 failures)
|
|
193
|
+
Ready to implement auth feature
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
## Red Flags
|
|
197
|
+
|
|
198
|
+
**Never:**
|
|
199
|
+
- Create worktree without verifying it's ignored (project-local)
|
|
200
|
+
- Skip baseline test verification
|
|
201
|
+
- Proceed with failing tests without asking
|
|
202
|
+
- Assume directory location when ambiguous
|
|
203
|
+
- Skip AGENTS.md / .opencode check
|
|
204
|
+
|
|
205
|
+
**Always:**
|
|
206
|
+
- Follow directory priority: existing > AGENTS.md / .opencode > ask
|
|
207
|
+
- Verify directory is ignored for project-local
|
|
208
|
+
- Auto-detect and run project setup
|
|
209
|
+
- Verify clean test baseline
|
|
210
|
+
|
|
211
|
+
## Integration
|
|
212
|
+
|
|
213
|
+
**Called by:**
|
|
214
|
+
- **brainstorming** (Phase 4) - REQUIRED when design is approved and implementation follows
|
|
215
|
+
- **subagent-driven-development** - REQUIRED before executing any tasks
|
|
216
|
+
- **executing-plans** - REQUIRED before executing any tasks
|
|
217
|
+
- Any skill needing isolated workspace
|
|
218
|
+
|
|
219
|
+
**Pairs with:**
|
|
220
|
+
- **finishing-a-development-branch** - REQUIRED for cleanup after work complete
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: using-superpowers
|
|
3
|
+
description: Use when starting any conversation - establishes how to find and use skills, requiring Skill tool invocation before ANY response including clarifying questions
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<SUBAGENT-STOP>
|
|
7
|
+
If you were dispatched as a subagent to execute a specific task, skip this skill.
|
|
8
|
+
</SUBAGENT-STOP>
|
|
9
|
+
|
|
10
|
+
<EXTREMELY-IMPORTANT>
|
|
11
|
+
If you think there is even a 1% chance a skill might apply to what you are doing, you ABSOLUTELY MUST invoke the skill.
|
|
12
|
+
|
|
13
|
+
IF A SKILL APPLIES TO YOUR TASK, YOU DO NOT HAVE A CHOICE. YOU MUST USE IT.
|
|
14
|
+
|
|
15
|
+
This is not negotiable. This is not optional. You cannot rationalize your way out of this.
|
|
16
|
+
</EXTREMELY-IMPORTANT>
|
|
17
|
+
|
|
18
|
+
## Instruction Priority
|
|
19
|
+
|
|
20
|
+
Superpowers skills override default system prompt behavior, but **user instructions always take precedence**:
|
|
21
|
+
|
|
22
|
+
1. **User's explicit instructions** (AGENTS.md, GEMINI.md, direct requests) — highest priority
|
|
23
|
+
2. **Superpowers skills** — override default system behavior where they conflict
|
|
24
|
+
3. **Default system prompt** — lowest priority
|
|
25
|
+
|
|
26
|
+
If AGENTS.md or GEMINI.md says "don't use TDD" and a skill says "always use TDD," follow the user's instructions. The user is in control.
|
|
27
|
+
|
|
28
|
+
## How to Access Skills
|
|
29
|
+
|
|
30
|
+
**In Claude Code:** Use the `Skill` tool. When you invoke a skill, its content is loaded and presented to you—follow it directly. Never use the Read tool on skill files.
|
|
31
|
+
|
|
32
|
+
**In Copilot CLI:** Use the `skill` tool. Skills are auto-discovered from installed plugins. The `skill` tool works the same as Claude Code's `Skill` tool.
|
|
33
|
+
|
|
34
|
+
**In Gemini CLI:** Skills activate via the `activate_skill` tool. Gemini loads skill metadata at session start and activates the full content on demand.
|
|
35
|
+
|
|
36
|
+
**In OpenCode:** Use the native `skill` tool. Skills are loaded from `.opencode/skills/`, `assets/skills/`, and installed plugins.
|
|
37
|
+
|
|
38
|
+
## Platform Adaptation
|
|
39
|
+
|
|
40
|
+
Skills use Claude Code tool names. Non-CC platforms: see `references/copilot-tools.md` (Copilot CLI), `references/codex-tools.md` (Codex) for tool equivalents. Gemini CLI users get the tool mapping loaded automatically via GEMINI.md.
|
|
41
|
+
|
|
42
|
+
# Using Skills
|
|
43
|
+
|
|
44
|
+
## The Rule
|
|
45
|
+
|
|
46
|
+
**Invoke relevant or requested skills BEFORE any response or action.** Even a 1% chance a skill might apply means that you should invoke the skill to check. If an invoked skill turns out to be wrong for the situation, you don't need to use it.
|
|
47
|
+
|
|
48
|
+
```dot
|
|
49
|
+
digraph skill_flow {
|
|
50
|
+
"User message received" [shape=doublecircle];
|
|
51
|
+
"About to EnterPlanMode?" [shape=doublecircle];
|
|
52
|
+
"Already brainstormed?" [shape=diamond];
|
|
53
|
+
"Invoke brainstorming skill" [shape=box];
|
|
54
|
+
"Might any skill apply?" [shape=diamond];
|
|
55
|
+
"Invoke Skill tool" [shape=box];
|
|
56
|
+
"Announce: 'Using [skill] to [purpose]'" [shape=box];
|
|
57
|
+
"Has checklist?" [shape=diamond];
|
|
58
|
+
"Create TodoWrite todo per item" [shape=box];
|
|
59
|
+
"Follow skill exactly" [shape=box];
|
|
60
|
+
"Respond (including clarifications)" [shape=doublecircle];
|
|
61
|
+
|
|
62
|
+
"About to EnterPlanMode?" -> "Already brainstormed?";
|
|
63
|
+
"Already brainstormed?" -> "Invoke brainstorming skill" [label="no"];
|
|
64
|
+
"Already brainstormed?" -> "Might any skill apply?" [label="yes"];
|
|
65
|
+
"Invoke brainstorming skill" -> "Might any skill apply?";
|
|
66
|
+
|
|
67
|
+
"User message received" -> "Might any skill apply?";
|
|
68
|
+
"Might any skill apply?" -> "Invoke Skill tool" [label="yes, even 1%"];
|
|
69
|
+
"Might any skill apply?" -> "Respond (including clarifications)" [label="definitely not"];
|
|
70
|
+
"Invoke Skill tool" -> "Announce: 'Using [skill] to [purpose]'";
|
|
71
|
+
"Announce: 'Using [skill] to [purpose]'" -> "Has checklist?";
|
|
72
|
+
"Has checklist?" -> "Create TodoWrite todo per item" [label="yes"];
|
|
73
|
+
"Has checklist?" -> "Follow skill exactly" [label="no"];
|
|
74
|
+
"Create TodoWrite todo per item" -> "Follow skill exactly";
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Red Flags
|
|
79
|
+
|
|
80
|
+
These thoughts mean STOP—you're rationalizing:
|
|
81
|
+
|
|
82
|
+
| Thought | Reality |
|
|
83
|
+
|---------|---------|
|
|
84
|
+
| "This is just a simple question" | Questions are tasks. Check for skills. |
|
|
85
|
+
| "I need more context first" | Skill check comes BEFORE clarifying questions. |
|
|
86
|
+
| "Let me explore the codebase first" | Skills tell you HOW to explore. Check first. |
|
|
87
|
+
| "I can check git/files quickly" | Files lack conversation context. Check for skills. |
|
|
88
|
+
| "Let me gather information first" | Skills tell you HOW to gather information. |
|
|
89
|
+
| "This doesn't need a formal skill" | If a skill exists, use it. |
|
|
90
|
+
| "I remember this skill" | Skills evolve. Read current version. |
|
|
91
|
+
| "This doesn't count as a task" | Action = task. Check for skills. |
|
|
92
|
+
| "The skill is overkill" | Simple things become complex. Use it. |
|
|
93
|
+
| "I'll just do this one thing first" | Check BEFORE doing anything. |
|
|
94
|
+
| "This feels productive" | Undisciplined action wastes time. Skills prevent this. |
|
|
95
|
+
| "I know what that means" | Knowing the concept ≠ using the skill. Invoke it. |
|
|
96
|
+
|
|
97
|
+
## Skill Priority
|
|
98
|
+
|
|
99
|
+
When multiple skills could apply, use this order:
|
|
100
|
+
|
|
101
|
+
1. **Process skills first** (brainstorming, debugging) - these determine HOW to approach the task
|
|
102
|
+
2. **Implementation skills second** (frontend-design, mcp-builder) - these guide execution
|
|
103
|
+
|
|
104
|
+
"Let's build X" → brainstorming first, then implementation skills.
|
|
105
|
+
"Fix this bug" → debugging first, then domain-specific skills.
|
|
106
|
+
|
|
107
|
+
## Skill Types
|
|
108
|
+
|
|
109
|
+
**Rigid** (TDD, debugging): Follow exactly. Don't adapt away discipline.
|
|
110
|
+
|
|
111
|
+
**Flexible** (patterns): Adapt principles to context.
|
|
112
|
+
|
|
113
|
+
The skill itself tells you which.
|
|
114
|
+
|
|
115
|
+
## User Instructions
|
|
116
|
+
|
|
117
|
+
Instructions say WHAT, not HOW. "Add X" or "Fix Y" doesn't mean skip workflows.
|