# Council Plan Aura

> <!-- GENERATED by scripts/build-council-skill-fixture.ts from council-plan-aura/SKILL.md — do not edit by hand -->

- Skill: `antonioshaman/council-plan-aura` (Agent Skill)
- Install (CLI): `npx skillmds@latest add antonioshaman/council-plan-aura`
- Raw SKILL.md: https://api.skillmd.com/api/skills/antonioshaman/council-plan-aura/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: antonioshaman (https://skillmd.com/u/antonioshaman)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/antonioshaman/council-plan-aura

---

<!-- GENERATED by scripts/build-council-skill-fixture.ts from council-plan-aura/SKILL.md — do not edit by hand -->

## Phase 7: Emit Council Checkpoint (auto)

**Purpose.** When this skill runs inside an Aura Companion Council pair, this phase tells the observer half "the orchestrator just finished planning — here is the plan, please review it." The observer wakes within ~1 second of the checkpoint POST and emits its review to `<workspace>/.council/reviews/council-plan-<provider>-observer.md`. Without this step the council loop never closes — the observer remains in "Awaiting first checkpoint" forever.

**Skip this phase entirely** if any of these are true:
- `http://localhost:3456/api/sessions` does not respond (you are not inside the Aura Companion UI).
- No session in the response matches the current workspace + orchestrator role.
- The `POST .../council/checkpoint` returns 409 — that response IS the silent-skip signal.

### Steps

1. **Probe the API.** Run `curl -fsS http://localhost:3456/api/sessions`. Non-zero exit or empty → skip the entire phase.

2. **Discover the orchestrator session id.** Filter the response array for the entry matching ALL of:
   - `state == "connected"`
   - `cwd == <current workspace cwd>` (the cwd you planned under)
   - `sessionGroupRole == "orchestrator"`
   - newest `createdAt` if more than one match

   Zero matches → silent skip. One match → capture `sessionId` (= `ORCH_SID`) and `sessionGroupId` (= `GROUP_ID`).

3. **Compute next sequence.** List `<workspace>/.council/checkpoints/*.json`. Read each file's `sequence` field. `next_sequence = max(...) + 1`, or `0` if the directory is empty or absent.

4. **Build CheckpointPayload.**

   ```json
   {
     "schema_version": 1,
     "checkpoint_id": "council-plan-<seq>-<8-hex-random>",
     "phase": "council-plan",
     "sequence": <next_sequence>,
     "session_group_id": "<GROUP_ID>",
     "emitted_at": "<UTC ISO 8601 T-form, no fractional seconds>",
     "artifact_paths": ["<workspace-relative path to PLAN-aura-[feature-slug].md from Phase 6>"]
   }
   ```

   `artifact_paths` must contain exactly the PLAN file you wrote in Phase 6, workspace-relative.

5. **POST.** Use the Bash tool:

   ```bash
   curl -fsS -X POST \
     "http://localhost:3456/api/sessions/$ORCH_SID/council/checkpoint" \
     -H "Content-Type: application/json" \
     -d "$PAYLOAD"
   ```

   Expected 200 with `{"ok": true, "written": "...", ...}`.

6. **On non-200:**
   - **409** ("Session is not part of an active council group"): silent skip, not an error.
   - **400 / 403 / 500**: surface the raw response body to the user, do not retry. Schema rejection, auth violation, or filesystem write failure needs human attention.

7. **Do not wait** for the observer's review. The 200 response IS the success signal for this phase; the observer's review file lands asynchronously and surfaces in the Aura UI's ObserverPanel.

---

