Thot / prime
AGENTS.md0 starsChanged 3 months agoMITView on GitHub
When creating issues: When posting
- Deletes or force-pushes
- Installs packages
- Commits and pushes
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,774 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository87 other files it gives its agents.
- hermes/AGENTS.mdAGENTS.md
- apple-notesSkill
- apple-remindersSkill
- findmySkill
- imessageSkill
- vulnerability-triageSkill
- claude-codeSkill
- codexSkill
- computer-useSkill
- hermes-agentSkill
- merge-reconcilerSkill
- opencodeSkill
- architecture-diagramSkill
- ascii-artSkill
- ascii-videoSkill
- baoyu-infographicSkill
- claude-designSkill
- comfyuiSkill
- design-mdSkill
- excalidrawSkill
- humanizerSkill
- manim-videoSkill
- p5jsSkill
- popular-web-designsSkill
- pretextSkill
- sketchSkill
- songwriting-and-ai-musicSkill
- touchdesigner-mcpSkill
- sdlc-reviewSkill
- email-inbox-triageSkill
- himalayaSkill
- codebase-inspectionSkill
- github-authSkill
- github-code-reviewSkill
- github-issuesSkill
- github-issue-to-prSkill
- github-pr-workflowSkill
- github-repo-managementSkill
- gif-searchSkill
- songseeSkill
- youtube-contentSkill
- huggingface-hubSkill
- obsidianSkill
- airtableSkill
- boxSkill
- document-to-action-itemsSkill
- docxSkill
- google-workspaceSkill
- mapsSkill
- meeting-action-itemsSkill
- nano-pdfSkill
- notionSkill
- ocr-and-documentsSkill
- pdfSkill
- powerpointSkill
- product-price-monitorSkill
- session-librarianSkill
- teams-meeting-pipelineSkill
- weekly-review-planningSkill
- xlsxSkill
- The first 60 shown.
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
51 rules. About 0 are common, 27 are distinctive, and 24 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈27
Distinctive · estimate
This author's own choices. Worth a look.
24
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 5
No fluff or cheerful filler text
- Distinctive: line 6
Keep answers short and concise
- Distinctive: line 7
No emojis in commits, issues, PR comments, or code
- Distinctive: line 12
Read files in full before making wide-ranging changes, before editing files you have not already fully inspected, and when the user asks …
- Distinctive: line 13
Don't be too verbose with comments in the code.
- Distinctive: line 15
Check node_modules for external API type definitions instead of guessing
- Distinctive: line 17
NEVER remove or downgrade code to fix type errors from outdated dependencies.
- Distinctive: line 18
Always ask before removing functionality or code that appears to be intentional
- Distinctive: line 19
Do not preserve backward compatibility unless the user explicitly asks for it
- Very specific: line 20
Never hardcode key checks with, eg.
- Very specific: line 21
NEVER modify packages/ai/src/models.generated.ts directly.
- Very specific: line 25
After code changes (not documentation changes): npm run check (get full output, no tail).
- Very specific: line 27
NEVER run: npm run dev, npm run build, npm test
- Very specific: line 28
Only run specific tests if user instructs: npx tsx ../../node_modules/vitest/dist/cli.js --run test/specific.test.ts
- Distinctive: line 29
Run tests from the package root, not the repo root.
- Distinctive: line 30
If you create or modify a test file, you MUST run that test file and iterate until it passes.
- Distinctive: line 31
When writing tests, run them, identify issues in either the test or implementation, and iterate until fixed.
- Very specific: line 33
Put issue-specific regressions under packages/coding-agent/test/suite/regressions/ and name them <issue-number>-<short-slug>.test.ts.
- Distinctive: line 38
Add optional features behind a negotiated server capability.
- Very specific: line 40
Update DAEMON_SCHEMA_REVISION, the command/event compatibility maps, and both new-client/old-daemon and old-client/new-daemon tests for …
- Distinctive: line 42
Never make a new daemon command part of startup without a protocol or capability gate.
- Very specific: line 54
Add pkg:* labels to indicate which package(s) the issue affects
- Distinctive: line 56
If an issue spans multiple packages, add all relevant labels
- Distinctive: line 58
When posting issue/PR comments:
- Very specific: line 60
Write the full comment to a temp file and use gh issue comment --body-file or gh pr comment --body-file
- Very specific: line 61
Never pass multi-line markdown directly via --body in shell commands
- Distinctive: line 64
If a comment is malformed, delete it immediately, then post one corrected comment
- Distinctive: line 65
Keep comments concise, technical, and in the user's tone
- Distinctive: line 67
When closing issues via commit:
- Distinctive: line 75
If the user approves: create a feature branch, pull PR, rebase on main, apply adjustments, commit, merge into main, push, close PR, and …
- Very specific: line 126
Read the full [Unreleased] section first so you don't duplicate an existing bullet
- Very specific: line 128
NEVER modify already-released version sections (e.g., ## [0.2.1]) — each is immutable once released
- Very specific: line 141
Add API identifier to Api type union (e.g., "bedrock-converse-stream")
- Very specific: line 142
Create options interface extending StreamOptions
- Very specific: line 143
Add mapping to ApiOptionsMap
- Very specific: line 144
Add provider name to KnownProvider type union
- Distinctive: line 148
Create provider file exporting:
- Very specific: line 158
Add a package subpath export in packages/ai/package.json pointing at ./dist/providers/<provider>.js
- Very specific: line 159
Add export type re-exports in packages/ai/src/index.ts for provider option types that should remain available from the root entry
- Very specific: line 161
Add credential detection in packages/ai/src/env-api-keys.ts
- Distinctive: line 165
Add logic to fetch/parse models from provider source
- Very specific: line 170
Always add the provider to stream.test.ts with at least one representative model, even if it reuses an existing API implementation such as …
- Very specific: line 171
Add the provider to the broader provider matrix where applicable: tokens.test.ts, abort.test.ts, empty.test.ts, context-overflow.test.ts, …
- Distinctive: line 190
Lockstep versioning: All packages always share the same version number.
- Very specific: line 199
Update CHANGELOGs: Ensure all changes since last release are documented in the [Unreleased] section of each affected package's CHANGELOG.md
- Very specific: line 216
ALWAYS include fixes #<number> or closes #<number> in the commit message when there is a related issue or PR
- Distinctive: line 217
NEVER use git add -A or git add .
- Very specific: line 218
ALWAYS use git add <specific-file-paths> listing only files you modified
- Distinctive: line 219
Before committing, run git status and verify you are only staging YOUR files
- Distinctive: line 254
If conflict is in a file you didn't modify, abort and ask the user
- Distinctive: line 259
If the user instructions conflict with rules set out here, ask for confirmation that they want to override the rules.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Development Rules
Conversational Style
- No fluff or cheerful filler text
- Keep answers short and concise
- No emojis in commits, issues, PR comments, or code
- Technical prose only, be kind but direct (e.g., "Thanks @user" not "Thanks so much @user!")
Code Quality
- Read files in full before making wide-ranging changes, before editing files you have not already fully inspected, and when the user asks you to investigate or audit something. Do not rely only on search snippets for broad changes.
- Don't be too verbose with comments in the code. Only write comments when there is serious ambiguity
- No
anytypes unless absolutely necessary - Check node_modules for external API type definitions instead of guessing
- NEVER use inline imports - no
await import("./foo.js"), noimport("pkg").Typein type positions, no dynamic imports for types. Always use standard top-level imports. - NEVER remove or downgrade code to fix type errors from outdated dependencies; upgrade the dependency instead
- Always ask before removing functionality or code that appears to be intentional
- Do not preserve backward compatibility unless the user explicitly asks for it
- Never hardcode key checks with, eg.
matchesKey(keyData, "ctrl+x"). All keybindings must be configurable. Add default to matching object (DEFAULT_EDITOR_KEYBINDINGSorDEFAULT_APP_KEYBINDINGS) - NEVER modify
packages/ai/src/models.generated.tsdirectly. Updatepackages/ai/scripts/generate-models.tsinstead.
Commands
- After code changes (not documentation changes):
npm run check(get full output, no tail). Fix all errors, warnings, and infos before committing. - Note:
npm run checkdoes not run tests. - NEVER run:
npm run dev,npm run build,npm test - Only run specific tests if user instructs:
npx tsx ../../node_modules/vitest/dist/cli.js --run test/specific.test.ts - Run tests from the package root, not the repo root.
- If you create or modify a test file, you MUST run that test file and iterate until it passes.
- When writing tests, run them, identify issues in either the test or implementation, and iterate until fixed.
- For
packages/coding-agent/test/suite/, usetest/suite/harness.tsplus the faux provider. Do not use real provider APIs, real API keys, or paid tokens. - Put issue-specific regressions under
packages/coding-agent/test/suite/regressions/and name them<issue-number>-<short-slug>.test.ts.
Daemon Protocol Changes
- Classify every daemon command, event, and response-shape change as backward-compatible, capability-gated, or incompatible.
- Add optional features behind a negotiated server capability. Clients must check the capability before sending the command or depending on the event.
- Bump
DAEMON_PROTOCOL_VERSIONfor incompatible changes or when startup begins requiring behavior an older daemon cannot provide. - Update
DAEMON_SCHEMA_REVISION, the command/event compatibility maps, and both new-client/old-daemon and old-client/new-daemon tests for every wire change. - Optional daemon metadata and UI features must degrade locally. They must not prevent the agent, session attachment, or interactive startup from working.
- Never make a new daemon command part of startup without a protocol or capability gate.
Dependencies
- A 7-day minimum release age applies to all dependency updates:
.npmrcsetsmin-release-age=7and.github/dependabot.ymluses a matchingcooldown. Never bypass it for routine updates. - Enforcement requires npm >= 11.10; older npm silently ignores the setting, so use a current npm when updating dependencies.
- For an urgent security patch younger than 7 days, override explicitly:
npm install --min-release-age=0 <pkg>.
GitHub Workflow
When creating issues:
- Add
pkg:*labels to indicate which package(s) the issue affects- Available labels:
pkg:agent,pkg:ai,pkg:coding-agent,pkg:tui
- Available labels:
- If an issue spans multiple packages, add all relevant labels
When posting issue/PR comments:
- Write the full comment to a temp file and use
gh issue comment --body-fileorgh pr comment --body-file - Never pass multi-line markdown directly via
--bodyin shell commands - Preview the exact comment text before posting
- Post exactly one final comment unless the user explicitly asks for multiple comments
- If a comment is malformed, delete it immediately, then post one corrected comment
- Keep comments concise, technical, and in the user's tone
When closing issues via commit:
- Include
fixes #<number>orcloses #<number>in the commit message - This automatically closes the issue when the commit is merged
PR Workflow
- Analyze PRs without pulling locally first
- If the user approves: create a feature branch, pull PR, rebase on main, apply adjustments, commit, merge into main, push, close PR, and leave a comment in the user's tone
- We work in feature branches until everything is according to the user's requirements. Never merge PRs by yourself.
Testing Prime Agent Interactive Mode with tmux
To test Prime Agent's TUI in a controlled terminal environment:
# Create tmux session with specific dimensions
tmux new-session -d -s prime-agent-test -x 80 -y 24
# Start Prime Agent from source
tmux send-keys -t prime-agent-test "cd /Users/kevin/pi/prime-agent && ./prime-agent.sh" Enter
# Wait for startup, then capture output
sleep 3 && tmux capture-pane -t prime-agent-test -p
# Send input
tmux send-keys -t prime-agent-test "your prompt here" Enter
# Send special keys
tmux send-keys -t prime-agent-test Escape
tmux send-keys -t prime-agent-test C-o # ctrl+o
# Cleanup
tmux kill-session -t prime-agent-testYou, yourself, are often running into a tmux session, so be careful when killing tmux sessions. Lots of other processes can be running on different tmux sessions/
Changelog
Location: packages/*/CHANGELOG.md (each package has its own)
Format
A flat list of plain bullets under ## [Unreleased]. No ### Added / ### Changed / ### Fixed / ### Removed subsections — just one bullet per change, written as a short sentence starting with a past-tense verb (Added, Changed, Fixed, Removed). Keep each bullet to one line; describe the user-visible change, not the implementation.
Example of a well-formed [Unreleased] section:
## [Unreleased]
- Added `/effort` to set the reasoning level, with autocomplete for the levels the current model supports.
- Changed `prime-agent` to open a new chat by default instead of resuming the previous session.
- Fixed onboarding showing no models after entering a provider key.
- Removed the interactive `!` / `!!` bash shortcuts; use IPython instead.Rules
- Read the full
[Unreleased]section first so you don't duplicate an existing bullet - New entries ALWAYS go under
## [Unreleased] - NEVER modify already-released version sections (e.g.,
## [0.2.1]) — each is immutable once released
Attribution
- Internal changes (from issues):
Fixed foo bar ([#123](https://github.com/PrimeIntellect-ai/prime-agent/issues/123)) - External contributions:
Added feature X ([#456](https://github.com/PrimeIntellect-ai/prime-agent/pull/456) by [@username](https://github.com/username))
Adding a New LLM Provider (packages/ai)
Adding a new provider requires changes across multiple files:
1. Core Types (packages/ai/src/types.ts)
- Add API identifier to
Apitype union (e.g.,"bedrock-converse-stream") - Create options interface extending
StreamOptions - Add mapping to
ApiOptionsMap - Add provider name to
KnownProvidertype union
2. Provider Implementation (packages/ai/src/providers/)
Create provider file exporting:
stream<Provider>()function returningAssistantMessageEventStreamstreamSimple<Provider>()forSimpleStreamOptionsmapping- Provider-specific options interface
- Message/tool conversion functions
- Response parsing emitting standardized events (
text,tool_call,thinking,usage,stop)
3. Provider Exports and Lazy Registration
- Add a package subpath export in
packages/ai/package.jsonpointing at./dist/providers/<provider>.js - Add
export typere-exports inpackages/ai/src/index.tsfor provider option types that should remain available from the root entry - Register the provider in
packages/ai/src/providers/register-builtins.tsvia lazy loader wrappers, do not statically import provider implementation modules there - Add credential detection in
packages/ai/src/env-api-keys.ts
4. Model Generation (packages/ai/scripts/generate-models.ts)
- Add logic to fetch/parse models from provider source
- Map to standardized
Modelinterface
5. Tests (packages/ai/test/)
- Always add the provider to
stream.test.tswith at least one representative model, even if it reuses an existing API implementation such asopenai-completions. - Add the provider to the broader provider matrix where applicable:
tokens.test.ts,abort.test.ts,empty.test.ts,context-overflow.test.ts,image-limits.test.ts,unicode-surrogate.test.ts,tool-call-without-result.test.ts,image-tool-result.test.ts,total-tokens.test.ts,cross-provider-handoff.test.ts. - For
cross-provider-handoff.test.ts, add at least one provider/model pair. If the provider exposes multiple model families (for example GPT and Claude), add at least one pair per family. - For non-standard auth, create utility (e.g.,
bedrock-utils.ts) with credential detection.
6. Coding Agent (packages/coding-agent/)
src/core/model-resolver.ts: Add default model ID todefaultModelPerProvidersrc/core/provider-display-names.ts: Add API-key login display name so/loginand related UI show the provider for built-in API-key auth.src/cli/args.ts: Add env var documentationREADME.md: Add provider setup instructionsdocs/providers.md: Add setup instructions, env var, andauth.jsonkey
7. Documentation
packages/ai/README.md: Add to providers table, document options/auth, add env varspackages/ai/CHANGELOG.md: Add entry under## [Unreleased]
Releasing
Lockstep versioning: All packages always share the same version number. Every release updates all packages together.
Version semantics (no major releases):
patch: Bug fixes and new featuresminor: API breaking changes
Steps
- Update CHANGELOGs: Ensure all changes since last release are documented in the
[Unreleased]section of each affected package's CHANGELOG.md - Run release script:
npm run release:patch # Fixes and additions npm run release:minor # API breaking changes
The script handles: version bump, CHANGELOG finalization, commit, tag, publish, and adding new [Unreleased] sections.
CRITICAL Git Rules for Parallel Agents CRITICAL
Multiple agents may work on different files in the same worktree simultaneously. You MUST follow these rules:
Committing
- ONLY commit files YOU changed in THIS session
- ALWAYS include
fixes #<number>orcloses #<number>in the commit message when there is a related issue or PR - NEVER use
git add -Aorgit add .- these sweep up changes from other agents - ALWAYS use
git add <specific-file-paths>listing only files you modified - Before committing, run
git statusand verify you are only staging YOUR files - Track which files you created/modified/deleted during the session
- It is always fine to include
packages/ai/src/models.generated.tsin a commit alongside the actual files you want to commit
Forbidden Git Operations
These commands can destroy other agents' work:
git reset --hard- destroys uncommitted changesgit checkout .- destroys uncommitted changesgit clean -fd- deletes untracked filesgit stash- stashes ALL changes including other agents' workgit add -A/git add .- stages other agents' uncommitted workgit commit --no-verify- bypasses required checks and is never allowed
Safe Workflow
# 1. Check status first
git status
# 2. Add ONLY your specific files
git add packages/ai/src/providers/transform-messages.ts
git add packages/ai/CHANGELOG.md
# 3. Commit
git commit -m "fix(ai): description"
# 4. Push (pull --rebase if needed, but NEVER reset/checkout)
git pull --rebase && git pushIf Rebase Conflicts Occur
- Resolve conflicts in YOUR files only
- If conflict is in a file you didn't modify, abort and ask the user
- NEVER force push
User override
If the user instructions conflict with rules set out here, ask for confirmation that they want to override the rules. Only then execute their instructions.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

