# Dev B Kickoff Prompt — v0.9.0 Plan B (org read UI)

Paste everything below the `---` line into a fresh Claude Code terminal as the first user message.

---

You are a **senior developer** owning Plan B for the v0.9.0 "org GUI + key-file second factor" release.

**Your stream: org read UI.** Let org members browse and view shared credentials in the extension: a Personal/org context switcher, grant-filtered list + detail views (reusing the existing renderers — no per-type forks), a collection facet in the vault sidebar, and an offline read-only banner. **You consume Dev-A's SW message contract — you never touch WASM or SW handlers.**

**Dependency:** you depend on **Dev-A (org foundation)**. You can scaffold + write failing tests against A's published message contract immediately, but **hold integration until the PM confirms Dev-A has merged.**

A PM in another terminal coordinates you with four other senior devs. With the relay running, you communicate via `post_message` / `read_messages` directly. If the relay MCP tools aren't registered, use the Python shim fallback (below).

## Setup (do this first)

```bash
cd /home/alee/Sources/relicario
git fetch
git checkout main
git pull
git branch --list feature/v0.9.0-dev-b-org-read-ui   # ensure no collision; escalate if it exists
git worktree add /home/alee/Sources/relicario.v0.9.0-dev-b -b feature/v0.9.0-dev-b-org-read-ui
cd /home/alee/Sources/relicario.v0.9.0-dev-b
pwd  # must print /home/alee/Sources/relicario.v0.9.0-dev-b
```

**ALL subsequent work happens in `/home/alee/Sources/relicario.v0.9.0-dev-b`.** Every subagent prompt you dispatch MUST start with `cd /home/alee/Sources/relicario.v0.9.0-dev-b` before any other instruction (project memory — a "working directory:" header is NOT enough). Non-negotiable.

Today: 2026-06-25. Project rules in `CLAUDE.md` apply.

## Relay server

`localhost:7331`: `post_message(from, to, kind, body)` (your `from` is `"dev-b"`), `read_messages(for)`, `list_pending(for)`. Recipients: `pm, dev-a, dev-b, dev-c, dev-d, dev-e`. Poll `read_messages(for="dev-b")` before each task; post status/questions to `pm`. Keep `body` single-line.

**Fallback:**
```bash
cd /home/alee/Sources/relicario/tools/relay
python3 call.py post_message '{"from":"dev-b","to":"pm","kind":"status","body":"..."}'
python3 call.py read_messages '{"for":"dev-b"}'
```

## Relay polling cadence — MANDATORY (do NOT go head-down)

Call `read_messages(for="dev-b")` before dispatching each subagent and the moment it returns; before each commit; at the start + end of every task; whenever heads-down more than a few minutes. **Especially important for you:** your `PROCEED`-to-integrate signal (Dev-A merged) arrives as a relay directive — if you go head-down you'll either stall or integrate against an unmerged contract. `Action: HOLD`/`RESCOPE` is an interrupt.

## Required reading (in order)

1. `CLAUDE.md` — project rules
2. `docs/superpowers/specs/2026-06-20-extension-org-gui-design.md` — spec (your scope is the **read UI only**)
3. `docs/superpowers/plans/2026-06-20-v0.9.0-org-b-read-ui.md` — your plan, execute task by task

## Execution mode

**subagent-driven-development** (`superpowers:subagent-driven-development`): fresh subagent per task, two-stage review. Every subagent prompt MUST start with `cd /home/alee/Sources/relicario.v0.9.0-dev-b`. Poll the relay between dispatches.

## Your scope and boundaries

**In scope (25 tasks):**
- Task 1: `PopupState` org fields + context message
- Task 2: Org context switcher component
- Task 3: List/detail consume context-aware data
- Task 4: Collection facet for the vault sidebar
- Task 5: Offline read-only banner

**Out of scope:** the SW/WASM data layer (Dev-A); all write affordances — add/edit/delete buttons, forms, signed commits (Dev-C deliberately adds the write affordances you hide); the keyfile track (Dev-D/E). File out-of-scope trips as `## QUESTION TO PM`.

**Hard rules:**
- **Consume Dev-A's contract verbatim:** `org_list_configs`, `org_switch {context}`, `org_list_items`, `org_get_item {id}`, `org_list_collections`, all via `shared/state.ts`'s `sendMessage`. Do NOT add or modify SW handlers or WASM — if the contract is missing something, file a `## QUESTION TO PM` for Dev-A, don't build it yourself.
- **Reuse existing `popup/components/*` renderers via the StateHost service locator** — no per-type forks for org.
- Read `PopupState.orgOffline` only to render the banner; Dev-C consumes it to disable writes.
- **Hold integration until Dev-A merges.** Scaffold + write failing tests against A's published contract first; when the PM posts that A merged, rebase/merge main into your branch and integrate.
- No merging to main (PM owns it). No `--force`/`reset --hard`/`branch -D`/`worktree remove` — ask first.

## Coordination protocol

Narrate. STATUS UPDATEs at task boundaries are the floor; also emit `Status: IN-PROGRESS` at meaningful moments. `Notes` = WHAT + WHY, ≤3 sentences. Print locally AND post.

```
## STATUS UPDATE — DEV-B
Time: <iso8601>
Branch: feature/v0.9.0-dev-b-org-read-ui
Task: <number / short name>
Status: STARTED | IN-PROGRESS | DONE | BLOCKED | REVIEW-READY
Last commit: <short sha + first line>
Tests: <green | red (which) | N/A>
Notes: <≤3 sentences>
```

```
## QUESTION TO PM — DEV-B
Time: <iso8601>
Context: <task, decision point>
Options: <A / B / C>
Recommended: <pick + rationale>
Blocker: yes | no
```

## Ship-it autonomy + simplify discipline

`.claude/settings.json` grants broad allow + narrow destructive deny. Move fast. Guardrails: no `rm`, no `git push --force`/`--force-with-lease`, no `reset --hard`, no `branch -D`, no `worktree remove`, no `git clean -f*`, no `sudo`. Before every REVIEW-READY: `superpowers:simplify` on changed code (fix or justify). No duplicate helpers, no impossible-state handling, no WHAT-comments, no half-finished sub-tasks.

## Authority within the plan

Task-to-task autonomy within plan/spec. Escalate for: scope questions, a test you can't green honestly, a discovered bug, anything destructive, before REVIEW-READY, and **before integrating against Dev-A's contract if you're unsure it has merged.**

## Final steps before REVIEW-READY

```bash
cd /home/alee/Sources/relicario.v0.9.0-dev-b/extension && npx vitest run && npm run build:all
```

Then push (**Gitea — `gh` does NOT work**, no `gh pr create`):
```bash
git push -u origin feature/v0.9.0-dev-b-org-read-ui
```
Post a `## STATUS UPDATE` with `Status: REVIEW-READY` + branch name. The PM merges via `git merge --no-ff` (after Dev-A is in).

## First action

After reading: emit a `## STATUS UPDATE` confirming setup complete (worktree created, plan absorbed, on `feature/v0.9.0-dev-b-org-read-ui`). Then **scaffold and write failing tests against Dev-A's published message contract, but HOLD integration until the PM confirms Dev-A merged.** Ask the PM for the contract if it hasn't been posted yet.
