Skip to content
Back to skills

Rule Daemon Host Tools Stages

ASecurity

Host tools — move_stage and the stage writer, the user's own stage moves, and the stalled-stage nudge. A repository rule for apps/daemon/src/v1/teams/**/stage*, apps/daemon/src/v1/teams/services/run-team*, apps/daemon/src/v1/mcp/tools/move-stage/**; read it before editing a file there.

  • 8 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 26, 2026
ai-agentsgo

Works with

  • cli
  • mcp

Security analysis

A100/100

Scanned December 4, 2026

npx -y skills add geniro-io/geniro-app --skill rule-daemon-host-tools-stages --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Rule Daemon Host Tools Stages?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Rule Daemon Host Tools Stages
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/geniro-io-rule-daemon-host-tools-stages/badge)](https://www.skillsdirectory.com/skills/geniro-io-rule-daemon-host-tools-stages)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: rule-daemon-host-tools-stages
description: "Host tools — move_stage and the stage writer, the user's own stage moves, and the stalled-stage nudge. A repository rule for apps/daemon/src/v1/teams/**/stage*, apps/daemon/src/v1/teams/services/run-team*, apps/daemon/src/v1/mcp/tools/move-stage/**; read it before editing a file there."
---
<!-- GENERATED by scripts/sync-agent-rules.mjs from .claude/rules/daemon-host-tools-stages.md. DO NOT EDIT: edit the source, then run `pnpm sync:agent-rules`. -->

# Host tools — stages

- `move_stage` (`StageService`, `v1/teams` — it reads the run's snapshot through `RunTeamService`, which `v1/agents` may not import): offered to every member of a run whose snapshot has walkable stages (`Team.stages`, rules in `teams/utils/stage-validate.ts`, twin of the renderer's). `StageService` is the ONE writer and needs no sink: a move is checked against the progress folded from every `stage_change` row (`teams/utils/stage-fold.ts`), then written as a run-level `stage_change` row (seq reserved here, like `noteOnRun`), then folded into `Run.stageProgress`, then announced as `run_status.stages` (read back through the wire's parser) — all in one chain per run (`RunWriteQueue`, which archiving also goes through, so a move never lands on a run archived mid-move; deleting does not, so a move and a nudge re-read that the run still exists before writing), so two agents finishing the same stage cannot both succeed (`STAGE_NOT_CURRENT`). A refusal names its fix (`NEXT_REQUIRED` lists the branches, `NOT_REOPENABLE` the stages that can be). The listing is synchronous, so the executor registers each run it drives (`StageService.register`) and forgets it with the run (`disposeHostPublishers`); a CLI lists its tools only when a pass or wake starts it. What an agent knows: the static stage map is an instruction part (`stageMapPrompt`, from the snapshot, gated on the MCP tools like the call surface — it joins `sessionKey` and never changes mid-run), and the CURRENT stage rides each turn's prompt, after the user's words (`stageNotice`, on the delivery notice's turns — never a compaction, a geniro command or a slash command, which carry neither the stage line nor the delivery notice; a carried compaction summary still leads one), every call-tool reply (`stage`, beside the envelope like `unread_team_notes`), every call-broker wake (`RunCallCapability.currentStage`) and every `move_stage` reply — never the system prompt. A follow-up written into a live turn carries none (it reaches `beginAgentTurn` only on the next turn). A staged run's row is created with its starting progress (`initialStageProgress`, the one write outside `StageService`, so the first projection every client is handed already carries it); `StageService.current` folds the rows on a cache miss and rewrites the column when its rev differs (an older run with none, or a column write that failed); a move whose column write fails still counts and stays cached, and the column is written again by its own retry (`STAGE_COLUMN_RETRY_MS`) or the run's next `StageService.current` or move (`unsynced`), each revision announced once — until then a listing, the board card and `get_task` read its older rev. A held nudge is also withdrawn when the run is archived (`StageService.generation`). `Run.stageProgress` and the rows go with the run's teardown. No auto-approval (the executor auto-approves no host tool but the shared memory's and the knowledge store's).
  - The user's own moves (`POST /v1/teams/runs/:runId/stages`, `StageWakeService.userMove`): the same `StageService.move`, actor `user` with `via` from `cameViaRemote`, `expectedRev` refused `409 STAGE_PROGRESS_CHANGED` when stale, any other refusal 400 with its code, an archived run `409 RUN_ARCHIVED`. The run's LEAD after the move (`StageMoveResult.lead`, the trigger's member) is then woken in its own conversation with the move and the user's reason through `HostWakeBus` — held while its turn runs, a host turn when it ends. A run no pass has driven since the daemon started, or whose pass the user stopped, has no waker that takes a wake (`TeamExecutorService.canWake`): when its next pass would start the lead and no other agent, it is continued with the wake under geniro's own row (`continueAsHost`, never a user message, never throwing — the move is already written); otherwise the bus owes the lead a note for its next turn and the route answers `woke: false`; a run whose trigger starts no agent has no lead, and the route says so (`hasLead: false`). Each move and each nudge is its own wake key (`stage:<runId>:<rev>`, `stage:<runId>:nudge:<rev>`), so moves made while the lead works join one turn rather than replace each other; a held nudge is withdrawn once a move changes the revision. Never `walkAgain` a run whose pass would start other agents for a stage wake (the restart continuation's pass, which starts exactly the agents its record names, is the one walk that may: Teams and passes).
  - The nudge (`StageWakeService.nudgeIfStalled`, on `TeamExecutorService.onRunSettledCompleted` — the pass roll-up and a woken run's settle, `completed` only, never a shutdown's): a run idle with a stage still current, not archived, with no usage-limit reset scheduled (`Run.resetWakes`), no restart continuation owed (`Run.restartContinuation`) and no monitor of its still running — waits the status cannot show —, gets ONE `nudge` row and a lead wake per (stage, revision); a second settle at the same point — or the first, when the run has no lead — writes `stalled` and `run_status.notify` instead, and nothing more until a move changes the revision. Both are `stage_change` rows (actor `system`), so a restart re-reads them; the fold ignores them.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.