capyai 0.5.3 → 0.5.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "capyai",
3
- "version": "0.5.3",
3
+ "version": "0.5.5",
4
4
  "type": "module",
5
5
  "description": "Unofficial Capy.ai CLI for agent orchestration with quality gates",
6
6
  "bin": {
@@ -83,7 +83,7 @@ These are the mistakes agents make. Do not make them.
83
83
 
84
84
  1. **Never message a task with idle jams.** If the last jam has `status: "idle"` and zero credits, the task is finished. It cannot receive messages. Sending `capy msg` will appear to succeed but nothing happens. If you need to change something, use `capy retry` to start a new attempt.
85
85
 
86
- 2. **Never create a new Captain thread for work that already has a diff.** If a task produced code changes, that work exists. Create a PR for the existing task with `capy pr <id>`. Starting a new Captain thread throws away the existing work and burns credits.
86
+ 2. **Always check for existing work before starting a new Captain thread.** Run `capy triage --brief --json` or `capy list --json` first. If a task or thread already exists for the same work (in any state: `in_progress`, `needs_review`, `backlog`, `stuck`), resume it instead of creating a new thread. Use `capy retry <id> --fix="..."` to resume stuck/failed tasks, `capy wait <id>` for in-progress ones, `capy pr <id>` for ones needing a PR. Only start a new Captain thread when no related work exists. Creating duplicate threads throws away existing progress and burns credits.
87
87
 
88
88
  3. **Never call `capy review` on a task with no PR.** It will fail with `error.code: "no_pr"`. Always create the PR first with `capy pr <id> --json`, then review.
89
89
 
@@ -97,9 +97,13 @@ These are the mistakes agents make. Do not make them.
97
97
 
98
98
  ## Workflow: Start new work
99
99
 
100
- Default to `capy captain`. It has codebase context and plans its own approach. Only use `capy build` for small isolated tasks (one-file fix, config tweak).
100
+ Before creating a new Captain thread, check if related work already exists. If it does, resume it (see Decision tree). Only start new work when nothing related is in flight.
101
101
 
102
102
  ```bash
103
+ # 0. Check for existing related work first
104
+ capy triage --brief --json
105
+ # If something related exists → use retry/wait/pr on that task instead of starting new
106
+
103
107
  # 1. Start a Captain thread (the default for almost everything)
104
108
  RESULT=$(capy captain "We need feature X implemented. Make sure tests pass and CI is green." --json)
105
109
  THREAD_ID=$(echo "$RESULT" | jq -r '.id')
@@ -274,7 +278,7 @@ Captain prompts should include:
274
278
 
275
279
  Do NOT tell Captain which files to touch, which commands to run, or how to implement. It has the codebase. It figures that out.
276
280
 
277
- **Build** is the exception, not the rule. Use it only for small isolated tasks where Captain is overkill. Build has no codebase context, so be specific: name the files, the commands, the acceptance criteria.
281
+ **Build** is the exception, not the rule. It has codebase context too, but it works on a single task and can't orchestrate like Captain does. Use it for small one-off work where Captain is overkill.
278
282
 
279
283
  ## Triggers
280
284