Borrowing it
Nothing to install: this file belongs to jedarden/NEEDLE. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/jedarden/NEEDLE/main/AGENTS.mdgit clone --depth 1 https://github.com/jedarden/NEEDLEWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/jedarden/needle/agents-md)<a href="https://agentmods.dev/instructions/jedarden/needle/agents-md"><img src="https://agentmods.dev/badge/instructions/jedarden/needle/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/jedarden/needle/agents-md"><img src="https://agentmods.dev/badge/instructions/jedarden/needle/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.03770 | $0.03770 |
| Opus 5.5 | $0.01508 | $0.01508 |
| Sonnet 5.5 | $0.00754 | $0.00754 |
| Haiku 4.5 | $0.00377 | $0.00377 |
Grade A, and why
NEEDLE AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 21d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 324 lines — stays where its author put it; the contents beside it link to each section on GitHub.
NEEDLE Codex Guide
This file is the primary operating guide for Codex in this repository, both in interactive sessions and when Codex runs headlessly as a NEEDLE worker. Inspect the current repository state and the relevant source before relying on older examples or planning documents.
Project Overview
NEEDLE (Navigates Every Enqueued Deliverable, Logs Effort) is a Rust worker binary. It selects and claims work through the repository's configured bead backend, dispatches a coding agent, records telemetry, and routes every outcome through an explicit state machine.
The primary backend is bead-rs (bead); bead-forge (bf) remains supported
for explicitly bound legacy workspaces. Check .needle.yaml and the .beads/
layout before running either CLI. Do not infer the backend from which binaries
happen to be installed, and never use one backend's repair or import command on
the other backend's database. br is retired and must not be introduced in
source, prompts, scripts, tests, or documentation.
Working Safely
- Inspect
git status --shortbefore editing. Preserve unrelated user and worker changes in a dirty worktree. - Multiple NEEDLE workers may share the same repository. Re-check files before modifying them and avoid broad rewrites that can overwrite concurrent work.
- Do not create per-worker git worktrees to isolate concurrent workers —
a shared checkout is the intended model, not a bug to route around.
Worktrees add disk and build-cache duplication without addressing the
actual failure mode, which happens at the bead level: the same bead getting
claimed and worked twice (confirmed 2026-08-09, commitgraph
cg-l0v0kc— two byte-identical commits at the same second from two concurrent workers). The supported backends provide atomic claim operations, so avoid this by decomposing and dependency-ordering beads so the same unit of work is never independently claimable twice — see the target repo's ownAGENTS.mdfor repo-specific guidance. - A disposable clone under
~/scratchis the same thing as a worktree for this purpose, and the rule above covers it.git cloneinto amktemp -dis the usual way this rule gets routed around: it satisfies the letter (nogit worktree) while costing the identical disk. On 2026-08-21 there were 241 of them on ex44 —~/scratchat 95G, each a full clone plus a Rusttarget/— and the root filesystem reached 100%, which fails writes withENOSPCfor every agent on the box, not just the one that filled it. Work in the shared checkout. If a disposable checkout is genuinely warranted, the thing that creates it owns removing it:mktemp -dwith atrapthat cleans on success and deliberately leaves the tree on failure for diagnosis. Do not file cleanup as its own bead — fleet workers share no filesystem, so a cleanup bead can be claimed by a worker that cannot see the directory. A startup sweep is the backstop (needle-f40a5de7). - Do not use destructive Git operations (
reset --hard, forced checkout, forced push) to resolve unrelated changes. - Never advance a branch ref without its tree. In a shared checkout, do
not move
main(or any branch) withgit update-ref,git reset --soft, orgit branch -f. Each moves the ref and leaves the index and working tree where they were, so every file the skipped commits changed now reads as a staged revert of them, and the next pathspec commit of such a file silently undoes another worker's commit. Workers did exactly this to~/NEEDLE(git update-ref refs/heads/main <origin/main>, about twenty times from 2026-10-07) and left the checkout 85 files and 9,959 lines behind HEAD by 2026-10-16 (needle-8879251b). To pick uporigin/main, rungit merge --ff-only origin/main, which moves the ref, index and worktree together; if local commits have diverged, reconcile with a merge commit, never a rebase or a force-push. If a dirty tree or staged files block the merge, stop and report the blocking paths on the bead — do not move the ref by hand, and do not stash, reset or check out other workers' files to clear the way.needle auditreports a checkout whose tracked files hold older committed content than HEAD asF7_STALE_TREE_DRIFT. - Forgejo (
git.ardenone.com) is the authoritative remote. GitHub is a mirror. Push only to the configuredorigin, and never use--forceor--force-with-lease. - Keep commands suitable for unattended execution: avoid prompts, pagers, and commands that require an interactive terminal.
- Treat
docs/plan/plan.mdas architecture and design history. Verify current behavior in source and against the installed CLI before depending on old command examples.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 21d ago Changed · +16 lines · +316 tokens per session 54d43e05f58d
- 27d ago Changed · +3 lines · +47 tokens per session 6de9cd3ae64f
- 1mo ago Changed · -1 lines · -2 tokens per session 9200fb6bbf1b
- 1mo ago Changed · +16 lines · +157 tokens per session 1211ebba8c62
- 1mo ago Changed · +4 lines · +79 tokens per session 6a71d8a04b05
- 1mo ago Changed · +7 lines · +90 tokens per session 84f1a1b163a5
- 2mo ago Changed · +3 lines · +38 tokens per session 312d1f468145
- 2mo ago Changed · +20 lines · +262 tokens per session 3e8f36decc99
- 2mo ago First seen · 256 lines · 2,783 tokens per session scan A de1139920380
NEEDLE AGENTS.md is an instructions file published in the GitHub repository jedarden/NEEDLE (33 stars, last pushed 2d ago), licensed MIT. It adds 3,770 tokens to every session, about $0.0151 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
NEEDLE AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| NEEDLE AGENTS.mdjedarden/NEEDLE | Instructions file | 33 | 2d ago | MIT | A | 3,770 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | yesterday | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | yesterday | MIT | A | 4,680 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 5,516 | GitHub Copilot |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |