chore: add AGENTS.md and Cursor rules for AI-assisted development - #1115
Open
MaartenUreel wants to merge 2 commits into
Open
MaartenUreel wants to merge 2 commits into
MaartenUreel wants to merge 2 commits into
Conversation
Documents the conventions that were previously only discoverable by reading code, so AI coding agents follow the existing patterns instead of inventing their own. AGENTS.md covers the Bun toolchain, repo layout, path aliases, code style, the PR gates and the cross-cutting requirements (changelog entry, userscript version bumps, docs page). Seven glob-scoped rules under .cursor/rules/ auto-attach per area: features and registration, userscripts, Svelte/options UI, Torn page DOM helpers, storage/API/external services, the WXT shell, and documentation. Also adds a 'verify' script chaining the four PR gates into one command, and normalises .mdc line endings. Co-authored-by: Cursor <cursoragent@cursor.com>
Adds Murfy to team.ts and records the AGENTS.md/Cursor rules and the new verify script under the unreleased technical section, per CONTRIBUTING.md. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Torn username and ID: Murfy [420016]
CONTRIBUTING.md.src/common/utils/team.tsfile.src/extension/assets/changelog.jsonfileIs this PR:
Purpose of PR:
The repo had no machine-readable conventions, so every AI coding agent re-derived them from scratch and got the
wiring wrong. This adds
AGENTS.mdplus seven glob-scoped Cursor rules that document what the code already does.AGENTS.mdis deliberately short since it loads on every request: Bun-only toolchain, repo layout, path aliases,code style, the PR gates, and the cross-cutting requirements (changelog entry, userscript version bumps, docs page).
The rules under
.cursor/rules/attach only when the relevant files are touched:torntools-featuresFeaturecontract, lifecycle order, manual registration inscript-manager.ts, the fact there is no cleanup hooktorntools-userscriptsmetadata.tsversion bump to publishtorntools-svelte-uiui/being vendored shadcn, and the four files a new setting touchestorntools-torn-page-domfindElementoverquerySelector,requireElementover polling, containers/filters, Torn's hashed class namestorntools-data-storage-apittStoragevs the sync globals,DefaultSetting,relay: true,apiUsagegating, migrations, opt-in external servicestorntools-extension-shell--injectmain-world pattern, background proxy servicestorntools-docs__placeholder.mdxtemplate and its mandatory sectionsAlso adds a
verifyscript (lint && types && types:svelte && test) so contributors have one command matching thePR gates, and
*.mdc text eol=lfin.gitattributesfor consistency with the existing*.mdrule.No runtime code is touched.
Linked issues:
None