feinai 0.6.6 → 0.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/CHANGELOG.md CHANGED
@@ -3,6 +3,22 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
5
5
 
6
+ ## [0.7.0] - 2026-06-22
7
+
8
+ ### Added
9
+ - **Project-scoped server port tracking** (`server_state` table in `feinai.db`)
10
+ - `feinai status` now validates & repairs the server record before printing the exact project URL
11
+ - `feinai server` auto-increments from port 8272 when the default is busy
12
+ - `feinai server --down` targets the recorded pid/port for this project
13
+ - Graceful shutdown clears the server record from the DB
14
+ - 6 unit tests for server-state DB operations
15
+
16
+ ### Changed
17
+ - **Normalized language**: removed all "Claude Code" and provider-specific references across CLI, README, and skill files
18
+ - `feinai-implement` skill fully translated from Spanish to English
19
+ - `CLAUDE.md` references → `AGENTS.md`, `.claude/ARCHITECTURE.md` → `ARCHITECTURE.md`
20
+ - `formatStatus` accepts optional `serverUrl` parameter
21
+
6
22
  ## [0.6.3] - 2026-06-11
7
23
 
8
24
  ### Fixed
package/README.md CHANGED
@@ -109,28 +109,26 @@ Agents don't parse `QUEUE.md`. They talk to a small local coordination service i
109
109
 
110
110
  ---
111
111
 
112
- ## Claude Code skills
112
+ ## Agent harness skills
113
113
 
114
- feinai ships five Claude Code skills covering the full development loop. They activate automatically when `.feinai/feinai.db` is present:
114
+ feinai ships three skills covering the full development loop. They activate automatically when `.feinai/feinai.db` is present:
115
115
 
116
- | Skill | Purpose |
117
- |---------------------|--------------------------------------------------------|
118
- | `feinai-sdd` | Teaches Claude the feinai workflow and concepts |
119
- | `feinai-write-spec` | Writes spec + plan into feinai from a design thread |
120
- | `feinai-write-tasks`| Decomposes a plan into atomic tasks with parallelism |
121
- | `feinai-dispatch` | Orchestrates subagents in isolated git worktrees |
122
- | `feinai-implement` | Claims and executes one task end‑to‑end |
116
+ | Skill | Purpose |
117
+ |---------------------|----------------------------------------------------------------------------------|
118
+ | `feinai-write-spec` | Full pipeline: spec + plan + tasks. With no argument runs the complete flow; with a SPEC-ID argument regenerates tasks only (use when iterating on an existing plan) |
119
+ | `feinai-dispatch` | Orchestrates subagents in isolated git worktrees |
120
+ | `feinai-implement` | Claims and executes one task end‑to‑end |
123
121
 
124
122
  Together they cover: design → spec → plan → tasks → parallel execution → merge.
125
123
 
126
- ### Activating skills in Claude Code
124
+ ### Activating skills
127
125
 
128
126
  ```sh
129
- mkdir -p ~/.claude/skills
127
+ mkdir -p <your-harness-skills-dir>
130
128
  SKILLS=~/.bun/install/global/node_modules/feinai/skills
131
129
 
132
- for skill in feinai-sdd feinai-write-spec feinai-write-tasks feinai-dispatch feinai-implement; do
133
- ln -sf "$SKILLS/$skill" ~/.claude/skills/$skill
130
+ for skill in feinai-write-spec feinai-dispatch feinai-implement; do
131
+ ln -sf "$SKILLS/$skill" <your-harness-skills-dir>/$skill
134
132
  done
135
133
  ```
136
134
 
@@ -151,7 +149,7 @@ This installs:
151
149
 
152
150
  ### PATH setup (non‑interactive SSH)
153
151
 
154
- In interactive shells and for local agents (Claude Code, opencode) it should work out of the box.
152
+ In interactive shells and for local coding agents it should work out of the box.
155
153
 
156
154
  For non‑interactive SSH sessions (e.g. `ssh host 'feinai status'`), you may need a one‑time setup:
157
155
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "feinai",
3
- "version": "0.6.6",
3
+ "version": "0.7.0",
4
4
  "description": "Task & spec manager for AI agents — parallel worktrees, live dashboard, SDD skills",
