Skip to content

docs: record Phase 1's tasks and the review process in the process files - #48

Merged
shubhook merged 4 commits into
mainfrom
t3/docs-process-refresh
Nov 29, 2026
Merged

shubhook merged 4 commits into
mainfrom
t3/docs-process-refresh

Conversation

@shubhook

Copy link
Copy Markdown
Owner

Task: T-004, tasks/TEMPLATE.md (process files). Documentation refresh, Thread D1.

PRD: none

What changed

Brings docs/plan.md, AGENTS.md, tasks/TEMPLATE.md and .github/pull_request_template.md up to date with the process as PRs #34 to #45 ran it. All four files were last changed on 13 October 2026. Every edit is inside Khakha's grant, quoted under "Grants". Four commits, one per file, on main at 3566348.

docs/plan.md (04caafe)

  • First tasks. New rows: T-006, T-110, T-111 and T-114, done, and T-112, planned. Crate, PRD and After come from each task file. A line under the table says every task is done except T-112. The paragraph above it now says the table covers Phases 0 and 1 and their follow-ups. The Decisions table is unchanged.
  • Roadmap status line: "Status, 28 November 2026: Phase 1's code is complete, with every task listed under "First tasks" merged except T-112, a planned follow-up." I left out the gate sentence. See "The gate sentence" below.
  • How agents do the work. The spec parts now include choices and open questions. The loop names the stubs and ignored tests, and says that without a grant the implementer only deletes #[ignore] lines. New paragraphs cover follow-up tasks, written grants, the council, speed targets, controlled comparisons and main's baseline.
  • In T3 Code. Items 1 to 5 are unchanged. Item 6 is the orchestrator and its sub-agents. Item 7 is the fallback when an agent hits its usage limit.

AGENTS.md (88868b3)

  • Commands now match .github/workflows/ci.yml: --locked on test, clippy and bench, and cargo deny --all-features --locked check. cargo build --workspace stays, marked as a local step with no CI step of its own. A new paragraph says how CI's bench job runs.
  • Four new rules: written grants; not reading another editor's Vim emulation; reporting benchmark numbers (where from, local labelled, mean or fastest median named); refreshing the baseline only through refresh.sh. Every existing rule is unchanged.

tasks/TEMPLATE.md (855e66e)

Adds "Choices made and rejected", after "Crates and public interface", and "Open questions for Khakha", at the end. That matches where T-109 and T-112 put them.

.github/pull_request_template.md (cdf4ec0)

Adds $ cargo bench -p helm-bench to "Commands run", a "Grants" section after "What changed", and a "Council review" section before "Agent and model". That's where PRs #38, #41, #42 and #45 put them.

Where each claim comes from

