Skip to content

Fleet work-tracking framework — GitHub Projects (v2)

Status: ratified (amendment 0003, 2026-10-30; § 10 by 0005, § 11 by 0006) — amendment 0003, features github-projects-framework, projects-coverage-gate, projects-sync-console and PRD requirements projects-coverage, projects-sync, projects-scope-honest (fragments in features/features.d/; ids assigned at merge, amendment 0002). Spec (single source): templates/projects/framework.yml. Gate: python3 tools/projects_lint.py check.

1. Current state (audit 2026-10-29)

Area Finding
Projects (v2) None readable. gh project list fails for bamr87, year-of-ai, ai-world-view, bash-365, EissaLab and zer0-mistakes: the harness token has gist, read:org, repo, workflow, no read:project/project. Existence of projects is therefore unverified.
Open work bamr87: 145 issues / 62 PRs; year-of-ai 17/1; ai-world-view 8/0; bash-365 7/1; EissaLab 3/0 (gh search). fleet_triage.yml: 45 repos scanned, 128 open issues, 47 PRs, 18 repos red.
Labels (hub) 50 labels, overlapping vocabularies: GitHub defaults (bug, enhancement, documentation…), agent:* state machine (queued/ready/in-pr/blocked/hold/done), P0–P3, size:xs–xl, area:* (docs/a11y/feat/perf), and ad-hoc (daily-analysis, actions-review, optimization). docs and documentation, feature and enhancement duplicate each other.
Templates Hub: bug_report.yml, feature_request.yml, documentation.yml, page_feedback.yml + legacy custom.md, issue_template.md. None asks for a feature id or PRD req. bamr87/.github has workflow-templates/, no project workflow.
Milestones 0 in the hub; none used fleet-wide.
Flow today Issues → issue-pipeline (issue-pipeline.yml, _data/issue_pipeline.yml) labels agent:* → AI lane / bots open PRs → human merge. Status lives in labels and in _data/fleet_triage.yml / the console Work board, not in a project. Nothing links an item to HUB-NNN or FRn.

2. Design

Hierarchy

  • Fleet Portfolio (user-owned bamr87, so it can hold items from every org): every open issue/PR in the registry + hub. Views: Inbox, Board by Status, Roadmap by Iteration, By Repo, By Feature, Bots.
  • Domain projects (subsets, same fields): Platform & Harness, Sites & Content, Security & Dependencies, and an org program per org once it has >10 open items.
  • Domain membership is derived (repo / Area / labels) by the sync — items are never curated by hand in two places.

Fields

Status, Priority, Area, Repo (required); Size, Iteration (2 weeks), Owner (Amr or a bot team / JEV); Feature ID (HUB-NNN-style, any repo prefix) and PRD req (FRn/NFRn) required when an item changes a feature or requirement. Text fields, validated by pattern against features.yml/PRD, because single-select options cap at 50 and the fleet has hundreds of ids.

Lifecycle

Inbox → Triaged → Ready → In progress → In review → Done, plus Blocked and Won't do. agent:* labels become a mirror of Status (written by the sync), so the issue pipeline keeps working unchanged in phase 1–2.

Label harmonization

Canonical set = Priority (P0–P3), Size (size:*), Area (area:*, security, dependencies), type (bug, feature, chore, docs, ci, refactor, test), and the agent:* mirror. Aliases are renamed (documentation/docs→area:docs, enhancement/area:feat→feature, github_actions→ci); custom, optimization, daily-analysis, actions-review retire. The map lives in framework.yml; the existing standardize-fanout applies it per repo.

Automation

  1. Auto-add: reusable workflow bamr87/.github/.github/workflows/project-auto-add.yml (skeleton: templates/projects/auto-add.yml) using actions/add-to-project with a PROJECTS_TOKEN (GitHub App preferred over PAT).
  2. projects_sync.py (phase 2, hub): reconcile project fields/views from the spec; map labels→fields; mirror Status→agent:*; fill Feature ID/PRD req from issue forms or Refs: HUB-NNN / FRn in PR bodies; nightly from fleet-pulse.
  3. features ↔ project: each features.yml entry with status: planned|partial gets a tracking item (draft issue) in the portfolio; status changes propagate both ways; PRD requirements without an open item are reported.
  4. Issue forms gain optional Feature ID and PRD req inputs.

Governance

  • Constitution § 9 + amendment 0003 (this PR). tools/projects_lint.py: check (offline, in the gates now) and coverage (live; warning 30 days, then error). Reports scope_missing rather than passing silently (NFR-NEW:projects-scope-honest).
  • Console: dash-gen collector → _data/projects_board.yml (coverage per repo, untracked items, missing fields, WIP by Status/Owner) and a Projects panel next to Triage/Work.
  • MCP layer: read tool projects_board, confirm-gated write project_item_set (behind HARNESS_MCP_ALLOW_WRITES). Bots: Fleet Ops triages Inbox; Repo Janitor applies the label map; Security Warden owns the Security project; QA Lead moves In review→Done on verified evidence; Platform Architect owns the spec. JEV / conflict-triage consumes project Status instead of its own state once that stream lands (coordinated — no duplication here).

