feat(orchestrator): S5 Tasks with choices, Gantt, estimates and burn charts
Requirement 001 phase 6, S5: - Tasks tab: every pending ask, rule request, operator row and choice card shows under "waits on Operator"; a choice request goes out on a fixed channel button, post and call with an agent multi-select, and a click on an option sends a passkey-signed answer the agent checks with operator_message. The unsigned /api/decisions/<id>/choose route is gone, and a decision, choice answer or choice recipient whose name holds "*" is refused, so a signed answer never reaches every agent. - Gantt view: one bar per task from start to end (running to now), one arrow per explicit, branch-base and queue-order edge, hatched forecast bars (always, points only, real only) from the median duration or points times median hours per point. - rasci.py set --after/--drop-after stores task dependencies and refuses unknown tasks and cycles. - Estimation toggle (No estimate default, Story points) is stored in the hub settings; burndown and burnup per whole register, list filter or one agent or line, counting tasks or summing complexity with the unestimated tasks as their own line. - New skill kvb-org-queue-estimate: "Request estimates" (story points mode, passkey-signed board action) or the skill sends exactly one newsletter listing every unestimated task with its RASCI parties; a party name that is no plain name shows as "unnamed party". - Business value per task or in bulk is stored only with a verified passkey assertion over the exact ids and values; WSJF uses it instead of the median. The task list sorts by every decision-50 mode both ways. - e2e: the walk's pending ask lives an hour instead of 60 s, and the CDP and BiDi drivers retry removing the browser profile while the browser exits (ENOTEMPTY). Evidence: make test 709 OK, ruff and markdownlint clean (/tmp/s5-make-test-fix-2.log); e2e 26 OK in Chromium and Firefox (/tmp/s5-e2e-fix-2.log); MEDUSA 50 files, an independent skeptic rejected four holes (unsigned choose route, unsigned estimates request, free-text party names, "*" recipients incl. normalizer bypasses), all fixed and re-verified, the 8 remaining pattern hits accepted, rescan 0 open. 🎯 Fix: 92 % 💥 Break: 4 % 💸 Cost: 100 % ⏱️ Time: – 🛡️ Security: 100 % 🏆 Score: 88 🚦 Gate: ✅ 90/5, cost and time <= 100, security 100 % Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5c8b69d53d
commit
d9eb121d12
49 files changed
+2162
-148
No files matched your search
@@ -13,7 +13,7 @@ itself (holder as R and A, `running`, start, workdir, branch); its release
|
||||
sets `done` and the end, or `stopped` while a key result is still open.
|
||||
|
||||
```bash
|
||||
rasci.py set <task> --title <t> --objective <o> --description <d> --prio <n> --status queued|running|blocked|done|stopped --worker "<agent | subagent <type> (<model>)>" --workdir <dir> --branch <b> --base <upstream branch> --artifact <kind>:<ref> --tool <script or command> [--start <iso>] [--end <iso>] [--drop-artifact <a>] [--drop-tool <t>]
|
||||
rasci.py set <task> --title <t> --objective <o> --description <d> --prio <n> --status queued|running|blocked|done|stopped --worker "<agent | subagent <type> (<model>)>" --workdir <dir> --branch <b> --base <upstream branch> --artifact <kind>:<ref> --tool <script or command> --after <task> [--start <iso>] [--end <iso>] [--drop-artifact <a>] [--drop-tool <t>] [--drop-after <task>]
|
||||
rasci.py kr <task> add "<measurable result>" | met <n> | open <n> | rm <n>
|
||||
rasci.py role <task> "<party>" <letters>
|
||||
rasci.py get <task>
|
||||
@@ -22,6 +22,7 @@ rasci.py show [--all]
|
||||
rasci.py show --wide [--all]
|
||||
rasci.py artifacts [--ended] [--task <task>]
|
||||
rasci.py estimate <task> "<party>" --value <fib> --complexity <fib>
|
||||
rasci.py estimate <task> Operator --value <fib>
|
||||
rasci.py wsjf [--all]
|
||||
rasci.py tools
|
||||
rasci.py agents
|
||||
@@ -61,7 +62,10 @@ published). `done` is refused while one is open; a task ended short of them is
|
||||
- Priority is the rank of the `kvb-org-wsjf` skill: an operator's pin
|
||||
(`--prio`) first, then WSJF from the estimates the chair collects; `show`
|
||||
prints the rank as Prio and the score as WSJF; the agent order of
|
||||
`kvb-org-priority` only breaks ties.
|
||||
`kvb-org-priority` only breaks ties. The Operator's business value, also
|
||||
recorded alone, replaces the median.
|
||||
- `--after <task>` records that a task follows another (a Gantt arrow);
|
||||
an unknown task and a cycle are refused.
|
||||
- Write only your own rows; another session's task belongs to that session.
|
||||
- Read `show` (Prio, WSJF, Task, Status, Worker, A; cells cut short) or
|
||||
`get` instead of asking a peer what it works on. `show --wide` adds OKR,
|
||||
|
||||
@@ -47,7 +47,7 @@ FIELDS = (
|
||||
"branch", "base",
|
||||
)
|
||||
TEXT_FIELDS = ("title", "objective", "description", "worker", "workdir", "branch", "base")
|
||||
LIST_FIELDS = {"tools": "tool"}
|
||||
LIST_FIELDS = {"tools": "tool", "after": "after"}
|
||||
ARTIFACT = re.compile(r"^[a-z]+:\S")
|
||||
FIBONACCI = (1, 2, 3, 5, 8, 13, 21, 34, 55, 89)
|
||||
OPERATOR = "Operator"
|
||||
@@ -226,14 +226,43 @@ def when(value: str | None) -> str:
|
||||
|
||||
|
||||
def wsjf(row: dict) -> tuple[float, float, float] | None:
|
||||
estimates = list(row.get("estimates", {}).values())
|
||||
if not estimates:
|
||||
"""Returns:
|
||||
Business value, complexity and their quotient: the Operator's
|
||||
business value where it recorded one, else the median of all, over
|
||||
the median complexity; None while no estimate carries a complexity.
|
||||
"""
|
||||
estimates = row.get("estimates", {})
|
||||
sized = [e["complexity"] for e in estimates.values() if "complexity" in e]
|
||||
if not sized:
|
||||
return None
|
||||
value = statistics.median(e["value"] for e in estimates)
|
||||
complexity = statistics.median(e["complexity"] for e in estimates)
|
||||
own = estimates.get(OPERATOR)
|
||||
value = own["value"] if own else statistics.median(e["value"] for e in estimates.values())
|
||||
complexity = statistics.median(sized)
|
||||
return value, complexity, round(value / complexity, 2)
|
||||
|
||||
|
||||
def follows(tasks: dict[str, dict], start: str, target: str) -> bool:
|
||||
seen: set[str] = set()
|
||||
todo = list(tasks.get(start, {}).get("after", []))
|
||||
while todo:
|
||||
current = todo.pop()
|
||||
if current == target:
|
||||
return True
|
||||
if current not in seen:
|
||||
seen.add(current)
|
||||
todo.extend(tasks.get(current, {}).get("after", []))
|
||||
return False
|
||||
|
||||
|
||||
def check_after(tasks: dict[str, dict], task: str, after: list[str]) -> None:
|
||||
for other in after:
|
||||
check_task(other)
|
||||
if other == task:
|
||||
fail(f"{task} cannot follow itself")
|
||||
if other not in tasks:
|
||||
fail(f"{task}: --after {other} is no task of the register")
|
||||
|
||||
|
||||
def agent_order() -> list[str]:
|
||||
try:
|
||||
data = json.loads(nofollow.read_text(ROOT, AGENT_ORDER))
|
||||
@@ -338,6 +367,7 @@ def cmd_set(args: argparse.Namespace) -> int:
|
||||
if not ARTIFACT.match(ref):
|
||||
fail(f"invalid artifact {ref!r}; use <kind>:<ref>, e.g. image:<name>:<tag>")
|
||||
with database() as tasks:
|
||||
check_after(tasks, args.task, args.after)
|
||||
entry = tasks.setdefault(args.task, {"roles": {}})
|
||||
if args.status == "done" and open_results(entry):
|
||||
fail(f"{args.task}: {open_results(entry)} key result(s) open; mark them met or set stopped")
|
||||
@@ -356,6 +386,8 @@ def cmd_set(args: argparse.Namespace) -> int:
|
||||
entry[field] = items
|
||||
else:
|
||||
entry.pop(field, None)
|
||||
if args.after and follows(tasks, args.task, args.task):
|
||||
fail(f"{args.task}: --after {', '.join(args.after)} closes a cycle; drop one with --drop-after")
|
||||
kept = [a for a in entry.get("artifacts", []) if a["ref"] not in args.drop_artifact]
|
||||
known = {a["ref"] for a in kept}
|
||||
kept += [{"ref": r, "added": stamp()} for r in dict.fromkeys(args.artifact) if r not in known]
|
||||
@@ -422,7 +454,7 @@ def cmd_get(args: argparse.Namespace) -> int:
|
||||
roles = ", ".join(f"{p}={v}" for p, v in sorted(row["roles"].items()))
|
||||
print(f"roles: {roles or '-'}")
|
||||
for party, estimate in sorted(row.get("estimates", {}).items()):
|
||||
print(f"estimate {party}: business value {estimate['value']}, complexity {estimate['complexity']}")
|
||||
print(f"estimate {party}: business value {estimate['value']}, complexity {estimate.get('complexity', '-')}")
|
||||
score = wsjf(row)
|
||||
if score:
|
||||
print(f"wsjf: {score[2]:g}")
|
||||
@@ -431,8 +463,9 @@ def cmd_get(args: argparse.Namespace) -> int:
|
||||
|
||||
def cmd_estimate(args: argparse.Namespace) -> int:
|
||||
check_task(args.task)
|
||||
alone = args.complexity is None and args.party == OPERATOR
|
||||
if not args.drop:
|
||||
for name in ("value", "complexity"):
|
||||
for name in ("value",) if alone else ("value", "complexity"):
|
||||
if getattr(args, name) not in FIBONACCI:
|
||||
fail(f"--{name} must be one of {', '.join(map(str, FIBONACCI))}")
|
||||
with database() as tasks:
|
||||
@@ -441,7 +474,9 @@ def cmd_estimate(args: argparse.Namespace) -> int:
|
||||
if args.drop:
|
||||
estimates.pop(args.party, None)
|
||||
else:
|
||||
estimates[args.party] = {"value": args.value, "complexity": args.complexity, "at": stamp()}
|
||||
complexity = estimates.get(args.party, {}).get("complexity") if alone else args.complexity
|
||||
sized = {} if complexity is None else {"complexity": complexity}
|
||||
estimates[args.party] = {"value": args.value, **sized, "at": stamp()}
|
||||
if not estimates:
|
||||
entry.pop("estimates")
|
||||
print(f"{args.task}: estimate {'dropped' if args.drop else 'recorded'} for {args.party}")
|
||||
|
||||
Reference in new issue
Block a user