Repository navigation
docs: re-land Kilo AGENTS.md and rewrite the v2 fork conventions - #15259
Conversation
Add one marked Kilo block to the root AGENTS.md (rung 4 in shared-patches.json), rewrite v2-fork-conventions.md for origin/v2 and the moving base, and rewrite v2-baseline.ts to take the pin from pinned() and mirror check.yml, test.yml and kilo-v2.yml. U-E0-03, #15175.
…md patch Regenerate the progress map (31 shared patches, 2 at rung 4), point the pinned-v2-baseline reproducer at the rewritten script, and install with --frozen-lockfile as CI does.
|
➖ v2 migration progress: 0.9% → 0.9% (0 done, 0 total, 0 dropped; 86/9829 cells) Placement: 11 new marked lines in shared files (11 patch), 0 new Ratchets: 9 core-internal imports (base 9); shared patches by rung 28 seam, 2 patch (base 28 seam, 1 patch). No change to the progress map. |
| process.exit(0) | ||
| } | ||
|
|
||
| const only = Bun.argv.includes("--only") ? new Set(Bun.argv[Bun.argv.indexOf("--only") + 1]?.split(",")) : undefined |
There was a problem hiding this comment.
SUGGESTION: --only with no value silently runs zero checks
When --only is the last argument, Bun.argv[indexOf("--only") + 1] is undefined, so new Set(undefined) is an empty set. The loop filter !only || only.has(check.name) then matches nothing, and the script prints a total and exits 0, which reads like a successful baseline run. The --only=test form is also not recognized and instead runs every check. Validate that a value follows --only and fail with usage rather than silently running zero or all checks.
There was a problem hiding this comment.
Fixed in 64c9494. --only with no names (--only, --only --force, --only=, --only=,) now exits 1 with usage instead of running zero checks; --only=a,b is accepted alongside --only a,b; unknown names still fail. All seven cases verified locally.
|
|
||
| Rules that apply once a package lands, kept here so the landing PR finds them: | ||
|
|
||
| - **`kilo-vscode` (G2): `virtua` patch.** v1 `main` pins `virtua@0.49.1` and patches it (`patches/virtua@0.49.1.patch`, adds `VirtualizerHandle.measure()`), and `kilo-vscode/webview-ui/src/components/chat/MessageList.tsx` calls `handle.measure()` for the transcript handoff-flicker fix. v2 has neither the dependency nor the patch. Port the patch with its call site, or neither, and do not bump `virtua` without both. |
There was a problem hiding this comment.
SUGGESTION: the v1 call-site path is missing the packages/ prefix
On v1 (origin/main) the file is packages/kilo-vscode/webview-ui/src/components/chat/MessageList.tsx, with the handle.measure() call around line 511, not kilo-vscode/webview-ui/.... Since this line tells the future landing PR where the call site lives, use the full repository path.
There was a problem hiding this comment.
Fixed in 64c9494: packages/kilo-vscode/webview-ui/src/components/chat/MessageList.tsx (verified with git ls-tree origin/main).
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Both findings from the previous review are resolved at Files Reviewed (7 files)
Previous Review Summary (commit 51e57ce)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 51e57ce)Status: 2 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (7 files)
Verified against the tree: Reviewed by deepseek-v4.1-flash-1017 · Input: 51.7K · Output: 7.5K · Cached: 697.2K Review guidance: REVIEW.md from base branch |
…l-site path --only without names now fails instead of running zero checks and exiting 0, and --only=a,b is accepted. Addresses the review on #15259.
# Conflicts: # migration-tracking/progress/README.md # migration-tracking/progress/progress.json # script/upstream/shared-patches.json
Plan unit U-E0-03 (pre-gate), issue #15175. Part of #15171.
The root
AGENTS.mdonorigin/v2is upstream's. It tells every session to base work onorigin/dev, which does not exist on Kilo's remote, and to test withbun run dev:liveagainst the installedopencodeservice, which the isolation rule forbids. This PR adds one Kilo block on top of it, rewrites the fork conventions fororigin/v2and the moving base, and makesv2-baseline.tsrun at the current base again.Changes
AGENTS.mdscript/upstream/shared-patches.jsonAGENTS.mdentry, rung 4; limitsfiles29→30,markedLines304→315 (base after #15261)migration-tracking/technical-notes/v2-fork-conventions.mdmigration-tracking/technical-notes/script/v2-baseline.tspinned(), ancestry assertions, CI mirrormigration-tracking/technical-notes/baseline/pinned-v2-baseline.mdmigration-tracking/progress/{README.md,progress.json}Acceptance
AGENTS.mdnames the integration branchorigin/v2, BASE and branch rules. The block covers the repository andgh -R,origin/v2and nevermainor upstreamdev,upstream/devas sync source and frozenupstream/v2, BASE throughpinned()ormigration-context.md(no SHA), branch, commit and Changesets rules,bun devonly (overrides "Live TUI Testing" and thedev:livestory command), plugin first then host (KiloPlugins,packages/kilo-cli), markers plusshared-patches.json, the two skills, checks.git diff origin/v2 -- AGENTS.mdis one hunk at line 1: 14 added lines, 0 removed.env KILO_V2_PROFILE=$(mktemp -d) bun dev --helpprints the CLI help throughscript/dev-isolated.tswith the temp profile;bun run checkexists (lint && typecheck) and passes;.kilo/skills/v2-migration/SKILL.md,.kilo/skills/v2-feature-placement/SKILL.md,packages/kilo-plugin/src/index.ts(KiloPlugins) andpackages/kilo-cliexist;pinned()is inscript/upstream/utils/upstream.ts.Conventions carry the base pin, no-prefix branches and
services/www. Per stale item ofdoc-inventory.md§4, re-verified on the current tree:76dbaf20pinned()andmigration-context.md, no SHAorigin/v2it targets)merge.tsandscript/upstream/README.md, then re-run the baseline and diff against the captureupstream/devupstream/devsibling, diverged at0e2dd4adupstream/devis the sync source,upstream/v2frozenvirtuapatchkilo-vscodelands, G2); verified v1mainhasvirtua@0.49.1+patches/virtua@0.49.1.patchand thehandle.measure()call inMessageList.tsx, v2 has neitherjohnnyeric/kilo-opencode-v2,johnnyeric/v2-*origin/v2, short no-prefix namesorigin/v2by mergejohnnyeric/prefix overridetype(scope): summarykeptownedinscript/upstream/utils/owned.ts;kilo-*packages added,plans/row removed (no rootplans/)packages/opencode.prettierignorenow has five entries, no workflow runs prettier, nocheck-md-table-padding.tson v2AGENTS.mdhookservices/www/openapi.json,packages/protocol/openapi.json, client pathssrc/{promise,effect}/generatedandsrc/effect/api(fromcheck:generated)packages/kilo-ide-uiexample replaced bypackages/kilo-plugin; checker commands andshared-patches.jsonaddedservices/www, CI files, the scriptscript/upstream/README.md, baseline; progress-plan link droppedThe plugin-first rung table, vocabulary and "Areas expected to need rung 3 or 4" are unchanged.
v2-baseline.tsruns at BASE (pin-is-ancestor assertion, mirrorscheck.yml/test.yml). See "Baseline run" below.(E0 exit)
AGENTS.mdand conventions name the current base and branch rules. Both point topinned()andmigration-context.md.Mechanism recorded: not a plugin concern (documentation and conventions).
Placement
AGENTS.mdAGENTS.mdis the only root instruction file every agent here reads (v2 core loads onlyAGENTS.md,core/src/config/plugin/instruction.ts). A Kilo-owned file viainstructionsin a rootkilo.jsonwould reach Kilo sessions only, and the contradicting upstream rules would still be in this file, so the override sits next to them. The evidence for an alternative is not clear, so I did not switchAGENTS.md:1-14,shared-patches.jsonentryMarker form: the block uses
<!-- kilocode_change start - agents-md: ... -->/<!-- kilocode_change end - agents-md -->, notkilocode_change(agents-md) start. Both counters recognize a block only whenstart/endfollowskilocode_changedirectly (script/upstream/utils/shared.ts:139-140,utils/markers.ts:55-56). With the tagged form,check-shared-patchescounted 2 marked and 9 unmarked lines and failed. The conventions now say so. Package-levelAGENTS.mdfiles are untouched.bun script/check-shared-patches.ts: before 29 files, 304 marked, 50 unmarked (origin/v2after #15261); after 30 files, 315 marked, 50 unmarked,ok.bun script/check-opencode-annotations.ts:ok (59 shared files against 775d1d0d713).bun script/check-workflows.ts:ok (3 workflows).bun script/upstream/progress.ts --check: up to date (after regenerating twice, identical output).Baseline run
v2-baseline.tsnow importspinned(), so a sync moves the pin without an edit. Offline assertions: the pin is an ancestor ofHEAD, and ofupstream/devwhen that ref exists locally. Theupstream/v2 == pinassertion is gone.--checksmirrorscheck.yml,test.yml(unit, sdk, build) andkilo-v2.ymlin CI order, withbun install --frozen-lockfileassetup-bundoes (a plainbun installreorderspatchedDependenciesinbun.lockon this tree).--only a,bre-runs a subset. Logs go tobaseline/logs/(gitignored,.gitignore:38logs/).Not mirrored, listed in the script:
lint:changed(PR only),affected/e2e(if: false), test shards and--affected(the baseline runs every package once with--force), Windows matrix, JUnit and artifact steps, thekilo-v2.ymlarchive/upload and progress comment, and the Node build on Node < 26 (CI pins 26.4.0).Ancestry at
HEAD(pin775d1d0d713,v2.0.30): bothok; 268 commits on top of the pin;upstream/dev121 past it. With a deliberately wrong pin (temporary edit toorigin/main35a7472549c, reverted): both assertionsFAIL, "baseline ancestry broken; refusing to run checks", exit 1.Full
--checksat5ac694c41f, macOS arm64, bun 1.4.2, node 24.13.0, 27.7 min:v2.0.30capture@kilocode/kilo-clisince). Uncachedbun turbo typecheck --force: 28/28, 32 sturbo test --concurrency=3 --continue --force, isolated)@opencode/core6,609 pass, 31 fail: the same 30 host-environment cases (7 shell, 23 ripgrep) plusNpm.add > installs and locates unnamed Git packages…(5 s timeout under load;test/npm.test.tsalone: 17 pass). cli and tui pass (capture: 1 load flake each)check:generated, sdkverify:packageENOTFOUND(DNS) thenETARGET wrangler@4.110.0; passed on re-run (204 s). Not in the capture--version, service smokescript/upstreaminstall, typecheck, testmerge.test.ts: 4 timeouts (5 s) in the full run, 2 in one re-run; 87/87 in four further runs. A load flake near the default timeout, not caused by this change (no code change)lint:effect-patterns, protocolcheck:generated(not CI)No new failure in a package this PR changes (it changes no package).
Overlap with #15020
#15020 lists "
script/v2-baseline.tsfrom U-E0-03" ("run the pinned baseline again after each merge"). This PR covers that row: the script follows each sync throughpinned()and runs the CI commands. The rest of #15020 (merge tooling, the counters, the marker guard, v2 modes of the merge agent and skills) is not touched.Stale statements found outside this PR's scope
migration-tracking/plans/migration-context.md:74: "theAGENTS.mdon this branch is upstream's until Kilo's is re-landed" is stale once this merges (coordinator).migration-tracking/plans/kilo-v2-migration-plan.mdU-E0-03 Status cell (coordinator).script/upstream/README.md:71: "Kilo host (U-E0-01) … It does not exist yet." The host merged in feat(kilo-cli): add the Kilo host and the feature placement finder #15232.script/check-workflows.ts:7: "The Kilo v2 line mergesupstream/v2regularly"; the sync source isupstream/dev.pinned-v2-baseline.mdcurrent capture names CI jobsunit (linux),unit (windows); they are now sharded (unit (linux, 1/2)…) plussdk packageandbuild (…)jobs. For the next re-measure.v2-feature-placement,v2-host-strategy.md§5): "every marked line carries its feature" cannot apply to block markers until the counters acceptkilocode_change(<feature>) start(U-L3-01 tooling)..prettierignorelistspackages/client/src/generated/andgenerated-effect/, which no longer exist (upstream file; informational).Checks
bun run check(root, pre-push hook) passes.bun script/upstream/progress.ts --checkup to date. Tests were not run from the root.