بنقرة واحدة
conductor
// Orchestrate parallel agent sessions through a sprint. Coordinates task claiming, dependency resolution, and artifact handoff between independent agents. Triggers on /conductor, /sprint, /parallel.
// Orchestrate parallel agent sessions through a sprint. Coordinates task claiming, dependency resolution, and artifact handoff between independent agents. Triggers on /conductor, /sprint, /parallel.
Use when working near production, sensitive systems, or destructive operations. Activates on-demand safety hooks that block dangerous commands. Supports modes — careful (warn), freeze (guided, keeps writes within scope), unfreeze (remove restrictions). Triggers on /guard, /careful, /freeze, /unfreeze.
Add a feature to an existing project with a full sprint. Skips /think diagnostic, goes straight to planning. Use when the user knows what they want and the project already exists. Triggers on /feature.
Use to verify that code works correctly — browser-based testing with Playwright, native app testing with computer use, CLI testing, API testing, or root-cause debugging. Supports --quick, --standard, --thorough modes. Triggers on /qa.
Use when starting non-trivial work (touching 3+ files, new features, refactors, bug investigations). Produces a scoped, actionable implementation plan before any code is written. Triggers on /nano.
Use after writing code to get a thorough code review. Runs two passes — structural correctness then adversarial edge-case hunting. Scales depth by diff size. Supports --quick, --standard, --thorough modes. Triggers on /review.
Use before shipping to production. Performs OWASP Top 10 audit and STRIDE threat modeling against the codebase. Supports --quick, --standard, --thorough modes. Also use when the user asks to check security, audit code, or review for vulnerabilities. Triggers on /security.
| name | conductor |
| description | Orchestrate parallel agent sessions through a sprint. Coordinates task claiming, dependency resolution, and artifact handoff between independent agents. Triggers on /conductor, /sprint, /parallel. |
| concurrency | exclusive |
| depends_on | [] |
| summary | Multi-agent sprint orchestrator. Atomic file ops for phase claiming and dependency resolution. |
| estimated_tokens | 500 |
Coordinate multiple agent sessions working on the same project. Each agent claims a task, executes it, produces an artifact, and the next agent picks up where it left off.
No daemon. No service. No IPC. Just atomic file operations on .nanostack/conductor/.
Defensive telemetry init. No-op if telemetry is disabled via NANOSTACK_NO_TELEMETRY=1, ~/.nanostack/.telemetry-disabled, or if the helpers are removed.
_P="$HOME/.claude/skills/nanostack/bin/lib/skill-preamble.sh"
[ -f "$_P" ] && . "$_P" conductor
unset _P
Agent A (claude) Filesystem Agent B (codex)
│ │ │
├─ claim "plan" ────────►│ │
│ [plan.lock = A] │
│ │◄──── claim "plan" ─────┤
│ │ REJECTED (locked) │
│ │ │
├─ complete "plan" ─────►│ │
│ [plan.done + artifact] │
│ │ │
│ │◄──── claim "review" ───┤
│ [review.lock = B] │
│ │ OK (plan.done exists) │
A sprint is a sequence of phases with dependencies:
{
"sprint_id": "abc123",
"project": "/path/to/repo",
"phases": [
{ "name": "think", "depends_on": [] },
{ "name": "plan", "depends_on": ["think"] },
{ "name": "build", "depends_on": ["plan"] },
{ "name": "review", "depends_on": ["build"] },
{ "name": "qa", "depends_on": ["build"] },
{ "name": "security", "depends_on": ["build"] },
{ "name": "ship", "depends_on": ["review", "qa", "security"] }
]
}
Note: review, qa, and security can run in parallel — they all depend on build, not on each other. ship waits for all three.
conductor/bin/sprint.sh start [--phases "think,plan,build,review,qa,security,ship"]
Creates .nanostack/conductor/<sprint_id>/ with the phase graph. Default is the full workflow.
conductor/bin/sprint.sh claim <phase> [--agent <name>]
Atomic claim using mkdir (POSIX atomic on same filesystem). Fails if:
conductor/bin/sprint.sh complete <phase> [--artifact <path>]
Marks phase done. Links the artifact if provided. Unlocks downstream phases.
conductor/bin/sprint.sh status
Outputs the current sprint state — which phases are pending, claimed, done, and by whom.
conductor/bin/sprint.sh abort [phase]
Release a claim without completing. Use when an agent encounters a blocker.
conductor/bin/sprint.sh next
Print the first phase that is not done, has all dependencies met, and is not currently locked. Empty output means nothing is claimable right now (sprint complete, or all available phases are held by other agents). Use this so an agent that just joined the sprint does not have to parse status to know what to claim.
conductor/bin/sprint.sh unstuck <phase> [--force]
Force-release a lock when its owner PID is dead, without waiting the 1-hour grace period that claim uses for auto-recovery. Refuses if the PID is alive (you should let the owner finish or call abort yourself); pass --force to release a lock with a live PID. Use this when an agent crashed without releasing its lock and you need to keep moving.
conductor/bin/sprint.sh batch
Reads concurrency metadata from each skill's SKILL.md frontmatter and outputs execution batches. Consecutive read phases with met dependencies are grouped into parallel batches. write phases run one at a time. exclusive phases run alone.
Concurrency classification:
| Value | Meaning | Example |
|---|---|---|
read | Read-only, safe to parallelize | review, qa, security |
write | Mutates files, run serial | compound |
exclusive | Needs exclusive access (git ops) | ship, guard |
Example output:
{"batch":1,"type":"read","phases":["think"]}
{"batch":2,"type":"read","phases":["plan"]}
{"batch":3,"type":"write","phases":["build"]}
{"batch":4,"type":"read","phases":["review","qa","security"]}
{"batch":5,"type":"exclusive","phases":["ship"]}
Batch 4 shows review, qa, and security running in parallel — they share concurrency: read and all depend only on build.
.nanostack/conductor/
└── <sprint_id>/
├── sprint.json # Sprint definition + metadata
├── think/
│ ├── lock # Contains: {"agent":"claude","claimed_at":"...","pid":1234}
│ ├── done # Exists = phase complete. Contains: {"completed_at":"...","artifact":"..."}
│ └── artifact.json → ... # Symlink to the actual artifact in .nanostack/think/
├── plan/
│ ├── lock
│ └── ...
├── review/ # Can start once build/done exists
├── qa/ # Can start once build/done exists (parallel with review)
├── security/ # Can start once build/done exists (parallel with review)
└── ship/ # Can start once review/done AND qa/done AND security/done exist
mkdir <phase>/lock.d (atomic on POSIX). If it succeeds, you own it. Write agent metadata, then mv lock.d lock.done file, remove lock.lock directory.One agent, one sprint. Same as today — the conductor just adds visibility:
You: /conductor start
You: /think → /nano → build → /review → /qa → /security → /ship
[each phase auto-claims and auto-completes]
One build, then fan out review + qa + security in parallel:
Terminal 1: /conductor start
Terminal 1: /think → /nano → build
Terminal 1: /review
Terminal 2: /qa # claims qa (build.done exists)
Terminal 3: /security # claims security (build.done exists)
Terminal 1: /ship # waits until review + qa + security all done
Multiple developers, each running their own agent:
Dev A (claude): /think → /nano
Dev B (codex): build (claims after plan.done)
Dev A (claude): /review (claims after build.done)
Dev C (opencode): /security (claims after build.done, parallel with review)
Dev A (claude): /ship (claims after review.done + security.done)
Every phase transition follows this protocol. The agent executes these steps at every boundary — they are mandatory, not optional.
bin/session.sh resume
bin/restore-context.shbin/session.sh init <type>bin/validate-dependencies.sh <phase>
bin/session.sh phase-start <phase>context_checkpoint via bin/save-artifact.sh
context_checkpoint must include: summary, key_files, decisions_made, open_questionscontext_checkpoint populatedbin/session.sh phase-complete <phase>bin/session.sh resume detects the last session statebin/restore-context.sh reads all completed phase checkpointsBefore returning control:
_F="$HOME/.claude/skills/nanostack/bin/lib/skill-finalize.sh"
[ -f "$_F" ] && . "$_F" conductor success
unset _F
Pass abort or error instead of success if conductor did not complete normally.