Skip to content

Replace repeated agent prose with CI checks - #1204

Open
jatmn wants to merge 6 commits into
mainfrom
audit/shrink-agent-instructions
Open

jatmn wants to merge 6 commits into
mainfrom
audit/shrink-agent-instructions

Conversation

@jatmn

@jatmn jatmn commented Dec 6, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • The full agent prompt (42,869 bytes) and the domain card (2,163 bytes) did not beat a 298-byte root prompt. Nine fresh Composer replicates, three per text set, were asked to add status_line and to copy log-channel ids onto another guild. Copying those ids is already forbidden in code. Every finished replicate copied them anyway, accepted a blank status line, and kept the spaces in " hello ".
  • None of the audited transcripts opened AGENTS.md, the Copilot notes, or docs/. They edited src/db/configuration.rs, which states the skip, and deleted it to match the request.
  • Pre-registered rule: keep a larger instruction set only if its median score beats the smaller set by at least 2 points on a 0-20 scale. The first round, including a separate Grok judge, tied at 4. Later rounds failed the same probes. The minimal prompt is what ships.
  • Toolchain pins, the migrate flag, and production dependency edges now live in scripts/check-pinned-facts.sh. CI no longer requires AGENTS.md to repeat the audit expiry, Dependabot wording, or the service-boundary script name. The log-channel skip is locked in that same script because agents deleted the Rust test when asked to copy channels.

Test plan

  • bash scripts/check-pinned-facts.sh
  • bash scripts/dependabot-config-test.sh
  • bash scripts/public-install-acceptance-test.sh
  • bash scripts/select-checks-test.sh
  • bash scripts/ci-preflight.sh --audit-expiry-self-check
  • CI contracts job on this PR

Made with Cursor

Summary by Sourcery

Replace repeated agent instructions with concise notes and enforce key repository facts through CI contracts.

Enhancements:

  • Replace the lengthy agent guidance with concise contributor and review notes, relying on CI to enforce repository contracts.
  • Add a CI contract check for Rust/toolchain and runtime image pins, remote-database runtime settings, and production dependency boundaries.

CI:

  • Run the new pinned-facts check in the contracts job and select it when its script changes.
  • Limit the audit-expiry runner check to docs/CI.md and update contract tests to stop requiring repeated guidance in AGENTS.md.

Documentation:

  • Update CI documentation to describe which documentation changes trigger runner tests and point WebUI build guidance to docs/SETUP.md.

jatmn and others added 3 commits December 6, 2026 12:09
AGENTS.md no longer has to repeat the audit expiry, Dependabot wording, or the service-boundary script name. Those facts are enforced by the workflow files and scripts/check-pinned-facts.sh.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Agents asked to copy guild log channels deleted the Rust test that already forbids it. The contracts check now fails if that refusal or its test disappears.

Co-authored-by: Cursor <cursoragent@cursor.com>

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've found 7 issues

Sourcery assessment

Approval pending. 6 findings to address first.

Blocking findings: scripts/check-pinned-facts.sh:121, scripts/check-pinned-facts.sh:171, scripts/check-pinned-facts.sh:125, scripts/check-pinned-facts.sh:50, scripts/check-pinned-facts.sh:117, and 1 more


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread scripts/check-pinned-facts.sh Resolved
Comment thread scripts/check-pinned-facts.sh Resolved
Comment thread scripts/check-pinned-facts.sh Resolved
Comment thread scripts/check-pinned-facts.sh Resolved
Comment thread scripts/check-pinned-facts.sh Resolved
Comment thread scripts/check-pinned-facts.sh Resolved
Comment thread AGENTS.md Resolved

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Important

The contracts group fails because two preflight fixtures need a stand-in for the new check.

Approach Shorter agent instructions and executable checks fit this change. The log-channel rule already has a behavioral test that CI can use.

Reviewed changes

  • Agent guidance. Reduces AGENTS.md and the Copilot review notes to essentials.
  • Pinned facts. Adds checks for Rust and image configuration, migration ownership, dependency declarations, and the cross-guild log-channel rule.
  • CI routing. Wires the script into contracts, removes duplicate prose assertions, and limits the audit-expiry documentation trigger to docs/CI.md.

I reproduced the failure with bash scripts/ci-preflight.sh --only contracts and bash scripts/ci-preflight-test.sh. The standalone pinned-facts, Dependabot, public-install, check-selection, and audit-expiry checks passed.

Non-blocking

  • The log-channel guard locks diagnostic wording. Rephrasing the warning in copy_guild_config makes contracts fail even when the destination channels and the skip result stay correct. CI already runs the Rust regression for shared source changes. Use the guard to require that regression to run and let its assertions check the behavior. Text checks, Rust regression
  • The local API lint instructions point to a deleted section. development.md sends contributors to AGENTS.md Commands for the WebUI build needed by default-feature Clippy. Point them to the existing build commands in docs/SETUP.md. Lint instructions, WebUI build commands

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using gpt-6.2-sol | 𝕏

Comment thread scripts/ci-preflight.sh Resolved
@jatmn jatmn self-assigned this Dec 6, 2026
…lly do.

The preflight stand-ins never included the new script, so the contracts group exited before its assertions. The script also treated a builder-stage env, a sibling method, an unpinned image, and a grep -q pipeline as proof.

Co-authored-by: Cursor <cursoragent@cursor.com>
pullfrog[bot]
pullfrog Bot previously approved these changes Dec 6, 2026

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

ℹ️ No blocking issues. Both preflight commands that failed in the prior review now pass.

Reviewed changes

Reviewed 7c67b18 against the prior Pullfrog review at b22a79a.

  • Fixed preflight fixtures. Added check-pinned-facts.sh to both fixtures and verified the contracts-only preflight and runner fixture suite.
  • Tightened pin checks. Fixed large-manifest matching, scoped migration checks to db_open_options, required matching Rust builder digest pins, checked the final runtime stage for the remote DB flag, and required a versioned Dylint tag.
  • Removed the log-channel wording checks. The existing Rust regression still checks cross-guild copying.
  • Corrected the WebUI build reference. development.md now points to the build commands in docs/SETUP.md.

Non-blocking

  • A nested block can make contracts reject an unchanged migration call. method_contains stops at the first closing brace on its own line. I reproduced the false failure by inserting conditional logging before the existing open_options call. The existing Rust migration-role test can check which process migrates. Shell check, Rust test

Pullfrog  | Fix it ➔ | View workflow run | Using gpt-6.2-sol | 𝕏

The migrate check stopped at the first closing brace, so a nested block before the real call made contracts reject an unchanged migration role.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jatmn

jatmn commented Dec 6, 2026

Copy link
Copy Markdown
Owner Author

The non-blocking note is fixed. method_contains stopped at the first } on its own line, so a nested block before open_options made contracts reject an unchanged db_open_options. It now tracks brace depth and ignores braces inside strings. The self-test inserts a debug block, including a { inside a string, ahead of the migrate call and still requires that call. process_options_fix_migration_role_and_keep_shared_settings remains the executed check that the bot migrates and the API does not.

pullfrog[bot]
pullfrog Bot previously approved these changes Dec 6, 2026

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

ℹ️ No blocking issues. The contracts preflight passed.

Reviewed changes

Reviewed d0c4cbe against the prior Pullfrog review at 7c67b18.

  • Tracked nested braces in db_open_options. The migration check now reaches the existing call after a nested logging block, and a self-test covers that case.

Non-blocking

  • Braces in Rust comments and character literals can fail the migration check. A single } in a comment or character literal before the call drops the brace depth to zero. Both cases made the matcher reject an unchanged migration call in temporary copies of the source. Let the existing Rust migration-role test enforce the flags. Brace counter, Rust test

Pullfrog  | Fix it ➔ | View workflow run | Using gpt-6.2-sol | 𝕏

A comment or character literal containing a brace made the shell matcher reject an unchanged db_open_options. process_options_fix_migration_role_and_keep_shared_settings already calls both process configs and asserts the flags, and core CI runs that test when src/config.rs changes.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jatmn

jatmn commented Dec 6, 2026

Copy link
Copy Markdown
Owner Author

The non-blocking note is fixed by removing the brace scan. It ignored strings, then still treated a } in a comment or character literal as the end of db_open_options. A shell counter is not a Rust parser, so extending it again would only move the false failure. process_options_fix_migration_role_and_keep_shared_settings calls BotProcessConfig::db_open_options and ApiProcessConfig::db_open_options and asserts the bot migrates and the API does not. A change under src/ selects the core tests that run it.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ No new issues found.

Approach The existing Rust regression checks which process migrates through db_open_options, so contracts can drop the Rust source parser.

Reviewed changes

Reviewed 8b8bb5c against the prior Pullfrog review at d0c4cbe.

  • Removed the shell migration checks. Deleted the Rust source scanner and its fixtures from scripts/check-pinned-facts.sh. The existing Rust test still asserts that the bot migrates and the API does not.

The pinned-facts check, contracts-only preflight, and focused Rust test all passed. I also verified that src/config.rs changes select the root Rust test suite in CI.

Pullfrog  | View workflow run | Using gpt-6.2-sol | 𝕏

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