Claim added Source
T-006 row: crate, PRD NF-7, after T-005 tasks/006-bench-baseline.md; the same row PR #39 proposed under "Process notes"
T-110 row: helm-text, ED-2, after T-102 and T-103 tasks/110-amend-transactions.md
T-111 row: helm-editor, ED-5 and NF-1, after T-108 tasks/111-t108-fixes.md
T-112 row: helm-editor, ED-2 and ED-4, after T-109, planned tasks/112-vscode-undo-groups.md on PR #46's branch t3/t112-vscode-undo-groups-spec, not merged
T-114 row: helm-editor, ED-5 and NF-1, after T-109 tasks/114-t109-followups.md
Phase 1's code complete, every listed task merged README.md Status (PR #43); merges of PRs #39, #41, #42, #45 in git log origin/main
Specs carry choices made and rejected tasks/105 to tasks/110 ("Choices I made, and the ones I rejected" / "Choices I rejected"), tasks/109, tasks/112 on PR #46
Specs carry open questions with defaults, answers quoted tasks/109-vim-objects.md "Open questions for Khakha"; PR #37 and PR #40 "Open questions for Khakha"; tasks/112 on PR #46
Spec PR has todo!() stubs and #[ignore]d tests; the implementer only deletes the ignore lines PR #37, PR #40 "What changed"; tasks/110-amend-transactions.md "The rule for the implementer"; PR #34, PR #38 commit 3
A follow-up task puts its task file and work in one PR PR #39 ("the task file and its change in one PR"), PR #41, PR #45; tasks/111 and tasks/114 Goal
The label grants nothing by itself PR #37 "The label grants no edit outside this task's paths"
Written grants quoted word for word, own commit where asked PR #34 (chunk_at grant, commit beecec4), PR #38 (Stage 0 and follow-up grants), PR #41 (finding 4, commit 3b13012), PR #42 (a6c9cff), PR #45 (grant 3, commit 012a0d4)
Stop and ask if an unnamed assertion would change Khakha's grants quoted in PR #38 ("If any other existing assertion would have to change, stop and tell me") and PR #45 ("If any of 1 to 3 would change an assertion in an existing test, stop and tell me which one")
Council: Claude Code, Codex and Cursor delegates; overall and performance scores; SATISFIED or NOT SATISFIED PR #37, #38, #41, #42, #45 "Council review" tables
Scores are not averaged to override an objection PR #34 "Outcome: no consensus" paragraph
Implementation PRs go round until all three are satisfied PR #34 (4 rounds), PR #42 (3), PR #45 (2), PR #41 (2)
A spec PR gets at most one round PR #37 ("This is the only council round for this spec. Khakha reviews and edits the spec before merge."); PR #40 had no council; PR #46 plans one round
A PR merged before its round finished leaves its findings to a follow-up PR #38 "merged as 4e92574 before the round finished"; T-111 (PR #41)
README-only and baseline-refresh PRs get no council PRs #36, #43, #44 have no council section
budgets.toml is the only gate; 5% default crates/helm-bench/budgets.toml; .github/workflows/ci.yml bench job
Base and head alternate three rounds on one runner; fastest of three medians ci.yml (ROUNDS: 3, "each side keeps its fastest median"); PR #38 "How the numbers are aggregated"; PR #35
Speed targets are ungated review aids, reported as CI criterion means from the artifact Khakha's answer 7 quoted in PR #38; tasks/108 Performance budget; tasks/109 line 200; tasks/111 Performance budget
Controlled comparison before calling a regression noise PR #40 (artifact rounds and nm, "The cause is in this PR, not noise"); PR #38 (instruction counts); PR #41 (same benchmark file, two editor/vim.rs versions); PR #42 (x86_64 instructions compared); PR #45 ("Since nothing passed the gate, I ran no controlled comparison")
main.toml, refresh.sh <full sha>, 90-day artifact, nothing reads it tasks/006-bench-baseline.md; crates/helm-bench/baselines/refresh.sh header; PR #39; PR #44
Orchestrator, design and implementation sub-agents, Stage 0 answers PR #37 and PR #40 ("design sub-agent"), PR #38 ("implementation sub-agent", "Stage 0 answers"), PR #41 ("The orchestrator limited this pass"), PR #45 ("as the orchestrator relayed them")
Usage-limit fallback to Cursor with the same model, noted in "Agent and model" PR #41 "Agent and model"; PR #40 commit 7dedad4; PR #39 (council slot filled by Cursor Claude Opus 5.5)
CI commands with --locked and cargo deny --all-features --locked check .github/workflows/ci.yml (cargo-deny job runs EmbarkStudios/cargo-deny-action with command: check, arguments: --all-features --locked); run locally, see "Commands run"
Vim behaviour from :help and running Vim, never another editor's emulation PR #37 and PR #40 Outside sources ("I didn't read Vim's source or any other editor's Vim emulation"); PR #38, #41, #45
Benchmark numbers: artifact or summary, local labelled, mean or fastest median named PR #38 (the correction "An earlier version of this description wrongly called the run 1 and run 2 numbers means"); PR #34 ("Local timings ... do not substitute"); PR #41, #42, #45

The gate sentence

I left out "Phase 1's gate passed on ". No merged PR description, commit message or file records Khakha ruling that the gate passed. README.md (PR #43) says "the Phase 1 gate is under review", and git log origin/main has no commit about a gate ruling. Add the sentence when Khakha rules.

The T-113 row

I left out T-113. The grant asks for its crate, PRD IDs and After "from its task file", and no task file for T-113 exists on main, on any branch of origin, or in any PR. Proposed row, to add once its task file exists, with the values from that file:

| T-113 | <title from tasks/113-*.md> | <crate> | <PRD IDs> | <After> |

T-114's "Out of scope" says Khakha asked for a follow-up task to follow Vim's forward bracket search within the 1 MiB cap. I don't know that this is T-113, so I didn't fill anything in.

On the grant's wording

The grant says T-108 to T-114 use "Choices made and rejected" and "Open questions for Khakha". In the repo, "Choices" sections are in T-105 to T-110 (tasks/111 and tasks/114 have none), and "Open questions for Khakha" is in tasks/109 only, plus T-112 on PR #46. T-108's open questions were in PR #37's description, not its task file. The template sections are added as granted, and the citation table above names the files that do have them.

Protected paths

All four files are protected (any docs/**, any .github/**, any tasks/**, any AGENTS.md in .github/protected-paths.txt). The protected-paths check fails until Khakha adds the approved-protected label. I haven't added or removed any label.

No new dependency, no unsafe, no code. No crate, test, benchmark, budgets.toml, workflow, docs/prd.md, docs/research.md, tasks/112-*, tasks/113-* or tasks/2NN-* file changes.

Grants

Khakha's Stage 0 grant, quoted word for word as the orchestrator relayed it:

Grant from Khakha for the documentation refresh, 28 November 2026:

  • Thread D1 may edit docs/plan.md, AGENTS.md, tasks/TEMPLATE.md and .github/pull_request_template.md. Thread D2 may edit tasks/006-bench-baseline.md, tasks/101-.md to tasks/111-.md, tasks/114-*.md and README.md.
  • In docs/plan.md: add rows to 'First tasks' for T-006, T-110, T-111 and T-114 as done, and for T-112 and T-113 as planned, each with crate, PRD IDs and After from its task file; update the paragraph above the table so it says the table now covers Phase 1 and its follow-ups. Add a short status line under the Roadmap table: Phase 1's code is complete, with every task listed merged. [Keep the next sentence only if I have ruled on the gate:] Phase 1's gate passed on . Update 'How agents do the work' and 'In T3 Code' to describe the process as it now runs: the three-delegate council and when it applies, written grants for edits to protected files, quoted in the PR; speed targets as ungated review aids with only budgets.toml's gate; bench-compare's fastest of three medians; a controlled comparison before a regression is called noise; the committed baseline in crates/helm-bench/baselines/ and its refresh script; and the agent fallback when one hits its usage limit. Don't change the Decisions table.
  • In AGENTS.md: make the Commands section match .github/workflows/ci.yml (including cargo deny check and --locked), and add rules for written grants, not reading another editor's Vim emulation, reporting benchmark numbers (CI artifact, labelled local, mean or fastest median named), and refreshing the baseline. Keep every existing rule.
  • In tasks/TEMPLATE.md: add 'Choices made and rejected' and 'Open questions for Khakha' sections, as T-108 to T-114 use them.
  • In .github/pull_request_template.md: add cargo bench -p helm-bench to Commands run, and add 'Grants' and 'Council review' sections.
  • In tasks/ files: where an open question has an answer recorded in a merged PR's description or a later task file, mark it answered and quote or cite the answer. Don't change any task's interface, rules, acceptance tests or budget text.
  • In README.md: add T-114 to the Status list.

Anything else goes into the PR description as a proposal.

The tasks/ and README.md items belong to Thread D2, and this PR doesn't touch them.

Proposals outside the grant

None of these is made in this PR. Each gives the exact text I would write.

Process files

  1. AGENTS.md, "How a task works", step 4. PR editor: T-114, follow up Khakha's answers on PR #42 #45 marked itself ready while protected-paths waited on the label (its council round 2, item 2, citing the brief's rule 10). The step says "Mark it ready only when CI is green." Proposed: "Open a draft PR using the PR template. Mark it ready when CI is green, apart from a protected-paths check that waits only on Khakha's label." docs/plan.md "In T3 Code" item 2 would change to match: "The thread's branch becomes the task's PR. Use a draft PR until CI is green, apart from a protected-paths check that waits only on your label."
  2. AGENTS.md, "How a task works", step 1. Since PR editor: implement Vim modes, motions, operators and counts (T-108) #38 the brief has been the task file plus an orchestrator's brief with Khakha's answers, grants and allowed paths (PR editor: implement Vim modes, motions, operators and counts (T-108) #38 "Stage 0 answers", PR editor: Vim text objects, registers, . repeat, counted inserts and :w :q :e (T-109) #42 "the Stage 1 brief", PR editor: T-114, follow up Khakha's answers on PR #42 #45 "rule 10 of the brief"). Proposed: "Start from the task file in tasks/ (format in tasks/TEMPLATE.md). It is the whole brief, apart from Khakha's answers and grants, which an orchestrator's brief may add." docs/plan.md "In T3 Code" item 1 would get the same clause.
  3. AGENTS.md, "Commit messages". Cursor's harness appends Co-authored-by: Cursor <cursoragent@cursor.com> after Refs: (PR bench: commit main's benchmark baseline and a script to refresh it (T-006) #39 "Process notes", PR editor: fix the open council findings on T-108 (T-111) #41 round 2). That happened on this branch too, and I rebuilt the four commits with git commit-tree before pushing. Proposed new last paragraph: "Refs: is the last line. If your tool appends a trailer after it, rebuild the commit without it before you push."
  4. .github/pull_request_template.md, Commands run. The grant adds cargo bench -p helm-bench as written, so the block's flags still differ from AGENTS.md. Proposed block:
    $ cargo build --workspace
    $ cargo test --workspace --locked
    $ cargo fmt --all --check
    $ cargo clippy --workspace --all-targets --locked -- -D warnings
    $ cargo deny --all-features --locked check
    $ cargo bench -p helm-bench --locked
    
  5. README.md, "Building and testing" (Thread D2's file, not in D2's grant either). It lists cargo deny check --all-features --locked. With cargo-deny 0.20.2 that exits with a usage error, because --all-features and --locked are options of cargo deny, not of check. Proposed: cargo deny --all-features --locked check.
  6. AGENTS.md, Vim rule. PRs editor: add T-108 spec, Vim keymap and count stubs and acceptance tests #37, editor: T-109 spec: Vim text objects, registers, repeat, counted inserts and :w :q :e #40 and editor: T-114, follow up Khakha's answers on PR #42 #45 also say they didn't read Vim's own source, only :help and Vim's behaviour. If Khakha wants that as a rule too, proposed sentence after the new Vim rule: "Don't read Vim's source either."
  7. tasks/109-vim-objects.md, open question 6 (Thread D2's file). It still reads "default: unbounded", but Khakha's answer on PR editor: Vim text objects, registers, . repeat, counted inserts and :w :q :e (T-109) #42, quoted in tasks/114-t109-followups.md, capped the scan at 1 MiB. D2's grant covers this; I note it only so it isn't missed.

Decisions table (proposal only; I changed no row)

  1. Perf hardware. The row says "each PR is compared with its base commit on the same runner". Since PR ci: shard the PR bench job across parallel runners #35, each benchmark's base and head run on one runner, and different benchmarks can run on different runners (ci.yml comment above bench-plan). Proposed: "...and each benchmark in a PR is compared with its base commit on the same runner, since shared runners are too noisy for fixed millisecond limits or for comparing against earlier runs."
  2. UI toolkit (the GPUI pin). Nothing merged bears on it. No crate depends on gpui, Cargo.lock has no gpui entry, crates/helm-ui has only path dependencies, and no PR from editor: implement VS Code keymap and cursor motions (T-107) #34 to editor: T-114, follow up Khakha's answers on PR #42 #45 mentions GPUI. The merged work kept platform and window concerns out of the headless crates: key events become KeyEvent in helm-ui (tasks/106 lines 156 and 243), and T-109's Requests and Session::set_clipboard leave files, windows and the pasteboard to helm-ui (PR editor: T-109 spec: Vim text objects, registers, repeat, counted inserts and :w :q :e #40). That fits the decision but doesn't test it. The row's "version 0.2.2 on 13 October 2026" is a dated observation. Proposed: no change now. Phase 2's first helm-ui task records the gpui version it pins and checks it builds with the pinned toolchain (rust-toolchain.toml, 1.99.0). The row is updated then if the version differs.

PRD (proposal only; I changed nothing in docs/prd.md)

  1. ED-5, Acceptance: "A Vim test suite of keystroke sequences and expected buffers passes". This can read as Vim's own test suite, which nothing runs. What merged is Helm's own tables (tests/vim_normal.rs, vim_visual.rs, vim_objects.rs, vim_registers.rs, vim_repeat.rs, vim_ex.rs, vim_t114.rs, and oracles in vim_oracle.rs), with rows run through Vim 9.1. Every difference is listed in crates/helm-editor/src/vim.rs "Measured against Vim": 8 of 234 normal-mode rows in T-108 (PR editor: add T-108 spec, Vim keymap and count stubs and acceptance tests #37), 4 of 204 rows in T-109 (PR editor: T-109 spec: Vim text objects, registers, repeat, counted inserts and :w :q :e #40), five kinds of multiline d/c difference in T-111 (PR editor: fix the open council findings on T-108 (T-111) #41), and four in T-114 (PR editor: T-114, follow up Khakha's answers on PR #42 #45). Khakha kept each one. Visual-mode d and c weren't measured (vim.rs, T-111). Proposed acceptance: "Helm's tables of keystroke sequences and expected buffers pass. Rows are run through Vim 9.1, and every row that differs is listed in vim.rs's 'Measured against Vim' with Khakha's decision."
  2. ED-5, Requirement. "motions" doesn't say whether f, t, F, T, ;, , and r are in v1. Khakha put them in their own task after T-109 (answer 6, quoted in PR editor: implement Vim modes, motions, operators and counts (T-108) #38), and no task file for them exists. Proposed requirement: "Vim keymap as a mode: normal, insert, visual and visual-line; motions including f t F T ; ,, operators, r, counts, text objects, registers, . repeat, :w :q :e". Or, if they wait past v1, list them under "Out of scope for v1".
  3. NF-1, Target "under 5 ms average". An average over a scripted typing run hides a single slow key. T-109's di( with no pair took 3.95 to 8.00 ms of command time on CI, with no rendering counted (PR editor: Vim text objects, registers, . repeat, counted inserts and :w :q :e (T-109) #42, vim_objects/di_paren_no_pair_10mb). T-114 capped the scan at 1 MiB for that reason, which makes Helm differ from Vim on purpose (PR editor: T-114, follow up Khakha's answers on PR #42 #45: 754.26 µs average of the means on its first run). The cap is per cursor, so N cursors with no pair can still read N × 2 MiB in one key (PR editor: T-114, follow up Khakha's answers on PR #42 #45, council round 1, finding 4). T-108, T-109, T-111 and T-114 cite NF-1 but time only the command, as tasks/108 says. Proposed target: "under 5 ms average over a scripted typing run, and no single key's command over 5 ms on a 10 MB file with one cursor". Proposed CI column unchanged.
  4. NF intro: "Every NF item with a number is checked in CI on hosted runners against the PR's base commit". NF-1 to NF-6 are absolute limits, and a check against base can't enforce one. The perf-hardware decision says fixed millisecond limits on shared runners are too noisy, which is why task speed targets became ungated review aids (PR editor: add T-108 spec, Vim keymap and count stubs and acceptance tests #37 open question 7; Khakha's answer 7 in PR editor: implement Vim modes, motions, operators and counts (T-108) #38). Proposed: "NF-7 is gated in CI against the PR's base commit. NF-1 to NF-6 are absolute targets. Phase 2 produces their first measurements, and how CI checks each one is decided when its benchmark exists."
  5. NF-7, "Rope edits and offset lookups | no regression over 5%". budgets.toml applies 5% to every criterion benchmark: rope, but also cursor/, keymap/, editor/, vim/ and vim_objects/. The gate is the fastest of three medians against base on one runner. Proposed row: "NF-7 | Rope edits, offset lookups and editing commands | no benchmark more than 5% slower than the PR's base commit | criterion microbenchmarks, base and head on one runner, fastest of three medians, thresholds in budgets.toml". One more data point for Khakha: in PR editor: implement Vim modes, motions, operators and counts (T-108) #38, the same resolve code measured +4.48% and +5.02% on two runs, so the 5% line sits near run-to-run spread for some benchmarks.

Commands run

Local, macOS (aarch64), at 04caafe..cdf4ec0. Documentation only, so the brief asked for fmt and build once.

$ cargo build --workspace                       # exit 0
$ cargo fmt --all --check                       # exit 0
$ cargo deny --all-features --locked check      # exit 0: advisories ok, bans ok, licenses ok, sources ok
$ cargo deny check --all-features --locked      # usage error (README's form; see proposal 5)

cargo test, cargo clippy and cargo bench -p helm-bench were not run locally: no Rust, Cargo or benchmark file changed. CI runs them on this PR.

Outside sources

  • cargo deny --help (cargo-deny 0.20.2), for the flag order.
  • EmbarkStudios/cargo-deny-action's arguments and command inputs as ci.yml uses them.

Otherwise the repo and the descriptions of PRs #34 to #46.

Council review

None. This PR changes documentation only, and the brief said not to run one.

Agent and model

Cursor agent in T3 Code, Claude Opus 5.5 (claude-opus-5-5), as Thread D1's implementation sub-agent. Neither changed during the thread.

Adds T-006, T-110, T-111, T-112 (planned) and T-114 to "First tasks",
a Phase 1 status line under the Roadmap, and the process as PRs #34 to
#45 ran it: written grants, the council, speed targets as review aids,
controlled comparisons, main's baseline and the usage-limit fallback.

Refs: T-004
The commands now carry --locked and cargo deny, as ci.yml runs them.
New rules cover written grants, other editors' Vim emulation,
benchmark numbers and refreshing main's baseline.

Refs: T-004
@shubhook
shubhook marked this pull request as ready for review November 28, 2026 17:04
@shubhook shubhook added the approved-protected Khakha approves a change to a protected path. Agents never add or remove it. label Nov 28, 2026
@shubhook
shubhook merged commit 23b1862 into main Nov 29, 2026
15 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved-protected Khakha approves a change to a protected path. Agents never add or remove it.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant