syntaur 0.4.0 → 0.4.1

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
@@ -1,128 +1,292 @@
1
1
  # Syntaur
2
2
 
3
- Syntaur is a local mission and assignment workflow for coding agents. It ships a CLI, a dashboard, a Claude Code plugin, and a Codex plugin.
3
+ Syntaur is a local project and assignment workflow for coding agents. It ships a CLI, a dashboard, a Claude Code plugin, and a Codex plugin.
4
4
 
5
- ## Install and Run
6
-
7
- Requirements:
5
+ ## Requirements
8
6
 
9
7
  - Node.js 20+
10
- - `npx` from npm
8
+ - `npm` 7+ (ships with Node 20); `npx` is used for zero-install runs
9
+
10
+ ---
11
+
12
+ ## Install
13
+
14
+ Two supported install styles. Both pull the same package from npm; the only difference is whether the `syntaur` binary lives on your `$PATH` or inside npm's cache.
15
+
16
+ ### Option A — `npx` (no global install)
11
17
 
12
- Run Syntaur directly with `npx`:
18
+ Best for trying Syntaur once, or for users who don't want anything on their `$PATH`.
13
19
 
14
20
  ```bash
15
- npx syntaur@latest
21
+ npx syntaur@latest # first run: initializes ~/.syntaur/ and walks setup
22
+ npx syntaur@latest dashboard
23
+ npx syntaur@latest doctor
24
+ ```
25
+
26
+ Every `npx syntaur@latest <cmd>` resolves against the npm registry (so you stay up to date), then runs from the cache at `~/.npm/_npx/<hash>/`. The CLI is not on your `$PATH` — you must type `npx syntaur@latest ...` each time.
27
+
28
+ ### Option B — Global install
29
+
30
+ Best for day-to-day use. You can run `syntaur ...` directly.
31
+
32
+ ```bash
33
+ npm install -g syntaur
34
+ syntaur # first run: initializes ~/.syntaur/ and walks setup
35
+ syntaur dashboard
36
+ ```
37
+
38
+ To upgrade: `npm install -g syntaur@latest`.
39
+
40
+ ### Option C — Upgrade from `npx` to global
41
+
42
+ If you start on `npx`, the CLI notices and offers to install globally on the first interactive run:
43
+
44
+ ```
45
+ You're running syntaur via npx. Install it globally for faster startup?
46
+ 1) Yes — install now
47
+ 2) Maybe later — just start it for now
48
+ 3) Never — don't ask again
16
49
  ```
17
50
 
18
- This downloads the published `syntaur` package into npm's cache and runs the CLI. It does not do a global install unless you choose to install it globally yourself.
51
+ - **1** runs `npm install -g syntaur` for you and records the decision in `~/.syntaur/npx-install.json`.
52
+ - **2** does nothing permanent; you'll be asked again on the next `npx` run.
53
+ - **3** writes `decision: never` to that same state file so the prompt never reappears.
19
54
 
20
- On first run, Syntaur will:
55
+ The prompt is automatically suppressed when:
21
56
 
22
- 1. Initialize `~/.syntaur/`
23
- 2. Offer to install the Claude Code plugin
24
- 3. Offer to install the Codex plugin
25
- 4. Ask where those plugins should be installed, with recommended defaults based on your current machine
57
+ - stdin or stdout isn't a TTY (piped commands, CI)
58
+ - the invocation is a meta command (`--help`, `--version`, `help`)
59
+ - `SYNTAUR_SKIP_INSTALL_PROMPT=1` is set
60
+ - `~/.syntaur/npx-install.json` already records a decision
61
+
62
+ To re-trigger the prompt after you've dismissed it, delete the state file:
63
+
64
+ ```bash
65
+ rm ~/.syntaur/npx-install.json
66
+ ```
67
+
68
+ If you're already globally installed and later run a newer `npx syntaur@latest`, the CLI instead offers to upgrade your global install to match.
69
+
70
+ ---
71
+
72
+ ## First-Run Setup
73
+
74
+ The first time you run `syntaur` or `npx syntaur@latest`, it walks through:
75
+
76
+ 1. Initialize `~/.syntaur/` (config, SQLite session registry, playbooks dir)
77
+ 2. Offer to install the Claude Code plugin (copies vendored protocol skills into `~/.claude/skills/` too)
78
+ 3. Offer to install the Codex plugin (copies vendored protocol skills into `~/.codex/skills/` too)
79
+ 4. Ask where those plugins should live, with sensible defaults based on your machine
26
80
  5. Offer to launch the dashboard
27
81
 
28
- You can also run setup explicitly:
82
+ Run setup explicitly any time:
29
83
 
30
84
  ```bash
31
- npx syntaur@latest setup
85
+ syntaur setup # or: npx syntaur@latest setup
32
86
  ```
33
87
 
34
- Non-interactive setup:
88
+ Non-interactive setup (useful in dotfile bootstrap scripts):
35
89
 
36
90
  ```bash
37
- npx syntaur@latest setup --yes
38
- npx syntaur@latest setup --yes --claude
39
- npx syntaur@latest setup --yes --codex
40
- npx syntaur@latest setup --yes --dashboard
91
+ syntaur setup --yes
92
+ syntaur setup --yes --claude
93
+ syntaur setup --yes --codex
94
+ syntaur setup --yes --dashboard
41
95
  ```
42
96
 
43
- ## Plugin Install Paths
97
+ ---
44
98
 
45
- Syntaur remembers the plugin install locations you choose in `~/.syntaur/config.md`.
99
+ ## What Gets Installed Where
46
100
 
47
- For Claude Code, Syntaur will detect the machine's local plugin marketplace when one exists and recommend installing into that marketplace's `plugins/` directory.
101
+ A full install (CLI + both plugins + skills) touches the following locations:
48
102
 
49
- Interactive commands will prompt for install locations:
103
+ | Location | What lives there | Managed by |
104
+ |---|---|---|
105
+ | `~/.syntaur/` | Your data: `projects/`, `assignments/`, `playbooks/`, `config.md`, `syntaur.db` | You (via CLI). Never deleted by `syntaur uninstall` unless `--all` is passed. |
106
+ | `~/.syntaur/npx-install.json` | Remembers your answer to the "install globally?" prompt | CLI |
107
+ | `~/.npm/_npx/<hash>/` | npx-cached copy of the `syntaur` package | npm |
108
+ | `$(npm root -g)/syntaur/` | Globally-installed copy of the `syntaur` package | `npm install -g` |
109
+ | `~/.claude/plugins/.../syntaur/` | Claude Code plugin directory (slash commands, hooks, agent, marketplace entry) | `syntaur install-plugin` |
110
+ | `~/.claude/skills/<skill>/` | Protocol skills (six of them) | `syntaur install-plugin` copies from the vendored `syntaur-skills` |
111
+ | `~/.codex/plugins/syntaur/` (or chosen dir) | Codex plugin directory (`track-session` skill, hooks) | `syntaur install-codex-plugin` |
112
+ | `~/.codex/skills/<skill>/` | Protocol skills (same six) | `syntaur install-codex-plugin` copies from the vendored `syntaur-skills` |
113
+ | `~/.agents/plugins/marketplace.json` | Codex marketplace entry | `syntaur install-codex-plugin` |
114
+ | `<repo>/.syntaur/context.json` | Per-workspace agent context (current assignment, session id, transcript path) | Written by the `grab-assignment` skill and SessionStart hooks |
115
+
116
+ ### Plugin install paths
117
+
118
+ Syntaur remembers the plugin install locations you choose in `~/.syntaur/config.md`. For Claude Code, Syntaur will detect the machine's local plugin marketplace when one exists and recommend installing into that marketplace's `plugins/` directory.
119
+
120
+ Interactive install (prompts for paths):
50
121
 
51
122
  ```bash
52
- npx syntaur@latest install-plugin
53
- npx syntaur@latest install-codex-plugin
123
+ syntaur install-plugin
124
+ syntaur install-codex-plugin
54
125
  ```
55
126
 
56
- You can also set paths explicitly:
127
+ Explicit paths:
57
128
 
58
129
  ```bash
59
- npx syntaur@latest install-plugin --target-dir ~/.claude/plugins/marketplaces/user-plugins/plugins/syntaur
60
- npx syntaur@latest install-codex-plugin \
130
+ syntaur install-plugin --target-dir ~/.claude/plugins/marketplaces/user-plugins/plugins/syntaur
131
+ syntaur install-codex-plugin \
61
132
  --target-dir ~/plugins/syntaur \
62
133
  --marketplace-path ~/.agents/plugins/marketplace.json
63
134
  ```
64
135
 
65
- Setup supports the same path overrides:
136
+ Setup accepts the same overrides:
66
137
 
67
138
  ```bash
68
- npx syntaur@latest setup \
69
- --claude \
70
- --claude-dir ~/.claude/plugins/marketplaces/user-plugins/plugins/syntaur \
71
- --codex \
72
- --codex-dir ~/plugins/syntaur \
139
+ syntaur setup \
140
+ --claude --claude-dir ~/.claude/plugins/marketplaces/user-plugins/plugins/syntaur \
141
+ --codex --codex-dir ~/plugins/syntaur \
73
142
  --codex-marketplace-path ~/.agents/plugins/marketplace.json
74
143
  ```
75
144
 
145
+ ---
146
+
76
147
  ## Common Commands
77
148
 
78
149
  ```bash
79
- npx syntaur@latest dashboard
80
- npx syntaur@latest create-project "My First Project"
81
- npx syntaur@latest create-assignment "Implement feature" --project my-first-project
82
- npx syntaur@latest doctor
83
- npx syntaur@latest uninstall
84
- npx syntaur@latest uninstall --all
150
+ syntaur dashboard
151
+ syntaur create-project "My First Project"
152
+ syntaur create-assignment "Implement feature" --project my-first-project
153
+ syntaur doctor
154
+ syntaur uninstall
155
+ syntaur uninstall --all
85
156
  ```
86
157
 
158
+ Any of these can be prefixed with `npx syntaur@latest` if you chose not to install globally.
159
+
160
+ ---
161
+
87
162
  ## Protocol Skills
88
163
 
89
164
  The six protocol skills (`syntaur-protocol`, `grab-assignment`, `plan-assignment`, `complete-assignment`, `create-assignment`, `create-project`) are maintained in a separate agent-agnostic repo — [`prong-horn/syntaur-skills`](https://github.com/prong-horn/syntaur-skills) — and vendored into this repo as a git submodule at `vendor/syntaur-skills/`.
90
165
 
91
- `syntaur install-plugin` and `syntaur install-codex-plugin` automatically copy them into `~/.claude/skills/` or `~/.codex/skills/` (whichever applies). User-edited skills are preserved unless you pass `--force-skills`. Use `syntaur uninstall-skills --all` to remove just the protocol skills without uninstalling the plugin.
166
+ `syntaur install-plugin` and `syntaur install-codex-plugin` automatically copy them into `~/.claude/skills/` or `~/.codex/skills/`. Per-skill copy behavior:
167
+
168
+ - **Target absent** → skill is installed.
169
+ - **Target matches the vendored version byte-for-byte** → no-op.
170
+ - **Target differs (you edited it)** → skill is preserved and you get a warning. Pass `--force-skills` to overwrite.
92
171
 
93
- To update the vendored version:
172
+ To manage the skills without touching the plugin:
94
173
 
95
174
  ```bash
96
- git submodule update --remote --merge vendor/syntaur-skills
97
- git add vendor/syntaur-skills
98
- git commit -m "chore: bump vendored syntaur-skills"
175
+ syntaur install-plugin --skip-skills # install plugin, leave ~/.claude/skills alone
176
+ syntaur install-plugin --force-skills # overwrite any user-edited skills
177
+ syntaur uninstall-skills --all # remove the 6 skills from both dirs
178
+ syntaur uninstall-skills --claude # only ~/.claude/skills
179
+ syntaur uninstall-skills --codex # only ~/.codex/skills
99
180
  ```
100
181
 
101
- For non-Claude, non-Codex agents, install the skills directly:
182
+ `uninstall-skills` is safe: it only removes a skill directory if its `SKILL.md` `name:` field matches one of the six protocol skills we ship. A user-authored skill that happens to share a directory name is left alone.
183
+
184
+ For non-Claude, non-Codex agents (Cursor, OpenCode, etc.), install the skills directly from the standalone repo:
102
185
 
103
186
  ```bash
104
187
  npx skills add prong-horn/syntaur-skills
105
188
  ```
106
189
 
107
- ## Troubleshooting
190
+ Installing both the `syntaur` plugin AND `npx skills add prong-horn/syntaur-skills` on the same machine is safe — the names match exactly, and per-file detection prevents double-install.
191
+
192
+ ---
193
+
194
+ ## Upgrade
195
+
196
+ | Install style | Command |
197
+ |---|---|
198
+ | Global | `npm install -g syntaur@latest` |
199
+ | npx | Nothing to do — `npx syntaur@latest ...` always consults the registry. To force a refetch: `rm -rf ~/.npm/_npx` |
200
+ | Mixed | `syntaur` (global) stays pinned; `npx syntaur@latest` uses whatever's live. The CLI will prompt to upgrade the global install when the npx version is newer. |
108
201
 
109
- If Syntaur state looks inconsistent (missing files, stale manifests, hook blocks, etc.), run `syntaur doctor` to diagnose. Pass `--json` for structured output suitable for agents; the `/doctor-syntaur` slash command in the Claude Code plugin wraps it with interactive remediation.
202
+ When you upgrade, the vendored skills under `~/.claude/skills/` and `~/.codex/skills/` are NOT automatically re-copied. Run `syntaur install-plugin` / `syntaur install-codex-plugin` again to refresh them (it'll skip any you've edited unless you pass `--force-skills`).
203
+
204
+ ---
110
205
 
111
206
  ## Uninstall
112
207
 
113
- Remove Syntaur-managed Claude and Codex integrations:
208
+ Two levels, matching the install. **Neither deletes your projects or assignments unless you explicitly pass `--all`.**
209
+
210
+ ### Standard uninstall — keep your data
211
+
212
+ ```bash
213
+ syntaur uninstall
214
+ ```
215
+
216
+ Removes:
217
+
218
+ - Claude Code plugin directory + marketplace entry
219
+ - Codex plugin directory + marketplace entry
220
+ - Pointers to those locations in `~/.syntaur/config.md`
221
+
222
+ Preserves: `~/.syntaur/` (projects, assignments, syntaur.db, playbooks, config), all skills under `~/.claude/skills/` and `~/.codex/skills/`, and the `syntaur` CLI itself.
223
+
224
+ To also remove the installed protocol skills:
225
+
226
+ ```bash
227
+ syntaur uninstall-skills --all
228
+ ```
229
+
230
+ To also uninstall the CLI:
114
231
 
115
232
  ```bash
116
- npx syntaur@latest uninstall
233
+ npm uninstall -g syntaur # if globally installed
234
+ rm -rf ~/.npm/_npx # if you want to clear npx cache too
117
235
  ```
118
236
 
119
- Remove plugins and `~/.syntaur` data:
237
+ ### Full uninstall delete everything including data
120
238
 
121
239
  ```bash
122
- npx syntaur@latest uninstall --all
240
+ syntaur uninstall --all
123
241
  ```
124
242
 
125
- If your config points missions somewhere outside `~/.syntaur`, Syntaur will warn and leave that external directory alone.
243
+ Removes everything above **plus** `~/.syntaur/` (projects, assignments, database, playbooks, config). If your config points project storage somewhere outside `~/.syntaur`, Syntaur will warn and leave that external directory alone — you're responsible for removing it yourself.
244
+
245
+ ---
246
+
247
+ ## Fresh Reinstall Without Losing Data
248
+
249
+ If you want to completely reset the installation while keeping all projects and assignments:
250
+
251
+ ```bash
252
+ # 1. Safety backup (optional but recommended)
253
+ cp -a ~/.syntaur ~/.syntaur.backup-$(date +%Y%m%d)
254
+ # or: syntaur backup (if you've configured the GitHub backup)
255
+
256
+ # 2. Remove skills from both agent dirs
257
+ syntaur uninstall-skills --all
258
+
259
+ # 3. Remove plugins + marketplace entries (but keep ~/.syntaur/)
260
+ syntaur uninstall
261
+
262
+ # 4. Remove the CLI
263
+ npm uninstall -g syntaur # global install path
264
+ rm -f ~/.syntaur/npx-install.json # lets the "install globally?" prompt re-fire
265
+
266
+ # 5. Fresh install
267
+ npm install -g syntaur@latest # or stay on npx and skip this
268
+
269
+ # 6. Reinstall plugins + skills
270
+ syntaur install-plugin
271
+ syntaur install-codex-plugin
272
+ syntaur doctor
273
+ ```
274
+
275
+ Your projects, assignments, syntaur.db, playbooks, and config.md all survive the cycle. Live agent sessions won't get the new SessionStart hook until you close and reopen them.
276
+
277
+ ---
278
+
279
+ ## Troubleshooting
280
+
281
+ Run `syntaur doctor` to diagnose inconsistent state (missing files, stale manifests, hook block, schema drift). Pass `--json` for structured output suitable for agents. The `/doctor-syntaur` slash command in the Claude Code plugin wraps it with interactive remediation.
282
+
283
+ Common issues:
284
+
285
+ - **"Error: no such column: project_slug"** — pre-v0.2.0 database. Upgrade to the latest `syntaur` (0.3.1+) — the auto-migration runs on next init.
286
+ - **Plugin installed but Claude Code doesn't see slash commands** — re-run `syntaur install-plugin` and restart Claude Code. Check `~/.claude/plugins/marketplaces/` has a `user-plugins` (or equivalent) marketplace entry.
287
+ - **Skills missing in Claude Code after plugin install** — verify `ls ~/.claude/skills/` shows the six protocol skills. If empty, re-run `syntaur install-plugin --force-skills`.
288
+ - **`npx syntaur` keeps asking to install globally** — choose "3) Never", or `export SYNTAUR_SKIP_INSTALL_PROMPT=1`.
289
+ - **Want to revert the global install to the published version** — `npm run untry` in the syntaur repo, which runs `npm unlink -g syntaur && npm install -g syntaur@latest`.
126
290
 
127
291
  ## Development
128
292