CtrlK
BlogDocsLog inGet started
Tessl Logo

team-lifecycle-v4

Full lifecycle team skill with clean architecture. SKILL.md is a universal router — all roles read it. Beat model is coordinator-only. Structure is roles/ + specs/ + templates/. Triggers on "team lifecycle v4".

56

Quality

46%

Does it follow best practices?

Impact

Pending

No eval scenarios have been run

SecuritybySnyk

Passed

No known issues

Optimize this skill with Tessl

npx tessl skill review --optimize ./.codex/skills/team-lifecycle-v4/SKILL.md
SKILL.md
Quality
Evals
Security

Team Lifecycle v4

Orchestrate multi-agent software development: specification -> planning -> implementation -> testing -> review.

Architecture

Skill(skill="team-lifecycle-v4", args="task description")
                    |
         SKILL.md (this file) = Router
                    |
     +--------------+--------------+
     |                             |
  no --role flag              --role <name>
     |                             |
  Coordinator                  Worker
  roles/coordinator/role.md    roles/<name>/role.md
     |
     +-- analyze -> dispatch -> spawn -> wait -> collect
                                 |
                    +--------+---+--------+
                    v        v            v
            spawn_agent    ...     spawn_agent
          (team_worker)         (team_supervisor)
              per-task             resident agent
              lifecycle            assign_task-driven
                    |                     |
                    +-- wait_agent --------+
                              |
                         collect results

Role Registry

RolePathPrefixInner Loop
coordinatorroles/coordinator/role.md----
analystroles/analyst/role.mdRESEARCH-*false
writerroles/writer/role.mdDRAFT-*true
plannerroles/planner/role.mdPLAN-*true
executorroles/executor/role.mdIMPL-*true
testerroles/tester/role.mdTEST-*false
reviewerroles/reviewer/role.mdREVIEW-, QUALITY-, IMPROVE-*false
supervisorroles/supervisor/role.mdCHECKPOINT-*false

Role Router

Parse $ARGUMENTS:

  • Has --role <name> -> Read roles/<name>/role.md, execute Phase 2-4
  • No --role -> roles/coordinator/role.md, execute entry router

Delegation Lock

Coordinator is a PURE ORCHESTRATOR. It coordinates, it does NOT do.

Before calling ANY tool, apply this check:

Tool CallVerdictReason
spawn_agent, wait_agent, close_agent, send_message, assign_taskALLOWEDOrchestration
list_agentsALLOWEDAgent health check
request_user_inputALLOWEDUser interaction
mcp__ccw-tools__team_msgALLOWEDMessage bus
Read/Write on .workflow/.team/ filesALLOWEDSession state
Read on roles/, commands/, specs/, templates/ALLOWEDLoading own instructions
Read/Grep/Glob on project source codeBLOCKEDDelegate to worker
Edit on any file outside .workflow/BLOCKEDDelegate to worker
Bash("ccw cli ...")BLOCKEDOnly workers call CLI
Bash running build/test/lint commandsBLOCKEDDelegate to worker

If a tool call is BLOCKED: STOP. Create a task, spawn a worker.

No exceptions for "simple" tasks. Even a single-file read-and-report MUST go through spawn_agent.


Shared Constants

  • Session prefix: TLV4
  • Session path: .workflow/.team/TLV4-<slug>-<date>/
  • State file: <session>/tasks.json
  • Discovery files: <session>/discoveries/{task_id}.json
  • CLI tools: ccw cli --mode analysis (read-only), ccw cli --mode write (modifications)

Worker Spawn Template

Coordinator spawns workers using this template:

spawn_agent({
  agent_type: "team_worker",
  task_name: "<task-id>",
  fork_context: false,
  items: [
    { type: "text", text: `## Role Assignment
role: <role>
role_spec: <skill_root>/roles/<role>/role.md
session: <session-folder>
session_id: <session-id>
requirement: <task-description>
inner_loop: <true|false>

Read role_spec file (<skill_root>/roles/<role>/role.md) to load Phase 2-4 domain instructions.
Execute built-in Phase 1 (task discovery) -> role Phase 2-4 -> built-in Phase 5 (report).` },

    { type: "text", text: `## Task Context
task_id: <task-id>
title: <task-title>
description: <task-description>
pipeline_phase: <pipeline-phase>` },

    { type: "text", text: `## Upstream Context
<prev_context>` }
  ]
})

Supervisor Spawn Template

Supervisor is a resident agent (independent from team_worker). Spawned once during session init, woken via assign_task for each CHECKPOINT task.

Spawn (Phase 2 -- once per session)

supervisorId = spawn_agent({
  agent_type: "team_supervisor",
  task_name: "supervisor",
  fork_context: false,
  items: [
    { type: "text", text: `## Role Assignment
role: supervisor
role_spec: <skill_root>/roles/supervisor/role.md
session: <session-folder>
session_id: <session-id>
requirement: <task-description>

Read role_spec file (<skill_root>/roles/supervisor/role.md) to load checkpoint definitions.
Init: load baseline context, report ready, go idle.
Wake cycle: orchestrator sends checkpoint requests via assign_task.` }
  ]
})

Wake (per CHECKPOINT task)

assign_task({
  target: "supervisor",
  items: [
    { type: "text", text: `## Checkpoint Request
task_id: <CHECKPOINT-NNN>
scope: [<upstream-task-ids>]
pipeline_progress: <done>/<total> tasks completed` }
  ]
})
wait_agent({ targets: ["supervisor"], timeout_ms: 300000 })

