capyai 0.5.1 → 0.5.3

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/AGENTS.md CHANGED
@@ -50,17 +50,22 @@ Verify: `capy status --json` should return `{ "threads": [...], "tasks": [...] }
50
50
 
51
51
  If it returns `{ "error": ... }`, the API key or project ID is wrong. Ask the user.
52
52
 
53
- ## Step 4: Install skill
53
+ ## Step 4: Load the operating manual
54
+
55
+ `skills/capy/SKILL.md` is the full operating manual: object model, decision trees, workflows, guardrails, commands. You need it in your context.
54
56
 
55
57
  ```bash
56
58
  npx skills add yazcaleb/capy-cli
57
59
  ```
58
60
 
59
- This adds the `capy` skill to your skills directory so you have the full command reference available in context.
61
+ If skills.sh doesn't work in your setup, copy the file to your persistent skills or memory folder, or read it at session start:
62
+ ```bash
63
+ cp skills/capy/SKILL.md <your-agent-skills-dir>/capy.md
64
+ ```
60
65
 
61
- ## Step 5: MCP server (if you support MCP)
66
+ ## Step 5: MCP server (optional)
62
67
 
63
- Add this to your MCP configuration:
68
+ If your agent supports MCP, add the server for structured tool calls instead of CLI. Both have full API parity.
64
69
 
65
70
  ```json
66
71
  {
@@ -111,9 +116,7 @@ Config file locations:
111
116
  | `capy_project` | Get project details (repos, code, config) | readOnly, idempotent |
112
117
  | `capy_triage` | Actionable triage with categories + recs (brief mode available) | readOnly |
113
118
 
114
- Tools with predictable outputs (`capy_captain`, `capy_build`, `capy_review`, `capy_approve`, `capy_retry`) declare `outputSchema` for typed structured content per the 2025-03-26 MCP spec.
115
-
116
- If you don't support MCP, skip this step. The CLI works everywhere.
119
+ If you don't use MCP, skip this step. The CLI from Step 2 works everywhere with `--json`.
117
120
 
118
121
  ## Step 6: Verify everything
119
122
 
@@ -129,10 +132,4 @@ You are now fully configured.
129
132
 
130
133
  ## Usage
131
134
 
132
- For the full operating manual (commands, workflows, decision trees, guardrails), install the capy skill:
133
-
134
- ```bash
135
- npx skills add yazcaleb/capy-cli
136
- ```
137
-
138
- This loads `skills/capy/SKILL.md` into your context with everything you need to orchestrate Capy agents.
135
+ Read `skills/capy/SKILL.md`. That's it. Everything you need to orchestrate Capy agents is in that file.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "capyai",
3
- "version": "0.5.1",
3
+ "version": "0.5.3",
4
4
  "type": "module",
5
5
  "description": "Unofficial Capy.ai CLI for agent orchestration with quality gates",
6
6
  "bin": {
@@ -28,16 +28,16 @@ Do NOT use capy when:
28
28
 
29
29
  Understand these three objects before doing anything.
30
30
 
31
- **Thread** — A Captain session. You give it a prompt, it plans and may spawn multiple tasks. Threads have long opaque IDs (UUIDs). Terminal states: `idle`, `archived`, `completed`. You start threads with `capy captain`.
31
+ **Thread** — A Captain session. This is your primary interface. You give it a prompt, it plans and may spawn multiple tasks. Threads have long opaque IDs (UUIDs). Terminal states: `idle`, `archived`, `completed`. Start threads with `capy captain`. Use Captain for almost everything.
32
32
 
33
- **Task** — A single unit of coding work. Has a short identifier like `SCO-15`. A task produces a diff (code changes) and optionally a pull request. Terminal states: `needs_review`, `archived`, `completed`, `failed`. You start standalone tasks with `capy build`.
33
+ **Task** — A single unit of coding work. Has a short identifier like `SCO-15`. A task produces a diff (code changes) and optionally a pull request. Terminal states: `needs_review`, `archived`, `completed`, `failed`. Captain spawns tasks automatically. You can also start standalone tasks with `capy build` for small, isolated work where Captain is overkill (a one-file fix, a config change).
34
34
 
35
35
  **Jam** — An execution run inside a task. Each jam has a model, a status, and credit usage. A task can have multiple jams (one per retry). When `jam.status` is `"idle"` and credits are zero, that jam is finished. The task is done working. You cannot send it more messages.
36
36
 
37
37
  **Lifecycle:**
38
38
 
39
39
  ```
40
- [you] captain/build
40
+ [you] capy captain (default) or capy build (small isolated tasks)
41
41
  → [capy agent] in_progress (writing code, running tests)
42
42
  → [capy agent] needs_review (agent stopped, diff may exist)
43
43
  → [you] check diff, create PR, run quality gates
@@ -97,9 +97,11 @@ 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).
101
+
100
102
  ```bash
101
- # 1. Start a Captain thread
102
- RESULT=$(capy captain "Implement feature X. Files: src/foo.ts, src/bar.ts. Include tests. Run tests before finishing." --json)
103
+ # 1. Start a Captain thread (the default for almost everything)
104
+ RESULT=$(capy captain "We need feature X implemented. Make sure tests pass and CI is green." --json)
103
105
  THREAD_ID=$(echo "$RESULT" | jq -r '.id')
104
106
 
105
107
  # 2. Wait for completion (use 600s for Captain, 300s for Build)
@@ -205,8 +207,8 @@ All commands support `--json` for structured output. All errors return `{ "error
205
207
  ### Start work
206
208
 
207
209
  ```bash
208
- capy captain "<prompt>" --json # → { id, url }
209
- capy build "<prompt>" --json # → { id, identifier, status }
210
+ capy captain "<prompt>" --json # → { id, url } — default, use for almost everything
211
+ capy build "<prompt>" --json # → { id, identifier, status } — small isolated tasks only
210
212
  ```
211
213
 
212
214
  Model shortcuts: `--opus`, `--sonnet`, `--mini`, `--fast`, `--kimi`, `--gemini`, `--grok`, `--qwen`, or `--model=<id>`.
@@ -257,26 +259,22 @@ capy pool [status|set|test|instances|instance|clear] # → warm pool management
257
259
 
258
260
  ## Prompting tips
259
261
 
260
- Captain and Build need different prompting styles.
261
-
262
- **Captain** has full codebase context and plans its own approach. Tell it WHAT to accomplish, not HOW. Link the issue, set the quality bar, get out of its way.
262
+ You should almost always use Captain. It has full codebase context and plans its own approach. Tell it what to accomplish, not how. Link the issue, set the quality bar, get out of its way.
263
263
 
264
- Bad: `"Fix CI for crypto-trading pack. The changeset file is missing. Add a changeset entry for @veto/crypto-trading with patch bump. Run 'npx changeset status' to validate. Files: packages/crypto-trading/."`
264
+ Bad (over-specifying): `"Fix CI for crypto-trading pack. The changeset file is missing. Add a changeset entry for @veto/crypto-trading with patch bump. Run 'npx changeset status' to validate. Files: packages/crypto-trading/."`
265
265
 
266
- Good: `"We have a CI failure on the crypto-trading pack missing changeset. Fix it. Reference: PLW-201. Don't finish until CI is green and tests pass."`
266
+ Good: `"CI is failing on the crypto-trading pack, missing changeset. Fix it. Reference: PLW-201. Don't come back until CI is green and tests pass."`
267
267
 
268
- Good: `"https://linear.app/plaw/issue/PLW-201 — get this done. Make sure all tests pass, CI is green, and code review comes back clean."`
268
+ Good: `"https://linear.app/plaw/issue/PLW-201 — get this done. All tests passing, CI green, code review clean."`
269
269
 
270
270
  Captain prompts should include:
271
271
  - What the problem or goal is (natural language)
272
272
  - A link to the issue if one exists (GitHub, Linear)
273
273
  - The quality bar ("tests pass", "CI green", "code review clean")
274
274
 
275
- Do NOT include specific files, specific commands, or implementation details. Captain figures that out.
276
-
277
- **Build** is isolated and has no codebase context. Be specific. Name the files, the commands, the acceptance criteria.
275
+ Do NOT tell Captain which files to touch, which commands to run, or how to implement. It has the codebase. It figures that out.
278
276
 
279
- Good: `"Fix CI for crypto-trading pack. The changeset file is missing. Add a changeset entry for @veto/crypto-trading with patch bump. Run 'npx changeset status' to validate. Files: packages/crypto-trading/. Reference: PLW-201."`
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.
280
278
 
281
279
  ## Triggers
282
280