Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
0acdb1c
feat: catalog herdr agent integrations
codejunction Oct 3, 2026
b23afb6
feat: add agent lifecycle domain model
codejunction Oct 3, 2026
13a5fb9
expanded agent enhancement doc and task
codejunction Oct 4, 2026
c2513af
feat(agents): server-owned lifecycle, report api, waits, context store
claude Oct 4, 2026
05ded02
feat(skill): teach agents shared context workflow
claude Oct 4, 2026
d63b246
docs(agents): lifecycle, report api, waits, context cli
claude Oct 4, 2026
7428629
feat(integrations): lifecycle hooks for claude, gemini, cursor, copil…
claude Oct 4, 2026
2b70bf0
feat(agents): codex and claude lifecycle from their own logs
claude Oct 4, 2026
0e3f7ca
feat(agents): resume stored agent sessions after restart
claude Oct 4, 2026
f82b6e2
docs(readme): agent resume setting row
claude Oct 4, 2026
31260ab
feat(integrations): codex hooks, session hooks for qwen, qoder, droid…
claude Oct 4, 2026
1493df9
feat(integrations): kimi, mastracode, kilo, grok, antigravity
claude Oct 4, 2026
3e6ce1c
feat(integrations): letta session hook, hermes plugin
claude Oct 4, 2026
e37d03e
feat(integrations): pi and omp extensions
claude Oct 4, 2026
dfc69f3
feat(integrations): claude, codex, gemini, devin as supported set
claude Oct 4, 2026
10eaae7
feat(agents): attention queue and project rollups
claude Oct 4, 2026
1f547e9
feat(agents): sd agent explain diagnostics
claude Oct 4, 2026
b03feb5
feat(agents): prompt --wait, rename, event stream
claude Oct 4, 2026
5ccfa42
feat(agents): native cli flags for launch, spawn, resume
claude Oct 4, 2026
8f35e4d
feat(agents): native slash commands per agent
claude Oct 4, 2026
5264079
feat(context): context page
claude Oct 4, 2026
c474857
feat(agents): versioned detection rules with local overrides
claude Oct 4, 2026
c5937e1
feat(agents): sd switch, message action, skill update
claude Oct 4, 2026
3187b46
feat(context): agents extract their own facts on demand
claude Oct 4, 2026
f0c3842
docs(integrations): support matrix with verification source
claude Oct 4, 2026
d473cd3
fix(agents): heuristic verdict replaces the previous one
claude Oct 4, 2026
c516ac9
docs(task): record 0.0.7rc1 release
claude Oct 4, 2026
2d991fd
feat(context): deterministic capture of agent commands, tests, edits,…
claude Oct 4, 2026
c3178d1
feat(agents): devin cli commands and hooks cross-checked from web sou…
claude Oct 4, 2026
fcdb1e5
docs(task): tick ci matrix and docs items
claude Oct 4, 2026
3886969
feat(context): smart recall via agent small models, no embeddings
claude Oct 4, 2026
e4b18eb
docs(task): claude verified with real cli; prepare rc2
claude Oct 4, 2026
f9072ad
docs(task): record 0.0.7rc2 release
claude Oct 4, 2026
7f144ce
feat(ui): declutter sidebar footer
claude Oct 4, 2026
4a27bc6
feat(context): human friendly context page, pick agent and model for …
claude Oct 4, 2026
0504f11
docs(task): record 0.0.7rc3 release
claude Oct 4, 2026
f9453f5
feat(context): sd init sets up .shelldeck in a project
claude Oct 4, 2026
fdc479f
docs(readme): refresh screenshots, one actions menu per agent row
claude Oct 4, 2026
a66f521
docs(agents): restructure enhancement doc around what shipped
claude Oct 4, 2026
5150f90
chore(release): 0.0.7
claude Oct 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat(agents): sd switch, message action, skill update
- sd switch checkpoints and starts another agent from sd context
- message button on agents page, refused while blocked
- skill teaches agent prompt/cmd/wait/switch
- drop claude StopFailure hook (not in claude 2.1.289)
- update task.md
  • Loading branch information
