@ours.network/fleet-claude-code 0.1.0

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.
@@ -0,0 +1,6 @@
1
+ {
2
+ "name": "ours-fleet",
3
+ "description": "Spawn and oversee ours-fleet agents from inside Claude Code",
4
+ "version": "0.1.0",
5
+ "author": { "name": "ours.network contributors", "url": "https://ours.network" }
6
+ }
package/package.json ADDED
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "@ours.network/fleet-claude-code",
3
+ "version": "0.1.0",
4
+ "description": "Claude Code plugin for ours-fleet — spawn and oversee fleet agents from inside a session. Bundles the spawn-ours-agent and oversee-agents skills; the ours-fleet CLI (@ours.network/fleet) does the actual work.",
5
+ "license": "FSL-1.1-Apache-2.0",
6
+ "author": "ours.network contributors",
7
+ "homepage": "https://github.com/adapt-toolkit/ours-fleet/tree/main/integrations/claude-code#readme",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/adapt-toolkit/ours-fleet.git",
11
+ "directory": "integrations/claude-code"
12
+ },
13
+ "keywords": ["claude", "claude-code", "plugin", "fleet", "agents", "tmux", "spawn", "oversight", "ours"],
14
+ "files": [".claude-plugin", "skills"],
15
+ "publishConfig": { "access": "public" },
16
+ "engines": { "node": ">=20" }
17
+ }
@@ -0,0 +1,54 @@
1
+ ---
2
+ name: oversee-agents
3
+ description: Keep an eye on ours-fleet agents you spawned or were assigned - periodically peek into their tmux consoles, unstick them (answer prompts, approve dialogs, nudge) via ours-fleet send, escalate only when unsure. Use when the user or your persona/briefing says "keep an eye on X", "oversee agents", "watch agents", or right after spawning an agent.
4
+ ---
5
+
6
+ # Oversee ours-fleet agents
7
+
8
+ Your wards are subagents — you own their liveness. The core gives you two
9
+ primitives; the judgment is yours.
10
+
11
+ ```bash
12
+ ours-fleet peek <Name> [lines] # console snapshot (default 40 lines)
13
+ ours-fleet send <Name> "<text>" # type into its console (+ Enter)
14
+ ours-fleet send <Name> --key <K> # raw key: Escape, Up, C-c, "1", ...
15
+ ```
16
+
17
+ ## 1. Determine your assignment
18
+
19
+ Wards and intervals come from any of:
20
+ - an explicit request ("keep an eye on Alice and Bob every 5 minutes"),
21
+ - your briefing's **## Oversight assignments** section,
22
+ - your persona text,
23
+ - an agent you just spawned (default interval 5m).
24
+
25
+ ## 2. Arm the loop
26
+
27
+ Schedule a repeating check every N minutes using your harness's mechanism
28
+ (scheduled wake-ups or a persistent background monitor). One tick = check every
29
+ ward once. Keep the loop armed across restarts — re-arm it right after re-binding
30
+ your identity.
31
+
32
+ ## 3. Each tick: peek and judge
33
+
34
+ Run `ours-fleet peek <Name>` per ward and classify the console:
35
+
36
+ | Console shows | Action |
37
+ |---|---|
38
+ | Permission prompt, trust dialog, numbered menu ("1. Yes…") | Answer it directly: `ours-fleet send <Name> --key 1` (or the right key/text). Prefer the safe affirmative that unblocks the task the agent was assigned. |
39
+ | A question the agent asked its (absent) user | Answer with what you know of the mission: `ours-fleet send <Name> "<answer>"`. |
40
+ | Crashed to a shell prompt / error text | Investigate (`ours-fleet logs <Name>`); for permanent roles `ours-fleet restart <Name>`; report to the owner. |
41
+ | Idle with work still assigned | Nudge: `ours-fleet send <Name> "Status? Continue with <task> or declare BLOCKED."` |
42
+ | Actively working / healthy | Nothing. Do not interrupt. |
43
+
44
+ ## 4. Escalate when unsure
45
+
46
+ If the resolution would make a decision that is not yours (spending, deleting,
47
+ publishing, changing scope), do NOT press through it — message the owner or
48
+ coordinator over ours messaging (`send_message`) with the pane snapshot and your
49
+ recommendation.
50
+
51
+ ## 5. Log
52
+
53
+ Append notable interventions (ward, what was stuck, what you did) to your
54
+ WORKLOG so the history survives restarts.
@@ -0,0 +1,76 @@
1
+ ---
2
+ name: spawn-ours-agent
3
+ description: Spawn a new ours-fleet agent (permanent fleet role or temporary background agent) from inside a session. Use when the user says "spawn ours agent", "spawn an agent", "create a fleet agent", "start a background agent", or asks for a new subagent that should live in its own tmux session.
4
+ ---
5
+
6
+ # Spawn an ours-fleet agent
7
+
8
+ You are about to create a new long-lived agent in its own tmux session, managed by
9
+ `ours-fleet`. Follow these steps in order.
10
+
11
+ ## 1. Temporary or permanent?
12
+
13
+ Ask the requester (skip only if they already said):
14
+
15
+ - **Permanent** — written to `~/fleet.d/<Name>.yaml`, supervised (auto-restart,
16
+ survives reboot). For roles that should stay.
17
+ - **Temporary** — plain tmux, auto-cleaned when it exits, gone on reboot. For
18
+ one-off background work. Killed by you or the coordinator when done.
19
+
20
+ ## 2. Pick a name
21
+
22
+ `<Name>` must match `[A-Za-z0-9_-]+` (it becomes the tmux + service name). Check it
23
+ is free: `ours-fleet config` must not list it and `ours-fleet ls` must not show it.
24
+
25
+ ## 3. Co-draft bio and persona
26
+
27
+ Draft WITH the requester, iterating until they approve:
28
+
29
+ - **Bio** — the public card peers and coordinators see (1–3 sentences: who this
30
+ agent is, what to ask it for).
31
+ - **Persona** — the local operating contract (boundaries, quality bar, how it
32
+ works, when it escalates).
33
+
34
+ Write them to temp files to avoid shell-quoting problems:
35
+
36
+ ```bash
37
+ cat > /tmp/spawn-bio.md <<'EOF'
38
+ <approved bio>
39
+ EOF
40
+ cat > /tmp/spawn-persona.md <<'EOF'
41
+ <approved persona>
42
+ EOF
43
+ ```
44
+
45
+ ## 4. Spawn
46
+
47
+ Permanent (announce it to yourself if you are its coordinator):
48
+
49
+ ```bash
50
+ ours-fleet spawn <Name> \
51
+ --mission "<one-line mission>" \
52
+ --bio-file /tmp/spawn-bio.md --persona-file /tmp/spawn-persona.md \
53
+ [--harness claude-code] [--cwd <dir>] [--coordinator <YourRoleName>]
54
+ ```
55
+
56
+ Temporary:
57
+
58
+ ```bash
59
+ ours-fleet spawn --temp <Name> \
60
+ --mission "<one-line mission>" \
61
+ --bio-file /tmp/spawn-bio.md --persona-file /tmp/spawn-persona.md
62
+ ```
63
+
64
+ ## 5. Verify
65
+
66
+ ```bash
67
+ ours-fleet peek <Name> 30 # console snapshot — it should be booting its briefing
68
+ ours-fleet status <Name> # permanent roles: unit state
69
+ ```
70
+
71
+ ## 6. Arm oversight
72
+
73
+ The spawner babysits its subagent. Ask the requester for a check interval
74
+ (default **5m**), then follow the **oversee-agents** skill for `<Name>` at that
75
+ interval. If you set `--coordinator <YourRoleName>`, the new agent will announce
76
+ itself to you on boot.