Knowledge base: progress says how far a design, milestone, issue or record has come (issue 1947)

A lead's five-minute report and 'is design 47 nearing its end' were joined by hand from
the design file, the tracker and the deliveries. One verb now works the state out
(ADR 0424 §1), minimal for every five minutes, detailed for the report's tree.
Milestones are read from the design's table until the tracker's milestone records
(issue 1781) are delivered.
This commit is contained in:
2026-10-26 16:37:54 +01:00
parent 5e516317e9
commit 8da33e43d4
17 changed files with 3366 additions and 8 deletions
@@ -37,7 +37,7 @@ import (
const Seat = "knowledge-base"
// Verbs are the seat's verbs, as the manifest declares and claims them (ADR 0290 rule 6).
var Verbs = []string{"ask", "get", "list", "findings", "holds", "links", "history", "reserve", "propose", "import", "return", "withdraw"}
var Verbs = []string{"ask", "get", "list", "findings", "holds", "links", "history", "reserve", "propose", "import", "return", "withdraw", "progress"}
// HealthTool is the module's own tool the node-engine asks how it is.
const HealthTool = "knowledge_health"
@@ -83,6 +83,7 @@ func newKB(store Store) *KB {
return &KB{
Store: store,
Records: busRecords{},
Seats: stdio.Ask,
Reserve: busReserver,
Judge: busJudgement(os.Getenv("MESH_NODE")),
Asks: sdkAskBus{},
@@ -1120,6 +1121,39 @@ func Tools(k *KB, caller func(map[string]any) string) []stdio.Tool {
}
return k.WithdrawRecord(caller(m), key, why)
}},
{Name: Seat + ".progress",
Description: "How far something has come, in one call: of mesh (every design in progress), design <n> (its " +
"milestones), milestone <design>/<id> (its issues, such as milestone 47/R6), issue <n> (its pull requests " +
"and deliveries) or decision <n> / research <n> (the designs naming it and the issues linked to it). Each " +
"thing is done ✓, moving ▶, waiting ⏸ or stuck ✗, worked out from the issue tracker and mesh-delivery " +
"and never written by anyone, with when it last moved. detail minimal (the default) gives one line per " +
"milestone, cheap enough for a report every five minutes; detailed gives the report's tree: each " +
"milestone not done with its issues, their pull requests, the groups holding them and what each waits " +
"for, for about every thirty. Milestones are read from the design's milestone table until the issue " +
"tracker holds milestone records (issue 1781); what the table does not say for certain is said in " +
"warnings. Within a bound it states, 4 KiB unless asked for more, saying what it cut.",
Input: schema([]string{"of"}, map[string]any{
"of": text("what: mesh, design 47, milestone 47/R6, issue 1945, decision 493 (or ADR 0493) or research 72"),
"detail": map[string]any{"type": "string", "enum": []string{DetailMinimal, DetailDetailed},
"description": "minimal (the default): one line per child; detailed: the tree with issues, pull requests and groups"},
"bound": boundArg()}),
Run: func(m map[string]any) (any, error) {
a, err := readArgs("progress", m, "of", "detail", "bound")
if err != nil {
return nil, err
}
var p ProgressAsk
if p.Of, err = a.str("of"); err != nil {
return nil, err
}
if p.Detail, err = a.str("detail"); err != nil {
return nil, err
}
if p.Bound, err = a.num("bound", false); err != nil {
return nil, err
}
return k.Progress(p)
}},
}
}