claude committed Oct 4, 2026
commit c5937e1019dae7ee7433685ec11db36e5bc8cfd0
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ All notable changes to shelldeck are listed here. The format follows [Keep a Cha
- Screen detection rules moved into a versioned bundled file (`agent_detection/default.toml`), with per-agent local overrides in `<config>/agent-detection/<agent>.toml`. Invalid overrides are ignored and reported by `sd agent explain`.
- `sd agent explain` (and `--file`): why an agent has its state, without showing screen text.
- Context page: task and state editor, memory with verify/invalidate, decisions, related projects, and cross-project search.
- `sd switch AGENT`: checkpoint the task and continue with another agent, which starts from `sd context`. *Message* action on the AI agents page. The skill teaches `sd agent prompt/cmd/wait` and `sd switch`. The Claude hook no longer registers `StopFailure`, which Claude Code 2.1.289 doesn't have.
- Hand-off files include a context snapshot, and the installed agent skill teaches the context workflow.

## [0.0.6] - 2026-10-01
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ sd remember FACT / sd discover FINDING [--type T] [--file F] add to project me
sd decide TITLE [-r REASON] record a settled decision (sd decisions lists them)
sd task update [STATUS] [--task --step --next --tests --error] update the active task and state
sd knowledge verify ID [--status S] mark knowledge VERIFIED, REVIEWED, STALE or INVALIDATED
sd switch AGENT [--note TEXT] checkpoint this project's task and continue it with another agent in a new terminal
sd projects / sd project NAME / sd relate PROJECT known projects, one project, link related projects
sd install-skill [AGENT...] [--remove] teach agent CLIs the sd team commands (automatic on server start)
sd edit FILE / sd view FILE open a file in shelldeck's editor / viewer
Expand Down
2 changes: 1 addition & 1 deletion docs/agent-integrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ approve, deny or block a tool.

| Agent | What is installed | Where (env override) | Session/resume |
| --- | --- | --- | --- |
| Claude Code | Hook entries for `SessionStart`, `UserPromptSubmit`, `Pre/PostToolUse`, `PostToolUseFailure`, `PermissionRequest`, `Notification`, `SubagentStart`, `PreCompact`, `Stop`, `StopFailure` (all `async`) | `~/.claude/settings.json` (`CLAUDE_CONFIG_DIR`) | yes: `claude --resume <id>` |
| Claude Code | Hook entries for `SessionStart`, `UserPromptSubmit`, `Pre/PostToolUse`, `PostToolUseFailure`, `PermissionRequest`, `Notification`, `SubagentStart`, `PreCompact`, `Stop` (all `async`; names checked in Claude Code 2.1.289) | `~/.claude/settings.json` (`CLAUDE_CONFIG_DIR`) | yes: `claude --resume <id>` |
| Gemini CLI (v0.26+) | Hook groups (`matcher: "*"`) for `SessionStart`, `BeforeAgent`, `Before/AfterTool`, `PreCompress`, `AfterAgent`, `Notification` (approval) | `~/.gemini/settings.json` (`GEMINI_DIR`) | yes: `gemini --resume <id>` (docs: session management) |
| Cursor (editor and CLI) | `hooks.json` entries for the watching hooks (`sessionStart`, `beforeSubmitPrompt`, `after*`, `postToolUse*`, `subagentStop`, `preCompact`, `stop`) | `~/.cursor/hooks.json` (`CURSOR_DIR`) | yes: `cursor-agent --resume <id>` |
| GitHub Copilot CLI | Its own file; each event's command names the event, because Copilot's payloads don't | `~/.copilot/hooks/shelldeck.json` (`COPILOT_HOME`) | yes: `copilot --resume=<id>` |
Expand Down
24 changes: 15 additions & 9 deletions docs/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,12 @@
(replace / disable / add), invalid overrides ignored and reported in
`sd agent explain` (rule id, manifest source/version, warning). The server's
heuristic uses it; the wheel includes the file; docs/agent-detection.md added.
- **2026-10-04 — Remaining CLI/UI items:** `sd switch <agent>` (checkpoint +
start the agent via `/api/agent-start` with a `sd context` kickoff), a
*Message* action on the AI agents page (refused while blocked), and the skill
now teaches agent prompt/cmd/wait/switch. Claude hook events were checked
against Claude Code 2.1.289's bundle: `StopFailure` doesn't exist there and was
removed. Checked live.
- **2026-10-04 — Docs:** README, CHANGELOG (Unreleased), CLAUDE.md,
`docs/agent-automation.md` and `docs/agent-report.schema.json` describe the
lifecycle, report API, waits and context commands.
Expand Down Expand Up @@ -269,7 +275,7 @@ conversation without affecting unrelated Codex hooks.

### Task 3.3: Claude Code integration

- [ ] Verify the current Claude Code hook schema and event names before writing
- [x] Verify the current Claude Code hook schema and event names before writing
an installer.
- [x] Install/remove only Shelldeck-owned hook entries and scripts.
- [x] Report native session identity; preserve screen detection for state.
Expand Down Expand Up @@ -403,12 +409,12 @@ attribution; stale detection works on file changes; verification CLI works.
- [x] Add `sd context [PROJECT]` — show current or named project context.
- [x] Add `sd memory [search <query>]` — show/search project memory.
- [x] Add `sd projects` and `sd project <name>` — list/show projects.
- [ ] Add `sd handoff` / `sd handoffs` / `sd done <id>` — enhanced with
- [x] Add `sd handoff` / `sd handoffs` / `sd done <id>` — enhanced with
full context snapshots (task, state, memory, decisions, git, tests, files,
events, next action, related projects — section 44).
- [x] Add `sd resume` — resume most recent incomplete task.
- [ ] Add `sd switch <agent>` — create handoff and switch active agent.
- [ ] Add agent-accessible commands: `sd context`, `sd recall`, `sd memory`,
- [x] Add `sd switch <agent>` — create handoff and switch active agent.
- [x] Add agent-accessible commands: `sd context`, `sd recall`, `sd memory`,
`sd handoff`, `sd done`, `sd tell <agent>`, plus optional `sd remember`,
`sd decide`, `sd discover`, `sd task update` (section 34).

Expand Down Expand Up @@ -452,12 +458,12 @@ at checkpoints; sensitive files are excluded.

### Task 5.7: Background processing and performance

- [ ] Add background worker infrastructure for knowledge extraction,
- [~] Add background worker infrastructure for knowledge extraction (Markdown projection and context calls run off the event loop; no LLM extraction or embeddings yet),
embedding generation, Markdown projection, event compaction, stale
detection, and indexing (section 56).
- [ ] Ensure agent terminal interaction never blocks on context processing
- [x] Ensure agent terminal interaction never blocks on context processing
(section 55): startup <100ms, recall <100ms, SQLite search <50ms.
- [ ] Implement failure handling: context system failure logs warning but
- [x] Implement failure handling: context system failure logs warning but
agent execution continues (section 57).

**Primary files:** new `shelldeck/workers.py`, `shelldeck/context_store.py`,
Expand Down Expand Up @@ -490,7 +496,7 @@ settings.
- [x] Add atomic `sd agent prompt --wait` semantics.
- [x] Add agent attach/rename commands (rename; manually started agents are attached automatically by process detection).
- [x] Add an event subscription endpoint/transport and `sd events subscribe`.
- [ ] Update the installed skill only after these commands are tested.
- [x] Update the installed skill only after these commands are tested.

**Done when:** supervisors can wait for an agent state transition without
polling screen text, and a new agent process cannot satisfy an old wait.
Expand All @@ -500,7 +506,7 @@ polling screen text, and a new agent process cannot satisfy an old wait.
- [x] Add a prioritized attention section to `static/agents.js`.
- [x] Display semantic state, source, reason, elapsed time, model/context,
role/title, and integration health.
- [~] Add direct actions appropriate to the viewer's permissions (open, open next and resume done; peek/answer/message via CLI): open, peek,
- [x] Add direct actions appropriate to the viewer's permissions (open, open next, message, native commands, resume; peek/answer via CLI): open, peek,
answer, message, resume, diagnose, reassign, and close.
- [x] Add project sidebar rollups with accessible text/icon state indicators.
- [x] Keep completed agents visible until reviewed; do not re-alert unchanged
Expand Down
18 changes: 18 additions & 0 deletions shelldeck/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -1257,6 +1257,24 @@ def resume(json_: bool = typer.Option(False, "--json", help="Print JSON.")):
typer.echo(out["text"])


@app.command()
def switch(
agent: str = typer.Argument(..., help="The agent to continue with: claude, codex, gemini, devin, ..."),
note: str = typer.Option("", "--note", "-n", help="Where you stopped, saved as the current step."),
model: str = typer.Option("", "--model", "-m"),
):
"""Hand this project's work to another agent: checkpoint the task and state, then open the new agent in a new terminal
of the same project, told to start from `sd context`. The current agent keeps running until you close it."""
me = os.environ.get("SHELLDECK_SESSION_ID", "")
sessions = _api("/api/sessions")["sessions"]
mine = next((s for s in sessions if s["id"] == me), None)
_api("/api/context/state", "POST", {**_where(), **({"step": note} if note else {}), "next_action": f"continue with {agent}"})
body = {"agent": agent, "model": model, "prompt": "Continue this project's task where the last agent stopped. First run: sd context"}
body |= {"project_id": mine["project_id"]} if mine and mine.get("project_id") else {"cwd": os.getcwd()}
r = _api("/api/agent-start", "POST", body)
typer.echo(f"checkpoint saved; {agent} started as {r['session']['nick']} ({r['session']['id']}). It starts from sd context.")


@app.command()
def recall(
query: str = typer.Argument(..., help="What you're looking for, e.g. \"authentication architecture\"."),
Expand Down
2 changes: 1 addition & 1 deletion shelldeck/hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
EVENTS: dict[str, dict[str, str | None]] = {
"claude": {"SessionStart": IDLE, "UserPromptSubmit": WORKING, "PreToolUse": WORKING, "PostToolUse": WORKING,
"PostToolUseFailure": WORKING, "PermissionRequest": BLOCKED, "SubagentStart": WORKING, "PreCompact": WORKING,
"Stop": DONE, "StopFailure": IDLE, "SessionEnd": None, "Notification": None},
"Stop": DONE, "SessionEnd": None, "Notification": None}, # names checked in Claude Code 2.1.289's cli.js
"gemini": {"SessionStart": IDLE, "BeforeAgent": WORKING, "BeforeTool": WORKING, "AfterTool": WORKING, "PreCompress": WORKING,
"AfterAgent": DONE, "Notification": BLOCKED, "SessionEnd": None},
"cursor": {"sessionStart": IDLE, "beforeSubmitPrompt": WORKING, "afterShellExecution": WORKING, "afterFileEdit": WORKING,
Expand Down
18 changes: 16 additions & 2 deletions shelldeck/static/agents.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// AI agents page: coding agents running in terminals, every known agent CLI with its models, and launch.
import { ATTENTION, S, attentionOf, orderedProjects, projectColor, refreshProjects, showSession } from "./app.js";
import { api, esc, icon, toast, toastError } from "./ui.js";
import { api, esc, icon, promptDialog, toast, toastError } from "./ui.js";

// pasted into an agent so it knows how to reach the others in its project
const TEAM_PROMPT = `You are one of several AI coding agents working in this project, each in its own shelldeck terminal with a person's name ($SHELLDECK_NICK).
Expand Down Expand Up @@ -181,7 +181,8 @@ function commandMenu(r) {
const cmds = (COMMANDS[r.agent] || []).filter((c) => !c.takes_arg);
if (!cmds.length) return "";
const opts = cmds.map((c) => `<option value="${c.action}">${esc(c.action)} (${esc(c.command)})${c.verified ? "" : " ?"}</option>`).join("");
return `<select class="sm" data-agent-cmd="${r.session_id}" aria-label="Run a ${esc(r.label)} command"><option value="">Command…</option>${opts}</select>`;
return `<button class="btn sm" data-message="${r.session_id}" title="Send a prompt (refused while it waits on a question)">Message</button>
<select class="sm" data-agent-cmd="${r.session_id}" aria-label="Run a ${esc(r.label)} command"><option value="">Command…</option>${opts}</select>`;
}

async function onCommand(e, el) {
Expand All @@ -202,6 +203,19 @@ async function onCommand(e, el) {

async function onClick(e, el) {
if (e.target.closest("select")) return; // the command menu, not "open terminal"
const msgTo = e.target.closest("[data-message]")?.dataset.message;
if (msgTo) {
const text = await promptDialog("Message the agent", "", { label: "Prompt", ok: "Send" });
if (!text?.trim()) return;
try {
await api("/api/agent-prompt", { method: "POST", body: { session_id: msgTo, text } });
toast({ title: "Sent" });
} catch (err) {
if (String(err?.message || err).includes("agent_blocked")) toast({ title: "Not sent", body: "It is waiting on a question: answer that first.", kind: "warn" });
else toastError(err);
}
return;
}
const sid = e.target.closest("tr[data-sid]")?.dataset.sid;
if (sid) return showSession(sid);
if (e.target.closest("[data-copy-prompt]")) {
Expand Down
7 changes: 6 additions & 1 deletion shelldeck/team.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,12 @@ def one_line(text: str, limit: int = 2000) -> str:
records a settled decision; check `sd memory` first so you don't duplicate one.
- `sd task update [IN_PROGRESS|BLOCKED|DONE] --task "..." --step "..." --next "..." --tests "..." --error "..."`
updates the task and state. Run it when the plan or step changes, after tests, and before you stop.
- `sd agent status [name]` shows agent states; `sd agent wait <name> --until idle --timeout 10m` waits for one.
- `sd agent status [name]` shows agent states; `sd agent wait <name> --until done --timeout 10m` waits for one
(exit 0 reached, 2 timeout, 3 it exited). `sd agent prompt <name> "text" --wait` sends a follow-up and waits for it.
- `sd agent cmd <name> compact` runs that agent's own slash command (compact, clear, model, status, review, ...;
`sd agent cmd <agent> --list`). Commands and prompts are refused while the agent waits on a question.
- `sd switch <agent> --note "where I stopped"` hands this project's task to another agent in a new terminal; it
starts from `sd context`. Use it only when the user asks.
Never put passwords, tokens or keys into these commands.

Rules:
Expand Down
Loading