Skip to content
This repository was archived by the owner on Nov 25, 2026. It is now read-only.

TML-2705: reject dead .md rules; only .mdc is ever loaded - #612

Merged
wmadden merged 1 commit into
mainfrom
tml-2705-fix-md-rule-extension
May 29, 2026
Merged

wmadden merged 1 commit into
mainfrom
tml-2705-fix-md-rule-extension

Conversation

@wmadden

@wmadden wmadden commented May 29, 2026

Copy link
Copy Markdown
Contributor

Why

Follow-up fix to the merged TML-2705 work (#609, commit 74cb2c1).

That change consolidated agent rules into .agents/rules/ and treated both .mdc and .md as valid rule extensions. But the agent harnesses (Cursor, Claude Code) only load .mdc files — a rule with a .md extension is silently never picked up. So:

  • no-backward-compatibility.md was a dead rule: tracked, symlinked into both presentation trees, and never loaded by anything.
  • The sync script and docs actively blessed the .md extension, so the same mistake could recur on the next rule someone authored.

What changed

  • Renamed .agents/rules/no-backward-compatibility.md → .mdc so the rule actually loads (its frontmatter was already valid).
  • scripts/sync-agent-rules.mjs: rules are now .mdc-only. README.md remains the single mirrored .md (it's the index, not a rule). Any other .md in the canonical dir is rejected — a hard error in sync mode (pnpm rules:sync / the prepare hook), and reported as drift in --check mode (pnpm lint:rules:symlinks). The mistake now fails CI instead of shipping a dead rule.
  • Docs: AGENTS.md and the rules README.md no longer document .{md,mdc}; they state plainly that rule files must be .mdc.
  • Tests: updated/added cases covering the README-only .md exemption and the dead-.md-rule rejection in both modes.

Scope

Rules + the sync tool + its docs only. No product code touched. pnpm lint:rules, pnpm lint:rules:symlinks, pnpm lint:rules:footprint, and pnpm test:scripts (118 tests) all pass locally.

The symlink-sync work treated both `.mdc` and `.md` as rule extensions, but
the agent harnesses load `.mdc` only — a `.md` rule is silently never picked
up. `no-backward-compatibility.md` was such a dead rule.

- Rename `no-backward-compatibility.md` -> `.mdc` so it actually loads.
- `sync-agent-rules.mjs`: rules are `.mdc`-only; `README.md` stays the lone
  mirrored `.md` index. Any other `.md` in the canonical dir is rejected
  (hard error on sync, drift on `--check`) so the mistake cannot recur.
- Update AGENTS.md / rules README to stop blessing the `.md` extension.

Signed-off-by: Will Madden <[email protected]>
@wmadden
wmadden requested a review from a team as a code owner May 29, 2026 07:00
@coderabbitai

coderabbitai Bot commented May 29, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@wmadden, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 40 minutes and 5 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: 40dec01e-19aa-42a3-84bb-e616a97c16ea

📥 Commits

Reviewing files that changed from the base of the PR and between dab9017 and 8e8b806.

📒 Files selected for processing (5)
  • .agents/rules/README.md
  • .agents/rules/no-backward-compatibility.mdc
  • AGENTS.md
  • scripts/sync-agent-rules.mjs
  • scripts/sync-agent-rules.test.mjs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch tml-2705-fix-md-rule-extension

Comment @coderabbitai help to get the list of available commands and usage tips.

@pkg-pr-new

pkg-pr-new Bot commented May 29, 2026

Copy link
Copy Markdown

Open in StackBlitz

@prisma-next/extension-author-tools

npm i https://pkg.pr.new/@prisma-next/extension-author-tools@612

@prisma-next/mongo-runtime

npm i https://pkg.pr.new/@prisma-next/mongo-runtime@612

@prisma-next/family-mongo

npm i https://pkg.pr.new/@prisma-next/family-mongo@612

@prisma-next/sql-runtime

npm i https://pkg.pr.new/@prisma-next/sql-runtime@612

@prisma-next/family-sql

npm i https://pkg.pr.new/@prisma-next/family-sql@612

@prisma-next/extension-arktype-json

npm i https://pkg.pr.new/@prisma-next/extension-arktype-json@612

@prisma-next/extension-cipherstash

npm i https://pkg.pr.new/@prisma-next/extension-cipherstash@612

@prisma-next/middleware-cache

npm i https://pkg.pr.new/@prisma-next/middleware-cache@612

@prisma-next/mongo

npm i https://pkg.pr.new/@prisma-next/mongo@612

@prisma-next/extension-paradedb

npm i https://pkg.pr.new/@prisma-next/extension-paradedb@612

@prisma-next/extension-pgvector

npm i https://pkg.pr.new/@prisma-next/extension-pgvector@612

@prisma-next/extension-postgis

npm i https://pkg.pr.new/@prisma-next/extension-postgis@612

@prisma-next/postgres

npm i https://pkg.pr.new/@prisma-next/postgres@612

@prisma-next/sql-orm-client

npm i https://pkg.pr.new/@prisma-next/sql-orm-client@612

@prisma-next/sqlite

npm i https://pkg.pr.new/@prisma-next/sqlite@612

@prisma-next/target-mongo

npm i https://pkg.pr.new/@prisma-next/target-mongo@612

@prisma-next/adapter-mongo

npm i https://pkg.pr.new/@prisma-next/adapter-mongo@612

@prisma-next/driver-mongo

npm i https://pkg.pr.new/@prisma-next/driver-mongo@612

@prisma-next/contract

npm i https://pkg.pr.new/@prisma-next/contract@612

@prisma-next/utils

npm i https://pkg.pr.new/@prisma-next/utils@612

@prisma-next/config

npm i https://pkg.pr.new/@prisma-next/config@612

@prisma-next/errors

npm i https://pkg.pr.new/@prisma-next/errors@612

@prisma-next/framework-components

npm i https://pkg.pr.new/@prisma-next/framework-components@612

@prisma-next/operations

npm i https://pkg.pr.new/@prisma-next/operations@612

@prisma-next/ts-render

npm i https://pkg.pr.new/@prisma-next/ts-render@612

@prisma-next/contract-authoring

npm i https://pkg.pr.new/@prisma-next/contract-authoring@612

@prisma-next/ids

npm i https://pkg.pr.new/@prisma-next/ids@612

@prisma-next/psl-parser

npm i https://pkg.pr.new/@prisma-next/psl-parser@612

@prisma-next/psl-printer

npm i https://pkg.pr.new/@prisma-next/psl-printer@612

@prisma-next/cli

npm i https://pkg.pr.new/@prisma-next/cli@612

@prisma-next/cli-telemetry

npm i https://pkg.pr.new/@prisma-next/cli-telemetry@612

@prisma-next/emitter

npm i https://pkg.pr.new/@prisma-next/emitter@612

@prisma-next/migration-tools

npm i https://pkg.pr.new/@prisma-next/migration-tools@612

prisma-next

npm i https://pkg.pr.new/prisma-next@612

@prisma-next/vite-plugin-contract-emit

npm i https://pkg.pr.new/@prisma-next/vite-plugin-contract-emit@612

@prisma-next/mongo-codec

npm i https://pkg.pr.new/@prisma-next/mongo-codec@612

@prisma-next/mongo-contract

npm i https://pkg.pr.new/@prisma-next/mongo-contract@612

@prisma-next/mongo-value

npm i https://pkg.pr.new/@prisma-next/mongo-value@612

@prisma-next/mongo-contract-psl

npm i https://pkg.pr.new/@prisma-next/mongo-contract-psl@612

@prisma-next/mongo-contract-ts

npm i https://pkg.pr.new/@prisma-next/mongo-contract-ts@612

@prisma-next/mongo-emitter

npm i https://pkg.pr.new/@prisma-next/mongo-emitter@612

@prisma-next/mongo-schema-ir

npm i https://pkg.pr.new/@prisma-next/mongo-schema-ir@612

@prisma-next/mongo-query-ast

npm i https://pkg.pr.new/@prisma-next/mongo-query-ast@612

@prisma-next/mongo-orm

npm i https://pkg.pr.new/@prisma-next/mongo-orm@612

@prisma-next/mongo-query-builder

npm i https://pkg.pr.new/@prisma-next/mongo-query-builder@612

@prisma-next/mongo-lowering

npm i https://pkg.pr.new/@prisma-next/mongo-lowering@612

@prisma-next/mongo-wire

npm i https://pkg.pr.new/@prisma-next/mongo-wire@612

@prisma-next/sql-contract

npm i https://pkg.pr.new/@prisma-next/sql-contract@612

@prisma-next/sql-errors

npm i https://pkg.pr.new/@prisma-next/sql-errors@612

@prisma-next/sql-operations

npm i https://pkg.pr.new/@prisma-next/sql-operations@612

@prisma-next/sql-schema-ir

npm i https://pkg.pr.new/@prisma-next/sql-schema-ir@612

@prisma-next/sql-contract-psl

npm i https://pkg.pr.new/@prisma-next/sql-contract-psl@612

@prisma-next/sql-contract-ts

npm i https://pkg.pr.new/@prisma-next/sql-contract-ts@612

@prisma-next/sql-contract-emitter

npm i https://pkg.pr.new/@prisma-next/sql-contract-emitter@612

@prisma-next/sql-lane-query-builder

npm i https://pkg.pr.new/@prisma-next/sql-lane-query-builder@612

@prisma-next/sql-relational-core

npm i https://pkg.pr.new/@prisma-next/sql-relational-core@612

@prisma-next/sql-builder

npm i https://pkg.pr.new/@prisma-next/sql-builder@612

@prisma-next/target-postgres

npm i https://pkg.pr.new/@prisma-next/target-postgres@612

@prisma-next/target-sqlite

npm i https://pkg.pr.new/@prisma-next/target-sqlite@612

@prisma-next/adapter-postgres

npm i https://pkg.pr.new/@prisma-next/adapter-postgres@612

@prisma-next/adapter-sqlite

npm i https://pkg.pr.new/@prisma-next/adapter-sqlite@612

@prisma-next/driver-postgres

npm i https://pkg.pr.new/@prisma-next/driver-postgres@612

@prisma-next/driver-sqlite

npm i https://pkg.pr.new/@prisma-next/driver-sqlite@612

commit: 8e8b806

@wmadden
wmadden merged commit be36c03 into main May 29, 2026
16 checks passed
@wmadden
wmadden deleted the tml-2705-fix-md-rule-extension branch May 29, 2026 07:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant