Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions planning/roadmaps/id.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,36 @@ Decided by Drew on 2026-11-05 in the next-horizons discussion #1240: **all seven
| Creator tooling & insight | #6282 | #6308, #6309, #6310, #6311 |

Design order: F12.4 (#1061) and F12.10 (#1067) designs first, then Phase 14 v1 designs in the order hosted worlds → discovery → agents spike → ecosystem → shells → scale → creators. Implementation follows Phase 13.

## Phase tracker — F-item mapping (source of record for #9923)

The Phase tracker panel's per-phase progress counts F-items against live GitHub state, and this table is the mapping it counts from — maintained as plan data here, never copied into the aggregator. Researched and verified against GitHub on 2026-11-14 (task 16681): each ref is the item's dedicated tracking issue, except F11.6 and F11.14, which were delivered by PR with no dedicated issue (per the 2026-10-20 Phase 11 status record). Phase 12 is not in this table: its uniform source is the ordered step list in #1235, which the panel already counts. Phases 0–10 have no rows because their plans carry no F-item numbering at all (Phase 9's plan included) — the panel states that gap rather than inventing a percentage for them.

| Phase | Item | Ref | Title |
| --- | --- | --- | --- |
| 11 | F11.1 | #238 | Relay kit location |
| 11 | F11.2 | #229 | Firefox E2E isolation |
| 11 | F11.3 | #241 | Explain the LogSync flakes |
| 11 | F11.4 | #551 | A fast lane |
| 11 | F11.5 | #552 | Injected time |
| 11 | F11.6 | PR #247 | Per-call fuel metrics and budgets |
| 11 | F11.7 | #553 | Host metrics and tracing |
| 11 | F11.8 | #539 | Benchmarks |
| 11 | F11.9 | #542 | Bytes per frame |
| 11 | F11.10 | #540 | Split the large modules, with no behavior change |
| 11 | F11.11 | #543 | One client projection |
| 11 | F11.12 | #227 | Journal format management |
| 11 | F11.13 | #554 | Error taxonomy |
| 11 | F11.14 | PR #248 | Cheaper Screen |
| 11 | F11.15 | #555 | Smaller modules |
| 11 | F11.16 | #544 | Replay self-check |
| 11 | F11.17 | #547 | A view trap must not poison the world |
| 11 | F11.18 | #541 | Pinned toolchain for checked-in artifacts |
| 13 | F13.1 | #783 | The shell contract |
| 13 | F13.2 | #784 | SSH as a transport for the frame protocol |
| 13 | F13.3 | #785 | SSH-over-iroh reachability |
| 13 | F13.4 | #786 | Presentation capability tiers |
| 13 | F13.5 | #787 | Kitty keyboard protocol on the raw input path |
| 13 | F13.6 | #788 | Native client shells |
| 13 | F13.7 | #789 | Client-side capability providers |
| 13 | F13.8 | #790 | Multi-server, multi-client topology; client-only mode |
157 changes: 157 additions & 0 deletions pm-stack/aggregator/src/phase-mapping.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
// Phase tracker F-item mapping (#9923, build-order step 3): the
// source of record that maps id-program phases to their F-items and
// each F-item to the GitHub issue (or, for the two items delivered
// without a dedicated issue, the PR) that tracks it. The table lives
// in planning/roadmaps/id.md under "## Phase tracker — F-item
// mapping" and is maintained as plan data; this module parses it and
// derives per-phase progress from live GhItem state.
//
// Coverage, researched and verified against GitHub on 2026-11-14:
// Phases 11 and 13 are the phases whose plans number F-items and
// whose items carry verifiable refs (Phase 11: plan headers for
// F11.1-F11.3, dedicated F-item issues for most of the rest, the
// 2026-10-20 phase-11 status record for F11.6 -> PR #247 and
// F11.14 -> PR #248, #227 for F11.12; Phase 13: issues #783-#790 in
// order). Phase 12's source remains the ordered step list in #1235
// (phase12.ts) — it is already uniform and machine-readable, so it
// is not duplicated here. Phases 0-10 have no F-item numbering in
// any plan (verified by the #9923 archaeology, 2026-11-14), so they
// have no rows: the panel states that gap instead of inventing one.
//
// Oracle (same as derivePhase12Progress): an item is done iff its
// ref is closed (issue) or merged/closed (PR) in LIVE GitHub state —
// completed work is recorded in GitHub, not in the table; the table
// only names the ref. A ref whose live kind differs from the table's
// (an issue number that resolves to a PR, or vice versa) counts as
// unresolved, never as done: a mismatched join must not fabricate
// progress.
import { readFile } from "node:fs/promises";
import { join } from "node:path";
import type { GhItem, RefKey } from "./model.ts";

export const PHASE_MAPPING_REPO = "developing-today/code";
export const PHASE_MAPPING_PATH = "planning/roadmaps/id.md";

/** One row of the mapping table: an F-item and its tracking ref. */
export interface PhaseMappingEntry {
phase: number;
/** The F-item id as written in the plans ("F11.6"). */
item: string;
kind: "issue" | "pr";
number: number;
title: string;
}

export interface PhaseMappingSnapshot {
entries: PhaseMappingEntry[];
/** When this snapshot was read from the checkout (ISO-8601). */
fetchedAt: string;
/** Repo-relative path the entries were parsed from. */
sourcePath: string;
}

/** Split a markdown table row into trimmed cells (mirrors the
* repo-roadmap source's splitter: unescaped pipes, edge pipes dropped). */
function splitCells(line: string): string[] {
const parts = line.split(/(?<!\\)\|/);
if (parts.length && parts[0].trim() === "") parts.shift();
if (parts.length && parts[parts.length - 1].trim() === "") parts.pop();
return parts.map((c) => c.replace(/\\\|/g, "|").trim());
}

function cellText(cell: string): string {
return cell
.replace(/\[([^\]]*)\]\([^)]*\)/g, "$1")
.replace(/[*_`]/g, "")
.trim();
}

/** Parse the F-item mapping table out of planning/roadmaps/id.md.
* Only the section whose heading names the F-item mapping is read,
* and only rows shaped like one (numeric phase, F<phase>.<n> item,
* "#<n>" or "PR #<n>" ref) become entries — the file's other roadmap
* tables are not mapping data and must never leak in. */
export function parsePhaseMapping(content: string): PhaseMappingEntry[] {
const entries: PhaseMappingEntry[] = [];
let inSection = false;
for (const line of content.split(/\r?\n/)) {
const heading = /^##\s+(.*)$/.exec(line);
if (heading) {
inSection = /f-item mapping/i.test(heading[1]);
continue;
}
if (!inSection || !line.trim().startsWith("|")) continue;
const cells = splitCells(line).map(cellText);
if (cells.length < 3) continue;
const phase = Number(cells[0]);
if (!Number.isInteger(phase) || phase < 0) continue;
if (!/^F\d+\.\d+$/.test(cells[1])) continue;
const ref = /^(PR\s+)?#(\d+)$/.exec(cells[2]);
if (!ref) continue;
entries.push({
phase,
item: cells[1],
kind: ref[1] ? "pr" : "issue",
number: Number(ref[2]),
title: cells[3] ?? "",
});
}
return entries;
}

/** Read and parse the mapping from the aggregator host's code
* checkout. Returns null when the file cannot be read or parses to
* no entries — the panel withholds mapped progress rather than
* rendering an empty or invented one. */
export async function loadPhaseMapping(
codeCheckout: string,
): Promise<PhaseMappingSnapshot | null> {
try {
const content = await readFile(join(codeCheckout, PHASE_MAPPING_PATH), "utf8");
const entries = parsePhaseMapping(content);
if (!entries.length) return null;
return { entries, fetchedAt: new Date().toISOString(), sourcePath: PHASE_MAPPING_PATH };
} catch {
return null;
}
}

/** Per-phase F-item progress counted from the mapping. */
export interface MappedPhaseProgress {
/** Mapped F-items for the phase. */
total: number;
/** Items whose ref is closed/merged in live GitHub state. */
done: number;
/** Items whose ref is open in live GitHub state. */
open: number;
/** Items the current items source could not resolve (or resolved
* to the other kind — see the header oracle). */
unresolved: number;
/** done / total as a whole percent; null when total is 0. */
percent: number | null;
}

/** Derive per-phase progress by joining the mapping entries to live
* GhItem state. Phases with no entries are absent from the result —
* absence is the honest signal (no source), not a zero. */
export function deriveMappedProgress(
entries: readonly PhaseMappingEntry[],
items: ReadonlyMap<RefKey, GhItem>,
): Map<number, MappedPhaseProgress> {
const byPhase = new Map<number, MappedPhaseProgress>();
for (const entry of entries) {
const acc =
byPhase.get(entry.phase) ??
({ total: 0, done: 0, open: 0, unresolved: 0, percent: null } as MappedPhaseProgress);
acc.total++;
const item = items.get(`${PHASE_MAPPING_REPO}#${entry.number}` as RefKey);
if (!item || item.kind !== entry.kind) acc.unresolved++;
else if (item.state === "open") acc.open++;
else acc.done++; // "closed" or "merged"
byPhase.set(entry.phase, acc);
}
for (const acc of byPhase.values()) {
acc.percent = acc.total ? Math.round((acc.done / acc.total) * 100) : null;
}
return byPhase;
}
26 changes: 11 additions & 15 deletions pm-stack/aggregator/src/phase-tracker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,17 @@
// instead of inventing a state.
//
// The per-phase F-item PROGRESS half is derived only where a
// uniform machine-readable source exists. Today that is Phase 12:
// the ordered step list in issue #1235's body (parsed and joined by
// phase12.ts for the Path to Phase 12 panel) is exactly such a
// source, and derivePhase12Progress below counts its steps against
// live GhItem state. Phase 11 is NOT derivable from its plan file:
// only F11.1-F11.3 carry an issue ref in their item header
// (.opencode/plans/phase-11-foundations.md, verified 2026-11-14);
// the other items' refs are prose-level and ambiguous (F11.11 names
// #250 for a done part and #242 for an open part), so a header join
// would fabricate progress for 15 of 18 items. Phases 0-10 and 13
// have no F-item source at all. Those phases join when a
// phase-mapping source of record exists (proposed: a phases table
// in planning/roadmaps/id.md, parsed like the repo-roadmap source);
// until then they render validation state only, with the gap stated
// rather than a percentage invented.
// uniform machine-readable source exists. Phase 12: the ordered
// step list in issue #1235's body (parsed and joined by phase12.ts),
// counted by derivePhase12Progress below. Phases 11 and 13: the
// F-item mapping table in planning/roadmaps/id.md — the source of
// record created for this panel (parsed and counted by
// phase-mapping.ts) — researched on 2026-11-14: dedicated F-item
// issues for most items, the phase-11 status record for the two
// PR-delivered items (F11.6 -> PR #247, F11.14 -> PR #248), #227 for
// F11.12, and #783-#790 for F13.1-F13.8. Phases 0-10 have no F-item
// numbering in any plan, so they render validation state only, with
// the gap stated rather than a percentage invented.
//
// Everything in this module is pure: the derivations join their
// sources against the aggregator's GhItem states.
Expand Down
30 changes: 20 additions & 10 deletions pm-stack/aggregator/src/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ import {
derivePhase12Progress,
derivePhaseValidation,
} from "./phase-tracker.ts";
import { deriveMappedProgress, type PhaseMappingSnapshot } from "./phase-mapping.ts";
import {
BUILD_HEALTH_REPO,
buildHealthIsStale,
Expand Down Expand Up @@ -7263,18 +7264,21 @@ export function phase12PanelHtml(
* validation audits, #1075-#1078, already in the id project's tracked
* refs). No hand-maintained values: a reopened audit or a new open
* follow-up changes the panel without an edit. Phase 12 also shows
* F-item progress counted from #1235's ordered step list (the one
* uniform machine-readable F-item source); the other phases withhold
* progress — no such source exists for them yet (#9923), and a
* fabricated percentage is worse than the stated gap. */
* F-item progress counted from #1235's ordered step list, and Phases
* 11 and 13 count the F-item mapping table in planning/roadmaps/id.md
* (the source of record, #9923 step 3) when the source carries it;
* Phases 0-10 have no F-item numbering in their plans, so they state
* that gap instead of showing a fabricated percentage. */
export function phaseTrackerPanelHtml(
items: Map<RefKey, GhItem>,
phase12: Phase12Snapshot | null = null,
phaseMapping: PhaseMappingSnapshot | null = null,
): string {
const umbrellaUrl = `https://github.com/${PHASE_TRACKER_REPO}/issues/${PHASE_TRACKER_UMBRELLA}`;
const head = `<h2>Phase tracker — validation by phase, live from <a href="${umbrellaUrl}">#${PHASE_TRACKER_UMBRELLA}</a></h2>`;
const progress = derivePhase12Progress(phase12, items);
const sourceLine = `<p class="muted">Source: the validation audits <a href="https://github.com/${PHASE_TRACKER_REPO}/issues/1075">#1075</a>–<a href="https://github.com/${PHASE_TRACKER_REPO}/issues/1078">#1078</a> under umbrella <a href="${umbrellaUrl}">#${PHASE_TRACKER_UMBRELLA}</a>, resolved from the same live GitHub items as the tracked-issues table above (the page provenance stamp applies). Phase 12 progress counts the ordered steps in <a href="${PHASE12_ISSUE_URL}">#1235</a> against live issue state${phase12 ? ` (body fetched ${esc(phase12.fetchedAt)})` : ""}; other phases show no percentage — no machine-readable F-item mapping source exists for them yet, so the gap is stated rather than a number invented.</p>`;
const mappedProgress = phaseMapping ? deriveMappedProgress(phaseMapping.entries, items) : null;
const sourceLine = `<p class="muted">Source: the validation audits <a href="https://github.com/${PHASE_TRACKER_REPO}/issues/1075">#1075</a>–<a href="https://github.com/${PHASE_TRACKER_REPO}/issues/1078">#1078</a> under umbrella <a href="${umbrellaUrl}">#${PHASE_TRACKER_UMBRELLA}</a>, resolved from the same live GitHub items as the tracked-issues table above (the page provenance stamp applies). Phase 12 progress counts the ordered steps in <a href="${PHASE12_ISSUE_URL}">#1235</a> against live issue state${phase12 ? ` (body fetched ${esc(phase12.fetchedAt)})` : ""}; ${phaseMapping ? `Phases 11 and 13 progress counts the F-item mapping table in <a href="https://github.com/${PHASE_TRACKER_REPO}/blob/main/planning/roadmaps/id.md">planning/roadmaps/id.md</a> (read ${esc(phaseMapping.fetchedAt)}) against live item state; ` : ""}Phases 0–10 have no F-item numbering in their plans, so no percentage is shown for them — the gap is stated rather than a number invented.</p>`;
const rows = derivePhaseValidation(items)
.map((r) => {
const badge =
Expand All @@ -7294,12 +7298,17 @@ export function phaseTrackerPanelHtml(
.map((f) => `<a href="${esc(f.url)}">#${f.issueNumber}</a>`)
.join(" ")
: `<span class="muted">—</span>`;
const mapped = mappedProgress?.get(r.phase);
const progressCell =
r.phase !== 12
? `<span class="muted">not derived — no F-item source yet</span>`
: progress
r.phase === 12
? progress
? `<strong>${progress.done}/${progress.total} steps done (${progress.percent}%)</strong><br><span class="muted">${progress.open} open${progress.unresolved ? ` · ${progress.unresolved} not resolved in the current source` : ""} — from <a href="${PHASE12_ISSUE_URL}">#1235</a></span>`
: `<span class="muted">withheld — #1235 feed unavailable or stale</span>`;
: `<span class="muted">withheld — #1235 feed unavailable or stale</span>`
: mapped
? `<strong>${mapped.done}/${mapped.total} items done (${mapped.percent}%)</strong><br><span class="muted">${mapped.open} open${mapped.unresolved ? ` · ${mapped.unresolved} not resolved in the current source` : ""} — from the F-item mapping in planning/roadmaps/id.md</span>`
: r.phase <= 10
? `<span class="muted">not derived — this phase's plan has no F-item numbering</span>`
: `<span class="muted">not derived — F-item mapping unavailable in the current source</span>`;
return `<tr><th scope="row">Phase ${r.phase}</th><td>${badge}</td><td>${audit}</td><td>${followUps}</td><td>${progressCell}</td></tr>`;
})
.join("");
Expand Down Expand Up @@ -7472,6 +7481,7 @@ export function renderProgramProject(
buildHealth?: BuildHealthSnapshot | null,
f12?: { design: Phase12Snapshot | null; prRefs: Map<number, F12PrRef[]> | null } | null,
queueSnap?: QueueSnapshot | null,
phaseMapping?: PhaseMappingSnapshot | null,
): string {
const { config } = detail;
const linkBits: string[] = [];
Expand Down Expand Up @@ -7577,7 +7587,7 @@ export function renderProgramProject(
<p class="muted">Built only from already-published fleet data — the orchestration section this aggregator serves and the fleet's tracked issues. No new data pipeline feeds this section.</p>${programEntries(config.sweepHealth, items)}`
: "";

const phaseTrackerHtml = config.id === "id" ? phaseTrackerPanelHtml(items, phase12 ?? null) : "";
const phaseTrackerHtml = config.id === "id" ? phaseTrackerPanelHtml(items, phase12 ?? null, phaseMapping ?? null) : "";
const phase12Html = config.id === "id" && phase12 !== undefined ? phase12PanelHtml(phase12, items, queueSnap ?? null) : "";
const buildHealthHtml = config.id === "id" && buildHealth !== undefined ? buildHealthPanelHtml(buildHealth) : "";
const f12Html =
Expand Down
18 changes: 18 additions & 0 deletions pm-stack/aggregator/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ import {
projectConfigById,
} from "./project-config.ts";
import { PHASE12_REPO, parsePhase12Steps, type Phase12Snapshot } from "./phase12.ts";
import { PHASE_MAPPING_REPO, type PhaseMappingSnapshot } from "./phase-mapping.ts";
import type { BuildHealthSnapshot } from "./build-health.ts";
import { parseF12Items, type F12PrRef } from "./f12-readiness.ts";
import { identitiesFromRecords, type AuthorIdentity } from "./registry.ts";
Expand Down Expand Up @@ -3069,6 +3070,22 @@ async function handler(req: Request): Promise<Response> {
}
}
}
// #9923 step 3: the Phase tracker's F-item mapping snapshot
// (planning/roadmaps/id.md via the source), when the source
// carries one, with the mapped refs resolved into the items map
// like the phase12 steps above.
let phaseMapping: PhaseMappingSnapshot | null = null;
if (config.id === "id" && source.phaseMapping) {
phaseMapping = await source.phaseMapping().catch(() => null);
if (phaseMapping) {
const mapRefs = [...new Set(phaseMapping.entries.map((e) => `${PHASE_MAPPING_REPO}#${e.number}`))];
const missing = mapRefs.filter((r) => !items.has(r));
if (missing.length) {
const resolved = await source.items(missing).catch(() => new Map());
for (const [k, v] of resolved) items.set(k, v);
}
}
}
return html(
renderProgramProject(
buildProjectDetail(config, items, pool, rows),
Expand All @@ -3080,6 +3097,7 @@ async function handler(req: Request): Promise<Response> {
buildHealth,
f12,
queueSnap,
phaseMapping,
),
);
}
Expand Down
7 changes: 7 additions & 0 deletions pm-stack/aggregator/src/source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import type { SectionDiagnosis } from "./feed.ts";
import type { QueueSnapshot } from "./queue.ts";
import type { Phase12Snapshot } from "./phase12.ts";
import type { PhaseMappingSnapshot } from "./phase-mapping.ts";
import type { BuildHealthSnapshot } from "./build-health.ts";
import type { F12PrRef } from "./f12-readiness.ts";
import type { NeedsDrewCensus } from "./needs-drew.ts";
Expand Down Expand Up @@ -90,6 +91,12 @@ export interface Source {
* omit it and the panel renders unavailable instead of inventing
* a step list. */
phase12?(): Promise<Phase12Snapshot | null>;
/** The Phase tracker F-item mapping snapshot (#9923 step 3),
* parsed from planning/roadmaps/id.md in the code checkout;
* null = unavailable. Optional like phase12: sources that cannot
* read the checkout omit it and the panel withholds mapped
* progress instead of inventing it. */
phaseMapping?(): Promise<PhaseMappingSnapshot | null>;
/** The Actions-API build-health snapshot for the id section's
* Build health panel (#9924); null = not collected / unavailable.
* Optional like phase12: sources that cannot read the Actions API
Expand Down
Loading