Repository navigation
docs: crew lanes keep context cheap (bounded warm waits, lane start card, names-only AGENTS.md index) - #4060
Merged
Merged
Conversation
…) and a names-only AGENTS.md index Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ane-card fallback and exemptions) Review-Finding: p1/targeted#1 reader=targeted Review-Finding: p1/adversarial-native#1 reader=adversarial-native Review-Finding: p1/red-team#3 reader=red-team Review-Finding: p1/red-team#4 reader=red-team Review-Finding: p1/red-team#5 reader=red-team Review-Finding: p1/red-team#6 reader=red-team Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
4 tasks done
capy-ai Bot
added a commit
that referenced
this pull request
Nov 6, 2026
* runaway: warm-wait check-ins are not empty wakes (GST-1597) lib/runaway.ts counted each 240-second warm-wait check-in (docs/captain.md, #4060) as an empty wake, so /runaway-stopper could flag a lane that follows the rule. A turn whose only call re-issues the wait on the same operation, or a 240-second timer, within 30 minutes of the wait that started the run is now left out of the rate. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix: pre-landing review fixes Review-Finding: p1/specialist-batched#1 reader=red-team Review-Finding: p1/specialist-batched#2 reader=testing Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * docs: note the warm-wait exclusion in the /runaway-stopper summary; rewrap captain.md (GST-1597 docs audit) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * runaway: keep wait input in the skill collector; 240 s timers chain only on the run's operations; status reads keep the warm window (GST-1597) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --------- Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
docs/captain.md gains a Lane context section: bounded warm waits, batched reads, the lane start card and a tail check.
Before/after as text: docs/captain.md gains a Lane context section: bounded warm waits, batched reads, the lane start card and a tail check
Why
Plan GSTA-330 found that lanes pay mostly for re-read instruction text and for cold restarts after idle waits, not for checks. Garry said "Do it" on all six items. This PR carries four of them. Lanes keep their prompt cache warm through short waits, with a 30-minute cap, and batch their reads. They read a 4.5 KB start card instead of the whole Capy skill. A lane past twice the median spend now hands off before it reaches the hard stop. AGENTS.md also stops loading about 9.8 KB of skill tables into every session.
Blast radius
Only docs and prompt text change: AGENTS.md, docs/captain.md, docs/unattended.md, docs/skills.md, the captain brief template, the Capy gstack skill (SKILL.md plus the new lane-card.md) and one test. No bin, lib or generated file reads the AGENTS.md tables. The adversarial reader grepped scripts/, lib/ and bin/ for that and found only
## Skill routingprobes, which still match. SKILL.md stays under its 5,315-token eager budget (context-budget-ratchet passed), and CI Free Tests passed at this exact tree (run 42180117992).Approvals
Approved: yes (record r-c95fcb190c3c). The full approval record stays private: this repository is public or its visibility is unknown.
Garry, 2026-11-06: "Do it" on plan GSTA-330, decision D1 (all six items at full scope). This PR carries L1, L3, L4 and T1.
Summary
Crew lanes were spending most of their budget re-reading instructions and restarting cold after idle waits. Lanes now warm-wait short waits for 30 minutes at most, batch independent reads, and start from a short lane card. Past twice the median lane spend they write a handoff. AGENTS.md becomes a names-only skill index that points to docs/skills.md, and the /cso catalog details it alone held moved to docs/skills.md. A review fix round then bounded the warm wait and replaced a claimed but undefined "three times the median" stop with the crew's own spend stop. The same round fixed the brief's wait to watch the operation and filled in the lane card's plan exemptions.
Test Coverage
The diff is docs and skill prose, so the Step 7 audit covered its contracts. 6 of 10 paths are tested (60% value-weighted). The tested paths: the lane card cites real SKILL.md sections and stays under 6,800 bytes, SKILL.md points to it, docs/captain.md carries the Lane context rules (now including the warm-wait cutoff), and the brief has a
Read:line. The untested paths are prose that a test would only copy: the brief'sContext:line, the unattended.md cross-reference, the docs/skills.md /cso paragraph and the changelog fragment.Tests: 1726 → 1726 files (+0 new files; one assertion added to the existing lane-card test in test/captain-skill.test.ts for the warm-wait cutoff).
Test value: 0 tests written, 2 rejected by the authoring gate, 1 existing test extended, 1 path weakly covered.
Tests ran: test 1601 (carried from CI run 42180117992 at tree 0d9e05b75f86)
Pre-Landing Review
Pass 1 (full depth, 5 dispatches plus the coverage audit) found 2 blocking items. The fix round in 4c62cbc closed both, plus four informational items. Pass 2 (the fix range, 3 dispatches) found one informational note.
Context:line said to wait with a 240 s timer without naming the operation, which lets a Capy machine sleep and kill the work being waited on. It now says to wait on the operation.REVIEW_LOOP: passes=2 blocking_found=2 deferred=0 noted=1 fixed=6 scope=frozen ledgers_read=2 dispatches=8
Gate edits: none detected (1 listed, 0 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)
Outside review: openai/gpt-6.1-sol (a Capy subagent, cross-family, at reasoning high, outside the certified medium setting) completed with no actionable findings.
Review notes
Below the blocking floor (advisory, informational, test-gap or wording items); recorded here and not fixed in this PR.
captain/templates/brief.md:15The lane-card fallback names "the checkout's" copy, which a lane on another repository reads as its working repository; it should name the certified install root ($GSTACK_CAPY_ROOT, default~/.local/share/gstack).docs/captain.md:150Warm-wait re-waits count as empty turns inlib/runaway.tsemptyWakes(). A lane that follows the rule can cross the empty-wake WARN line, and runaway-stopper's "One wait" brief line still says never to poll. A follow-up should teach the detector about warm waits.capy/skill/gstack/lane-card.md:3The card does not repeat the CAPY_WRAPPER_STALE rule ("never write the skill folder yourself").captain/templates/brief.md:15The Drive copy of the skill has no lane-card.md until an owner recopies the folder, and the wrapper number did not change, so no stale-copy warning fires.AGENTS.mdThe area labels file/make-pdfand/diagramunder "safety + scoping". The docs audit adds that about 10 skills (plan-devex-review, plan-tune, devex-review, landing-report, document-generate, context-save, context-restore, benchmark-models, setup-gbrain, sync-gbrain) have no dedicated docs/skills.md section, so the names-only index points them at thin docs.Exploratory QA
Functional surface, smoke budget (5 minutes or 12 probes), report-only. Probes ran at cccff5f and were rerun on the fixed tree at 4c62cbc:
bun test test/captain-skill.test.ts: pass (11 tests).#anchorin lane-card.md, captain.md, unattended.md, brief.md and AGENTS.md): pass, 0 broken. The first run's 25 misses were a checker defect: it ignored explicit<a id>anchors. The fixed checker found none.Verdict: pass. Limit: whether a live lane actually warm-waits or reads the card is prose behavior and was not exercised.
Design Review
No frontend files changed, so design review was skipped.
Eval Results
The eval selector (
scripts/eval-select.ts, PR profile) picked no behavioral probes and no quality judges for these 9 files, so no paid evals ran ($0).Review bot comments
No review bot comments (the PR did not exist during review).
Scope Drift
Scope Check: CLEAN. Intent: lane context items L1, L3, L4 and T1 from plan GSTA-330. Delivered: the Lane context section, the lane start card, the brief's Read:/Context: lines, the unattended.md exception, the names-only AGENTS.md index with the /cso paragraph moved, and one test.
Plan Completion
Plan completion audit: not run (no plan is bound to this branch and no docs/designs/ file matches). Fix: add "Plan: " to the PR body, or run /autoplan.
Issues
Refs p1/adversarial-native#1
Refs p1/red-team#3
Refs p1/red-team#4
Refs p1/red-team#5
Refs p1/red-team#6
Refs p1/targeted#1
Verification Results
No plan-specific verification items (no plan file bound). Automatic QA above: 2 PASS, 0 FAIL, 0 BLOCKED, 0 NOT RUN.
TODOS
No TODO items completed in this PR.
Documentation
Status: current. The audit made no edits (read-only mode) and found no blockers.
Scope: the candidate at head 4c62cbc on gsta-332-lane-context against base 12d18a2, covering committed content (nothing staged, unstaged or untracked). Reviewed in full: AGENTS.md, captain/templates/brief.md, capy/skill/gstack/SKILL.md, capy/skill/gstack/lane-card.md, changelog.d/gsta-332-lane-context.md, docs/captain.md, docs/skills.md (the /cso addition) and docs/unattended.md. Cross-links and anchors were checked.
Documentation health:
Coverage debt: about 10 skills (plan-devex-review, plan-tune, devex-review, landing-report, document-generate, context-save, context-restore, benchmark-models, setup-gbrain, sync-gbrain) have no dedicated section in docs/skills.md, so AGENTS.md's pointer to docs/skills.md for what each skill does is incomplete for them. This predates the change. Diagram drift: none found.
Test plan
bun run test(carried from CI Free Tests run 42180117992 at tree 0d9e05b75f86): 1601 files, exit 0bun run gen:skill-docsfresh (no diff);bun run typecheck:test812 known diagnostics, none new; typecheck and conflict-marker guards pass