5
5
  "type": "module",
6
6
  "bin": {
@@ -21,7 +21,6 @@
21
21
  "keywords": [
22
22
  "task-manager",
23
23
  "sdd",
24
- "claude-code",
25
24
  "ai-agents",
26
25
  "sqlite",
27
26
  "cli",
@@ -76,19 +76,19 @@ feinai is installed but no DB in this project. Ask the user:
76
76
 
77
77
  ---
78
78
 
79
- ### Failure: skills not activating in Claude Code
79
+ ### Failure: skills not activating in your agent harness
80
80
 
81
- If Claude Code doesn't recognize `feinai-dispatch` or other skills after install:
81
+ If your agent harness doesn't recognize `feinai-dispatch` or other skills after install:
82
82
 
83
83
  > Run this to activate the skills:
84
84
  > ```bash
85
- > mkdir -p ~/.claude/skills
85
+ > mkdir -p <your-harness-skills-dir>
86
86
  > SKILLS=~/.bun/install/global/node_modules/feinai/skills
87
87
  > for skill in feinai-sdd feinai-write-spec feinai-write-tasks feinai-dispatch feinai-implement; do
88
- > ln -sf "$SKILLS/$skill" ~/.claude/skills/$skill
88
+ > ln -sf "$SKILLS/$skill" <your-harness-skills-dir>/$skill
89
89
  > done
90
90
  > ```
91
- > Then restart Claude Code.
91
+ > Then restart your agent harness.
92
92
 
93
93
  **Offer to run it.**
94
94
 
@@ -162,7 +162,7 @@ For each iteration:
162
162
  For each task to dispatch:
163
163
 
164
164
  ```bash
165
- git worktree add .claude/worktrees/TASK-X-id <branch>
165
+ git worktree add .worktrees/TASK-X-id <branch>
166
166
  ```
167
167
 
168
168
  Branch naming: `feature/TASK-X-id-slug` derived from the subject.
@@ -171,7 +171,7 @@ Branch naming: `feature/TASK-X-id-slug` derived from the subject.
171
171
 
172
172
  ```bash
173
173
  feinai take TASK-X --json # atomic claim, sin worktree aún
174
- feinai task edit TASK-X --worktree .claude/worktrees/TASK-X-id
174
+ feinai task edit TASK-X --worktree .worktrees/TASK-X-id
175
175
  ```
176
176
 
177
177
  Order matters: take first (atomic reservation), then edit to record the worktree path.
@@ -218,7 +218,7 @@ For each `completed` task:
218
218
 
219
219
  1. Run the quality gates **again** in the worktree as a final check
220
220
  2. Merge worktree branch into the working branch
221
- 3. Remove the worktree: `git worktree remove .claude/worktrees/TASK-X-id`
221
+ 3. Remove the worktree: `git worktree remove .worktrees/TASK-X-id`
222
222
  4. Clear the worktree field: `feinai task edit TASK-X --worktree ""`
223
223
 
224
224
  If the merge has conflicts → treat as a failure. Go to Phase 3.
@@ -270,7 +270,7 @@ When `feinai list --spec SPEC-NNN --pending --json` returns empty:
270
270
 
271
271
  ### Worktree rules (non-negotiable)
272
272
 
273
- - ✅ Each task gets its own worktree under `.claude/worktrees/`
273
+ - ✅ Each task gets its own worktree under `.worktrees/`
274
274
  - ✅ Subagent never switches branches, never works outside its worktree
275
275
  - ✅ Worktree path is recorded in feinai (`worktree` field) immediately after `take`
276
276
  - ❌ Never run `git checkout` on the main working tree during dispatch
@@ -17,117 +17,117 @@ If any fails: stop and report. Do not improvise.
17
17
 
18
18
  ---
19
19
 
20
- ## AL ARRANCAR
20
+ ## On startup
21
21
 
22
- 1. `feinai list --pending --json` — encontrá la primera tarea disponible (sin blockers pendientes)
23
- 2. Si no hay ninguna respondé "No hay tareas pendientes" y pará
24
- 3. `feinai take <TASK-ID> --owner implement-agent` — tomala atómicamente
25
- 4. Si la tarea tiene `spec_id` → `feinai spec content <SPEC-ID>` para contexto
26
- 5. Si la tarea tiene `blocked_by` con tareas no completadas soltá con `feinai release <TASK-ID>` y pará
22
+ 1. `feinai list --pending --json` — find the first available task (no pending blockers)
23
+ 2. If none existsrespond "No pending tasks" and stop
24
+ 3. `feinai take <TASK-ID> --owner implement-agent` — claim it atomically
25
+ 4. If the task has `spec_id` → `feinai spec content <SPEC-ID>` for context
26
+ 5. If the task has `blocked_by` with uncompleted tasksrelease with `feinai release <TASK-ID>` and stop
27
27
 
28
- Leé `AGENTS.md` del proyecto para arquitectura y convenciones del proyecto específico.
28
+ Read `AGENTS.md` of the project for architecture and project-specific conventions.
29
29
 
30
30
  ---
31
31
 
32
- ## Ejecutar la tarea
32
+ ## Execute the task
33
33
 
34
- **Paso 1 — Worktree aislado:**
34
+ **Step 1 — Isolated worktree:**
35
35
  ```bash
36
36
  feinai git worktree add .worktrees/<TASK-ID> origin/main
37
37
  cd .worktrees/<TASK-ID>
38
38
  ```
39
39
 
40
- **Paso 2 — Setup del worktree:**
41
- Instalá dependencias si el proyecto las requiere. Consultá `AGENTS.md` del proyecto para el comando exacto.
40
+ **Step 2 — Worktree setup:**
41
+ Install dependencies if the project requires them. Check `AGENTS.md` of the project for the exact command.
42
42
 
43
- **Paso 3 — Leer antes de escribir:**
44
- - La descripción completa de la tarea (`feinai show <TASK-ID>`)
45
- - Los archivos que vas a tocar léelos antes de editarlos
46
- - Si hay un **Workplan** en la descripciónejecutá esos pasos en ese orden exacto
43
+ **Step 3 — Read before writing:**
44
+ - The full task description (`feinai show <TASK-ID>`)
45
+ - The files you will touchread them before editing
46
+ - If there is a **Workplan** in the descriptionfollow those steps in exact order
47
47
 
48
- **Paso 4 — Implementar:**
49
- Exactamente lo que dice la tarea. Ni más ni menos.
50
- - No toques archivos fuera del scope de la tarea
51
- - Si un archivo "a crear" ya existeextendelo en lugar de sobrescribirlo si ya tiene contenido válido
48
+ **Step 4 — Implement:**
49
+ Exactly what the task says. No more, no less.
50
+ - Do not touch files outside the task scope
51
+ - If a file "to create" already existsextend it instead of overwriting if it already contains valid content
52
52
 
53
- **Paso 5 — Commit:**
54
- Un commit por tarea. Conventional commits:
53
+ **Step 5 — Commit:**
54
+ One commit per task. Conventional commits:
55
55
  ```
56
- feat(scope): descripción concisa
56
+ feat(scope): concise description
57
57
  ```
58
- Tipos: `feat`, `fix`, `refactor`, `test`, `chore`.
58
+ Types: `feat`, `fix`, `refactor`, `test`, `chore`.
59
59
 
60
- **Paso 6 — Quality gates:**
61
- Corré los gates definidos en la tarea (`quality_gates`). Si la tarea no los especifica, consultá `AGENTS.md` del proyecto para los gates por defecto.
60
+ **Step 6 — Quality gates:**
61
+ Run the gates defined in the task (`quality_gates`). If the task does not specify them, check `AGENTS.md` of the project for default gates.
62
62
 
63
- **Paso 7 — Cerrar:**
63
+ **Step 7 — Close:**
64
64
 
65
- Gates pasan:
65
+ Gates pass:
66
66
  ```bash
67
- # Desde el worktree:
67
+ # From the worktree:
68
68
  feinai git push origin HEAD:main
69
69
 
70
- # Desde la raíz del repo:
70
+ # From the repo root:
71
71
  feinai git worktree remove .worktrees/<TASK-ID>
72
72
  feinai git complete
73
73
 
74
74
  feinai done <TASK-ID> --result "gates ✓"
75
75
  ```
76
76
 
77
- Gates fallanseguí "Si algo falla".
77
+ Gates failfollow "If something fails".
78
78
 
79
- **Done = 3 hechos observables:**
80
- 1. Quality gates pasan sin errores
81
- 2. Los archivos de la tarea existen con contenido correcto
82
- 3. Commit limpio en `main` y tarea en estado `completed` en feinai
79
+ **Done = 3 observable facts:**
80
+ 1. Quality gates pass without errors
81
+ 2. The task files exist with correct content
82
+ 3. Clean commit on `main` and task status `completed` in feinai
83
83
 
84
84
  ---
85
85
 
86
- ## Si algo falla
86
+ ## If something fails
87
87
 
88
- Gates fallan, push falla, o error en cualquier paso:
88
+ Gates fail, push fails, or error at any step:
89
89
 
90
- 1. **No limpies el worktree**
91
- 2. Push a rama backup:
90
+ 1. **Do not clean the worktree**
91
+ 2. Push to a backup branch:
92
92
  ```bash
93
93
  feinai git push origin HEAD:backup/<TASK-ID>
94
94
  ```
95
- 3. Marcá la tarea como fallida:
95
+ 3. Mark the task as failed:
96
96
  ```bash
97
- feinai fail <TASK-ID> --error "<comando exacto + output relevante>"
97
+ feinai fail <TASK-ID> --error "<exact command + relevant output>"
98
98
  ```
99
- 4. Dejá el worktree intacto para recuperación manual
99
+ 4. Leave the worktree intact for manual recovery
100
100
 
101
101
  ---
102
102
 
103
- ## Git — `feinai git` exclusivamente
103
+ ## Git — `feinai git` exclusively
104
104
 
105
- `git` y `gh` están bloqueados. Usá `feinai git` para todoes opengit bundleado con feinai.
105
+ `git` and `gh` are blocked. Use `feinai git` for everythingit is opengit bundled with feinai.
106
106
 
107
- **Permitido:**
107
+ **Allowed:**
108
108
  - `feinai git worktree add/list/lock/unlock`
109
109
  - `feinai git add`, `commit`, `push`, `status`, `diff`, `log`, `show`
110
- - `feinai git complete` — sincroniza main local tras push (solo desde raíz del repo)
110
+ - `feinai git complete` — syncs local main after push (only from repo root)
111
111
 
112
- **Prohibido:**
113
- - `feinai git branch`, `checkout`, `switch` — nunca cambiar branches
112
+ **Prohibited:**
113
+ - `feinai git branch`, `checkout`, `switch` — never switch branches
114
114
  - `feinai git merge`, `rebase`, `reset`, `cherry-pick`
115
115
  - `feinai git fetch`, `pull`, `remote`, `clone`
116
116
  - `feinai git stash`, `tag`
117
- - `feinai git worktree remove` — solo tras push exitoso
117
+ - `feinai git worktree remove` — only after successful push
118
118
 
119
- Si `feinai git` falla → **STOP**. No reintentes, no uses `git`. Reportá al usuario.
119
+ If `feinai git` fails → **STOP**. Do not retry, do not use `git`. Report to the user.
120
120
 
121
121
  ---
122
122
 
123
- ## Reglas absolutas
123
+ ## Absolute rules
124
124
 
125
- **No modifiques:**
125
+ **Do not modify:**
126
126
  - `AGENTS.md`, `CLAUDE.md`
127
- - Archivos de configuración de CI/CD, infra, o secretos (`.env`, `.env.*`)
128
- - La DB de feinai directamente
127
+ - CI/CD, infrastructure, or secret configuration files (`.env`, `.env.*`)
128
+ - The feinai DB directly
129
129
 
130
- **Código:**
131
- - Sin `any` sin comentario justificado en la misma línea
132
- - Si un test falla: corregí el test O la implementación. Nunca silencies, skipees, ni agregues workarounds para que el gate "pase"
133
- - Si no es obvio cuál es la causa → **STOP**, reportá al usuario con el comando exacto y el output completo
130
+ **Code:**
131
+ - No `any` without a justified comment on the same line
132
+ - If a test fails: fix either the test or the implementation. Never silence, skip, or add workarounds to make the gate "pass"
133
+ - If the cause is not obvious → **STOP**, report to the user with the exact command and the full output
@@ -1,18 +1,31 @@
1
1
  ---
2
2
  name: feinai-write-spec
3
- description: Use when the user wants to design a new feature, refactor, or change in a project that has `.feinai/feinai.db`. Writes a complete spec + plan into feinai in a single session. Replaces `brainstorming` + `writing-plans` from superpowers when feinai is active. Reads project context (CLAUDE.md, ARCHITECTURE.md, README.md), asks clarifying questions only when context has gaps, and produces spec+plan atomically with one `feinai spec add` + one `feinai plan add`.
3
+ description: Use when the user wants to design a new feature, refactor, or change in a project that has `.feinai/feinai.db`. With no argument, runs the full pipeline (spec + plan + tasks). With a SPEC-ID argument, skips to task generation only (use when iterating on an existing plan). Replaces `brainstorming` + `writing-plans` + `feinai-write-tasks` from superpowers when feinai is active.
4
4
  ---
5
5
 
6
6
  # feinai-write-spec
7
7
 
8
- Write a spec + plan for a feature in one session. Output goes to feinai, not markdown files.
8
+ Full pipeline: spec plan tasks. One skill, two entry points.
9
+
10
+ ## Entry point detection
11
+
12
+ **Check the first argument before doing anything else.**
13
+
14
+ - **No argument** → full pipeline (Phases 1–5)
15
+ - **SPEC-ID given** (e.g. `SPEC-42`) → tasks only, jump to **Phase 4**
16
+
17
+ Ask the user which mode only if ambiguous.
18
+
19
+ ---
9
20
 
10
21
  ## Preconditions
11
22
 
12
23
  Run `feinai status` (exit 0 = feinai is active). If not active, stop and ask the
13
24
  user if they want `feinai init` or to fall back to vanilla superpowers.
14
25
 
15
- ## The flow — three entry modes
26
+ ---
27
+
28
+ ## Phase 1 — Decide entry mode (full pipeline only)
16
29
 
17
30
  Decide which entry mode applies BEFORE doing anything else. Ask the user only if ambiguous.
18
31
 
@@ -31,12 +44,12 @@ as a minimal change (just the input + endpoint call) or shall I think wider
31
44
 
32
45
  ---
33
46
 
34
- ## Phase 1 — Load project context
47
+ ## Phase 2 — Load project context (full pipeline only)
35
48
 
36
49
  Read **in this order, stop early if enough**:
37
50
 
38
- 1. `CLAUDE.md` (root) — already in your context normally
39
- 2. `.claude/ARCHITECTURE.md` or `ARCHITECTURE.md` (root)
51
+ 1. `AGENTS.md` (root) — already in your context normally
52
+ 2. `ARCHITECTURE.md` (root)
40
53
  3. `README.md`
41
54
  4. `decisions/` directory (just file names, read only if a name matches the topic)
42
55
 
@@ -50,9 +63,9 @@ Keep this phase tight — every read costs tokens. Stop as soon as you can write
50
63
 
51
64
  ---
52
65
 
53
- ## Phase 2 — Draft and write the spec
66
+ ## Phase 3 — Draft and write the spec + plan (full pipeline only)
54
67
 
55
- **Spec answers: what and why.** Not how.
68
+ ### Spec (what and why not how)
56
69
 
57
70
  Required sections:
58
71
  - **Goal** — one sentence
@@ -90,19 +103,14 @@ feinai spec add SPEC-NNN "Short title" --stdin <<'FEINAI_EOF'
90
103
  FEINAI_EOF
91
104
  ```
92
105
 
93
- ---
94
-
95
- ## Phase 3 — Draft and write the plan
96
-
97
- **Plan answers: how.** Architecture decisions, file map, dependencies.
106
+ ### Plan (how — architecture decisions, file map, dependencies)
98
107
 
99
108
  Required sections:
100
109
  - **Architecture overview** — 2–4 sentences
101
110
  - **Files to touch** — explicit list
102
- - **Task breakdown preview** — high-level (the actual tasks are written by `feinai-write-tasks`)
111
+ - **Task breakdown preview** — high-level (the actual tasks come in Phase 4)
103
112
  - **Quality gates** — the commands that prove correctness
104
113
 
105
- **Write the plan:**
106
114
  ```bash
107
115
  feinai plan add SPEC-NNN --stdin <<'FEINAI_EOF'
108
116
  # Plan v1 — SPEC-NNN: Title
@@ -127,19 +135,112 @@ FEINAI_EOF
127
135
 
128
136
  ---
129
137
 
130
- ## Phase 4 — Hand off
138
+ ## Phase 4 — Build the task graph
131
139
 
132
- Tell the user:
133
- > Spec + plan written: SPEC-NNN. View with `feinai spec show SPEC-NNN --full`.
134
- > Next step: run `/feinai-write-tasks SPEC-NNN` to break it down into executable tasks.
140
+ *Entry point when SPEC-ID is given as argument.*
141
+
142
+ ### Step 1 Load spec + plan
143
+
144
+ ```bash
145
+ feinai spec show SPEC-NNN --full
146
+ ```
147
+
148
+ Read both. Internalize:
149
+ - The WHAT (spec)
150
+ - The HOW (plan)
151
+ - The "Files to touch" list
152
+ - The "Task breakdown preview" — your starting point, not a contract
153
+
154
+ ### Step 2 — Analyze granularity and parallelism
155
+
156
+ **A. Granularity** — one task = one logical change a single subagent can complete in one session.
157
+ - Too big: "implement the entire auth system" → split by route
158
+ - Too small: "add a single import" → merge into larger task
159
+ - Sweet spot: ~50–300 lines, 1–3 files
160
+
161
+ **B. Parallelism rule — no exceptions:**
162
+
163
+ > **Tasks that touch the same file cannot run in parallel.**
164
+
165
+ When a **shared file** needs changes (e.g. `router.ts`, `index.ts`, schema), extract it first:
166
+
167
+ ```
168
+ TASK-NNN-0: edit shared file once
169
+ ↓ blocks
170
+ TASK-NNN-1: feature A ┐
171
+ TASK-NNN-2: feature B ├ parallel
172
+ TASK-NNN-3: feature C ┘
173
+ ```
135
174
 
136
- Do NOT create tasks here. That's `feinai-write-tasks`. One responsibility per skill.
175
+ **C. Dependencies** use `--blocked-by` for:
176
+ - File-level conflicts (above)
177
+ - Logical dependencies (B uses a type defined in A)
178
+
179
+ ### Step 3 — Embed TDD instructions
180
+
181
+ Each implementation task description starts with:
182
+
183
+ ```
184
+ ## TDD baseline
185
+ Write the tests first based on the "Tests required" section of SPEC-NNN.
186
+ Run them — they must fail (the implementation doesn't exist yet).
187
+ Implement until all tests pass. Then run the quality gates.
188
+ ```
189
+
190
+ No separate "write tests" tasks. Test + implementation live together.
191
+
192
+ **Exception:** if shared fixtures are needed across tasks, extract them into a tiny TASK-NNN-0 that others block on.
193
+
194
+ ### Step 4 — Write the tasks
195
+
196
+ ```bash
197
+ feinai add TASK-NNN-X "subject" \
198
+ --spec SPEC-NNN \
199
+ --desc "$(cat <<'EOF'
200
+ ## TDD baseline
201
+ Write the tests first based on the "Tests required" section of SPEC-NNN.
202
+ Run them — they must fail. Implement until they pass.
203
+
204
+ ## Files to touch
205
+ - packages/X/...
206
+ - packages/Y/...
207
+
208
+ ## Implementation notes
209
+ <concrete, copy-pasteable details. Cite line numbers if useful.>
210
+
211
+ ## Do not touch
212
+ - <files explicitly out of scope>
213
+ EOF
214
+ )" \
215
+ --package "@scope/pkg" \
216
+ --gate "pnpm --filter @scope/pkg typecheck" \
217
+ --gate "pnpm --filter @scope/pkg test -- --run" \
218
+ --blocked-by TASK-NNN-Y # repeatable if needed
219
+ ```
220
+
221
+ **Task description = self-contained.** The subagent reads only the task (via `feinai take`) and gets spec+plan as `spec_context` automatically.
137
222
 
138
223
  ---
139
224
 
140
- ## Key questions to ask (during, only if needed)
225
+ ## Phase 5 Hand off
226
+
227
+ Output a parallelism summary table:
228
+
229
+ ```
230
+ TASK-NNN-0: shared file edit (sequential)
231
+ TASK-NNN-1: feature A (parallel with 2, 3) blocked-by 0
232
+ TASK-NNN-2: feature B (parallel with 1, 3) blocked-by 0
233
+ TASK-NNN-3: feature C (parallel with 1, 2) blocked-by 0
234
+ TASK-NNN-4: integration tests (sequential) blocked-by 1, 2, 3
235
+ ```
236
+
237
+ Tell the user:
238
+ > Tasks written for SPEC-NNN. View with `feinai list --spec SPEC-NNN`.
239
+ > Next step: run `/feinai-dispatch SPEC-NNN` to execute.
240
+
241
+ ---
141
242
 
142
- These come up mid-session. Ask them inline, one at a time, brief:
243
+ ## Key questions to ask (inline, only if needed)
143
244
 
144
245
  - Ambiguity in scope: *"Do we include X in this spec or punt to a follow-up?"*
145
246
  - Missing architecture decision: *"This needs a choice between A and B. Default is A unless you say otherwise."*
@@ -152,18 +253,19 @@ These come up mid-session. Ask them inline, one at a time, brief:
152
253
  ## What NOT to do
153
254
 
154
255
  - ❌ Write `docs/superpowers/specs/*.md` files — spec lives in feinai
155
- - ❌ Create tasks in this skill — that's `feinai-write-tasks`
156
256
  - ❌ Invent architecture if `ARCHITECTURE.md` is silent — ask the user
157
257
  - ❌ Write spec content that is actually a plan (HOW). Keep them separated.
158
- - ❌ Ask the user to confirm before writing — write the spec, then they review with `feinai spec show`
258
+ - ❌ Ask the user to confirm before writing — write spec/plan/tasks, then they review
259
+ - ❌ Re-think architecture in Phase 4 — it's in the plan, follow it
260
+ - ❌ Write tasks without a SPEC-ID — every task must have `--spec SPEC-NNN`
261
+ - ❌ Skip the same-file analysis — it's the single biggest cause of merge conflicts
262
+ - ❌ Hardcode worktree paths — `feinai-dispatch` assigns those at execution time
159
263
 
160
264
  ---
161
265
 
162
266
  ## Subagent isolation
163
267
 
164
- If you delegate the spec drafting to a subagent (e.g. for parallel research),
165
- the subagent must NOT use this skill — it has no context. Hand it concrete
166
- findings and let it return text; you write to feinai yourself.
268
+ If you delegate spec drafting to a subagent, the subagent must NOT use this skill. Hand it concrete findings and let it return text; you write to feinai yourself.
167
269
 
168
270
  ---
169
271
 
@@ -176,3 +278,6 @@ findings and let it return text; you write to feinai yourself.
176
278
  | Update spec content | `feinai spec set-content SPEC-N --stdin <<<` content |
177
279
  | Write plan | `feinai plan add SPEC-N --stdin <<<` content |
178
280
  | Show spec+plan together | `feinai spec show SPEC-N --full` |
281
+ | List tasks for spec | `feinai list --spec SPEC-N` |
282
+ | Add task | `feinai add TASK-X "subject" --spec SPEC-N --desc "..." --gate "..." [--blocked-by TASK-Y]` |
283
+ | Edit task | `feinai task edit TASK-X --desc "..." --gate "..."` |
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: feinai-write-tasks
3
- description: Use when a spec + plan already exist in feinai (written by `feinai-write-spec` or manually) and need to be broken down into executable tasks. Decomposes the plan into atomic `feinai add` calls, analyzes file-level parallelism, and embeds TDD instructions. Output: a set of tasks with `blocked_by` dependencies ready for `feinai-dispatch` to execute.
3
+ description: "Use when a spec + plan already exist in feinai (written by `feinai-write-spec` or manually) and need to be broken down into executable tasks. Decomposes the plan into atomic `feinai add` calls, analyzes file-level parallelism, and embeds TDD instructions. Output: a set of tasks with `blocked_by` dependencies ready for `feinai-dispatch` to execute."
4
4
  ---
5
5
 
6
6
  # feinai-write-tasks