agentleFS
AvyayalayaAvyayalaya/agent-prime/AGENTS.md

agent-prime

AGENTS.md8 starsChanged 7 months agoMITView on GitHub

Machine-readable system manifest. Primary audience: AI orchestrators deciding whether to route work here. Agent Prime is an open-source AI operating system built entirely from markdown files. It provides 13 specialized agents + a runtime-portable 5-agent quality gate (Agent Council), 12 domain skills with typed schemas, persistent memory with recursive self-improvement, 8 structured guardrails, and 4 declarative workflows. Zero dependencies — no database, no runtime, no package manager. Clone the repo and point any LLM at it. The system gets permanently…

  • 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 repository2 other files it gives its agents.

The file

We split this AGENTS.md into the rules it gives an agent

4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Recursive learning loop: Every user correction becomes a permanent rule in shared/learnings.md, applied to all agents in all future sessions

    line 17
  2. Distinctive:

    Session resilience: Write-ahead journaling, crash recovery, session audit, learning extraction

    line 22
  3. Distinctive:

    Zero dependencies: No npm, no pip, no Docker.

    line 25
  4. Very specific:

    Every skill follows codified standards (see shared/toolkits/skill_file_spec.md):

    line 100

≈ “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.

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

AGENTS.md — Agent Prime

Machine-readable system manifest. Primary audience: AI orchestrators deciding whether to route work here.

Overview

Agent Prime is an open-source AI operating system built entirely from markdown files. It provides 13 specialized agents + a runtime-portable 5-agent quality gate (Agent Council), 12 domain skills with typed schemas, persistent memory with recursive self-improvement, 8 structured guardrails, and 4 declarative workflows. Zero dependencies — no database, no runtime, no package manager. Clone the repo and point any LLM at it. The system gets permanently smarter with every correction via an append-only learnings registry that propagates constraints to all agents.

Repository: https://github.com/avyayalaya/agent-prime Instruction files: CLAUDE.md (Claude Code), .github/copilot-instructions.md (GitHub Copilot), both kept in sync. Architecture: Markdown-only, 7 layers, cross-LLM compatible (Claude Code, GitHub Copilot, Gemini CLI).

Capabilities

  • 13 specialized agents with typed inputs, outputs, and Context Verification Gates
  • 12 PM-domain skills with codified methodologies, failure modes, and benchmark scores
  • Recursive learning loop: Every user correction becomes a permanent rule in shared/learnings.md, applied to all agents in all future sessions
  • 8 structured guardrails enforced via system rules in CLAUDE.md (including a runtime-portable 5-agent quality gate)
  • 4 declarative workflows composing agents into end-to-end pipelines
  • 49 system rules governing context verification, voice, NDA compliance, change propagation, and quality
  • 100+ accumulated learnings across voice, content, process, quality, build, and agent design categories
  • Session resilience: Write-ahead journaling, crash recovery, session audit, learning extraction
  • Cross-LLM compatibility: Works on Claude Code, GitHub Copilot Chat, Gemini CLI without modification
  • Onboarding wizard: Interactive setup in under 10 minutes via the Onboarder agent
  • Zero dependencies: No npm, no pip, no Docker. Python 3.10+ for optional scripts only.

Agents

#AgentRoleInputOutputPrompt Path
1PrimeOrchestratorDispatch queue, registry stateRouting decisions, quality reviews, kill signalsagents/prime/prompt.md
2ScoutSignal detectionTopic or thesis areaRanked signals with source, relevance, freshness scoresagents/scout/prompt.md
3SynthesizerThesis buildingSignals, evidence fragmentsStructured thesis with evidence map and confidence levelsagents/synthesizer/prompt.md
4WriterPublicationMature thesisPublishable artifact (Substack, LinkedIn, conference talk)agents/writer/prompt.md
5ConnectorRelationship buildingPublished artifacts, strategic goalsDistribution plans, outreach sequences, relationship pipelineagents/connector/prompt.md
6Planner4-stage planningRough idea or scratchpadBuild Handoff Spec (Excavation, Research, Architecture, Critique)agents/planner/prompt.md
7BuilderExecutionBuild Handoff Spec from PlannerBuilt deliverables, integration reports, validation resultsagents/builder/prompt.md
8Industry AnalystDeep structural mappingIndustry name or sector~80-90KB structural analysis: 9 steps, 13 frameworks, 91+ citationsagents/industry_analyst/prompt.md
9Investment AnalystInvestment-grade analysisIndustry structural map4-lens valuation, stress-tested scenarios, investment watchlistagents/investment_analyst/prompt.md
10ExperimenterEmpirical validationThesis claim to testRunnable experiments, prototypes, validation resultsagents/experimenter/prompt.md
11ClerkTask trackingRegistry state, deadlinesStaleness reports, commitment audits, deadline alertsagents/clerk/prompt.md
12JudgeDecision proxyPending decisions with contextAuto-acts on low-risk decisions; holds high-risk with structured reasoningagents/judge/prompt.md
13EmissaryExternal boundary agentInbound signals, outbound actions5-layer pipeline: Sensing, Creation, Action, Permission, Learning. 3-tier permission governance.agents/emissary/prompt.md

Supporting agent (not counted in 13):

AgentRolePrompt Path
OnboarderInteractive setup wizard — configures identity, goals, registry in under 10 minutesagents/onboarder/prompt.md

Agent Composition Rules

Agents trigger each other via successor rules in the dispatch queue:

Completing AgentSuccessor AgentCondition
ScoutSynthesizerSignal is thesis-worthy
SynthesizerWriterThesis reaches maturity
WriterConnectorArtifact is publishable
PlannerBuilderSpec passes critique stage
BuilderWriter or ConnectorBuild is complete

Workflows

#WorkflowAgent SequenceOutputTrigger
1Research to PublishScout → Synthesizer → Writer → ConnectorPublished article with distribution planNew topic or signal detected
2Idea to BuildPlanner (4 stages) → BuilderBuilt deliverable with validationRough idea added to registry
3Signal to ActionScout → Industry Analyst → Investment AnalystInvestment-grade analysis with watchlistMarket signal in tracked sector
4Inbound to ResponseEmissary (5-layer pipeline)Assessed inbound with drafted responseExternal inbound received

Guided Projects (for new users)

ProjectPathWhat You Build
Research & Publishgetting-started/project-1-research-publish/A real draft article via Scout → Synthesizer → Writer
Plan & Buildgetting-started/project-2-plan-build/A real plan via the 4-stage Planner methodology

Skills (PM Domain)

12 codified skills with typed schemas, 1.1-1.3K lines each, 9-12 failure modes per skill.

#SkillDomainFrameworksInputOutputPath
1competitive-market-analysisAnalysis9 (7 Powers, Aggregation Theory, Christensen, JTBD, Wardley)Industry or competitor nameStructural competitive map with moat scoringshared/toolkits/skills/competitive-market-analysis/
2discovery-researchResearch8Interview data, research sourcesEvidence-backed feature hypothesesshared/toolkits/skills/discovery-research/
3problem-framingResearch8Vague problem descriptionStructured problem statement with sizingshared/toolkits/skills/problem-framing/
4specification-writingDefinition6Feature or product requirementZero-question spec with acceptance criteriashared/toolkits/skills/specification-writing/
5metric-design-experimentationMeasurement9Business objectiveMetric framework, NSM, experiment designsshared/toolkits/skills/metric-design-experimentation/
6product-strategyStrategy7 (Vision Cascade, Bet-Sizing, Option-Value Sequencing)Strategic contextRoadmap with bet sizing and resource allocationshared/toolkits/skills/product-strategy/
7go-to-market-strategyStrategy7 (Market Entry Thesis, Channel Unit Economics, Dunford Positioning)Product and market contextGTM plan with launch gating and growth mechanicsshared/toolkits/skills/go-to-market-strategy/
8pricing-packagingStrategy7 (WTP/Van Westendorp, Good/Better/Best, Sensitivity Analysis)Product and competitive contextPricing model with packaging tiers and revenue impactshared/toolkits/skills/pricing-packaging/
9executive-writingCommunication8 (Minto/SCR, Audience Calibration, Decision Architecture)Decision or strategy contextBoard memo, strategy one-pager, or exec briefshared/toolkits/skills/executive-writing/
10narrative-buildingCommunication8Product or strategy contextPositioning narrative with stakeholder pitchshared/toolkits/skills/narrative-building/
11multi-channel-publishingCommunication7 (Channel Taxonomy, Hook Adaptation, Spoken Script Derivation)Long-form contentChannel-specific formats (LinkedIn, conference, newsletter, podcast)shared/toolkits/skills/multi-channel-publishing/
12stakeholder-alignmentInfluence7 (Power-Interest-Position, Coalition Analysis, Decision Archaeology)Stakeholder contextAlignment plan with objection pre-emption and sequencingshared/toolkits/skills/stakeholder-alignment/

Skill Design Standards

Every skill follows codified standards (see shared/toolkits/skill_file_spec.md):

  • Context Gate: Required context declared upfront; skill refuses to proceed without it
  • Reader Navigation: Table of contents with section anchors
  • Notation Key: Standardized symbols for confidence, evidence quality, risk
  • Failure Modes: 9-12 explicitly named failure patterns with detection and mitigation
  • Discoverability YAML: Identity metadata for agent-to-agent discovery (SYS-015)

Guardrails

#GuardrailTypeActionApplies To
1Context GateBlockingAgent stops and asks if required files are missing — never proceeds with degraded contextAll agents
2NDA FilterBlockingNever references internal employer data, roadmaps, or unreleased featuresAll outputs
3Voice CheckCorrectiveApplies voice rules from shared/context.md; bans hype language, "not X but Y" constructionsAll artifacts
4Quality BarValidatingEvery substantial artifact includes a visible ## Quality Check sectionAll agents
5Permission TierGating3-tier governance for external actions (auto/confirm/escalate)Emissary, Connector
6Production OrderSequentialLong-form first, short-form second — never compress before the full argument existsWriter, Multi-Channel Publishing
7Publish ParityParallelBuild specs must include distribution plans with equal rigor to the build itselfPlanner, Builder, Writer
8Council GateBlockingTier-1 artifacts (external, irreversible, identity-shaping, memory writes) pass through 5-deliberator Agent Council — Skeptic, Voice & Identity, Evidence & Calibration, Strategy & Stakes, Adjudicator. CI-tested modularity invariant.Emissary (chokepoint); emitting agents have ZERO hard dependency

Getting Started

For AI agents (programmatic)

1. Read CLAUDE.md (system rules and file map)
2. Read shared/context.md (user identity, goals, constraints)
3. Read shared/registry.json (current state of all work items)
4. Read shared/learnings.md (accumulated hard constraints)
5. Invoke agents via their prompt files at agents/{name}/prompt.md

For humans (interactive)

git clone https://github.com/avyayalaya/agent-prime.git
cd agent-prime
python meta/scripts/first_run.py

Three modes available: preview (see it in browser), quick-trial (pre-built example), onboard (guided setup).

For LLM environments

EnvironmentInstruction FileHow It Loads
Claude CodeCLAUDE.mdAuto-loaded at session start
GitHub Copilot Chat.github/copilot-instructions.mdAuto-injected into every conversation
Gemini CLICLAUDE.mdRead manually or via config
Any LLMCLAUDE.mdPoint the model at this file as system context

Benchmarks

