agentleFS
EcuaByte-latEcuaByte-lat/Cortex/AGENTS.md

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 code style.

    Of the AGENTS.md files we read, the 33,398 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.

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
  1. Distinctive:

    Verify Before Change: - Check existing patterns first

    line 9
  2. Common:

    Zero Secrets: - Never log, commit, or transmit secrets/PII

    line 11
  3. Distinctive:

    Before product or architecture work, read:

    line 19
  4. Distinctive:

    Purpose: Ensure PRs don't contradict architectural consensus

    line 37
  5. Very specific:

    When the Cortex memory connector is unavailable, do not claim that context was loaded.

    line 97

≈ “Common” is an estimate: at least 1 in 5 of the 43,423 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

AI Agent Orchestration Protocol

Generated by Cortex Memory System - 2026-01-09

Constitutional Principles

  1. Context First - Query cortex_context before decisions when available; otherwise inspect the canonical strategy and repository state
  2. Document Why - Save reasoning, not just choices
  3. Verify Before Change - Check existing patterns first
  4. Incremental Progress - Small commits, frequent checkpoints
  5. Zero Secrets - Never log, commit, or transmit secrets/PII
  6. Single Responsibility - One clear purpose per task
  7. 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.md
  • docs/strategy/MARKET_RESEARCH.md
  • docs/strategy/DISTRIBUTION.md
  • docs/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-review on 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")
EventMemory Type
Decisionsdecision
Patternscode
Factsfact
Risksnote 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 --resume to continue previous session
  • /clear to reset context for new task
  • Session history stored locally for retrospective

MCP Tools

ToolPurpose
cortex_contextLoad task-relevant memories
cortex_addSave new memory
cortex_searchQuery existing memories

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.