Cortex
AGENTS.md2 starsChanged 11 months agoMITView on GitHub
Generated by Cortex Memory System - 2026-01-09 Cortex is not a generic AI memory product. It is a local-first, evidence-backed engineering state plane for reliable handoffs between humans and coding agents. Before product or architecture work, read: The primary outcome is verified continuation of a software task. A memory, graph, MCP endpoint, or dashboard is only valuable when it improves that outcome. Store subagent definitions in .claude/agents/: Pattern: Lead Agent delegates to specialized Subagents Configure in .claude/settings.json: When the Cortex…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 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 repository3 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/cortex.mdcCursor rule
The file
We split this AGENTS.md into the rules it gives an agent
5 rules. About 1 is common, 3 are distinctive, and 1 is very specific to this project.
≈1
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
1
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 9
Verify Before Change: - Check existing patterns first
- Common: line 11
Zero Secrets: - Never log, commit, or transmit secrets/PII
- Distinctive: line 19
Before product or architecture work, read:
- Distinctive: line 37
Purpose: Ensure PRs don't contradict architectural consensus
- Very specific: line 97
When the Cortex memory connector is unavailable, do not claim that context was loaded.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 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
AI Agent Orchestration Protocol
Generated by Cortex Memory System - 2026-01-09
Constitutional Principles
- Context First - Query
cortex_contextbefore decisions when available; otherwise inspect the canonical strategy and repository state - Document Why - Save reasoning, not just choices
- Verify Before Change - Check existing patterns first
- Incremental Progress - Small commits, frequent checkpoints
- Zero Secrets - Never log, commit, or transmit secrets/PII
- Single Responsibility - One clear purpose per task
- Plan Before Code - Outline approach, get approval, then implement
Product North Star
Cortex is not a generic AI memory product. It is a local-first, evidence-backed engineering state plane for reliable handoffs between humans and coding agents.
Before product or architecture work, read:
docs/strategy/PRODUCT_DIRECTION.mddocs/strategy/MARKET_RESEARCH.mddocs/strategy/DISTRIBUTION.mddocs/strategy/ADOPTION.md
The primary outcome is verified continuation of a software task. A memory, graph, MCP endpoint, or dashboard is only valuable when it improves that outcome.
Agent Personas
1. Onboarding Agent
Purpose: Reduce developer ramp-up time from weeks to hours
- Queries Shared Knowledge Graph to explain why code exists
- References architectural decisions from memory
- Points to relevant documentation
2. Code Review Agent
Purpose: Ensure PRs don't contradict architectural consensus
- Queries Decision Trail before reviewing
- Flags "Semantic Drift" when code evolves away from truths
- Uses adversarial review: "What would a senior dev criticize?"
3. Tech Debt Radar
Purpose: Track and surface technical debt early
- Scans for patterns violating Architecture Guardrails
- Logs violations as a documented risk; use a supported record type until a dedicated risk type exists
- Prioritizes by impact and effort
4. Security Auditor
Purpose: Identify vulnerabilities before deployment
- Runs
/security-reviewon changes - Checks for OWASP Top 10 issues
- Validates input handling and auth flows
Subagent Orchestration
Store subagent definitions in .claude/agents/:
# .claude/agents/reviewer.yaml
name: Code Reviewer
description: Reviews code for bugs and style
tools: [Read, Search]Pattern: Lead Agent delegates to specialized Subagents
Hooks Configuration
Configure in .claude/settings.json:
{
"hooks": {
"PreToolUse": [{
"matcher": "Write|Edit",
"command": "echo 'Validating...' && biome check"
}],
"PostToolUse": [{
"matcher": "Write",
"command": "biome format --write"
}]
}
}Context and Evidence Protocol
cortex_context("summary of current task")| Event | Memory Type |
| Decisions | decision |
| Patterns | code |
| Facts | fact |
| Risks | note or decision until a dedicated risk type exists |
When the Cortex memory connector is unavailable, do not claim that context was loaded. Record important reasoning in the relevant ADR or strategy document instead.
Session Management
claude --resumeto continue previous session/clearto reset context for new task- Session history stored locally for retrospective
MCP Tools
| Tool | Purpose |
cortex_context | Load task-relevant memories |
cortex_add | Save new memory |
cortex_search | Query existing memories |
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.

