chore: bootstrap rdb-discovery

This commit is contained in:
2026-06-01 17:43:02 +01:00
commit dede6ecc60
45 changed files with 2101 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
from __future__ import annotations
from pathlib import Path
from .tasks import read_tasks
def project_stage(root: Path) -> str:
if not (root / "context" / "discovery-log.md").exists():
return "NOT_INITIALISED"
tasks = read_tasks(root)
if not tasks:
return "DISCOVERY"
if any(task.status.lower() == "in progress" for task in tasks):
return "BUILDING"
if any(task.status.lower() == "todo" for task in tasks):
return "TASKS_READY"
return "REVIEW_READY"
def task_counts(root: Path) -> dict[str, int]:
counts: dict[str, int] = {}
for task in read_tasks(root):
counts[task.status] = counts.get(task.status, 0) + 1
return counts