Skip to content

feat(user-docs): bound discovery and write pages incrementally - #188

Merged
chubes4 merged 1 commit into
mainfrom
feat/user-docs-incremental-writes
Nov 15, 2026
Merged

chubes4 merged 1 commit into
mainfrom
feat/user-docs-incremental-writes

Conversation

@chubes4

@chubes4 chubes4 commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

Problem

The user bootstrap lane spent its whole turn budget reading source and never wrote. Extra-Chill/extrachill run 43726382831 made 32 tool calls over 12 turns, all of them reads/lists/greps, and zero writes. The instructions told the agent to build a full private inventory first, and the only gate was a completion gate, which fires only once the model tries to finish (by then it had hit the turn cap).

Change

User bootstrap package

  • The instructions now tell the agent to write as you go:
    • Scope to the component path the consumer names.
    • Read the existing docs, then write the first page early.
    • Then go one topic at a time (targeted grep/read, then write), with the index last.
  • New Agents API tool_call_rules, enforced by WP_Agent_Tool_Call_Gate, not the prompt:
    • bootstrap-first-write-budget: after workspace_show, at most 24 discovery calls (read/ls/grep/GitHub) before a documentation write. It also blocks completion.
    • bootstrap-write-cadence-after-{write,edit,apply-patch}: at most 16 discovery calls after the latest write before the next write (it does not gate completion).
    • require-bootstrap-workspace-write is unchanged.

User maintenance package

  • Scope to the component path. Check page by page and edit drift immediately.
  • no_changes only after every page has been checked. There is still no write gate, so honest no-change runs stay possible.

Validation

  • validate-docs-agent-packages.php checks the new required_bounded_discovery_rules spec entries. Every rule tool must be enabled, and no rule may limit its own commit tools.
  • native-agent-import.php exercises the real gate:
    • blocks discovery past the budget
    • always allows the write
    • resets after a write
    • enforces cadence; an edit counts as a write
    • allows the final diff review and completion after writing

The package revision pin and digests are unchanged here. A follow-up PR pins DOCS_AGENT_PACKAGE_REVISION to this merge commit, the same pattern as f3d9657/84bcf7a.

Tests

  • php tests/validate-docs-agent-packages.php
  • php tests/validate-external-native-package-sources.php
  • AGENTS_API_DIR=<agents-api@78e2dd4> php tests/native-agent-import.php (51 pass)

AI assistance: Extra Chill Bot (Claude), via a Roadie subagent.

The user bootstrap lane read source for its whole turn budget without a
single write (run 43726382831: 32 reads over 12 turns, zero writes).
- bootstrap: write as you go, one topic at a time, scoped to the component
  path the consumer names; runtime-enforced discovery budget of 24 calls
  before the first write and 16 between writes
- maintenance: scope to the component path, check page by page and edit
  drift immediately; no_changes only after every page is checked
@chubes4
chubes4 merged commit 667a3d7 into main Nov 15, 2026
3 checks passed
chubes4 added a commit that referenced this pull request Nov 15, 2026
…e user packages (#189)

- WP Codebox v0.33.6 (4875fb1) reports failure{stage:agent,code,message} for
  every failed agent runtime and uploads the transcript and tool observability
  on failure (Automattic/wp-codebox#2590)
- advance DOCS_AGENT_PACKAGE_REVISION to 667a3d7 (#188) with the new user
  bootstrap and maintenance package digests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant