aide-observer — the observer session
The observer is a local web page, one per user per machine, that shows every project's agent sessions live. It is the single source of truth for which session is working in a project, so it is not optional: a project has at most one open session at a time, and the session start is where that is checked.
This skill owns everything the agent does with the observer. The aide skill keeps no observer text; it relies on the rules below.
Session start
Run these in order, one call at a time, before the aide skill's boot:
- Check the tools. If
aide_observer_eventandaide_observer_startare not available, tell the user once that the observer tools are missing (the aide server is not loaded) and stop: nothing proceeds unobserved. - Report the session start, alone. Call
aide_observer_eventwithkind: "session_started"and what you know:projectRoot(the project's absolute path) andkanbanTag(theKanban project tag:line of the instructions file). Leave out anything you don't know. Do not report a brain folder: the observer finds the board from thekanbanfield of the project's own brain config. Make this call on its own and read its reply before anything else — never batch it with another call. The reply ends with[observer-session <id>]; that is this session's observer id, and the hook links your Claude session to it while the reply comes back. - Report the user's request. Call
aide_observer_eventwithkind: "prompt"and the user's message in full. - Start the observer. Call
aide_observer_start(no arguments). Its reply starts with one of:Observer running at <link>orObserver already running at <link>— keep the link and go on.Observer not replaced: …— an older observer is still serving; keep the link it names and go on.REOPENED: …— this conversation had ended earlier (it was closed, archived or ended) and nothing newer has worked the project since, so it is open again. Tell the user in one line that the session was reopened, keep the link on the next line and go on.HALT: …— another session of this project is open. Hard stop. See "HALT" below.STOPPED: …— this conversation had ended and cannot reopen: either a newer session has worked the project since, or another session ended it with the user's approval. Hard stop, and no approval lifts it. Tell the user, in plain words, which of the two it is, that nothing proceeds here, and that they should continue in a new session. Do not offer to end any session and do not callaide_observer_startagain.BLOCKED: …— the observer could not start on any port (it names every port tried), or this ended conversation could not be reopened (it gives the reason). Hard stop. Tell the user the reason as given and stop. Nothing proceeds until the user fixes it and starts a new session.
- Give the user the link once the
aideskill's boot sequence is complete, in one line.
HALT
A HALT reply names each open session of the project: its observer id (or claude:<id> for a Claude session that never reported), whether it is working or waiting on the user, how long it has been quiet ("maybe stuck" past 15 minutes), its last activity, and its pipeline and phase.
A HALT is the observer's view, not proof that the session is still running. A session whose transcript shows it closed no longer halts anyone, but a crash or force-kill leaves no such record, so a session can still look open after it is gone. Check each one before you tell the user anything about it.
- Stop all other work. Do not run the
aideskill's boot or touch any file. - Find each session's Claude session id. A
claude:<id>line already names it. For an observer id, read the project's presence records: the*.jsonfiles in thepresencefolder of the project's runtime folder, whose name is thep/<key>part of the observer link (under$AIDEMD_HOMEwhen it is set, else~/.aidemdon Windows,~/Library/Application Support/aidemdon macOS,$XDG_STATE_HOME/aidemdor~/.local/state/aidemdelsewhere). The record whosesessionIdis the observer id givesclaudeSessionId, its last hook (hookEvent,at) and itstranscriptPath. Only read these files; never edit or delete them. - Check whether that Claude session is really running, with whatever the host gives you. In the Claude desktop app, list the sessions including archived ones and find the one in this project's folder whose last activity matches the presence
at:isRunningandisArchivedgive its real state. In a terminal, look for a runningclaudeprocess for this project and at when the transcript was last written. If nothing you can reach answers it, say you could not verify it, and never claim it is running. - Tell the user, in plain words, which session holds the project, what it was doing, its Claude session id, and what the check found: still running (and where), closed without reporting its end, or not verifiable.
- Ask the user what to do: end that session, or close this one. Never decide for them, and never end a session because it looks quiet. A session the check found closed is safe to end; say so.
- Only on the user's clear yes, call
aide_observer_end_sessionwith the id the HALT named: an observer id as written, or, for aclaude:<id>line, the id without theclaude:prefix. Ending only marks the session ended; it deletes nothing. It refuses your own session. - If it replies
not ended (<reason>), the mark could not be written: tell the user the reason, the HALT still stands, and try again only if the user says so. - After
endedoralready ended, callaide_observer_startagain and handle its reply as in step 4 of the session start. A second HALT names whatever is still open.
If the user chooses to close this session, stop and say so.
Reporting
Report each action through aide_observer_event as it happens. Every reply ends with [observer-session <id>].
| When | Report |
|---|---|
| The user sends a message | prompt with the message in full |
| The session takes up a task — at boot or later, including one already In Progress that nothing moves | task with its slug, picked, and the column it is in |
| A task is moved on the board | task with its slug, moved, and the column it moved to |
| A feature pipeline starts or resumes | pipeline_started with the pipeline and the phase it starts at |
| A phase is passed over — the flow starts later than spec ("just plan it"), research or synthesize is skipped by routing, QA passes with no fix loop, or any other stage is not run | phase_skipped with the pipeline, the phase and a short reason |
| Before you delegate to a pipeline agent | phase_started with the pipeline, the phase, the agent's name and the module |
| When it returns — including on failure or when you abandon it | phase_finished with the same pipeline, phase, agent and module, a short result and summary |
| You pause for the user's approval of a file (structure tree, spec, plan) | gate_waiting with the pipeline, the gate and the path of the file awaiting approval |
| The user answers | gate_resolved with the same pipeline, gate and file, and the resolution |
| An implementor checks off a plan step | plan_step_checked with the pipeline, the module, the step and the plan's step count |
| QA returns | qa_verdict with the pipeline, the module, passed or issues, and the open count |
| The pipeline is done (cleanup finished) or the user abandons it | pipeline_finished with the pipeline and completed or abandoned |
| You write or edit a file yourself (session record, prose) | file_written with its path, created or updated |
| A commit or release lands | commit with the sha and message, or release with the version |
| Something fails | error with the message, and the agent and module when known |
Pipelines. A pipeline is one feature flow run by the /aide orchestrator, from the stage it starts at to completion or abandonment, across every module it plans. Name it by its kanban task's slug; with no task, give it a short name and keep it for the whole flow. A later session that resumes the same task continues the same pipeline: report pipeline_started with the same name and the phase it resumes at — stages finished in earlier sessions show as done on their own. Every phase, gate, plan-step and QA report names its pipeline. Work you do by hand outside a pipeline (prose edits, a quick fix) names none: report its file_written and commit events only.
Phases: spec, research, synthesize, structure, plan, build, qa, fix, align, refactor, cleanup. Pair every phase_started with a phase_finished. Report spec as a phase, not only as a gate. The module is the folder the phase works on, as a project-relative path.
When a report misses the observer
A report always lands in the session's own record first; a reply of recorded; observer not running means only the live page missed it.
- On the first such reply in a run of misses, call
aide_observer_startonce. If it brings the observer back, carry on; the next report that gets through resets the run. - If that restart replies
BLOCKED: …, stop: tell the user the reason and that nothing proceeds unobserved. Do not try again on your own. - Never retry a report, never wait on one, and never stop because one report missed a running observer.
A reply that ends ; previously ended: run aide_observer_start before anything else means this conversation had ended (it was closed or archived and has now been resumed). The report was still recorded. Call aide_observer_start before anything else and act on its reply as in step 4 of the session start: REOPENED carries on, HALT and STOPPED stop.
Not observing a session
If the user says not to observe this session, make no further reporting calls for the rest of it. The session start (steps 1–4 above) still runs, because the one-open-session check protects the project; say so if the user asks to skip it too, and follow their answer.