Skip to content

larsen66/agentsge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

agentsge

Open-source CLI for AGENTS.md, .agents project memory, MCP sync, and automatic knowledge capture across AI coding agents.

agentsge makes any repository agent-ready. It creates a versioned .agents/ directory, keeps AGENTS.md and tool-specific entrypoints thin, and helps projects accumulate durable context in git instead of losing it between chats.

What It Solves

AI-assisted development usually breaks in the same places:

  • AGENTS.md, CLAUDE.md, .cursorrules, GEMINI.md, Copilot instructions, and MCP config drift apart.
  • New sessions start from zero, so the next agent has to rediscover architecture, conventions, and hidden constraints.
  • Teams switch between Claude Code, Cursor, Codex, Copilot, Gemini CLI, and other tools, but project context stays tool-local.

agentsge treats project intelligence as project infrastructure:

  • AGENTS.md tells agents what to do.
  • .agents/ remembers what the project already learned.

Search Intents This Project Covers

If you are looking for any of these, you are in the right repo:

  • AGENTS.md generator
  • .agents project memory
  • AI coding agent onboarding
  • Claude Code context sync
  • Cursor rules alternative
  • Codex CLI shared repo context
  • GitHub Copilot instructions sync
  • Gemini CLI project memory
  • MCP config sync for AI agents
  • LLM-friendly developer documentation

Quick Start

Run directly from npm:

npx agentsge init

Or install globally:

npm install -g agentsge
agents init

Then open the repository in your AI coding agent. It reads AGENTS.md, follows onboarding, and starts filling .agents/ with structured project knowledge.

Core Features

  • AGENTS.md bootstrap for any repo
  • .agents/ as the versioned source of truth
  • automatic knowledge capture via hooks
  • typed project memory: architecture, patterns, lessons, conventions, dependencies
  • MCP config defined once and synced to multiple agent formats
  • stack detection for language, framework, testing, package manager, and monorepo structure
  • zero vendor lock-in: markdown and YAML stored in git

Supported Agent Surfaces

Surface Role
AGENTS.md Universal entrypoint for agent onboarding
CLAUDE.md Claude Code optimized entrypoint
.cursorrules Cursor optimized entrypoint
GEMINI.md Gemini-friendly entrypoint
.codex/ Codex / compatible config target
.github/copilot-mcp.json Copilot MCP sync target

What agents init Creates

.agents/
  config.yaml              # Project name, stack, description
  rules/                   # Mandatory rules for agents
    _capture.md            # Ongoing knowledge capture policy
  skills/                  # Reusable multi-step workflows
  mcp/                     # MCP server definitions
    config.yaml            # Synced to tool-specific MCP files
  knowledge/
    _index.md              # Always-loaded project knowledge index
    architecture/          # Decisions and trade-offs
    patterns/              # Repeating codebase patterns
    lessons/               # Bugs and misleading symptoms
    conventions/           # Team conventions not obvious from code
    dependencies/          # Why a dependency or workaround exists

How It Works

  1. agentsge init scans the repository and creates .agents/.
  2. AGENTS.md becomes the onboarding entrypoint for AI coding agents.
  3. The agent reads repo structure, asks only non-derivable questions, and writes durable project knowledge.
  4. Hooks capture new lessons from future sessions and queue them for review.
  5. agents sync keeps entrypoints and MCP configs aligned across tools.

Commands

agents init
agents init --force

agents sync
agents status
agents validate

agents capture list
agents capture accept <name>
agents capture accept --all
agents capture reject <name>
agents capture context --compact

agents hooks install
agents hooks install --agent claude

agents add rule <name>
agents add skill <name>
agents add mcp <name>

Why This Is Better Than Static Agent Files

  • Static instructions drift.
  • Project memory compounds.
  • Multiple agents can share the same source of truth.
  • Knowledge stays in the repo instead of disappearing into chat history.
  • The format is readable by humans, search engines, and LLM-based tooling.

Knowledge System

The project captures durable information in five types:

  • architecture for structural decisions and rejected alternatives
  • pattern for reusable implementation shapes
  • lesson for bugs where the symptom hid the cause
  • convention for team rules that are not obvious from code
  • dependency for non-obvious package choices and workarounds

This gives future agents a compressed, reusable map of the repo instead of forcing repeated rediscovery.

MCP Sync

Define MCP once in .agents/mcp/config.yaml, then sync to target formats:

agents add mcp postgres
agents sync

Generated targets include Claude, Cursor, Codex, and Copilot MCP configuration surfaces.

Automatic Knowledge Capture

When hooks are installed, agentsge can capture project knowledge without adding agent overhead:

  • session start stores a git marker and injects a knowledge digest
  • file edits are logged during work
  • session end inspects the diff and extracts candidate knowledge items
  • candidates land in pending/ for human review before entering the knowledge base

SEO / LLM Notes

The public site ships crawlable docs, route-level metadata, structured data, robots.txt, sitemap.xml, and llms.txt so both search engines and LLM-based search systems can understand the project quickly.

Requirements

  • Node.js >= 22

License

MIT

About

Open-source CLI for AGENTS.md, .agents project memory, MCP sync, and automatic knowledge capture across AI coding agents

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages