Skip to content
Back to skills

Rule Daemon Projects Tasks

ASecurity

Projects and tasks — a run's project, project chats, the task board and its runs. A repository rule for apps/daemon/src/v1/projects/**, apps/daemon/src/v1/tasks/**, apps/daemon/src/v1/teams/**/project-chat*, apps/daemon/src/v1/teams/**/task-board*, apps/daemon/src/v1/agents/**/host-board*, apps/daemon/src/v1/agents/**/project-*, apps/daemon/src/v1/mcp/tools/board/**, apps/daemon/src/utils/stop-cause*; read it before editing a file there.

  • 8 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 17, 2026
ai-agentsgogit

Works with

  • cli
  • mcp

Security analysis

A100/100

Scanned December 4, 2026

npx -y skills add geniro-io/geniro-app --skill rule-daemon-projects-tasks --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Rule Daemon Projects Tasks?

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

Security grade badge for Rule Daemon Projects Tasks
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/geniro-io-rule-daemon-projects-tasks/badge)](https://www.skillsdirectory.com/skills/geniro-io-rule-daemon-projects-tasks)

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-projects-tasks
description: "Projects and tasks — a run's project, project chats, the task board and its runs. A repository rule for apps/daemon/src/v1/projects/**, apps/daemon/src/v1/tasks/**, apps/daemon/src/v1/teams/**/project-chat*, apps/daemon/src/v1/teams/**/task-board*, apps/daemon/src/v1/agents/**/host-board*, apps/daemon/src/v1/agents/**/project-*, apps/daemon/src/v1/mcp/tools/board/**, apps/daemon/src/utils/stop-cause*; read it before editing a file there."
---
<!-- GENERATED by scripts/sync-agent-rules.mjs from .claude/rules/daemon-projects-tasks.md. DO NOT EDIT: edit the source, then run `pnpm sync:agent-rules`. -->

# Projects and tasks

- **Which project a run belongs to** is settled once, when it is created (`ProjectScopeService.placeNewRun`), and stored as `Run.projectId` + `Run.projectSource` (`explicit` / `card` / `folder` / `none`): the project the run was started under by choice (`projectId` on the chat and team-run create DTOs, from a run configuration or the composer chip; an unknown or deleted id is passed over), explicitly none (`projectId: null`), else its task card's project while it exists, else the live project bound to its folder or to the CLOSEST folder above it — after `ProjectRootsService.rootsOf` maps a task worktree to its repository (`ProjectDao.findNearestByFolder` over `nearestProjectOf`). The home folder and `/` count only as an exact match, never as an ancestor. A run whose project could not be read keeps `projectSource` null and is resolved again where asked (`projectOfRun`: card, then exact folder — the rule every run from before the columns keeps). The run's instructions snapshot, its memory index and its memory scope all follow the one answer. A run started under a project by choice, with no group named, is filed in that project's sidebar group while it exists (`RunGroupsService.groupForNewRun`). The run wire names it (`RunWire.project`, from one live-projects read per listing; null for none, a deleted one and a run from before the columns).
- `GET /v1/projects/of-folder?path=` answers the project a new chat there would get by the folder rule (null for a folder that does not exist).
- A project's instructions are blocks (`Project.instructionBlocks`, JSON `{id, title, text}[]`, every block reaching every run). `Project.instructions` is derived on every write: the blocks' texts joined in order, titles left out, and it is what a run's snapshot composes. A project written before blocks has `instructionBlocks` null and reads as one block titled Instructions (`projectBlocksOf`); its first write stores blocks. The change log and an analysis card's diff use `blocksDocument` (each block under `## Title`), so a change names its block.
- `Project.instructionsRevision` counts every change to the description or instructions (an edit that leaves `blocksDocument` as it was, such as a blank block added, moves nothing). `ProjectsService.update` is their one writer: a quoted `expectedInstructionsRevision` the project has moved past is refused `409 PROJECT_INSTRUCTIONS_DRIFT` with nothing written, and updates are serialized so the check and the write never interleave. Each changed text is logged in `project_instruction_changes` (teardown-exempt), credited to the user, an analysis, a chat or a saved lesson (`lesson`, the source thread as its chat); consecutive user edits of one field within `PROJECT_CHANGE_COALESCE_MS` (10 min) extend one row. Every create, update, rearm and delete, and every move of the autopilot breaker (`TaskSettleService`), publishes `projects_changed {projectId, textsOnly?}` (`ProjectEventBus`) to every client, paired devices included; `textsOnly` marks an update that named only the texts. Any text an analysis writes is refused control characters (the service) and invisible format characters (the tool's reader).
- **A project's own chat** (`ProjectChatService` in `v1/teams`, `POST|DELETE /v1/projects/:projectId/chat`): one ordinary chat per project, in its folder and under it (`Run.projectId`), marked `Run.editsProjectId` with no `editsTeamSlug` (`isProjectChat`), a system chat like a builder chat (listed only with `includeSystem`, `RunDao.listChats`; found by `listEditingProject`, read without creating one by `GET /v1/projects/:projectId/chat`), deleted with its project (on `projects_changed` and by a boot sweep). `ChatService` re-briefs it before each turn from the source the service installs (`useProjectChat`: `utils/project-chat-instructions.ts`, the project's blocks with their revision, its description, and for a team default the members' Model groups, the overlay's path and the overlay as it stands — never the team file's path, the team being read through `read_teams`) and registers a `ProjectChatBroker` sink per turn carrying the project and its default team (null for an agent, or a team the library lost) — never the model's. It holds the same team and project tools as any chat (user decision), its own project being what a call naming none means: `save_project_instructions` (`blocks` + `baseRevision`, `projectId` for another project, no item ids; `ProjectInstructionsChangeService.saveForChat`, a drift answered with the blocks as they stand, the card's change carrying no ids and `cardSeq: null`, logged with source `chat`), `propose_team` in the one form (`.claude/rules/daemon-host-tools-team-proposal.md`) and `read_teams` over the whole library, approved without a card in every mode (`isHostLibraryReadCall`, on a project chat's or an analysis's turn only). Never `save_team_change` or the analysis tools.
- `Task.folder` null means INHERIT the project's folder, resolved at read sites (Run press, `TaskQueueService`). Never snapshot it at create. Folders are canonicalized and checked where set.
- The autopilot queue split lives in `v1/tasks` (`TaskQueueService`, `TaskQueueController` keeps the projects path/tag/operationId) because of the module cycle. While armed it refuses team-targeted cards.
- Module direction: `TasksModule` imports `ProjectsModule`; `ProjectsModule` provides `TaskDao` / `LabelInstructionDao` rather than importing back. No cascades: `ProjectsService.remove` deletes tasks itself.
- `Task.position` is allocated past the column's live max, never from a count; only `reorder` renumbers (conditional per-card UPDATE).
- Label instructions go into `Run.taskInstructions`, a column separate from `customInstructions` (forget must not purge them). They are re-resolved on resume.
- `Task.runId` and `Run.taskId` are written together or not at all; `abandon` deletes the run it created.
- **The daemon runs no git** (worktrees: `.claude/rules/storage-split.md`). A card's run works where the daemon reads it, never where a caller says (`POST /v1/tasks/:taskId/runs` takes no folder): `<userData>/worktrees/<taskId>` when the start names the branch main cut there (`taskRunFolder`, twin of main's `WORKTREES_DIR_NAME`), else the card's folder, else its project's. The route is desktop only (`DesktopOnlyGuard`); a paired device presses Run through Electron main (`geniro:startTaskRun`). `TaskRunsService` starts an ordinary chat, or a team run; a later press continues the card's own run when it is a settled run of the same agent or team (`resumableRun`), sending the press's own words, else — when the run's last word is the boot reconcile's interruption (`interruptionOf`, `agents/utils/run-interruption.ts`) — geniro's continuation note naming the calls the stop closed (`restartContinuationPrompt`), never the brief again, else the brief, first moving a run its folder's deletion moved back into the worktree that press cut (`TurnFolderService.returnTo`). Two start guards: the synchronous `TasksService.claimStart` claim and `assertNotAlreadyRunning` (asks the run). The board's reconcile holds off a card while its claim is held and makes it once the claim is released.
- `TaskSettleService` observes only. A run completing moves nothing and writes no report; never automate that from the settle. The settle only maps `failed` → `failed` and `cancelled` → `todo`, and only for a card still `in_progress`.
- A card whose own run starts or settles without the card moving is announced as `task_changed` with no `reason` (`TasksService.announceInPlace`, from `TaskSettleService`), since the queue's live count moved; only on the live path, never from a reconcile, which every board load and `task_changed` runs. A move or a `work-finished` announce stands for it. Every write of a command-center start request (`CommandCenterStartsService`: filed, approved, declined, failed) is announced the same way, since the wire carries it as `TaskWire.startRequest`.
- Board tools (`HOST_BOARD_TOOLS`) go to every endpoint holder; every write goes through `TasksService`. Run-owned fields are refused. `delete_task` deletes through `TasksService.remove`, the app's Delete path, and names its card (the card the calling run works is refused: its run works in that worktree); it is the one board tool a chat never auto-approves (`HOST_BOARD_ASKED_TOOLS`), so outside `auto` the user approves each delete.
- A delete is announced as `task_changed` with `reason: 'deleted'`, and the board prunes the card's worktree off it (`pruneTaskWorktree`, which keeps a dirty tree and the branch), whoever deleted it.
- `refuseUnattended`: a chat not in `auto` may not put a card in an armed intake, change any card on an armed board (except the working run moving its own card out of intake), set `approval: 'auto'`, or change an existing card's run configuration. Keyed on the column the card ends in. The executor auto-approves no host tool but the shared memory's and the knowledge store's (`.claude/rules/daemon-memory.md`, `.claude/rules/daemon-knowledge.md`).
- The armed-intake rule is one util (`tasks/utils/armed-intake.ts`: `landsInArmedIntake`, `quietColumn`), shared by the board tool and the system analysis's apply, which files into the quiet column. A card's start request carries its kind (`Task.startRequestKind`: `manager` — the command center's, null on rows written before it — or `analysis`, a system analysis's Implement right away, written already approved). The drain (`CommandCenterStartsService.approvedStarts`) returns both with `startedBy` (`manager` / `user`), main starts each under that starter, and only `manager` requests wake a manager, join its roster or are rehydrated; an `analysis` failure is published on `TaskEventBus.startFailures` for `SystemAnalysisStartsService`. `source: 'system_analysis'` cards carry `sourceRef` `<runId>:<cardSeq>:<itemId>` (`TaskDao.findBySourceRef`).
- A working run may move its card only to `TASK_AGENT_OWN_STATUSES`.
- Report screenshots and the board tools' `files` are copied onto the card through `TaskFilesService.copyOnto`, the one copy-in: opened by `openArtifactFile` over the allowed roots (`cardFileRoots`: `localMediaRoots(run.cwd)`, the card's project folder, the card's own folder and worktree), copied from that descriptor, bound into the same `Task.attachments` column and `<userData>/task-attachments/<taskId>/` folder as UI uploads, and deleted again when the bind refuses. Every refusal reaches the agent's answer with its reason and the allowed roots. Caps: `TASK_FILES_MAX` per card, `TASK_UPLOAD_MAX_BYTES` per stored file, `TASK_STORED_BYTES_MAX` stored per card, `MAX_REPORT_IMAGES` per report (the rest named, never dropped silently). Rewrite the image destination by position; a file matching a stored copy by name and size reuses it.
- A run ended by a spent usage limit (`AgentAdapter.failureFrom`, read off its newest `error` row) never counts toward the failure breaker. It holds an armed project until the limit reopens (`Project.autopilotLimitUntil`: the named reset plus `AUTOPILOT_LIMIT_RESET_GRACE_MS`, else `AUTOPILOT_LIMIT_FALLBACK_MS` from now). The moment passing ends the hold, and a completed run or a re-arm ends it early. A person's Run press is not held.
- **Run starters** (`TaskRunStarter`): `user`, `autopilot`, `manager` and `schedule`. Only `autopilot` meets the autopilot's gates; `schedule` keeps the approval its schedule names. `startProjectRun`'s `schedule` branch takes the fire's id, never a folder: it derives the run's folder from the fire (`scheduleFireFolder`, the project's folder when the start names no branch), links the run to its schedule and fire, and writes the first row, a system line naming the schedule, the time and the branch. Scheduled tasks: `.claude/rules/daemon-schedules.md`.
- A cancelled card is marked `Task.stoppedAt` and never auto-restarted (`TASK_STOPPED_BY_USER`); only a Run press that starts it clears the mark.
- A worktree the autopilot could not prepare is reported by main (`POST /v1/tasks/:taskId/prepare-failed`, git's line as `reason`) and marked `Task.prepareFailedAt` (only while the card is still in the intake column; announced as `task_changed`, since nothing else makes the board re-read the queue). While armed, `TaskQueueService` holds a mark younger than `PREPARE_FAILURE_RETRY_MS` (5 min) in `blocked` BEFORE the cap, so it never takes the slot of the card behind it; an older one is handed out again (retry), a repeat failure re-stamps it, and any successful start clears it.
- Every `blocked` entry carries a `kind` (where the answer lies: `run-target` / `missing-team` in the run settings, `stopped` / `worktree` by a Run press on the card, `overlay` on the team's page in the project's scope, `dependency` by the cards it is blocked by reaching `done`) and a `retryInMs` (set only for `worktree`: what is left of the hold, relative so a client on another clock times it right — nothing announces it lapsing, so the board re-reads the queue then). The worktree hold is asked last, so a card with a run-settings problem is reported as that.
- `work-finished` is announced only for a card in `done` with no run working and no live work outside a turn (`RunLiveWork` in `v1/agents`: a monitor, a command action, a detached command or background sub-agent, monitor output or a host wake waiting to start a turn; the team module adds its own through `register`, a wake the executor took counting until the turn it opens is running, `holdsOpeningWake`) — each runs in, or wakes the agent into, the card's worktree. A card withheld for live work is asked again on every `RunLiveWork.changes()` and announced once free; the hold is in memory, since a restart ends monitors and command actions and main's reaper asks `POST /v1/tasks/finished` at every daemon start. On `work-finished`, re-checked against the card and run as they are then (`finishedAmong`, not archived, no start in flight: `TasksService.isStarting`, not `hasEnded`), `TaskSettleService.endFinishedWork` closes the run's CLIs gracefully (`closeFinishedRun`; a turn in flight skips the close and the reap) and, after the kill grace, stops what the agents detached through `RunIdleReapService.reap`, which writes no transcript row and only owes the next turn its note. It stops nothing `RunLiveWork` reports: that work withholds the finish instead, so a monitor or a command the CLI still tracks outlives Done until it ends. `reviveFailedCard` lifts only `failed`. `run_deleted` clears the edge, keeps the report and never touches the worktree.
- Stop cause (`utils/stop-cause.ts`, twin of the UI's `writeStopCause`): `main.ts` reads and deletes it once, before both reconciles, then runs `settleCutOffCards(null)`. It also reads and deletes the previous daemon's records (`utils/previous-stop.ts`: its heartbeat, the UI's exit note — twin of `writeExitNote` — and the crash guards' error summary, matched by pid) and the Mac's boot time, and, for `crash` / `unknown` — or any cause whose exit note says the app had to SIGKILL the daemon after the grace (`killedAfterMs`) — composes one short detail (an uncaught error, Geniro's own kill, a signal, an exit code, the Mac restarting, or no record) that every interruption row the reconciles write carries in its message and as `interruptDetail`; the cause and everything keyed on it stay as they are. `crash` / `unknown` mark interrupted cards stopped (`TASK_INTERRUPTED`); `quit` / `self-update` / `restart` continue unattended (`resumesUnattended`). After them the daemon itself continues a team run in its sessions, and a chat after `self-update` / `restart` (`continuesUnattended`, Teams and passes): the run stays `running` until the drain, so the settle and the autopilot leave its card where it is and no brief is sent again. After `crash` / `unknown` a team run stays `running`, held for the user's choice, so its card stays in progress too; declined, it ends `failed` and its card is marked stopped as before.
- **Blocked by** (`Task.blockedBy`, JSON ids, additive column): the cards of the SAME project a card waits on. `TasksService` refuses, `TASK_BLOCKED_BY_INVALID` with nothing saved, a card blocking itself, another project's card, an unknown one and any loop (`utils/task-blockers.ts`); `update` replaces the whole list. A deleted blocker stays in the column and is dropped by every reader. While armed, `TaskQueueService` holds a card with a blocker not in `done` in `blocked` (`dependency`, after the run-settings problems, before the worktree hold); a Run press and a command-center start are never refused for it (user decision). The wire names each live blocker (`TaskWire.blockedBy`: id, number, title, status); the board tools take keys or ids and `get_task` / `list_tasks` read them back.
- `create_task` defaults a new card to `backlog`; never default one into an intake column — an armed project starts an agent on it within seconds.
- A reported merge (`POST /v1/tasks/:taskId/pull-request-merged`) moves only a card still `in_review`, only for a URL its run captured (else `TASK_PULL_REQUEST_UNKNOWN`); a card moved elsewhere is a no-op.
- `GET /v1/tasks/:taskId/image` (the card panel's pictures, a paired device's too) reads only inside the card's own `<userData>/task-attachments/<taskId>/` and `cardFileRoots` of its own run's cwd (`TaskImageService` over `LocalImageService.readWithin`, judged by `openArtifactFile`: as written and on the real path, hard links refused). Never widen it to the card's picked files: `POST /v1/tasks/:taskId/files` is open to a paired device, so a picked path would read anything. A refusal shows in the panel as the picture's reference.
- A file the USER picks is bound by PATH, never copied; only what an agent names (above) or a phone uploads is stored under the card. `DELETE /v1/tasks/:taskId/files/:attachmentId` drops the reference only and never deletes the user's file; a stored copy goes with its reference unless the description or report still shows it.

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.