capyai 0.5.2 → 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 +6 -22
- package/package.json +1 -1
- package/skills/capy/SKILL.md +15 -17
package/AGENTS.md
CHANGED
|
@@ -52,34 +52,20 @@ If it returns `{ "error": ... }`, the API key or project ID is wrong. Ask the us
|
|
|
52
52
|
|
|
53
53
|
## Step 4: Load the operating manual
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
`skills/capy/SKILL.md` is the full operating manual: object model, decision trees, workflows, guardrails, commands. You need it in your context.
|
|
56
56
|
|
|
57
|
-
Pick whichever method works for your setup:
|
|
58
|
-
|
|
59
|
-
**Option A: skills.sh (if supported)**
|
|
60
57
|
```bash
|
|
61
58
|
npx skills add yazcaleb/capy-cli
|
|
62
59
|
```
|
|
63
60
|
|
|
64
|
-
|
|
65
|
-
If you have a persistent skills directory or memory system, copy the file directly:
|
|
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:
|
|
66
62
|
```bash
|
|
67
|
-
|
|
68
|
-
cp skills/capy/SKILL.md ~/.claude/skills/capy/SKILL.md
|
|
69
|
-
cp skills/capy/SKILL.md .cursor/skills/capy.md
|
|
70
|
-
cp skills/capy/SKILL.md /path/to/your/agent/memory/capy-skill.md
|
|
63
|
+
cp skills/capy/SKILL.md <your-agent-skills-dir>/capy.md
|
|
71
64
|
```
|
|
72
65
|
|
|
73
|
-
|
|
74
|
-
If none of the above work, read `skills/capy/SKILL.md` from this repo at the start of every session. It's ~275 lines. That's your entire operating manual.
|
|
75
|
-
|
|
76
|
-
## Step 5: MCP server or CLI
|
|
77
|
-
|
|
78
|
-
Choose MCP if your agent supports it (structured tool calls, no shell parsing). Choose CLI if you run shell commands. Both have full API parity.
|
|
66
|
+
## Step 5: MCP server (optional)
|
|
79
67
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
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.
|
|
83
69
|
|
|
84
70
|
```json
|
|
85
71
|
{
|
|
@@ -130,9 +116,7 @@ Config file locations:
|
|
|
130
116
|
| `capy_project` | Get project details (repos, code, config) | readOnly, idempotent |
|
|
131
117
|
| `capy_triage` | Actionable triage with categories + recs (brief mode available) | readOnly |
|
|
132
118
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
**If you prefer CLI** (any agent that runs shell commands): skip this step. The CLI is already installed from Step 2. Every command supports `--json` for structured output.
|
|
119
|
+
If you don't use MCP, skip this step. The CLI from Step 2 works everywhere with `--json`.
|
|
136
120
|
|
|
137
121
|
## Step 6: Verify everything
|
|
138
122
|
|
package/package.json
CHANGED
package/skills/capy/SKILL.md
CHANGED
|
@@ -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`.
|
|
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
|
|
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 "
|
|
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
|
|
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: `"
|
|
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.
|
|
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
|
|
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
|
-
|
|
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
|
|