Skip to content

docs(agents): add performance guidance - #5208

Merged
thymikee merged 3 commits into
mainfrom
docs/agents-performance-guidance
Nov 29, 2026
Merged

thymikee merged 3 commits into
mainfrom
docs/agents-performance-guidance

Conversation

@thymikee

@thymikee thymikee commented Nov 29, 2026 •

Copy link
Copy Markdown
Member

Summary

Adds docs/agents/performance.md and one AGENTS.md routing row. It states the rules for request cost, caching, count tests, timing comparisons, and deliberate safety checks.

Scope expansion: the agent-guidance byte budgets had 20 bytes free in AGENTS.md and 1 byte free in docs/agents. The first commit removes lines with another owner instead of raising a budget. After review, the mutation lane contract and the stale-ref rule after a pose change are restored.

Removed from Remaining owner
AGENTS.md: formatting, CONTEXT.md glossary rule format gate; agent-guidance test (headings and repo paths only)
testing.md: platform, wait limit, receipt, pnpm check selection Gate runner
gates.md: replay seed Tool output
device-foldable.md: panels, pose mechanics, touch overlays ADR 0025; --hide-touches in user docs
device-verification.md: claim recovery sessions.md; CLI help
web-backend.md: setup, doctor, hint help web; command
cli-flags.md: action option refusal flagsByAction doc comment
selector-capture.md: selector package AGENTS.md
test-authoring.md: regression proof test-experiments.md

Validation

SHA 1fec2f1.

  • Byte counts: AGENTS.md 3,995 of 4,000; docs/agents 39,983 of 40,000.
  • agent-guidance-contract.test.ts: 5 passed locally.
  • Paths cited by performance.md exist.
  • Runtime tests do not apply: Markdown only.
  • No local gates ran. CI is pending.
  • Four review threads on dc12762 are fixed. No independent review of the new head.
  • Risk: please confirm each removal.

🤖 Generated with Claude Code


Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

View guided diff Turn on auto-fix

thymikee and others added 2 commits November 29, 2026 15:45
Free room under the agent-guidance byte budgets. Each removed line is
enforced by a tool, or held by an ADR, a user doc, the CLI help, a code
comment, or another agent doc.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
State the rules for request cost, caching, count tests, timing
comparisons, and deliberate safety checks, and route to them from
AGENTS.md.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 10 files

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread docs/agents/gates.md Resolved
Comment thread docs/agents/performance.md Resolved
Comment thread docs/agents/device-foldable.md Resolved
Comment thread docs/agents/performance.md Resolved
@apex-sentinel-staging

This comment has been minimized.

Restore the mutation lane scope and completeness contract and the stale
ref and coordinate rule after a pose change. State when file stat
validation is acceptable, and use the full cache module path. Shorten the
performance doc to stay within the byte budget.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@apex-sentinel-staging

Copy link
Copy Markdown

Apex Sentinel · ✅ Approve · review of 1fec2f1

Since the review of dc12762: 0 new · 0 still open · 0 no longer raised

No open findings.

Not in the reviewers' scope (10 files)
  • AGENTS.md: no reviewer was selected for this change
  • docs/agents/cli-flags.md: no reviewer was selected for this change
  • docs/agents/device-foldable.md: no reviewer was selected for this change
  • docs/agents/device-verification.md: no reviewer was selected for this change
  • docs/agents/gates.md: no reviewer was selected for this change
  • docs/agents/performance.md: no reviewer was selected for this change
  • docs/agents/selector-capture.md: no reviewer was selected for this change
  • docs/agents/test-authoring.md: no reviewer was selected for this change
  • docs/agents/testing.md: no reviewer was selected for this change
  • docs/agents/web-backend.md: no reviewer was selected for this change

Reviewed with this repository's own Sentinel configuration (47e3fbe2758c).

💬 Talking to Sentinel

In a finding's thread, reply with:

Command What it does
@apex-sentinel-staging note <context> Adds context; Sentinel re-checks the cited code
@apex-sentinel-staging pivot <why> Says the finding is wrong; Sentinel re-checks the cited code
@apex-sentinel-staging like Marks the finding as useful
@apex-sentinel-staging dislike <why> Marks it as not useful, so it is not raised again

On this conversation, comment @apex-sentinel-staging review to run a full review once again.

@thymikee

Copy link
Copy Markdown
Member Author

The PR is ready at 1fec2f1, with no required changes.

Not blocking: these can be taken or left: in performance.md:9, add "If no caller reads a fact, do not compute it." and attach the readProcessLock example to it, because that example stops computing an unused fact instead of passing a known one; split the 22-word timing rule at performance.md:28 into "Before you compare timings, record the code origin and request route of each run." and "Compare only runs where both match." (performance.md:8 also puts three prohibitions in one sentence); link the base-comparison procedure in test-experiments.md from that timing rule, since benchmark tasks are routed to this page; at performance.md:21, replace the undefined term "generation" with what bounds validity, such as "an owner, a lifetime, and an invalidation rule"; at performance.md:11, write "resolves the target of a route-scoped channel during the surface probe", because the route-scoped part in the router is the channel circuit; at device-verification.md:38, restore the limit to your own daemon, for example "If your own daemon is stuck, run agent-device daemon stop --state-dir <dir> --clean.", because the new text and its linked section allow stopping a live owner's daemon; confirm the removal of the OXC format instruction at AGENTS.md:58 or keep "Format changed files with pnpm format <files>.", because a delegated task skips local gates and may hand off unformatted files; confirm the removal of "Keep CONTEXT.md a glossary only" at AGENTS.md:54 or keep it, because the remaining test only enforces a single Language heading and no repo paths; confirm the removal of the rule to keep selector keys in @agent-device/selectors at selector-capture.md:57 or widen the AGENTS.md sentence if the budget allows, because that sentence covers only parsing and matching.

These earlier threads no longer apply and can be resolved: the KERNEL_MODULES, LANE_SOURCES and LANE_DEPENDENCIES lines are kept in gates.md; performance.md now allows stat validation only if a missed same-size rewrite is accepted; the Pose bullet in device-foldable.md now says refs and coordinates go stale and need a fresh snapshot; the cited code-signature-cache.ts path exists.

10 of 11 checks pass, and the remaining one is still in progress. The change is Markdown only and exercises no runtime route.

Not verified here: no tests or gates were run, size budgets were only computed from the committed files, and ASD-STE100 was judged only on sentence length and one-instruction form. After this PR, only 5 bytes remain in the AGENTS.md budget and 17 bytes in docs/agents, so the next guidance addition must delete text first.

Before merge, the remaining check needs to finish and a maintainer needs to confirm the removed instructions.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Nov 29, 2026
@thymikee
thymikee merged commit 81d8771 into main Nov 29, 2026
11 checks passed
@thymikee
thymikee deleted the docs/agents-performance-guidance branch November 29, 2026 15:19
thymikee added a commit that referenced this pull request Nov 29, 2026
…roc-first

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* origin/main:
  perf(apple): reuse the process identity for native-build cache locks (#5203)
  perf(apple): read the native-build toolchain identity with two concurrent probes (#5206)
  perf(macos): reuse the helper fingerprint between unchanged calls (#5207)
  docs(agents): add performance guidance (#5208)
  perf(daemon): classify a device claim owner only for refusals and settlement (#5210)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant