Engine Rules, MCP & API Surface

Filter all DAG invariants, file-scope lease locks, SHA-256 checkpoint fields, MCP tools, resources, prompts, and REST endpoints.

Surface / ID Category Guarantee & Behavior
WRITE_WRITE DAG & Leases Splits or blocks two tasks modifying overlapping file paths, directory globs (`**`), or identical `::symbol` slices.
READ_WRITE DAG & Leases Serializes readers against an active writer on matching file globs so agents never read half-written code.
SHARED_READ DAG & Leases Allows arbitrary parallel read-only tasks (`01_ast_audit` style) on shared glob trees without contention.
path.py::symbol DAG & Leases Narrows lock scope to a specific symbol; two functions in one file can execute in the same wave when non-overlapping.
CycleDetectedError DAG & Leases Reconstructs exact cyclic path (`A -> B -> A`) via Kahn sort + iterative DFS before scheduling starts.
prev_hash -> entry_hash State Append-only canonical JSON SHA-256 hash chain linking every finished task in `CheckpointJournal`.
TypedBlackboard State Validates `input_contract` (`str`, `int`, `float`, `bool`, `dict`, `list`, callables) and `output_contract` lineage.
swarmweaver_plan_waves MCP Tool Compiles `TaskSpec` payloads into conflict-free waves and critical-path metrics (`readOnlyHint: true`).
swarmweaver_check_file_conflicts MCP Tool Tests a set of parallel task file globs for `WRITE_WRITE` or `READ_WRITE` overlaps without running tasks.
swarmweaver_inspect_checkpoint MCP Tool Verifies `.jsonl` checkpoint integrity and separates resumable completed task IDs from pending IDs.
swarmweaver_run_benchmark MCP Tool Runs the 4-part deterministic benchmark suite and emits structured JSON latency & token metrics.
swarmweaver://workflow/demo-10-agent MCP Resource Exposes the canonical 10-agent full-stack refactoring DAG specification with two intentional file overlaps.
swarmweaver://dag/lease-conflict-rules MCP Resource Formal specification of `read_globs`, `write_globs`, `**` wildcard, and `::symbol` rules.
plan-safe-swarm MCP Prompt Prompt template decomposing engineering objectives into typed contracts and disjoint file scopes.
resolve-file-lease-conflict MCP Prompt Diagnoses overlapping globs and proposes wave splits or disjoint file boundaries.
recover-crashed-workflow MCP Prompt Audits a `checkpoint.jsonl` journal and resumes only pending downstream nodes.
POST /mcp & GET /mcp HTTP / CLI Streamable HTTP JSON-RPC 2.0 endpoint and Server-Sent Events (`text/event-stream`) transport.
POST /api/plan & /api/conflicts HTTP / CLI REST endpoints returning compiled `WavePlan` JSON and pairwise file-conflict diagnostics.
GET /health, /readyz, /metrics HTTP / CLI Liveness probes, Prometheus text exposition, and JSON telemetry counters for request latency and conflicts split.