AGENTS.md
AGENTS.mdAGENTS.mdroot
Quality
92/100
Scores the file, not the repository.Length
550 words
18 headings · 4 code blocksRepository
35
— · pushed 141 days agoLast changed
3 days ago
First indexed 3 days ago.1# AGENTS instructions23## Project Overview45**AI Rules Sync (AIS)** is a CLI tool for synchronizing, managing, and sharing AI agent rules across projects using symbolic links.67### Tech Stack8- **Language**: TypeScript (strict mode)9- **Build**: `tsc` (ES modules)10- **Test**: Vitest11- **CLI Framework**: Commander.js12- **Package Manager**: pnpm1314### Key Features15- Multi-repository rule management (Cursor, Copilot, Claude, Trae)16- Symbolic link-based synchronization17- Shell tab completion (bash, zsh, fish)18- Plugin-based adapter architecture1920## Directory Structure2122```23src/24├── adapters/ # Tool-specific adapters (cursor, copilot, claude, trae)25│ ├── base.ts # Base adapter factory26│ ├── types.ts # Adapter interfaces27│ └── index.ts # Adapter registry28├── commands/ # CLI command handlers29│ ├── handlers.ts # Core command logic (add, remove, link, unlink)30│ ├── install.ts # Install command31│ └── helpers.ts # Shared utilities32├── cli/33│ └── register.ts # CLI registration34├── completion/35│ └── scripts.ts # Shell completion scripts36├── config.ts # Global config (~/.config/ai-rules-sync/)37├── project-config.ts # Project config (ai-rules-sync.json)38├── sync-engine.ts # Symlink creation/removal39├── link.ts # Link utilities40├── git.ts # Git operations41├── utils.ts # Shared utilities42└── index.ts # Entry point43```4445## Development Commands4647```bash48# Build TypeScript49npm run build5051# Run tests (watch mode)52npm test5354# Run tests once55npx vitest run5657# Test CLI locally58node dist/index.js <command>59```6061## Code Style Guidelines62631. **TypeScript Strict Mode**: All code must pass strict type checking642. **Functional Programming**: Prefer pure functions, avoid side effects where possible653. **Testing Required**: All new features must have tests in `src/__tests__/`664. **ES Modules**: Use `.js` extension in imports for Node.js compatibility675. **Error Handling**: Use descriptive error messages with chalk for CLI output6869### Adapter Pattern7071All adapters follow the `BaseAdapter` interface:72```typescript73interface BaseAdapter {74 name: string; // Unique adapter name75 tool: string; // Tool identifier (cursor, copilot, etc.)76 subtype: string; // Type within tool (rules, commands, skills)77 configPath: string[]; // Path in ai-rules-sync.json78 defaultSourceDir: string;79 targetDir: string;80 mode: 'file' | 'directory';81}82```8384## Workflows8586### After Code Changes (Auto-trigger)8788When making significant code changes, update documentation:89901. **Update KNOWLEDGE_BASE.md** (if architecture/features changed)91 - Use `/update-knowledge-base` skill92 - Document new adapters, commands, or architectural changes93942. **Update README.md** (English)95 - Add new features, commands, or usage examples96 - Keep architecture section current97983. **Sync README_ZH.md** (Chinese)99 - Use `/sync-readme` skill100 - Maintain parity with English README1011024. **Run Tests**103```bash104 npm test105```106107### Session Summary (End of Session)108109Before ending a productive session:1101111. **Identify Reusable Patterns** → Generate Rules112 - Coding standards discovered113 - Project-specific conventions1141152. **Identify Multi-step Workflows** → Generate Skills116 - Complex operations that benefit from step-by-step guidance117 - Integration workflows1181193. **Identify Frequent Commands** → Generate Commands120 - One-click operations121 - Common development tasks122123Use `/summarize-session` to generate artifacts.124125## Testing Conventions126127- Test files: `src/__tests__/*.test.ts`128- Use Vitest's `describe`, `it`, `expect`129- Mock file system operations with `vi.mock('fs-extra')`130- Test adapters independently from CLI131132## Git Commit Guidelines133134- Use conventional commits: `feat:`, `fix:`, `refactor:`, `docs:`, `test:`135- Include scope when relevant: `feat(adapter): add windsurf support`136- Keep commits atomic and focused137138## Related Files139140- `README.md` - English documentation141- `README_ZH.md` - Chinese documentation142- `.cursor/rules/` - Cursor-specific rules (if any)143- `ai-rules-sync.json` - Project configuration example144
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| n8n-io/n8npackages/@n8n/agents/AGENTS.md · 199k | AGENTS.md | buildteststylearch+3 | 100/100 | 3 days ago | |
| TryGhost/Ghoste2e/AGENTS.md · 55k | AGENTS.md | setupteststylearch+2 | 100/100 | 3 days ago | |
| SkeneTechnologies/skene-cookbookAGENTS.md · 51 | AGENTS.md | setupbuildtestlint-format+7 | 100/100 | 2 days ago | |
| mui/material-uiAGENTS.md · 99k | AGENTS.md | setupbuildtestlint-format+9 | 100/100 | 3 days ago | |
| aaif-goose/gooseAGENTS.md · 52k | AGENTS.md | setupbuildtestlint-format+6 | 100/100 | 3 days ago | |
| duckduckgo/content-scope-scriptsspecial-pages/AGENTS.md · 70 | AGENTS.md | buildteststylearch+3 | 100/100 | 3 days ago | |
| trick77/agents-md-syncAGENTS.md · 2 | AGENTS.md | setupbuildteststyle+5 | 100/100 | 3 days ago | |
| code-yeongyu/oh-my-openagentpackages/web/AGENTS.md · 67k | AGENTS.md | setupbuildtestlint-format+6 | 100/100 | 2 days ago |
