Borrowing it
Nothing to install: this file belongs to Parslee-ai/neo. 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/Parslee-ai/neo/main/AGENTS.mdgit clone --depth 1 https://github.com/Parslee-ai/neoWrote 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/parslee-ai/neo/agents-md)<a href="https://agentmods.dev/instructions/parslee-ai/neo/agents-md"><img src="https://agentmods.dev/badge/instructions/parslee-ai/neo/agents-md.svg" alt="Measured on agentmods" 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.03383 | $0.03383 |
| Opus 5 | $0.01691 | $0.01691 |
| Sonnet 5 | $0.00677 | $0.00677 |
| Haiku 4.5 | $0.00338 | $0.00338 |
Grade A, and why
neo 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 8d 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 — 179 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Project: Neo - Semantic Reasoning Helper
Quick Context
- Purpose: Read-only reasoning helper for CLI tools using MapCoder/CodeSim-style multi-agent reasoning with semantic memory
- Tech Stack: Python 3.10+, fastembed (Jina Code v2, 768d), faiss-cpu (legacy pattern matching), Anthropic/OpenAI/Google LMs
- Installation:
pip install -e ".[dev]"for development
Code Style
- Import convention: stdlib → third-party → local, specific imports
- Naming: PascalCase classes, snake_case functions, UPPER_SNAKE constants, _private methods
- Error handling: Try/except with specific exceptions, logger warnings, graceful fallbacks
- Testing: test_*.py pattern, pytest framework
- Type hints: Extensive with Optional, list[], dict[]
- Docstrings: Triple quotes, brief description first
Project Rules
- Keep implementations simple first, enhance iteratively
- Test all changes before committing
- Use 3-5 minute timeout when executing
neocommands - Semantic memory: Local embeddings (Jina 768-dim) preferred over OpenAI (1536-dim)
- Memory hygiene:
- Per-scope valid-fact caps (
SCOPE_LIMITSinstore.py): global=200, org=100, project=500, session=50. Enforced per loaded scope set (project+org+global); invalidated facts persist as tombstones untilpurge_dead_factsruns. - Supersession at cosine ≥ 0.85 (
SUPERSESSION_THRESHOLD); pre-write dedup is canonical-signature equality, not cosine (memory.generalize). - REVIEW → PATTERN synthesis was REMOVED. In four months of production it
minted 114 facts and not one PATTERN (its PATTERN branch needed an
outcome:acceptedgroup that never existed), while re-consuming its own summaries as evidence and decaying the whole corpus on every run. A census also found zero ≥3-member clusters at cosine 0.85 across all 1152 valid REVIEWs, so it could not fire on real data. Durable learning now comes only from the git-verified episode ledger — do NOT reintroduce an unverified similarity-clustered route beside it. - Probation: new non-curated facts enter with a
probationtag and a 3-day stale window (vs 7/14); promoted automatically on access_count ≥2 or success_count >0. - Independent-outcome facts capped at 5/session (
MAX_INDEPENDENT_OUTCOMESinoutcomes.py) and 50/project (MAX_INDEPENDENT_FACTSinstore.py). prune_stale_facts→demote_unhelpful_facts→purge_dead_facts→strip_tombstone_embeddingsrun on every cold start, each withsave=Falseso the chain flushes one merge-on-save instead of four._invalidatealready strips a tombstone's embedding and bulk text at the transition, so the final step is a backfill for tombstones minted off that path. For on-demand compaction of tombstone bloat in a specific project's fact file, useneo memory prune [--all] [--dry-run](subcommands.py:_compact_fact_file).- Diagnostics (read-only, flag-and-propose):
neo memory issues [--since 14d] [--min-cluster 3] [--suggest-rules] [--json]surfaces recurring frictions mined from transcript history (Claude Code / Codex / CAR) as ranked, evidence-cited issues (missing-tool/absent-guardrail/vague-rule);--suggest-rulesadds a bounded LM call per issue to draft a preventive rule.neo memory rules [--json] [--no-conflicts]flags drift between AGENTS.md / CLAUDE.md / GEMINI.md (gaps + LM-judged conflicts).neo memory audit [--json] [--no-conflicts]inspects an AI tool's memory files (Claude Codememory/*.md) for malformed entries, near-duplicates, conflicts, and MEMORY.md index drift.neo memory import [--dry-run]ingests a peer tool's memory files into neo's store as REVIEW facts on probation (trust-first;imported:claude-memorytag, content-hash watermark for idempotency).neo memory explain <fact-id-or-prefix> [--json]is a deterministic, read-only join across FactStore and the learning-episode ledger: provenance, supporting/conflicting outcomes, retrieval/context use, metric mutations, rollback, and supersession; it initializes neither embeddings nor an LM. - Evaluation:
neo memory evaluate-learning [--json] [--workspace PATH]runs the versionedbenchmarks/learning_loop_v1.jsoncorpus against memory-disabled, legacy-immediate, and evidence-driven policies. All ten causal/safety scenarios, zero harmful/unsupported/repeat-error/leakage thresholds, a 500 ms local latency cap, zero model calls/tokens, and primary-quality improvement are hard gates. (neo/memory/issues.py,neo/memory/rulesync.py,neo/memory/memaudit.py,neo/memory/memimport.py)
- Per-scope valid-fact caps (
- Domain tags (
Fact.domain,memory.models.SUGGESTED_DOMAINS): optional free-form area tag orthogonal toFactKind—code-style,testing,git,debugging,workflow,security,file-patterns,architecture,performanceare the suggested vocabulary, but any string is valid.retrieve_relevant(..., domain=...)filters by exact match;domain=Nonereturns all facts including unset ones. - Outcomes (
memory.outcomes+store.detect_implicit_feedback): ACCEPTED/MODIFIED act on a linked legacy fact with confidence +0.2 / −0.2 (±arch_mod); ACCEPTED bumpssuccess_count. New suggestions remain episode-local candidates until independently accepted twice; deterministic verification failure blocks promotion. MODIFIED also writes a REVIEW at confidence 0.4; ACCEPTED falls back to a REVIEW (suggestion_confidence + 0.1) only for legacy unattributed sessions. UNVERIFIED is recorded but never changes confidence or success. INDEPENDENT writes a REVIEW at confidence 0.2. REGRESSION is an explicitly attributed delayed failure; two distinct contradicting source episodes roll back their promoted fact without penalizing unrelated retrieved facts. Footgun: if you add a newOutcomeType, update bothoutcomes.pyandstore.detect_implicit_feedback. - Retrieval: `rank_score = recall_decay(sim)·confidence + success_bonus·effectiveness_f
- provenance_bonus
.memory.models.rank_scoreis the single source of truth — if you change the formula, auditContextAssembler._score_factstoo. Cosine is batched viamath_utils.batched_cosine. Hybrid: 0.7·dense + 0.3·BM25; half the result slots ranked byrank_score, half by raw cosine. CONSTRAINT/ARCHITECTURE/DECISION and theseed/community/synthesizedtags bypass decay. Branching prompts (CHAIN/SPLIT) get per-branch retrieval viamemory.query_routing`; each surfaced EPISODE pulls up to 2 peer episodes from the same session.
- provenance_bonus
- Local storage: per-scope JSON files in
~/.neo/facts/with inline embeddings. Fine while any single scope file stays under ~10k facts; revisit the backend past that.project_idisSHA256[:16]of the normalized git remote URL (scope._compute_project_id) so the same repo on different clones / worktrees / machines hashes to the same ID. Falls back to a path hash for repos without a remote. Legacy path-hashed fact and watermark files are renamed in place onFactStoreinit (store._migrate_legacy_project_id_files). - Context assembly four-layer model is from Beyond Conversation: A State-Based Context
Architecture for Enterprise AI Agents (Liotta, 2025); the
ContextAssemblertoken-budget enforcement is ported from Memgine: A Deterministic Memory Engine for Stateful AI Agents (Liotta, 2026). Both PDFs: state-based-context-architecture and memgine-deterministic-memory-engine. Both are evaluated by StateBench. Changes to layer ordering, the 2/3 constraint cap, or the inline(changed from: X)annotation should preserve the validated 95.8% decision-accuracy contract (GPT-5.2 on the v1.0 development split). Seedocs/solutions/token-budget-enforcement.md. - A2UI memory inspector (
neo.a2ui): a per-project A2UI v0.9 surface (neo-<project_id8>) registered with the runningcar-serverdaemon so any conformant renderer (CarHost.app, future webviews) can inspect neo's state live. Two tabs: Observer (status badge, pid, last cycle, recent cycles list, Kick/Stop buttons) and Memory (valid fact count, by kind, by scope, probation count). Updates pushed by the observer process at the end of each synthesis cycle — the same FactStore load powers both tabs, so the inspector adds zero hot-path cost. Kick/Stop buttons emita2ui.actionnotifications which the observer dispatches tokick_observer/stop_observer— closes the loop with CAR's supervisor. Footgun: Python'scar_runtime.a2ui_*helpers are in-process only; reaching the daemon's shared store (which renderers subscribe to) requires speaking JSON-RPC over its WebSocket.neo.a2ui.DaemonClientis that bridge. Activation: auto when127.0.0.1:9100is reachable; silent no-op otherwise. Addswebsockets>=12.0to the[car]extra. - Async transcript-mining observer (
memory.observer): a single global background process (CAR agentneo-observer,--daemon --all) that sweeps every discovered project each cycle, round-robin and watermark-gated. The earlier per-project model (neo-observer-<id12>) is migrated away on bootstrap. Container roots (/,$HOME,~/git) are excluded from discovery. It ransynthesize_reviewsuntil that subsystem was removed. Hard dep: car-runtime ≥ 0.17.0 and a runningcar-serverdaemon — CAR's supervisor owns the spawn / restart-on-failure / log redirection / clean SIGTERM shutdown. Spec persisted to~/.car/agents.json(auto_start: trueso it comes back on daemon boot); logs land at~/.car/logs/neo-observer-<id8>.{stdout,stderr}.log. Lifecycle:neo memory observer {start|stop|status|kick}—kickmaps toagents_restartsince CAR has no signal-passthrough primitive. Status surfaces CAR's raw state verbatim (running|stopped|starting|backoff|errored) so restart-loops are diagnosable. Tunables:NEO_OBSERVER_INTERVAL_SECONDS(default 300),NEO_OBSERVER_COOLDOWN(default 60, per-process). Footgun: the interpreter path (sys.executable) must not live under a world-writable directory (/tmp,/private/tmp,/var/tmp,/dev/shm) — the CAR daemon rejects such commands as a security measure. Use a venv under$HOMEor a system install. - Observability: retrieve / add_fact / lm_call / overseer_tick events land in
~/.neo/metrics.jsonl. Gated byNEO_PROFILE:off(no emit),minimal(lm_call only),standard(default, all events),strict(reserved for future verbose events; currently == standard).NEO_METRICS=offis a legacy hard kill-switch that overridesNEO_PROFILE. Sessions and watermarks live in~/.neo/sessions/. - Debugging:
neo --dry-run "your query"assembles the full context (file selection, fact retrieval, constraints, four-layer assembly) and prints what would be sent to the LM, then exits without making the LLM call. Faster iteration on context-gatherer and retrieval changes than waiting for an inference round trip. - CarAdapter defaults
intent_hint={"task":"code"}so CAR's router picks a code-capable model rather than the chat default. This is the local workaround for Parslee-ai/car-releases#52 (route_modelis cost-biased for "simple" prompts and ranksgpt-5.3-codex/o3behindgpt-4.1-mini). If that upstream lands, revisit the default. - Operating modes (
neo.operating_mode): standalone defaults tolearnfor backward compatibility (repository read-only, evidence learning enabled).adviseandpatchretrieve memory but never detect outcomes/create candidates;verifyrequires caller-provided changes and makes zero LM calls;agentrequires explicit workspace-relative write globs plus a hostExecutionAdapter. Neo never executes generated command strings, and standalone/CAR-without-executor fail closed. - Goal-aware execution envelope (
neo.execution_context): JSON/CAR callers may supply goal, intent, constraints, success criteria, attempt, outcome, progress, trajectory, caller role, and requested output. Missing goal/intent values are deterministic, confidence-scored provisional context; never promote an inferred goal or intent as durable truth. Retrieval is conditioned on the resolved envelope. Loop stop/change decisions must use observed progress/outcome evidence, never model confidence alone. Proof-aware callers should declarevalidation_gatesand link eachvalidation_observationbygate_id; aggregate success never satisfies missing gates, and stale/skipped/unavailable evidence fails closed.hypothesesare episode-local falsifiable claims with explicit evidence transitions, never durable truth by generation.execution_identitypreserves goal/task/parent/session and cross-repository provenance. Runneo memory evaluate-execution --jsonfor the deterministic zero-model safety gate. - When creating a pull request, always use the PR template included in the repo.
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.
- 8d ago First seen · 179 lines · 3,383 tokens per session scan A e845f08d3cbb
neo AGENTS.md is an instructions file published in the GitHub repository Parslee-ai/neo (16 stars, last pushed today), licensed Apache-2.0. It adds 3,383 tokens to every session, about $0.0169 per session on Opus 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.
Other instructions, from other repositories
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.