feinai 0.5.5 → 0.5.7

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 CHANGED
@@ -165,7 +165,7 @@ tasks — atomic work units with blocked_by, quality_gates, worktree
165
165
  events — append-only audit log: {parent_process}:{pid}:{user}
166
166
  ```
167
167
 
168
- Every mutation is logged. Every agent is identified. Override identity with `$FEINA_USER`.
168
+ Every mutation is logged. Every agent is identified. Override identity with `$FEINAI_USER`.
169
169
 
170
170
  ---
171
171
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "feinai",
3
- "version": "0.5.5",
3
+ "version": "0.5.7",
4
4
  "description": "Task & spec manager for AI agents — parallel worktrees, live dashboard, SDD skills",
5
5
  "type": "module",
6
6
  "bin": {
@@ -7,45 +7,102 @@ description: Use when tasks exist in feinai for a spec and need to be executed.
7
7
 
8
8
  Execute the pending tasks of a SPEC. One responsibility: dispatch subagents in worktrees, integrate their output, handle failures.
9
9
 
10
- ## Preconditions
10
+ ## Preconditions — environment check
11
11
 
12
- Before anything else, verify the environment:
12
+ Run this first:
13
13
 
14
14
  ```bash
15
15
  feinai --version 2>&1
16
16
  feinai git status 2>&1
17
17
  ```
18
18
 
19
- **If `feinai: command not found` or `opengit: command not found`:**
19
+ ---
20
+
21
+ ### Failure: `feinai: command not found`
22
+
23
+ feinai is not installed. Tell the user:
24
+
25
+ > feinai is not installed. Install with:
26
+ > ```bash
27
+ > bun install -g feinai
28
+ > ```
29
+ > Full setup guide: https://www.npmjs.com/package/feinai
30
+
31
+ **Offer to run it.** Do not proceed until `feinai --version` returns a version number.
32
+
33
+ ---
34
+
35
+ ### Failure: `feinai` found but `opengit: command not found`
36
+
37
+ opengit ships with feinai — if it's missing, the install is incomplete. Tell the user:
38
+
39
+ > opengit is missing. Reinstall feinai:
40
+ > ```bash
41
+ > bun remove -g feinai && bun install -g feinai
42
+ > ```
43
+
44
+ **Offer to run it.**
45
+
46
+ ---
20
47
 
21
- This means `~/.bun/bin` is not on PATH in this shell context. This is a known issue with bun global installs in non-interactive sessions.
48
+ ### Failure: `feinai --version` works but `feinai status` fails with command not found in a different shell
22
49
 
23
- Tell the user:
50
+ PATH issue in non-interactive SSH session. `~/.bun/bin` is not loaded. Tell the user:
24
51
 
25
- > `feinai` (or `opengit`) is not on PATH in this shell context. This happens in non-interactive SSH sessions where `~/.bun/bin` is not loaded.
52
+ > feinai is installed but not on PATH in this shell context (common in non-interactive SSH sessions).
26
53
  >
27
- > Fix with a one-time symlink (requires sudo/root):
54
+ > Fix with a one-time symlink (requires root):
28
55
  > ```bash
29
56
  > sudo ln -sf ~/.bun/bin/feinai /usr/local/bin/feinai
30
57
  > sudo ln -sf ~/.bun/bin/opengit /usr/local/bin/opengit
31
58
  > sudo ln -sf ~/.bun/bin/bun /usr/local/bin/bun
32
59
  > ```
33
- > Or if root access is available via a different user (e.g. `do-hermes`):
60
+ > Or via root SSH if available:
34
61
  > ```bash
35
- > ssh do-hermes "ln -sf /home/martin/.bun/bin/feinai /usr/local/bin/feinai && ln -sf /home/martin/.bun/bin/opengit /usr/local/bin/opengit && ln -sf /home/martin/.bun/bin/bun /usr/local/bin/bun"
62
+ > ssh root@<host> "ln -sf /home/<user>/.bun/bin/feinai /usr/local/bin/feinai && ln -sf /home/<user>/.bun/bin/opengit /usr/local/bin/opengit && ln -sf /home/<user>/.bun/bin/bun /usr/local/bin/bun"
36
63
  > ```
37
- >
38
- > Want me to run this fix now?
39
64
 
40
- **Do not proceed until `feinai --version` returns a version number.**
65
+ **Offer to run it.** Full docs: https://www.npmjs.com/package/feinai
66
+
67
+ ---
68
+
69
+ ### Failure: `feinai status` exits with code 2 (`no .tasca/tasca.db found`)
70
+
71
+ feinai is installed but no DB in this project. Ask the user:
72
+
73
+ > No feinai DB found in this directory. Run `feinai init` to create one?
74
+
75
+ **Offer to run `feinai init`.**
76
+
77
+ ---
78
+
79
+ ### Failure: skills not activating in Claude Code
80
+
81
+ If Claude Code doesn't recognize `feinai-dispatch` or other skills after install:
82
+
83
+ > Run this to activate the skills:
84
+ > ```bash
85
+ > mkdir -p ~/.claude/skills
86
+ > SKILLS=~/.bun/install/global/node_modules/feinai/skills
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
89
+ > done
90
+ > ```
91
+ > Then restart Claude Code.
92
+
93
+ **Offer to run it.**
94
+
95
+ ---
41
96
 
42
- Then verify:
97
+ **Do not proceed to dispatch until all checks pass:**
43
98
 
44
- 1. `feinai status` succeeds
45
- 2. The SPEC has pending tasks: `feinai list --spec SPEC-NNN --pending --json` returns non-empty
46
- 3. The current working directory is a clean git repo (no uncommitted changes blocking worktree creation)
99
+ 1. `feinai --version` returns a version number
100
+ 2. `feinai git status` runs without error
101
+ 3. `feinai status` exits 0 (DB found)
102
+ 4. The SPEC has pending tasks: `feinai list --spec SPEC-NNN --pending --json` returns non-empty
103
+ 5. Current working directory is a clean git repo
47
104
 
48
- If any fails: stop and report. Do not improvise.
105
+ If any fails: stop, diagnose, offer the fix above.
49
106
 
50
107
  ## Input
51
108
 
@@ -3,7 +3,7 @@ name: feinai-sdd
3
3
  description: Use when working in spec-driven development (SDD) workflows that involve brainstorming, writing-plans, or subagent-driven-development AND the project has a `.tasca/tasca.db` file. Replaces creating markdown files in `docs/superpowers/specs/` and `docs/superpowers/plans/` with atomic `feinai` CLI calls, keeping state queryable, race-free, and audit-logged. Also use when the user asks to create a spec, add a task, claim work, or mark progress, in a project that uses tasca.
4
4
  ---
5
5
 
6
- # Tasca SDD integration
6
+ # feinai SDD integration
7
7
 
8
8
  `feinai` is a CLI + local SQLite database for managing specs, plans, and tasks in
9
9
  SDD workflows. When a project has `.tasca/tasca.db`, you should write to that
@@ -20,7 +20,7 @@ just change *where the artifacts get stored*.
20
20
  Invoke when **all** of the following are true:
21
21
 
22
22
  1. The project has a `.tasca/tasca.db` file (walk up the directory tree from
23
- the current working directory; tasca uses the same discovery pattern as git).
23
+ the current working directory; feinai uses the same discovery pattern as git).
24
24
  Check with: `feinai status` (exit code 0 = tasca is set up).
25
25
  2. You are about to:
26
26
  - Write a spec via the `brainstorming` skill, OR
@@ -41,10 +41,20 @@ Before any spec / plan / task write, run:
41
41
  feinai status 2>/dev/null
42
42
  ```
43
43
 
44
- - Exit code 0: tasca is active in this project → use this skill.
44
+ - Exit code 0: feinai is active in this project → use this skill.
45
45
  - Exit code 2: `No .tasca/tasca.db found` → fall back to vanilla superpowers
46
46
  (or ask the user `feinai init` if it seems intended).
47
- - Command not found: tasca is not installed. Tell the user and stop.
47
+ - Command not found: feinai is not installed or not on PATH. Tell the user:
48
+
49
+ > `feinai` is not found. Install it with:
50
+ > ```bash
51
+ > bun install -g feinai
52
+ > ```
53
+ > Full documentation and setup guide: https://www.npmjs.com/package/feinai
54
+ >
55
+ > If already installed but not found in this shell context (non-interactive SSH), see the PATH setup section in the docs above.
56
+
57
+ Stop and wait for the user to confirm it's fixed before continuing.
48
58
 
49
59
  ---
50
60
 
@@ -86,7 +96,7 @@ FEINAI_EOF
86
96
 
87
97
  ### What replaces what
88
98
 
89
- | Superpowers step | tasca equivalent |
99
+ | Superpowers step | feinai equivalent |
90
100
  |---|---|
91
101
  | `Write(docs/superpowers/specs/YYYY-MM-DD-X-design.md, ...)` | `feinai spec add SPEC-NNN "title" --stdin <<<` content |
92
102
  | Spec self-review (re-read the markdown) | `feinai spec content SPEC-NNN` (returns the markdown) |
@@ -159,7 +169,7 @@ single response, the full payload: `description` (workplan), `quality_gates`,
159
169
  `packages`, `blocked_by`. **The subagent never has to read the plan markdown.**
160
170
 
161
171
  This is the single biggest token saving and the strongest correctness
162
- guarantee from using tasca: each subagent's context contains exactly the task
172
+ guarantee from using feinai: each subagent's context contains exactly the task
163
173
  it's executing, nothing else.
164
174
 
165
175
  ---
@@ -238,7 +248,7 @@ human-readable rationale; the tasks are the executable state.
238
248
 
239
249
  ### ❌ Don't create `docs/superpowers/specs/*.md` files
240
250
 
241
- If tasca is active, those files become a source of drift. The spec lives in
251
+ If feinai is active, those files become a source of drift. The spec lives in
242
252
  the database. If you need to publish the spec elsewhere (PR description, wiki,
243
253
  etc.), export it on demand: `feinai spec content SPEC-X > /tmp/spec.md`.
244
254
 
@@ -252,9 +262,9 @@ subagents that both `show` then act will collide. Always `feinai take`.
252
262
  The CLI handles concurrency, audit logging, and validation. Direct SQL
253
263
  mutations bypass the events table and leave the audit log incomplete.
254
264
 
255
- ### ✅ Do set `FEINA_USER` for explicit subagent identity
265
+ ### ✅ Do set `FEINAI_USER` for explicit subagent identity
256
266
 
257
- When dispatching a subagent, pass `FEINA_USER=subagent-N` in its environment
267
+ When dispatching a subagent, pass `FEINAI_USER=subagent-N` in its environment
258
268
  so the audit log distinguishes which subagent did what. Otherwise the actor
259
269
  field will read `bun:<pid>:<user>` for everyone.
260
270
 
@@ -284,8 +294,8 @@ field will read `bun:<pid>:<user>` for everyone.
284
294
 
285
295
  This skill is **additive**. The superpowers skills (`brainstorming`,
286
296
  `writing-plans`, `subagent-driven-development`, etc.) still run; they still
287
- own the process. tasca only changes the storage of the artifacts they produce.
297
+ own the process. feinai only changes the storage of the artifacts they produce.
288
298
 
289
- If you start brainstorming and discover the project has no tasca DB, fall back
299
+ If you start brainstorming and discover the project has no feinai DB, fall back
290
300
  to the normal superpowers behavior (markdown files). Do not silently switch
291
301
  storage strategy mid-project.
package/src/cli.ts CHANGED
@@ -48,7 +48,7 @@ import {
48
48
  type OutputFormat,
49
49
  } from "./format";
50
50
 
51
- const VERSION = "0.5.5";
51
+ const VERSION = "0.5.7";
52
52
 
53
53
  interface ParsedArgs {
54
54
  positional: string[];
@@ -126,7 +126,7 @@ function detectFormat(args: ParsedArgs): OutputFormat {
126
126
  * Build a stable identifier for whoever is invoking feina.
127
127
  *
128
128
  * Priority:
129
- * 1. $FEINA_USER env var (explicit override — used by agents to identify themselves)
129
+ * 1. $FEINAI_USER env var (explicit override — used by agents to identify themselves)
130
130
  * 2. parent process name (on Linux via /proc/$PPID/comm) → "{parent_name}:{ppid}:{user}"
131
131
  * 3. fallback: "{user}@{hostname}"
132
132
  *
@@ -134,7 +134,7 @@ function detectFormat(args: ParsedArgs): OutputFormat {
134
134
  * from "bash:9999:m" in the events audit log without manual configuration.
135
135
  */
136
136
  function getCurrentUser(): string {
137
- const override = process.env.FEINA_USER;
137
+ const override = process.env.FEINAI_USER;
138
138
  if (override) return override;
139
139
 
140
140
  const username = process.env.USER ?? userInfo().username ?? "unknown";
@@ -259,7 +259,7 @@ GLOBAL FLAGS:
259
259
  --version Show version
260
260
 
261
261
  ENV:
262
- FEINA_USER Override owner/actor identity used in audit log
262
+ FEINAI_USER Override owner/actor identity used in audit log
263
263
 
264
264
  \x1b[34m\x1b[1m── Agent Integration ──────────────────────────────────────────────\x1b[0m
265
265
  \x1b[36mTeach your AI agents to use \x1b[1mfeina\x1b[0m\x1b[36m as their single source of truth for\x1b[0m