taskchad-os: Command for Claude Code

.claude/commands/core_piv_loop/prime-orchestration.md

prime-orchestration is a command for Claude Code from TheSmokeDev/taskchad-os. It costs 24 tokens per session (663 once invoked), scanned A, original, MIT.

A command that loads the project's orchestration code: the system for coordinating multiple agents, their tasks, messages, and task dependencies.

In plain words
What is it for?
Working on multi-agent coordination, task graphs, mailboxes, team services, executor adapters, or the local API on port 4322.
Why use it?
It helps the coding agent understand how agents divide work, exchange updates, store coordination data, and connect to task executors or a local API.

Command for Claude Code

Written for Claude Code: installed under .claude/.

This is TheSmokeDev/taskchad-os's own configuration. It tells Claude Code how to work on taskchad-os itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything taskchad-os configures →

Reuse

Borrowing it

Nothing to install: this file belongs to TheSmokeDev/taskchad-os. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/TheSmokeDev/taskchad-os/master/.claude/commands/core_piv_loop/prime-orchestration.md
Clone the repo
git clone --depth 1 https://github.com/TheSmokeDev/taskchad-os

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for prime-orchestration

README.md
[![agentmods](https://agentmods.dev/badge/commands/thesmokedev/taskchad-os/prime-orchestration/github.svg)](https://agentmods.dev/commands/thesmokedev/taskchad-os/prime-orchestration)
Your own site
<a href="https://agentmods.dev/commands/thesmokedev/taskchad-os/prime-orchestration"><img src="https://agentmods.dev/badge/commands/thesmokedev/taskchad-os/prime-orchestration/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for prime-orchestration

Your own site · 80×15
<a href="https://agentmods.dev/commands/thesmokedev/taskchad-os/prime-orchestration"><img src="https://agentmods.dev/badge/commands/thesmokedev/taskchad-os/prime-orchestration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 24 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 663 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00024 $0.00663
Opus 5 $0.00012 $0.00331
Sonnet 5 $0.00005 $0.00133
Haiku 4.5 $0.00002 $0.00066

Measured 9d ago against content hash 3094bec2bfd6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

prime-orchestration scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/core_piv_loop/prime-orchestration.md · 76 lines

How it starts

The opening of the file, as written. The whole thing — 76 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Prime: Orchestration Slice

Objective

Build understanding of the convoy/mailbox orchestration system, team coordination, and the local API surface. This slice owns multi-agent task coordination — subtask DAGs with dependency tracking, inter-agent messaging, and pluggable executor adapters.

Key Files to Read

Read these files in order. Together they are the complete orchestration vertical slice.

Architecture doc (read first)

@.claude/sections/07_orchestration.md

Contract (frozen — read before any service code)

@.claude/scripts/orchestration/contract.py

Data model

@.claude/scripts/orchestration/models.py

Persistence layer

@.claude/scripts/orchestration/db.py

Core services

@.claude/scripts/orchestration/convoy_service.py @.claude/scripts/orchestration/mailbox_service.py

Executor boundary

@.claude/scripts/orchestration/executor.py

Team orchestration

@.claude/scripts/orchestration/team_service.py @.claude/scripts/orchestration/team_memory.py

API surface (thin adapter — zero business logic)

@.claude/scripts/orchestration/api.py @.claude/scripts/orchestration/run_api.py

Observability

@.claude/scripts/orchestration/observability.py

Slice Boundaries

  • Owns: convoy state machine, subtask transitions, dependency release, mailbox delivery, team sessions/members, executor dispatch+callback, the local API on port 4322
  • Does NOT own: chat routing (.claude/chat/), dashboard rendering (dashboard/), runtime provider selection (.claude/scripts/runtime/)
  • Cross-slice touchpoints: Cabinet handlers in core_handlers.py HTTP-route to this API; dashboard reads convoy/team state via the API; orchestration never imports from chat or dashboard

Invariants to Preserve

  1. Contract is FROZEN — transition maps, terminal sets, field allowlists do not change without a PRP
  2. 3-layer idempotency: CAS dispatch + attempts table + callback receipts
  3. Executor boundary: adapters NEVER write DB — they return ExecutorReceipt, the service layer persists
  4. API is a thin adapter: routes to service layer, Pydantic validation, zero business logic in HTTP handlers
  5. Non-loopback requires ORCHESTRATION_API_ALLOW_NON_LOOPBACK=true + bearer token

Read the full file on GitHub · 76 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 76 lines · 24 tokens per session scan A 3094bec2bfd6

Subscribe to this mod's changes

prime-orchestration is a command published in the GitHub repository TheSmokeDev/taskchad-os (23 stars, last pushed 2d ago), licensed MIT. It adds 24 tokens to every session and 663 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.