MetricScoreMethodology
PM Skills Arsenal (v1.3.0)93.3/105 (88.9%)7-dimension rubric on competitive-market-analysis skill output
Anthropic PM Skill (baseline)81/105 (77.1%)Same rubric, Anthropic's built-in PM skill
No skill (control)47/105 (44.8%)Same rubric, raw LLM with no skill guidance
Improvement over no-skill+108%47 → 98 points on identical input
Publication threshold90/105Minimum score for public release (exceeded)

Benchmark based on the competitive-market-analysis skill. Same one-sentence input across all three conditions.

Architecture

Layer 7: Workflows          4 declarative pipelines composing agents
Layer 6: Agents             13 specialized agents with typed I/O
Layer 5: Skills             12 PM-domain skills with codified methodologies
Layer 4: Guardrails         7 rules enforcing quality, voice, NDA, permissions
Layer 3: State              Registry (JSON) + dispatch queue + session state
Layer 2: Memory             Learnings (append-only) + context + reference library
Layer 1: Identity           User context, voice, goals, constraints

Design principles:

  1. Composable agents, not a hierarchy — each agent is self-contained
  2. State lives in files, not memory — all state is human-readable markdown and JSON
  3. Learning is permanent — corrections become hard constraints
  4. Agents trigger agents — dispatch queue creates push-based pipelines
  5. Quality is visible — every output includes verification

Key state files:

FileRoleFormat
shared/registry.jsonSingle source of truth for all work itemsJSON
shared/learnings.mdAppend-only correction log — hard constraintsMarkdown
shared/context.mdUser identity, goals, voice, constraintsMarkdown
prime/dispatch.mdAgent task queue with prioritiesMarkdown
prime/dashboard.mdAuto-generated pipeline viewMarkdown (generated)
shared/dependency_map.mdChange propagation registryMarkdown
shared/theses.jsonThesis data for Synthesizer and WriterJSON

Schemas: shared/schemas/ contains JSON schemas for pipeline, signals, and tasks.

File Structure

agent-prime/
├── AGENTS.md                    # This file — system manifest
├── CLAUDE.md                    # System rules (Claude Code)
├── ARCHITECTURE.md              # Detailed architecture documentation
├── QUICKSTART.md                # 4-path getting started guide
├── agents/
│   ├── prime/prompt.md          # Orchestrator
│   ├── scout/prompt.md          # Signal detection
│   ├── synthesizer/prompt.md    # Thesis building
│   ├── writer/prompt.md         # Publication
│   ├── connector/prompt.md      # Relationship building
│   ├── planner/prompt.md        # 4-stage planning
│   ├── builder/prompt.md        # Execution
│   ├── industry_analyst/prompt.md   # Structural mapping
│   ├── investment_analyst/prompt.md # Investment analysis
│   ├── experimenter/prompt.md   # Empirical validation
│   ├── clerk/prompt.md          # Task tracking
│   ├── judge/prompt.md          # Decision proxy
│   ├── emissary/prompt.md       # External boundary
│   └── onboarder/prompt.md      # Setup wizard
├── shared/
│   ├── context.md               # User identity and goals
│   ├── learnings.md             # Accumulated corrections
│   ├── registry.json            # Work item state
│   ├── dependency_map.md        # Change propagation
│   ├── theses.json              # Thesis data
│   ├── schemas/                 # JSON schemas
│   ├── runbooks/                # Operational runbooks
│   └── toolkits/skills/         # 12 PM-domain skills
├── prime/
│   ├── dashboard.md             # Auto-generated pipeline view
│   ├── dispatch.md              # Agent task queue
│   ├── briefing.md              # Session briefing
│   ├── session_state.md         # Session bootstrap
│   └── config.json              # Agent cadences
├── meta/scripts/                # Python automation scripts
├── getting-started/             # Guided first projects
└── examples/                    # Pre-built configurations

Contact

Author: Parth Sangani License: See LICENSE Issues: https://github.com/avyayalaya/agent-prime/issues

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.