DevOps methodology

Constitution § 10 (amendment projects-devops-methodology, numbered at merge) adds the working rules on top of this framework: the Fleet portfolio project is user project #14; every task (including AI-agent and submodule work) is an item there with Status and Priority; multi-phase work is an epic (#6E40C9) with ordered sub-issues (scope, acceptance criteria, guardrails); no change to the live Mac before an approved deploy step; read-only-by-default tools; AI cost labelled "API-equivalent (estimate)". Phase 4 fan-out also adds a § 10 pointer to each submodule's AGENTS.md.

3. Rollout (all after ratification)

Phase What Gate
0 — ratify Merge this PR. Grant project scope (gh auth refresh -s project) or create the GitHub App / PROJECTS_TOKEN. Amr
1 — create Create Fleet Portfolio + Platform project from the spec; publish auto-add workflow v1 in bamr87/.github; wire hub + bamr87 repos. Backfill open items. coverage report (warn)
2 — sync projects_sync.py, label→field map, agent:* mirror, issue-form fields, features/PRD sync. The daily review that plans the sync is the PM review (tools/dash pm, fleet-pm.yml), which also covers the roadmap and the release train; its plans are applied through § 11. projects_lint coverage warn
3 — console collector, _data/projects_board.yml, Projects panel, MCP tools; bots switched to project Status. console test_pages
4 — fan-out Label harmonization + auto-add caller per repo via standardize-fanout, in waves: (a) hub, .github, zer0-mistakes; (b) bamr87 user repos; © year-of-ai, ai-world-view; (d) bash-365, EissaLab. Org programs created when >10 open items. per-wave PRs, never auto-merged
5 — enforce coverage becomes an error 30 days after ratification; milestones retired in favour of Iteration. quality gate