Shutdown (pipeline complete)

close_agent({ target: "supervisor" })

Model Selection Guide

Rolemodelreasoning_effortRationale
Analyst (RESEARCH-*)(default)mediumRead-heavy exploration, less reasoning needed
Writer (DRAFT-*)(default)highSpec writing requires precision and completeness
Planner (PLAN-*)(default)highArchitecture decisions need full reasoning
Executor (IMPL-*)(default)highCode generation needs precision
Tester (TEST-*)(default)highTest generation requires deep code understanding
Reviewer (REVIEW-, QUALITY-, IMPROVE-*)(default)highDeep analysis for quality assessment
Supervisor (CHECKPOINT-*)(default)mediumGate checking, report aggregation

Override model/reasoning_effort in spawn_agent when cost optimization is needed:

spawn_agent({
  agent_type: "team_worker",
  task_name: "<task-id>",
  fork_context: false,
  model: "<model-override>",
  reasoning_effort: "<effort-level>",
  items: [...]
})

Wave Execution Engine

For each wave in the pipeline:

  1. Load state -- Read <session>/tasks.json, filter tasks for current wave
  2. Skip failed deps -- Mark tasks whose dependencies failed/skipped as skipped
  3. Build upstream context -- For each task, gather findings from context_from tasks via tasks.json and discoveries/{id}.json
  4. Separate task types -- Split into regular tasks and CHECKPOINT tasks
  5. Spawn regular tasks -- For each regular task, call spawn_agent({ agent_type: "team_worker", items: [...] }), collect agent IDs
  6. Wait -- wait_agent({ targets: [...], timeout_ms: 900000 })
  7. Collect results -- Read discoveries/{task_id}.json for each agent, update tasks.json status/findings/error, then close_agent({ target }) each worker
  8. Execute checkpoints -- For each CHECKPOINT task, assign_task to supervisor, wait_agent, read checkpoint report from artifacts/, parse verdict
  9. Handle block -- If verdict is block, prompt user via request_user_input with options: Override / Revise upstream / Abort
  10. Persist -- Write updated state to <session>/tasks.json

User Commands

CommandAction
check / statusView execution status graph
resume / continueAdvance to next step
revise <TASK-ID> [feedback]Revise specific task
feedback <text>Inject feedback for revision
recheckRe-run quality check
improve [dimension]Auto-improve weakest dimension

v4 Agent Coordination

Message Semantics

IntentAPIExample
Queue supplementary info (don't interrupt)send_messageSend planning results to running implementers
Wake resident supervisor for checkpointassign_taskTrigger CHECKPOINT-* evaluation on supervisor
Supervisor reports back to coordinatorsend_messageSupervisor sends checkpoint verdict as supplementary info
Check running agentslist_agentsVerify agent + supervisor health during resume

CRITICAL: The supervisor is a resident agent woken via assign_task, NOT send_message. Regular workers complete and are closed; the supervisor persists across checkpoints. See "Supervisor Spawn Template" above.

Agent Health Check

Use list_agents({}) in handleResume and handleComplete:

// Reconcile session state with actual running agents
const running = list_agents({})
// Compare with tasks.json active_agents
// Reset orphaned tasks (in_progress but agent gone) to pending
// ALSO check supervisor: if supervisor missing but CHECKPOINT tasks pending -> respawn

Named Agent Targeting

Workers are spawned with task_name: "<task-id>" enabling direct addressing:

  • send_message({ target: "IMPL-001", items: [...] }) -- queue planning context to running implementer
  • assign_task({ target: "supervisor", items: [...] }) -- wake supervisor for checkpoint
  • close_agent({ target: "IMPL-001" }) -- cleanup regular worker by name
  • close_agent({ target: "supervisor" }) -- shutdown supervisor at pipeline end

Completion Action

When pipeline completes, coordinator presents:

request_user_input({
  questions: [{
    question: "Pipeline complete. What would you like to do?",
    header: "Completion",
    multiSelect: false,
    options: [
      { label: "Archive & Clean (Recommended)", description: "Archive session, clean up resources" },
      { label: "Keep Active", description: "Keep session for follow-up work" },
      { label: "Export Results", description: "Export deliverables to target directory" }
    ]
  }]
})

Specs Reference

Session Directory

.workflow/.team/TLV4-<slug>-<date>/
├── tasks.json                  # Task state (JSON)
├── discoveries/                # Per-task findings ({task_id}.json)
├── spec/                       # Spec phase outputs
├── plan/                       # Implementation plan
├── artifacts/                  # All deliverables
├── wisdom/                     # Cross-task knowledge
├── explorations/               # Shared explore cache
└── discussions/                # Discuss round records

Error Handling

ScenarioResolution
Unknown commandError with available command list
Role not foundError with role registry
CLI tool failsWorker fallback to direct implementation
Supervisor crashRespawn with recovery: true, auto-rebuilds from existing reports
Supervisor not ready for CHECKPOINTSpawn/respawn supervisor, wait for ready, then wake
Completion action failsDefault to Keep Active
Worker timeoutMark task as failed, continue wave
Discovery file missingMark task as failed with "No discovery file produced"
Repository
catlog22/Claude-Code-Workflow
Last updated
Created

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.