Skip to content

docs: strengthen agent guidance on logged-out query counts, comments, and test quality#2155

Merged
ascorbic merged 1 commit into
mainfrom
docs/agent-guidance-queries-comments-tests
Jul 20, 2026
Merged

docs: strengthen agent guidance on logged-out query counts, comments, and test quality#2155
ascorbic merged 1 commit into
mainfrom
docs/agent-guidance-queries-comments-tests

Conversation

@ascorbic

@ascorbic ascorbic commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

What does this PR do?

Strengthens the guidance agents work from (AGENTS.md) and the conventions the flue-review reviewer checks against (infra/flue-review/.flue/skills/review/SKILL.md) in three areas where agent-authored PRs keep slipping:

  • Logged-out query counts. New headline rule plus Performance-section detail: any change that adds a query to a logged-out route needs a really good reason — including cold-start/first-request-only queries. A query-count snapshot increase on a logged-out route is presumed wrong, and the reviewer now treats it as a finding rather than bookkeeping.
  • Comment discipline. New Comments section: comments are evergreen and addressed to future readers of the code — not PR descriptions, not messages to reviewers, not justification for decisions, not narrative about rejected alternatives, and never references to issues/PRs/review threads or numbered lists. The reviewer enumerates these as candidates.
  • Test quality. Tests must be able to fail on a real regression. Named offenders: config-pin tests, tautological tests (add a CSS class, then assert the class is present), mocking the unit under test, and tests that only exercise third-party code. Plus: never change a test just to make it pass. The reviewer flags such tests for deletion or rewriting against observable behavior.

Type of change

  • Bug fix
  • Feature (requires maintainer-approved Discussion)
  • Refactor (no behavior change)
  • Translation
  • Documentation
  • Performance improvement
  • Tests
  • Chore (dependencies, CI, tooling)

Checklist

  • I have read CONTRIBUTING.md
  • pnpm typecheck passes — n/a, Markdown-only change
  • pnpm lint passes — n/a, Markdown-only change
  • pnpm test passes (or targeted tests for my change) — n/a, Markdown-only change
  • pnpm format has been run — n/a, Markdown-only change
  • I have added/updated tests for my changes (if applicable) — n/a, docs
  • User-visible strings in the admin UI are wrapped for translation (if applicable) — n/a, no UI change
  • I have added a changeset (if this PR changes a published package) — n/a, no published package touched
  • New features link to an approved Discussion — n/a, docs

AI-generated code disclosure

  • This PR includes AI-generated code — model/tool: Claude Fable 5 (Claude Code)

Screenshots / test output

n/a


Try this PR

Open a fresh playground →

A full working EmDash site, deployed from this branch. Each visit gets its own session-scoped sandbox: no login needed and no shared state. Try the admin, edit content, hit the public site.

Tracks docs/agent-guidance-queries-comments-tests. Updated automatically when the playground redeploys.

Copilot AI review requested due to automatic review settings July 20, 2026 20:54
@changeset-bot

changeset-bot Bot commented Jul 20, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 674e5af

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Jul 20, 2026

Copy link
Copy Markdown

Open in StackBlitz

@emdash-cms/admin

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/admin@2155

@emdash-cms/auth

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/auth@2155

@emdash-cms/auth-atproto

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/auth-atproto@2155

@emdash-cms/blocks

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/blocks@2155

@emdash-cms/cloudflare

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/cloudflare@2155

@emdash-cms/contentful-to-portable-text

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/contentful-to-portable-text@2155

emdash

npm i https://pkg.pr.new/emdash-cms/emdash@2155

create-emdash

npm i https://pkg.pr.new/emdash-cms/emdash/create-emdash@2155

@emdash-cms/gutenberg-to-portable-text

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/gutenberg-to-portable-text@2155

@emdash-cms/plugin-cli

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/plugin-cli@2155

@emdash-cms/plugin-types

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/plugin-types@2155

@emdash-cms/registry-client

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/registry-client@2155

@emdash-cms/registry-lexicons

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/registry-lexicons@2155

@emdash-cms/registry-verification

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/registry-verification@2155

@emdash-cms/sandbox-workerd

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/sandbox-workerd@2155

@emdash-cms/x402

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/x402@2155

@emdash-cms/plugin-ai-moderation

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/plugin-ai-moderation@2155

@emdash-cms/plugin-atproto

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/plugin-atproto@2155

@emdash-cms/plugin-audit-log

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/plugin-audit-log@2155

@emdash-cms/plugin-color

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/plugin-color@2155

@emdash-cms/plugin-embeds

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/plugin-embeds@2155

@emdash-cms/plugin-field-kit

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/plugin-field-kit@2155

@emdash-cms/plugin-forms

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/plugin-forms@2155

@emdash-cms/plugin-webhook-notifier

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/plugin-webhook-notifier@2155

commit: 674e5af

@emdashbot emdashbot 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.

This is a documentation-only PR that tightens the guidance in AGENTS.md and tells the flue-review reviewer to enforce it. The three focus areas—logged-out query counts, comment discipline, and test quality—are real agent slip zones, and the changes line up with the existing Performance and Testing sections instead of inventing a new structure. I read the diff, the full changed files, and checked heading anchors and cross-references; the two new links (#performance-caching-and-query-patterns and #comments) resolve to unique headings. The changes are otherwise low-risk, but I have two small precision fixes that would make the guidance clearer and keep the reviewer prompt in sync with the new AGENTS.md content.

Comment thread AGENTS.md
Comment thread infra/flue-review/.flue/skills/review/SKILL.md

Copilot AI 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.

Pull request overview

This PR updates the repository’s agent-facing guidance to reduce recurring quality regressions in agent-authored PRs by tightening documented rules around (1) query counts on logged-out routes, (2) comment discipline, and (3) what constitutes a meaningful test.

Changes:

  • Add headline rules to AGENTS.md emphasizing that logged-out query counts must not increase without strong justification, and that comments must be evergreen and not review-thread narrative.
  • Expand AGENTS.md with a dedicated Comments section and clearer test quality criteria (identifying anti-tests like config-pin/tautological/mock-the-unit tests).
  • Update infra/flue-review’s review skill checklist to treat logged-out query count increases and comment/test anti-patterns as first-class findings.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
infra/flue-review/.flue/skills/review/SKILL.md Extends reviewer checklist to explicitly flag logged-out query increases, comment anti-patterns, and low-value tests.
AGENTS.md Adds headline rules plus new “Comments” and “test quality” guidance; strengthens query-count snapshot expectations for logged-out routes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions github-actions Bot added review/awaiting-author Reviewed; waiting on the author to respond cla: signed and removed review/needs-review No maintainer or bot review yet labels Jul 20, 2026
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
emdash-demo-cache 674e5af Jul 20 2026, 08:58 PM

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
emdash-playground 674e5af Jul 20 2026, 08:59 PM

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
emdash-demo-do 674e5af Jul 20 2026, 08:59 PM

@ascorbic
ascorbic merged commit 751c9d7 into main Jul 20, 2026
54 checks passed
@ascorbic
ascorbic deleted the docs/agent-guidance-queries-comments-tests branch July 20, 2026 21:09
swissky pushed a commit to swissky/emdash that referenced this pull request Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: signed review/awaiting-author Reviewed; waiting on the author to respond size/S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants