oficina / equipo Public

Clone
git clone https://amadan.net/oficina/equipo

Plain git — no account needed to clone.

Download

Download this file

1# Brief: write Equipo plan 2b (direct provider launching)
2
3You are writing an implementation plan, and running one short feasibility
4check first. Work in this worktree (branch `plan-2b`, from `runner`
5ce02b38, which holds plan 2 as built plus trial mode).
6
7## Paul's decision (2026-11-03)
8
9Replace the Paseo layer. The runner launches Claude Code headless
10(`claude -p --output-format stream-json`, `--input-format stream-json` as
11needed) and Codex through its **app-server** (`codex exec --json` alone
12omits tool visibility, per the probe) **directly**, each harness inside a
13**bubblewrap** process namespace, with **our own durable event journal**.
14Goal: real guarantees for the try-out instead of trial labels.
15
16## Read first
17
18- The direct-CLI probe: `docs/superpowers/specs/2026-11-03-direct-cli-probe.md`
19 (commands that worked are in its appendices; its gap table is binding).
20- The Paseo probe and equipo discussion 3 (`amadan discuss show oficina/equipo 3`).
21- Spec `docs/superpowers/specs/2026-11-01-equipo-design.md` sections 6 and 9.
22- Plan 2 and its rulings: `docs/superpowers/plans/2026-11-02-equipo-plan-2-runner.md`.
23- The runner code as built: `internal/runner/...`, `runner/paseo/...`, the
24 core under `internal/equipo/team`.
25- Amadan now serves `GET /api/v1/repos/{ns}/{repo}/branches/{name}/description`
26 (live on amadan.net since bcc0e66): verbatim channels, `by`, `at`,
27 `agent`, `content_hash` = `sha256:` + hex of, for each of description,
28 human, summary, notes in order, an 8-byte big-endian length then the
29 UTF-8 bytes; `empty: true` with 200 when none. Plan 2b wires the
30 publisher's production readback to it.
31
32## Step 1: bubblewrap nesting check (run it, record it)
33
34On docs-t1 (bubblewrap is installed; unprivileged user namespaces are on),
35prove or disprove, with exact commands and output:
361. A harness started as the init of `bwrap --unshare-pid --die-with-parent
37 --new-session` (plus the binds it needs: workspace read-write, its own
38 config home, the provider CLI, `/usr`, `/etc` read-only, network as
39 needed for the provider API, nothing else of `$HOME`) runs a turn.
402. **Claude Code's own sandbox works nested inside it** (Claude's Linux
41 sandbox also uses bubblewrap), with `settings.sandbox` enabled,
42 `failIfUnavailable: true` and `denyRead` on a sentinel; and Codex's
43 deny profile works inside it.
443. A detached `setsid` child, a double-forked child, and a process that
45 tries to move itself to another cgroup all die when the namespace init
46 is killed, and nothing outside the namespace can be reached (no user
47 systemd socket, no `/run/user/<uid>/bus`).
484. The account home binds in and out cleanly, with no other homes visible.
49
50Use the cheapest models, tiny prompts, at most six provider runs. Two
51Claude homes are at their weekly limit; use a home that works (the probe
52used `/home/paulca/.paseo/zerosub/homes/claude-2b21c7944303`). Write the
53result to `docs/superpowers/specs/2026-11-03-bwrap-nesting.md`. If nesting
54fails for a provider, the plan must say what replaces it (for example
55Claude's sandbox off and bubblewrap's own read binds as the isolation),
56and why that is equivalent.
57
58## Step 2: write the plan
59
60Follow
61`/home/paulca/.claude/plugins/cache/claude-plugins-official/superpowers/7.0.0/skills/writing-plans/SKILL.md`
62exactly. Save to `docs/superpowers/plans/2026-11-03-equipo-plan-2b-direct.md`.
63Scope:
64- A provider launcher interface with Claude-headless and Codex-app-server
65 implementations, version-pinned, replacing the Paseo adapter and bridge.
66- Bubblewrap containment per attempt, replacing `/proc` sampling as the
67 containment proof; cancel kills the namespace and records it.
68- Explicit account homes per connection, with an identity check before the
69 first prompt and no failover; connection discovery from configured
70 homes, not Paseo.
71- Effective isolation by construction (`--setting-sources ''`,
72 `--strict-mcp-config`, `--ignore-user-config`, exact settings files)
73 recorded and hashed per attempt; the verified-tuple list keyed on it.
74- Our own durable event journal from the harness's stdout, per-turn usage
75 deltas, resume after runner restart; mid-turn crash leaves the step
76 waiting for a person, never redispatched.
77- Per-run tool server and permission/question relay through each CLI's
78 supported hook (`--permission-prompt-tool`, app-server approvals).
79- The Amadan readback wired to the live endpoint.
80- Remove what no longer has a reason to exist: supervised trial mode, the
81 dedicated-user requirement, the Paseo adapter, bridge and Node bridge
82 tests, `/proc` coverage as a gate. Codex becomes confined through its
83 deny profile; keep the owner acknowledgement path only if Step 1 shows
84 Codex cannot be confined, and say so.
85- The live gate becomes: Paul enrols docs-t1 and runs the first bug fix.
86 No sudo.
87
88Interfaces, test names and assertions, commands; not code bodies. Keep it
89proportionate. End with the self-review and "Questions for Paul" only for
90what genuinely needs him.
91
92## Rules
93
94Do not write product code, commit or push. Do not spawn Anthropic-model
95reviewers or other agents; no Paseo. No `.claude/HANDOFF.md`. Do not start a
96copy-review server. Scratch under `$TMPDIR`, removed; stop every process
97you start. Print a five-line summary: nesting verdict per provider, task
98count, questions for Paul.
99