STATE-WP-0069 T06: add workplan flow entity and prefer open_workplans
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 2s

Introduce flows/workplan.yaml and /flows/workplan/* routes alongside the
legacy workstream flow. Dashboard, README, and MCP flow docs now prefer
open_workplans with open_workstreams fallback until dual-key retirement.
This commit is contained in:
tegwick 2026-07-08 21:26:07 +02:00
parent f596fc27c7
commit 2b83654ac3
12 changed files with 122 additions and 13 deletions

View file

@ -37,5 +37,6 @@ except urllib.error.URLError as e:
"waiting_tasks": [],
"blocked_tasks": [],
"recent_progress": [],
"open_workplans": [],
"open_workstreams": [],
}))

View file

@ -86,5 +86,5 @@ a cycle exists and the WHI is penalised by 50%. The WHI KPI card on the
## Data source
Dependency edges are derived from the `depends_on` arrays on `open_workstreams`
Dependency edges are derived from the `depends_on` arrays on `open_workplans`
in `GET /state/summary`. Polls every **15 seconds**.

View file

@ -437,7 +437,7 @@ display(html`<div class="grid grid-cols-3" style="gap:1rem;margin-bottom:1.5rem"
```js
const waitingTasks = summary.waiting_tasks ?? summary.blocked_tasks ?? [];
const wsById = Object.fromEntries((summary.open_workstreams ?? []).map(w => [w.id, w]));
const wsById = Object.fromEntries((summary.open_workplans ?? summary.open_workstreams ?? []).map(w => [w.id, w]));
const todayCount = (summary.recent_progress ?? []).filter(e =>
e.created_at?.startsWith(new Date().toISOString().slice(0, 10))).length;
const decCount = (decisions.open ?? 0) + (decisions.escalated ?? 0);

View file

@ -282,7 +282,7 @@ display(Plot.plot({
display(_filtersForm);
{
// Enrich each workplan with tasks/deps data from open_workstreams summary
// Enrich each workplan with tasks/deps data from open_workplans summary
const _openWsMap = Object.fromEntries(openWs.map(w => [w.id, w]));
const _wsTable = buildEntityTable(
filtered,
@ -304,7 +304,7 @@ display(_filtersForm);
## Dependencies
```js
// Build dep cards from the enriched open_workstreams in the summary
// Build dep cards from the enriched open_workplans in the summary
const wsWithDeps = openWs.filter(w => {
const domain = data.find(d => d.id === w.id)?.domain ?? "unknown";
return (filters.domain.length === 0 || filters.domain.includes(domain)) &&