|
| 1 | +## Why |
| 2 | + |
| 3 | +The governance dashboard shows the pipeline: pull requests bucketed by stage (awaiting review, in |
| 4 | +progress, changes requested, merged), by lane. That answers "what is moving through the gate right now." |
| 5 | +It does not answer the questions a project owner actually asks: |
| 6 | + |
| 7 | +- **What is the work about?** Across everything submitted and everything merged, what are the changes |
| 8 | + mostly doing, and does that match the project's stated goal and its invariants? |
| 9 | +- **Is the project healthy and balanced, or lopsided?** A project can merge steadily and still drift: |
| 10 | + all features, no tests; all code, no docs; velocity up, correctness down. There is no single view of |
| 11 | + where the project sits today and where it is heading if the open work merges. |
| 12 | +- **Are we building bug-free software?** The point of the gate is fewer escaped defects. Nothing today |
| 13 | + counts the failures that matter most: a change that passed review green, passed its tests, and still |
| 14 | + turned out to carry a bug. |
| 15 | + |
| 16 | +GitHub already holds every raw fact (each PR, each check, each merge). The dashboard's job is not to |
| 17 | +repeat GitHub; it is to **synthesise** those facts into a small number of quantifiable signals a human |
| 18 | +can read at a glance, and to make the trajectory visible: current-state (what has merged) versus the |
| 19 | +to-be state (what merges if the open PRs land). |
| 20 | + |
| 21 | +## What Changes |
| 22 | + |
| 23 | +Add a **project-analytics** section to the dashboard, above or beside the existing stage buckets. It is |
| 24 | +derived entirely from PR facts the dashboard already fetches, plus a small set of declared link |
| 25 | +conventions for the signals GitHub does not carry directly. Nothing here changes the gate; it is a |
| 26 | +read-only view. |
| 27 | + |
| 28 | +1. **Two-state summary.** A count and short digest of every **submitted** PR (open = the *to-be* state) |
| 29 | + and every **merged** PR (the *current-state*), so the two are always read side by side. |
| 30 | + |
| 31 | +2. **What the work is about.** The most common topics across submitted PRs and across merged PRs (by |
| 32 | + lane, declared scope, and changed-area), and a plain-language read of what those topics mean against |
| 33 | + the project's **invariants** and its **stated goal** (both declared in config). |
| 34 | + |
| 35 | +3. **A balance map (radar / spider chart).** A star-shaped chart with **6 fixed dimensions**, each scored |
| 36 | + `0` at the centre to `5` at the point, drawn as **two overlaid polygons**: the current-state (from |
| 37 | + merged PRs) and the to-be state (from merged plus open PRs, projecting the open work as if merged). The |
| 38 | + shape shows at a glance whether the project is balanced across the principles of a healthy software |
| 39 | + project or spiking in one direction, the way an attribute chart does for sports equipment or a game |
| 40 | + character. The six dimensions and their scoring are defined in the spec. |
| 41 | + |
| 42 | +4. **Governance KPI ratios.** Totals and percentages that quantify how the process is going: how many |
| 43 | + incoming PRs fit the spec/OpenSpec standard; how many pass review versus not (with the failing count |
| 44 | + called out); tests created and tests passing and doc updates from merged PRs and their trend; which |
| 45 | + review categories findings fall into; how many PRs conform to versus violate a MUST invariant; how many |
| 46 | + attempted to change the core business logic of the code; and how many were flagged malicious. |
| 47 | + |
| 48 | +5. **Bug-free-software KPIs.** The headline performance numbers: submitted versus merged, and the |
| 49 | + **escaped-defect count** framed as the **review agent's false-negative rate** - a defect reported |
| 50 | + against a PR that had passed review green and passed its tests yet still shipped. Green-then-buggy means |
| 51 | + the review missed it, so for a project that runs the agent review this is the sharpest read of whether |
| 52 | + the agent fleet is actually catching bugs. It is the number the whole gate exists to drive down. |
| 53 | + |
| 54 | +6. **A temporal trend.** The radar answers current-vs-to-be; alongside it, a per-window series (a small |
| 55 | + trend line) for the headline signals, so an owner sees whether escaped defects, throughput, and spec-fit |
| 56 | + are rising or falling, not only their latest value. |
| 57 | + |
| 58 | +A worked HTML example of the whole view (radar, KPIs, escaped-defect hero, sparklines, and the |
| 59 | +still-filling-in note) was produced as a design reference for this change. |
| 60 | + |
| 61 | +## What this depends on |
| 62 | + |
| 63 | +Two of the KPIs cannot come from what the pipeline emits today, so this change carries the small producer |
| 64 | +changes they need: |
| 65 | + |
| 66 | +- **Spec conformance is its own signal.** Intake rolls the spec check together with disclosure, DCO, and |
| 67 | + lane, and a chore lane is spec-exempt, so "passed intake" is not "spec-conformant." Intake must expose |
| 68 | + the spec result separately. |
| 69 | +- **The review emits a machine-readable per-lens result.** Review categories, malicious flags, and |
| 70 | + impact-core findings already exist inside the review, but only the rendered comment is queryable. A |
| 71 | + structured per-lens emission (a status per lens, or a parseable block) unlocks all three at once, instead |
| 72 | + of the dashboard scraping a comment. The MUST-invariant KPI stays "not enough signal" until a review |
| 73 | + emits an explicit invariant check; the spec marks it blocked on that producer rather than implying it is |
| 74 | + derivable. |
| 75 | + |
| 76 | +## Impact |
| 77 | + |
| 78 | +- Affected specs: new capability `project-analytics`. |
| 79 | +- Affected code (at build time, not in this change): `cli/dashboard.py` (a new analytics model + render |
| 80 | + section, plus extending `fetch` to read merged-PR statuses and files and to paginate the declared |
| 81 | + window), its HTML, and `cli/dashboard.test.sh`; `.github/asdd/intake-check.sh` (expose `spec_ok` |
| 82 | + separately); the review path (`post-review.sh` or a per-lens status) for the machine-readable emission. |
| 83 | +- New declared conventions (config + trailers) for the signals GitHub does not carry: the project goal and |
| 84 | + invariants, and the escaped-defect link (`Escaped-from: #N` on a bug-lane PR or a bug-labelled issue). |
| 85 | + Every KPI degrades to "not enough signal" rather than a wrong number when its input is absent, and each |
| 86 | + metric declares a minimum signal so a new project shows a note while an existing repo scores from history. |
| 87 | +- Privacy and provenance are unchanged from the dashboard's existing stance: every rendered fact is already |
| 88 | + visible on GitHub, private deployments stay behind auth, and `--public` remains the explicit opt-in for |
| 89 | + publication. |
0 commit comments