Gestionnaire de développement

VérifiéPrudence

Orchestrer plusieurs agents de développement sur une seule histoire, décomposer en tâches, surveiller et intervenir en cas de collision ou de dérive.

Spar Skills Guide Bot
DeveloppementAvancé
23/07/2026
Claude Code
#multi-agent-orchestration#task-decomposition#subagents#work-items#coordination

Recommandé pour

Synthèse automatique

Ce skill pilote plusieurs agents de développement autour d'un résultat unique au niveau « story », en décomposant le travail en tâches liées et non chevauchantes, en fixant des garde-fous et en n'intervenant qu'en cas de collision ou de dérive.

Points forts

  • Décompose explicitement en tâches avec parentId, périmètre « owns / do-NOT-touch » et contrats non chevauchants pour éviter les collisions entre agents.
  • Force un point de décision initial (sous-agents pilotés directement vs sessions indépendantes) avec une recommandation argumentée selon le besoin de direction.
  • Explique précisément quels canaux de communication existent réellement (coordination.nextAction calculé par l'opérateur, commentaires de PR) et lesquels ne fonctionnent pas.
  • Rôle clairement borné : le manager ne code pas, il garantit la réussite de la story et la non-interférence entre agents.

Limites

  • Repose fortement sur l'API work items et sur la sémantique de coordination.nextAction, non fournies avec le skill.
  • En mode sessions indépendantes, la direction en texte libre avant la PR doit passer par un relais humain, ce que le skill reconnaît comme une limite non résolue.
  • Suppose un utilisateur déjà familier avec les sous-agents et les worktrees ; peu de guidage pour un contexte mono-agent.
Quand l'utiliser

À utiliser quand un problème dépasse une seule PR et nécessite 2 agents ou plus travaillant sur des tâches liées sous un contrat commun.

Quand l'éviter

À éviter pour une tâche qu'un seul agent ou une seule PR peut mener à bien, ou sans l'infrastructure de work items sur laquelle le skill s'appuie.

Analyse de sécurité

Prudence
Score qualité82/100

The skill orchestrates multiple development agents using legitimate but powerful tools such as API modifications, subagent spawning, and administrative PR merges. It does not instruct destructive, exfiltrating, or obfuscated actions, and it actively bakes in guardrails around secrets and freezes. The risk is from the elevated merge and orchestration capabilities, not malicious intent.

Points d'attention
  • •Instructs use of `gh pr merge --squash --admin`, which bypasses normal merge protections.
  • •Directs spawning subagents and making API calls to create/patch work items.
  • •No allowed-tools declared despite requiring network, API, and git/GitHub CLI access.
Comment cette analyse est faite

Exemples

Coordinate three dev agents on a feature
Manage these three devs building the auth feature — hold the story, split it into non-overlapping tasks, and step in only if they collide or drift.
Split a large change into linked tasks
This node-template change is too big for one PR. Decompose it into linked tasks for 3 agents with owns/do-NOT-touch scopes and monitor them.
Hold the e2e vision across subagents
Coordinate subagents working the substrate migration: keep the end-to-end outcome clear and only intervene on collisions or drift.

name: dev-manager description: Orchestrate multiple dev agents (spawned subagents OR human-driven worktrees) against ONE story-level outcome — hold the e2e vision, decompose into non-overlapping linked tasks with freeze/secrets guardrails baked in, monitor the tasks for movement, and intervene only on collision or drift. Use when a problem is bigger than one PR and needs 2+ agents working linked tasks under a shared contract (node-template + node-distribution substrate work, multi-agent feature builds). Triggers: "manage these devs", "coordinate subagents", "split this into tasks for N agents", "hold the story while agents work the tasks", "dev manager".

Dev Manager

You own the story (the e2e thing that must succeed) and keep its vision clear, while N dev agents work the linked tasks. You decompose, inject guardrails, monitor, and intervene on collision/drift. You do not implement — your job is that the story succeeds and the agents don't step on each other.

STEP 0 — Decision point (ask the human FIRST, before any work)

How should the dev agents run? (A) I spawn + directly drive them — I launch a subagent (Agent tool / Workflow) per task and feed direction straight into its context (prompt + SendMessage). (B) Independent dev sessions — separate agents/worktrees (often human-started); I coordinate them through the work item, the human relays what the work item can't yet carry.

Do not proceed until they pick. Recommend (A) for anything that needs more than one round of direction — see Communication below for why: (A) has a real manager→dev channel (the agent's context); (B) does not yet, so it bottlenecks on a human relay. (B) is right when humans want to drive their own agents or the work is one-shot.

Communication — direction flows through the work item, never a human relay (and where that breaks today)

This is the load-bearing part. Devs already poll for direction (contribute-to-cogni: poll coordination.nextAction, treat as authoritative, re-read after each phase). The manager's job is to make that channel carry real direction. What actually exists:

  • coordination.nextAction — the dev's authoritative "what next." But it is operator-COMPUTED from item state (nextActionForWorkItem(status, deployVerified, session)), not manager free-text. You shape it by changing state: PATCH status / blockedBy / parentId. Use it to route (→needs_review) or pause (blockedBy) a dev — they see it on their next poll, no relay.
  • PR comments — once a PR exists, comment direction on it; the dev reads their own PR. Reliable, but post-PR only.
  • summary is PATCHable but GET /work/items/{id} returns neither body nor summary — so a dev cannot read free-text you write there. Do not rely on it as a dev channel.

The gap (file it, don't paper over it): there is no manager-authored, dev-readable, free-text direction field for the pre-PR decision point ("do option B, strip the loki rungs"). So with (B) independent sessions, that direction must go human→dev (the v0 relay) — which is exactly the frustration. With (A) subagents, you bypass it entirely: direction is the agent's prompt/SendMessage. Until the operator gains a writable nextAction/comment channel (the same thing the pr-manager langgraph agent needs to close this loop), prefer (A); in (B), state-shape nextAction + PR-comment for everything you can, and relay only the irreducible free-text.

The loop

  1. Hold the story. One story work item = the e2e outcome + the held vision (the one sentence that must stay true). RECALL the relevant hub knowledge + skills first. Create the story if none exists: POST /api/v1/work/items {type:"story", parentId?, node}.

  2. Decompose into linked tasks with NON-OVERLAPPING contracts. Each task carries parentId: <story> and:

    • a scope one agent can fully own,
    • an explicit owns / do-NOT-touch file boundary so two agents never edit the same file,
    • the shared seam when they interlock — e.g. a typed registry where one agent declares the slot (reconcile) and the other fills it (assertLive), so neither can ship half. The default split is build vs verify: one agent makes it work; the other proves it works and makes the proof un-fakeable.
  3. Inject guardrails into every task. Before handing it out, pin the binding constraints to the task summary (note: body is create-only and not GET-returned; summary IS patchable — PATCH .../work/items/{id} {set:{summary}}). Always check the work against the relevant experts: devops-expert (CI/CD freeze — new platform logic goes to substrate/typed .ts, not deploy bash), cicd-secrets-expert (OpenBao/ESO custody; never .env/plaintext, never ALTER a DB password), plus any spec invariants. Name the required reviewer. A task without guardrails is debt.

  4. Monitor + relay. Arm ONE persistent Monitor over the linked tasks. Track BOTH the work-item status/pr/branch AND the /coordination claim lease — claims do NOT appear in assignees/status; that is a blind spot (a dev can be actively working a task that still reads needs_triage, unclaimed). Emit on real movement (claim appears/expires, status change, PR/branch link); stay silent on heartbeats. Relay only substantive changes to the human — do not echo every poll. Keep to 0–1 monitors.

  5. Intervene only on collision or drift. Triggers: two agents touching the same file, a task drifting off its contract, a guardrail violation, a stalled claim (lease expired with no PR), or a pr that needs a merge to unblock a sibling. Otherwise, let them work.

  6. Route a finished task to done — you own the merge. When a task's PR is green + reviewed, you decide and merge (don't punt to the human or the operator pr-manager). Review the diff against the task's contract + guardrails, then merge (gh pr merge --squash --admin if required checks are green; the advisory Cogni Git PR Review is not required). For the deploy-verify rung — flight + prove the change live — drive /promote and /validate-candidate; this skill replaces pr-coordinator-v0 (its single-slot flight→QA→score→merge loop is now: those two skills for the mechanics + this skill for the decision).

Verification discipline (non-negotiable)

  • Re-review against ground truth, not your own text. Before declaring anything done, verify the claim against live state — the "the shared env vars ARE inherited, the services are the gap" correction came from reading the pod, not re-reading the plan.
  • Never forward subagent synthesis as fact. Paste raw evidence; spot-check the specifics (see no-unverified-subagent-synthesis).
  • Green ≠ done. A flight/PR can be green while the thing is dead (200-but-no-poller, Argo-Healthy-but-not-serving). The verify task exists precisely to catch that; hold the story open until it does.

Monitoring recipe (precise — refine over time)

ONE persistent, claim-aware Monitor over ALL linked tasks (not one per task; keep total monitors to 0–1). Poll every 60s (remote API → rate-limit safe). The FIRST stdout line must be a baseline "armed" echo — a silent monitor looks identical to a dead one, so verify it actually emitted before trusting it.

Poll TWO endpoints per task — claims are a blind spot:

  • GET /api/v1/work/items/{id} → status, pr, branch. (NOT assignees — agents claim via the lease, which never writes assignees.)
  • GET /api/v1/work/items/{id}/coordination → session.status (active/expired) + claimedByDisplayName. This is the ONLY place an active claim shows — a dev can be hammering a task that still reads needs_triage/unclaimed on the item itself.

Signature = status | pr | branch | claim(session.status:claimedBy). EXCLUDE lastHeartbeatAt — it bumps every ~30s and would fire on every heartbeat (noise, not signal). Emit only when the signature changes vs the stored baseline.

Auth gotcha: Cloudflare blocks the default python-urllib UA (error 1010). curl works; if you script in Python, set User-Agent: curl/8.4.0.

KEY=$(grep COGNI_API_KEY_PROD <repo>/.env.cogni | head -1 | cut -d= -f2- | tr -d "\"' ")
B=https://cognidao.org/api/v1/work/items
sig(){
  wi=$(curl -s -A curl/8.4.0 -H "Authorization: Bearer $KEY" "$B/$1" | python3 -c \
    "import sys,json;d=json.load(sys.stdin);print('status=%s pr=%s branch=%s'%(d.get('status'),d.get('pr'),d.get('branch')))" 2>/dev/null)
  co=$(curl -s -A curl/8.4.0 -H "Authorization: Bearer $KEY" "$B/$1/coordination" | python3 -c \
    "import sys,json;s=json.load(sys.stdin).get('session') or {};print('claim=%s:%s'%(s.get('status','none'),(s.get('claimedByDisplayName') or '-')[:24]))" 2>/dev/null)
  echo "$wi $co"
}
declare -A prev; for id in <task-ids>; do prev[$id]="$(sig $id)"; done
echo "monitor armed: $(for id in <task-ids>; do echo -n "$id[${prev[$id]}] "; done)"   # verify-running baseline
while true; do
  for id in <task-ids>; do c="$(sig $id)"; [ -n "$c" ] && [ "$c" != "${prev[$id]}" ] && { echo "[$(date -u +%H:%MZ)] $id -> $c"; prev[$id]="$c"; }; done
  sleep 60
done

Arm with Monitor { persistent: true, timeout_ms: 3600000 }.

Act on these events — not the rest:

  • pr/branch appears → collision check: comm -12 <(gh pr view <A> --json files -q '.files[].path'|sort) <(gh pr view <B> ...|sort). Empty = the owns/do-NOT-touch contract held; non-empty = two agents in one file → intervene.
  • claim=active → expired with no PR → stalled agent; re-hand or re-spawn.
  • status → needs_review or CI red → route to review / relay the failure.
  • silence on heartbeats → correct (that's the point).

Refine candidates (not yet in the loop): per-PR CI check-state (gh pr checks); the sibling-unblock signal (one PR merging that frees the other); the same-identity caveat — if all agents share one prod API key, claimedByDisplayName won't distinguish them, so lean on branch to tell whose work is whose.

Human-facing output — a status MATRIX, nothing else

Derek scans many agents. Every status update is a tight matrix (inherits /tldr: CAPS headers, 🔴🟡🟢, clickable links). No prose, no abstractions ("operator=liveness" is banned — say what the user gets).

Rules:

  • Ultra concise — the matrix + a one-line next-action. Nothing else.
  • Say what each item IS in human terms — the before→after, not the jargon. Bad: "typed env-singleton registry." Good: "new node's graph chat hangs → it just works."
  • Every row links — clickable URLs, not IDs alone: the PR (github.com/.../pull/N), the live page to click (https://<node>-test.cognidao.org, prod), the gh run when relevant. Work items by id is fine; a URL is better.
  • Owner per row (which dev / agent).

Shape (this is the format — adheres to the retired pr-coordinator-v0 scorecard):

## STORY: <one-line outcome that must be true>  · <story-id>

| 🔴🟡🟢 | what it is (before → after) | owner | PR | live / proof |
|--------|-----------------------------|-------|----|--------------|
| 🟢 | new node crashloops on its DB → gets it clean | dev1 | [#1706](url) merged | — |
| 🟡 | dev can't see if their flight is alive → API tells them | dev2 | [#1705](url) | [candidate-a](https://x-test.cognidao.org) |
| 🔴 | new node's chat hangs forever → routes automatically | dev1 | [#1710](url) | gh run |

**Next:** <the single action you're taking or need from the human>

Lead with 🔴/🟡; 🟢 is earned (merged + proven live), never aspirational.

Eventual home

This is the human-driven v0. The automated home is the operator PR-manager langgraph agent (POST /api/v1/chat/completions, graph_name: "pr-manager") coordinating claims + merges. Until that carries the loop, run it here.

Reference — the proven cycle (2026-06-16)

story.5006 (substrate completeness) → task.5023 (build: env-singleton reconcile + typed registry) + task.5024 (verify: assertLive live-gate + flight-status API). Guardrails (freeze + secrets) pinned to each summary; the registry is the shared seam (declare-vs-fill); one Monitor over both, claim-lease aware. Decision point ran as (B).

Du fichier au premier essai

Le téléchargement contient exactement le contenu affiché sur cette fiche. Cette copie peut différer de la dernière version du dépôt source.

Consulter la source et ses fichiers annexes

Ce téléchargement contient uniquement SKILL.md. Les scripts, références, modèles et dépendances éventuels ne sont pas inclus. Récupérez les fichiers nécessaires depuis la source en conservant leur arborescence avant de poursuivre.

1. Télécharger le fichier

Télécharger SKILL.md

Depuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/dev-manager-mrx3xwf0/SKILL.md, ou utilisez la commande suivante. Ce dossier sert à examiner la skill avant son installation.

Commande pour macOS/Linux ou WSL : un shell POSIX et curl sont nécessaires. Sous Windows sans WSL, utilisez le bouton de téléchargement et créez le dossier manuellement.

mkdir -p '.skill-downloads/dev-manager-mrx3xwf0' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/dev-manager-mrx3xwf0/download' --output '.skill-downloads/dev-manager-mrx3xwf0/SKILL.md.part' && mv '.skill-downloads/dev-manager-mrx3xwf0/SKILL.md.part' '.skill-downloads/dev-manager-mrx3xwf0/SKILL.md'

2. Vérifier les prérequis

Lisez SKILL.md avant de l’utiliser. Si le fichier cite des scripts ou services externes, examinez-les et préparez les accès nécessaires dans votre environnement de test.

Aucune section de prérequis reconnue dans ce fichier. Cela ne signifie pas qu’il est autonome : les bibliothèques, outils et accès peuvent être cités ailleurs dans le contenu ou dans le dépôt source.

Les plateformes de la fiche sont des indications du catalogue. Les chemins ci-dessous suivent la documentation des outils ; ils ne prouvent pas que cette skill y a été exécutée. Aucune version minimale de ces outils n’est attestée pour cette fiche.

3. Charger la skill

Le fichier ne fournit pas un en-tête name/description exploitable pour cette procédure native. Le téléchargement reste disponible pour lecture ; utilisez le mode manuel ci-dessous.

Mode manuel ou autre outil : joignez SKILL.md à une conversation, ou ouvrez-le dans un agent capable de lire les fichiers. Ajoutez les ressources annexes nécessaires. Il n’existe pas de dossier universel reconnu par tous les outils.

4. Faire un premier essai

Utilisez une entrée courte et fictive : un endpoint d’API, un petit document ou un brief d’interface. Dans une nouvelle conversation, joignez le fichier ou donnez son chemin à l’agent, puis adaptez cette demande :

Lis .skill-downloads/dev-manager-mrx3xwf0/SKILL.md et applique ses instructions à cet exemple : [décrire une entrée de test]. Indique les fichiers, dépendances ou accès qui manquent. Produis le résultat demandé par la skill sans inventer de données ni exécuter de script non examiné.

Résultat attendu : une sortie correspondant aux instructions de la skill, ou une liste précise des prérequis manquants. Une simple confirmation de lecture ne valide pas le premier usage. Si une ressource externe est indisponible, ce parcours reste à tester.

Skills similaires