Swarm Project Management

Full project management for AI agents. Hierarchical tasks, policy-driven governance, blocking propagation, and real-time observability for complex multi-agent workflows.

NEW: Hierarchical Task System

Organize work into 4-level hierarchies (Initiative → Feature → Workstream → Task) with configurable policies, evidence requirements, and automatic blocking propagation.

Overview

Snipara Swarm provides two task management systems to fit different complexity levels:

SystemBest ForKey Features
Flat Tasks (rlm_task_*)Simple workflows, quick prototypingCreate → Claim → Complete
Hierarchical Tasks (rlm_htask_*)Complex projects, governance needs4 levels, policies, evidence, audit trail

Hierarchical Task System

Task Hierarchy

N0: INITIATIVE     "Q1 Platform Modernization"
     ├── N1: FEATURE     "User Authentication"
     │        │
     │        ├── N2: API          ← Workstream
     │        │    ├── N3: TASK    "Implement JWT endpoint"
     │        │    └── N3: TASK    "Add refresh tokens"
     │        │
     │        ├── N2: FRONTEND     ← Workstream
     │        │    └── N3: TASK    "Build login form"
     │        │
     │        └── N2: QA           ← Workstream
     │             └── N3: TASK    "Write E2E tests"
     └── N1: FEATURE     "Payment Processing"
LevelNameDescriptionTypical Owner
N0InitiativeStrategic goal spanning multiple featuresProduct lead / Architect
N1FeatureEnd-user deliverableFeature lead
N2WorkstreamParallel work track (API, Frontend, QA)Tech lead
N3TaskAtomic unit of workIndividual agent

Creating Tasks

// Create an N3 task
rlm_htask_create({
  swarm_id: "swarm_abc123",
  level: "N3_TASK",
  parent_id: "htask_ws_api",
  title: "Implement JWT token generation",
  description: "Add signing and verification",
  owner: "agent_backend",
  priority: "P1",
  acceptance_criteria: [
    { id: "ac1", text: "JWT signed with RS256" },
    { id: "ac2", text: "Tokens expire after 1 hour" }
  ],
  evidence_required: [
    { type: "test", description: "Unit tests passing" }
  ]
})

Create Feature with Workstreams

Quickly scaffold a feature with standard workstream structure:

rlm_htask_create_feature({
  swarm_id: "swarm_abc123",
  title: "User Authentication",
  owner: "alice",
  workstreams: ["API", "FRONTEND", "QA"]
})
// Response:
{
  feature_id: "htask_feat_001",
  workstream_ids: {
    API: "htask_ws_api",
    FRONTEND: "htask_ws_fe",
    QA: "htask_ws_qa"
  }
}

Blocking & Propagation

When a task is blocked, the status propagates up the hierarchy automatically:

N1: Feature     → BLOCKED (child blocked)
    N2: API     → BLOCKED (child blocked)
        N3: Task → BLOCKED ← Original block

Block a Task

rlm_htask_block({
  swarm_id: "swarm_abc123",
  task_id: "htask_001",
  blocker_type: "DEPENDENCY",
  blocker_reason: "Waiting for auth API",
  blocked_by_task_id: "htask_auth_api",
  eta_recovery: "2026-03-20T10:00:00Z",
  escalation_to: "tech-lead@company.com"
})

Blocker Types

TypeDescription
TECHTechnical issue (bug, architecture)
DEPENDENCYWaiting on another task
ACCESSMissing permissions/credentials
PRODUCTNeeds product decision
INFRAInfrastructure issue
SECURITYSecurity review required

Unblock a Task

rlm_htask_unblock({
  swarm_id: "swarm_abc123",
  task_id: "htask_001",
  resolution: "Auth API is now available"
})

Policy Engine

Each swarm has configurable policies that govern task behavior:

// Get policy
rlm_htask_policy_get({ swarm_id: "swarm_abc123" })
// Response:
{
  maxDepth: 4,
  closurePolicy: "STRICT_ALL_CHILDREN",
  requireEvidenceOnComplete: true,
  failedIsBlockingDefault: true,
  allowParentCloseWithWaiver: true
}
PolicyDefaultDescription
closurePolicySTRICTSTRICT: all children must complete. ALLOW_EXCEPTIONS: can close with waiver
requireEvidenceOnCompletetrueN3 tasks require evidence to complete
allowParentCloseWithWaivertrueAllow closing parents with documented exceptions
maxDepth4Maximum hierarchy depth (N0-N3)

Closure & Evidence

Complete Task with Evidence

rlm_htask_complete({
  swarm_id: "swarm_abc123",
  task_id: "htask_task_001",
  evidence: [
    { type: "test", description: "15 unit tests passing" },
    { type: "review", description: "PR #123 approved" }
  ],
  result: { files_modified: ["src/auth/jwt.ts"] }
})

Verify Before Closing Parent

rlm_htask_verify_closure({
  swarm_id: "swarm_abc123",
  task_id: "htask_ws_001"
})
// Response:
{
  can_close: false,
  blockers: ["2 blocking children not completed"],
  needs_waiver: true
}

Close with Waiver

rlm_htask_close({
  swarm_id: "swarm_abc123",
  task_id: "htask_ws_001",
  waiver_reason: "Error handling moved to next sprint",
  waiver_approved_by: "tech-lead"
})

Observability

View Hierarchy Tree

rlm_htask_tree({
  swarm_id: "swarm_abc123",
  root_id: "htask_init_001",
  max_depth: 3
})

Get Metrics

rlm_htask_metrics({ swarm_id: "swarm_abc123", period_hours: 24 })
// Response:
{
  total: 45,
  by_status: { pending: 10, in_progress: 8, blocked: 3, completed: 23 },
  by_level: { N0: 1, N1: 3, N2: 9, N3: 32 },
  throughput: { closures_total: 15, per_hour: 0.63 },
  aging_days: { N0: 14.5, N1: 7.2, N2: 3.1, N3: 1.8 },
  blocked_recovered_ratio: 0.85
}

Audit Trail

Every action is logged for compliance and debugging:

rlm_htask_audit_trail({ swarm_id: "swarm_abc123", task_id: "htask_001" })
// Events: create, update, block, unblock, complete, close, delete, waiver

Comparison: Flat vs Hierarchical

FeatureFlat Tasks (rlm_task_*)Hierarchical (rlm_htask_*)
StructureSingle level4 levels (N0-N3)
BlockingNo propagationAutomatic propagation
PoliciesNoneConfigurable per swarm
EvidenceOptional resultRequired with verification
WaiversNoDocumented exceptions
AuditBasic eventsFull audit trail
Metricstask_statsthroughput, aging, recovery ratio

All HTask Tools

ToolPurpose
rlm_htask_createCreate task at any level
rlm_htask_create_featureCreate N1 with workstreams
rlm_htask_getGet task with children
rlm_htask_treeGet full hierarchy tree
rlm_htask_updateUpdate task fields
rlm_htask_blockBlock task with payload
rlm_htask_unblockUnblock task
rlm_htask_completeComplete N3 with evidence
rlm_htask_verify_closureCheck if parent can close
rlm_htask_closeClose parent (with waiver)
rlm_htask_deleteSoft/hard delete
rlm_htask_recommend_batchGet ready N3 tasks
rlm_htask_policy_getGet swarm policy
rlm_htask_policy_updateUpdate policy (admin)
rlm_htask_metricsGet observability metrics
rlm_htask_audit_trailGet task event history
rlm_htask_checkpoint_deltaIncremental sync

Best Practices

  • Use consistent owners — Assign clear ownership at each level
  • Set realistic acceptance criteria — Define what "done" means upfront
  • Require evidence for N3 tasks — Prevents premature closure
  • Use blocking propagation wisely — Mark non-critical tasks as non-blocking
  • Document waivers — Always provide clear waiver reasons
  • Monitor blocked_recovered_ratio — Low ratio indicates systemic blockers
  • Archive completed initiatives — Keep active tree clean

Next Steps