https://github.com/fernandomenuk/openspec
Universal AI context transpiler. Define once. Spec everywhere. Generates CLAUDE.md, .cursorrules, GEMINI.md, AGENTS.md, and more from a single source of truth.
https://github.com/fernandomenuk/openspec
ai aider claude cli context copilot cursor developer-tools gemini typescript
Last synced: 2 months ago
JSON representation
Universal AI context transpiler. Define once. Spec everywhere. Generates CLAUDE.md, .cursorrules, GEMINI.md, AGENTS.md, and more from a single source of truth.
- Host: GitHub
- URL: https://github.com/fernandomenuk/openspec
- Owner: fernandomenuk
- License: mit
- Created: 2026-03-12T17:34:28.000Z (3 months ago)
- Default Branch: master
- Last Pushed: 2026-03-12T18:27:55.000Z (3 months ago)
- Last Synced: 2026-03-13T00:33:47.255Z (3 months ago)
- Topics: ai, aider, claude, cli, context, copilot, cursor, developer-tools, gemini, typescript
- Language: TypeScript
- Size: 70.3 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
English |
简体中文 |
Português (Brasil)
🛑 Stop Context Drift.
The universal AI context infrastructure.
Sync your project rules across Cursor, Claude, Gemini, and Windsurf automatically.
One source of truth. Seven outputs. Zero manual work.
Quickstart ·
Why? ·
Architecture ·
Config ·
Contributing
---
## ✨ Why OpenSpec?
If you use more than one AI tool, you have a **context fragmentation problem**.
- **Cursor** wants `.cursorrules`
- **Claude Code** wants `CLAUDE.md`
- **Aider** wants `.aiderrules`
- **Copilot** wants `.github/copilot-instructions.md`
When your project conventions change, you have to manually update **7+ different files**. Miss one, and your AI starts hallucinating outdated patterns.
**OpenSpec is the "Transpiler" for AI context.** You define your rules in clean, modular Markdown files, and OpenSpec generates the optimized format for every AI agent in your stack.
### 🚀 Key Features
- **🤖 AI-Native Workflow:** Designed to be managed *by* your AI agent.
- **🔄 Universal Sync:** Supports Cursor, Claude, Gemini, Copilot, Aider, Codex, and Windsurf.
- **🧠 Zero-Knowledge Setup:** `openspec analyze` scans your codebase and *tells* the AI what rules to write.
- **🔌 Claude Code First:** Native plugin for the newest, most powerful AI coding tool.
- **🛠️ Watch Mode:** Updates your context files in real-time as you edit your modules.
---
## The Problem
Every AI tool has its own context file (CLAUDE.md, .cursorrules, GEMINI.md, etc.). When project conventions evolve, you have to manually update 7 different files. Miss one, and your AI agent starts writing inconsistent code.
OpenSpec solves this by acting as the context layer for your AI agents.
## The Solution
```
.openspec/modules/ ← AI writes your rules HERE
├── shared.md
├── frontend.md
└── backend.md
│
▼ AI runs openspec sync
│
CLAUDE.md ← Generated
.cursorrules ← Generated
GEMINI.md ← Generated
... (7+ outputs) ← Generated
```
**One source of truth. Seven outputs. Zero manual work.**
---
## ⚡ Truly Zero Manual Work (Recommended)
OpenSpec is built for AI agents to manage autonomously. You don't even need to initialize the project—the AI does it for you.
### 1. Add to Claude Code
Simply run these commands inside your Claude Code session:
```bash
/plugin marketplace add fernandomenuk/openspec
/plugin install openspec@openspec
```
### 2. Configure Automatically
Run the configuration command:
```bash
/openspec:configure
```
**That's it.** Claude will analyze your codebase, create the rules, and sync them to every tool in your stack.
---
## 🛠️ CLI Workflow (Any Agent)
If you use Cursor, Windsurf, Aider, or any other agent, just tell them:
> *"Run `npx @menukfernando/openspec analyze`, use the output to write modular rules to `.openspec/modules/`, and then run sync."*
OpenSpec's `analyze` command provides a high-density structured report specifically designed for AI agents to understand your codebase conventions instantly.
---
## 🔧 CLI Reference
```
Usage: openspec [command] [options]
Commands:
analyze Deep codebase analysis for AI-powered rule generation (auto-inits)
sync [--quiet] Compile modules → generate all AI context files
watch Watch for module changes, auto-sync on save
status Show modules, targets, and sync status
diff Preview what changes sync would make
add Create a new rule module
install Install OpenSpec Claude Code Plugin (Local)
hooks [--remove] Install/remove git pre-commit hook
clean Remove all generated files (only openspec-managed)
help [command] Show help for a command
```
---
## 📋 Roadmap
- [x] Core transpiler engine
- [x] 7 target outputs (Claude, Cursor, Gemini, Copilot, Aider, Codex, Windsurf)
- [x] **Claude Code Plugin & Marketplace support**
- [x] **Truly Zero-Init Workflow**
- [ ] MCP server mode for dynamic context
- [ ] Module inheritance & composition
- [ ] Monorepo support
---
## 📄 License
MIT — see [LICENSE](LICENSE) for details.
---
Stop copy-pasting AI rules.
npx @menukfernando/openspec analyze && npx @menukfernando/openspec sync