generated from coulomb/repo-seed
feat(tasks): adopt canonical task statuses
This commit is contained in:
@@ -25,10 +25,10 @@ Do not use them as a substitute for formal work definition inside the domain rep
|
||||
| Tool | Key Args | When to use |
|
||||
|------|----------|-------------|
|
||||
| `get_domain_summary(domain_slug)` | `domain_slug`: e.g. `"railiance"` | **Domain session start.** Scoped snapshot: active workstreams, blocking decisions, last 5 events, repo SBOM status, compact capabilities list — ~10% of get_state_summary() token cost. |
|
||||
| `get_state_summary()` | — | **Cross-domain work / custodian sessions.** Full snapshot: totals, all blocking decisions, all blocked tasks, all open workstreams, last 20 events. Large (~10k tokens). |
|
||||
| `get_state_summary()` | — | **Cross-domain work / custodian sessions.** Full snapshot: totals, all blocking decisions, waiting tasks, all open workstreams, last 20 events. Large (~10k tokens). |
|
||||
| `get_topic(slug)` | `slug`: e.g. `"markitect"` | Deep-dive on one topic + its workstreams + recent events. |
|
||||
| `list_tasks(workstream_id, status?)` | `workstream_id`: UUID (required); `status?`: todo/in_progress/blocked/done/cancelled | List all tasks in a workstream. Use this to look up task UUIDs before calling `update_task_status`, or to verify which workplan tasks are already synced to the DB. |
|
||||
| `list_blocked_tasks(workstream_id?)` | optional filter | Surface all impediments, optionally scoped to one workstream. |
|
||||
| `list_tasks(workstream_id, status?)` | `workstream_id`: UUID (required); `status?`: wait/todo/progress/done/cancel | List all tasks in a workstream. Use this to look up task UUIDs before calling `update_task_status`, or to verify which workplan tasks are already synced to the DB. |
|
||||
| `list_blocked_tasks(workstream_id?)` | optional filter | Legacy name: surfaces `wait` tasks, optionally scoped to one workstream. |
|
||||
| `list_pending_decisions(topic_id?)` | optional filter | Decisions holding up work, sorted by deadline. |
|
||||
| `get_recent_progress(limit, since?)` | `limit` default 20; `since` ISO datetime | Reconstruct recent session history. |
|
||||
| `get_capability_profile(domain_slug?)` | `domain_slug`: optional domain slug | **Capability deep-dive.** Returns repos → capabilities tree for one domain or all active domains. Includes descriptions and keywords. For cross-domain architectural discussion or when a worker needs to understand what a domain provides without checking out its repos. |
|
||||
@@ -56,7 +56,7 @@ Do not use them as a substitute for formal work definition inside the domain rep
|
||||
|------|----------|-------|
|
||||
| `create_workstream(topic_id, title, ...)` | `slug?`; `owner?`; `description?`; `due_date?` | Creates workstream under a topic. Use `get_state_summary()` to find topic IDs. |
|
||||
| `create_task(workstream_id, title, ...)` | `priority`: low/medium/high/critical; `assignee?`; `due_date?` | Creates task under a workstream. |
|
||||
| `update_task_status(task_id, status, ...)` | `status`: todo/in_progress/blocked/done/cancelled; `blocking_reason` required when blocked | |
|
||||
| `update_task_status(task_id, status, ...)` | `status`: wait/todo/progress/done/cancel; `blocking_reason?` describes wait conditions | Legacy aliases `blocked`, `in_progress`, `cancelled`, and `canceled` are accepted during migration. |
|
||||
| `update_workstream_status(workstream_id, status)` | `status`: proposed/ready/active/blocked/backlog/finished/archived | Thin shortcut — use `update_workstream` for full field control. |
|
||||
| `update_workstream(workstream_id, ...)` | `title?`; `description?`; `owner?`; `due_date?`; `repo_goal_id?`; `status?` | Patch any subset of workstream fields. Pass empty string for `repo_goal_id` to clear the link. |
|
||||
|
||||
@@ -115,7 +115,7 @@ Agents should call `record_token_event` (or pass `tokens_in`/`tokens_out` via
|
||||
| `state://topics` | Active topics list |
|
||||
| `state://workstreams/{topic_slug}` | Workstreams for a topic (by slug) |
|
||||
| `state://decisions/blocking` | All pending decisions |
|
||||
| `state://tasks/blocked` | All blocked tasks |
|
||||
| `state://tasks/blocked` | Legacy resource name; returns all `wait` tasks |
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -129,8 +129,8 @@ def resource_blocking_decisions() -> str:
|
||||
|
||||
@mcp.resource("state://tasks/blocked")
|
||||
def resource_blocked_tasks() -> str:
|
||||
"""All tasks with status=blocked."""
|
||||
return json.dumps(_get("/tasks", {"status": "blocked"}), indent=2)
|
||||
"""All tasks with status=wait. Legacy resource name kept for compatibility."""
|
||||
return json.dumps(_get("/tasks", {"status": "wait"}), indent=2)
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
@@ -142,7 +142,7 @@ def get_state_summary() -> str:
|
||||
"""Primary orientation tool. Call at the start of every session.
|
||||
|
||||
Returns a full snapshot: topic/workstream/task/decision totals, blocking
|
||||
decisions, blocked tasks, open workstreams, and the 20 most recent events.
|
||||
decisions, waiting tasks, open workstreams, and the 20 most recent events.
|
||||
|
||||
NOTE: This response is large (~10k tokens). When working inside a single
|
||||
registered domain repo, use get_domain_summary(domain_slug) instead —
|
||||
@@ -315,7 +315,7 @@ def list_tasks(workstream_id: str, status: str | None = None) -> str:
|
||||
|
||||
Args:
|
||||
workstream_id: UUID of the workstream (required).
|
||||
status: Optional filter — todo | in_progress | blocked | done | cancelled.
|
||||
status: Optional filter — wait | todo | progress | done | cancel.
|
||||
|
||||
Returns [{id, title, status, priority, assignee, due_date, needs_human}] for every
|
||||
matching task. Use this to look up task UUIDs before calling update_task_status,
|
||||
@@ -326,8 +326,8 @@ def list_tasks(workstream_id: str, status: str | None = None) -> str:
|
||||
|
||||
@mcp.tool()
|
||||
def list_blocked_tasks(workstream_id: str | None = None) -> str:
|
||||
"""List all tasks with status=blocked, optionally filtered by workstream_id."""
|
||||
return json.dumps(_get("/tasks", {"status": "blocked", "workstream_id": workstream_id}), indent=2)
|
||||
"""List all waiting tasks, optionally filtered by workstream_id."""
|
||||
return json.dumps(_get("/tasks", {"status": "wait", "workstream_id": workstream_id}), indent=2)
|
||||
|
||||
|
||||
@mcp.tool()
|
||||
@@ -512,7 +512,7 @@ def update_task_status(
|
||||
agent: Optional[str] = None,
|
||||
session_id: Optional[str] = None,
|
||||
) -> str:
|
||||
"""Update a task's status. blocking_reason is required when status='blocked'.
|
||||
"""Update a task's status. Canonical status values are wait/todo/progress/done/cancel.
|
||||
|
||||
When status='done', always records a token event using the best available data:
|
||||
Tier 1 (best): pass tokens_in + tokens_out — exact counts from the session
|
||||
@@ -526,8 +526,8 @@ def update_task_status(
|
||||
|
||||
Args:
|
||||
task_id: UUID of the task
|
||||
status: todo | in_progress | blocked | done | cancelled
|
||||
blocking_reason: required when status=blocked
|
||||
status: wait | todo | progress | done | cancel
|
||||
blocking_reason: optional wait-condition detail
|
||||
tokens_in: exact input token count for this task (Tier 1)
|
||||
tokens_out: exact output token count for this task (Tier 1)
|
||||
workplan_tokens_in: total input tokens for the whole workplan (Tier 2)
|
||||
|
||||
Reference in New Issue
Block a user