3a. Console surface and write-back (epic #468)

The console reads and writes Projects through two modules, governed by constitution § 11 (amendment projects-write-back, proposed):

Module Role
tools/console/gh_projects.py Read-only GraphQL over every owner (bamr87, year-of-ai, ai-world-view, bash-365, EissaLab), TTL cache, item normalisation, and the linked graph (project → item → issue/PR → commit → repo → FEAT/FR). A token without read:project returns scope_missing, never an error.
tools/console/gh_projects_write.py Write-back: mutation ALLOWLIST, deny words (merge, delete, settings…), plan() dry run with a deterministic plan_id and no-op detection, apply() only with HARNESS_PROJECTS_WRITES=1 + confirm=true + the same plan_id, stale-plan refusal, 50 ops/plan and 200/hour caps, redacted JSONL audit (state/audit/github-writes.jsonl, override HARNESS_PROJECTS_AUDIT).

Token: PROJECTS_TOKEN (else GH_TOKEN/GITHUB_TOKEN) with read:project to read and project plus issues/PR write on registry repos to apply; Amr provisions it in the console credential store or as an Actions secret. Phases: P0 #469 (this layer, flag off), P1 #470 read API + MCP + page, P2 #471 linked view, P3 #472 confirm UI + MCP write tools, P4 #473 auto-add + backfill #453, P5 #474 deploy (needs Amr).

The read half (P1, #470) is served three ways, all read-only and all from gh_projects.projects_view / items_view:

Surface What it answers
GET /api/gh-projects Every owner in OWNERS in one document: each ok with its projects, or scope_missing, error or skipped with the reason; status is fresh, partial, scope_missing or unavailable, with a hint; owner narrows it, closed=false drops closed projects, refresh skips the cache
GET /api/gh-projects/{project_id}/items One project's items, normalised (kind, repo#number, title, state, field values, FEAT/FR refs, closing issues, commits): the read stops at 500 (MAX_ITEMS) and says so (capped); limit (at most 500) and offset page it, status, kind and q filter it, counts cover every item read; 404 when the token cannot read the project
MCP gh_projects, gh_project_items The same documents, summarised by default (field names and the Status options; an item without its commit list), bounded by HARNESS_MCP_MAX_CHARS, annotated readOnlyHint; with no console they read in the MCP process (tools/console/docs/mcp-layer.md)
Fleet → GitHub Projects (/gh-projects) The owners with their read state, a project picker, and the items as a table or a board grouped by the project's Status options; on the published site it says it runs on a console

The token is PROJECTS_TOKEN when set, else the console's own GitHub identity (GH_TOKEN, GITHUB_TOKEN, then gh's login); an answer names its source (token_source), never its value, and every string in it passes through redact. Answers are cached for TTL_SECONDS (10 minutes) per token source; GitHub's GraphQL endpoint answers no conditional request (no ETag), so the cache is the TTL alone, and only an answer that reflects GitHub's view is kept. Two budgets bound a read: a sliding window of GraphQL calls shared by every read in the process (CALL_BUDGET = 60 per 600 s) and a wall clock per answer (15 s by default, at most 60, under the MCP client's 20 s timeout); past either, the answer is partial and says which owner or page was not read. Nothing on these surfaces writes: no route takes anything but GET, no MCP tool is a write tool, and gh_projects_write.py is never imported by them (test_gh_projects.py, test_console.py, test_mcp_layer.py). The data is never part of the public snapshot, because a private project's title must not reach Pages (test_pages.py).

3b. The backfill and triage pass (dash projects, rollout phase 1)

Phase 1 of the rollout — every open issue and PR on the Fleet project with Status and Priority set (#453, the backfill P4 #473 hands to it) — runs as a reviewed pass, not a bot: the maintainer's decisions live in _data/projects_backfill.yml (projects-backfill/v1), and tools/projects_backfill.py turns them into the § 11 service's ops, previews them and applies them only after the confirmation § 11.4 requires. Committing a change to the decisions file is the review; applying it is a second, explicit step.

Command What it does Writes
tools/dash projects inventory [--live] open issues and PRs per registry repo, from the committed triage snapshot (_data/fleet_triage.yml) or the API nothing
tools/dash projects plan [--board] compiles the decisions (closes with completed / not_planned, label adds and removes, sub-issue links) into issue.* ops, reads each target's current state through REST, batches them under the 50-op cap and prints every batch as before → after with its deterministic plan_id; --board adds the Fleet project items — item.add for open issues and PRs missing from the project, then item.set_field for Status, Priority and Area derived from labels (framework.yml labels.canonical first, the file's board: rules second, defaults last) a preview under .fleet/backfill/ (gitignored)
tools/dash projects plan --board [--repos registry] [--closed-since D] [--closed-before D] [--closed-only] [--max-items N] widens the board targets (#453): --repos registry plans the hub plus every registry repo instead of the decisions file's repo alone; --closed-since / --closed-before (YYYY-MM-DD, either open-ended) add the items closed in that window, which derive Status Done, with --closed-only dropping the open items; items the 2026-10-03 cleanup closed as not_planned that day are never targeted (board.exclude.closed_not_planned_on in the decisions file); the project is read up to --max-items (default 20000, not the console's 500) so an item already on it is never planned as a second add; the preview lists per-repo counts and the PR → issue closes links found on the project for review a preview under .fleet/backfill/ (gitignored)
tools/dash projects apply FILE --confirm [--batch N] applies a previewed file batch by batch through gh_projects_write.apply — the flag, the matching plan_id, the stale-plan refusal, the 200-ops-an-hour cap and the redacted audit log all come from the service; each applied batch is appended to the decisions file's applied: ledger GitHub, only with HARNESS_PROJECTS_WRITES=1

Issues and pull requests go through REST (gh api), so the issue half runs anywhere gh is logged in to the hub. Project items need GraphQL, which a Claude Code cloud session cannot reach (the session proxy refuses both graphql and the Projects REST preview), and which a token without read:project cannot read: the tool then reports graphql_unavailable and plans nothing for the board rather than failing or guessing. Run plan --board where gh api graphql works — the Mac, with PROJECTS_TOKEN (§ 11.7) exported or the ambient login refreshed with gh auth refresh -s project — and apply from there. A board plan is two passes by design: items are added first, and their fields are set by a second plan once the items exist. Status follows the pipeline's own precedence (agent:hold > agent:done > needs-amr > agent:in-pr > agent:blocked > agent:ready), a needs-amr item lands on Needs Amr when the project has that option (§ 12.4) and on Blocked otherwise, an open PR is In review (In progress while a draft), and a closed item is Done.

Phasing the fleet backfill (#453). The § 11 service applies at most 200 ops an hour, and each item new to the project costs up to four ops (add, then Status, Priority, Area), so the fleet backfill runs as resumable phases: phase 1 is plan --board --repos registry (every open item), phase 2 adds --closed-only --closed-since <90 days ago>, and phase 3 --closed-only --closed-before <that day>. Each phase is planned, applied in batches over as many hours as the cap needs, and re-planned until the plan shows 0 changes; the applied: ledger and no-op detection make a re-plan idempotent. How far back to go is the maintainer's call at apply time; the tool is the same for every choice.

The 2026-11-04 pass. All 171 open hub issues were reviewed against the merged PRs, the amendment log and every fleet repo's latest main runs. The decisions: 35 closes — 25 completed where the fix is named (a merged PR, an upstream fix, a green run), 10 not_planned where the doctor's own ticket says the red run was not a workflow defect and the signal has cleared (billing blocks, usage windows, a restructured workflow); 65 label additions so every open issue carries a type and a priority from the pipeline taxonomy; 13 removals (the enhancement alias → feature, and agent:queued left behind a later stage); two priority corrections named in the file; and 10 sub-issue links that turn #454, #455, #526, #588 into epics and hand #453 to epic #468. The board half waits for a machine that can reach GraphQL. Everything the file decides carries its evidence in why:, and every change is one line to revert.

4. Post-ratification actions (not done in this PR)

Grant token scope; create projects/fields/views; publish the reusable workflow; add PROJECTS_TOKEN secret; rename/retire labels; edit issue forms; add callers per repo.