feat: adopt symlink approach for cross-tool instruction files
Replace 4 separate instruction files with 1 real file + symlinks: - .github/copilot-instructions.md is the canonical instruction file - CLAUDE.md and .cursorrules are symlinks to it - AGENTS.md stays as global config (not a project instruction file) This eliminates all sync/merge logic - changes propagate automatically. Changes: - AGENTS.md: rewrite Cross-Tool Instruction Files section for symlink convention - librarian.md: simplify to maintain single instruction file + verify symlinks - lead.md: simplify PHASE-WRAP and Documentation Completion Gate - commands (init, bootstrap-memory, save-memory): update for symlink model - doc-coverage skill: verify symlinks exist and point correctly
This commit is contained in:
@@ -1,52 +0,0 @@
|
||||
# OpenCode Agent Configuration
|
||||
|
||||
This repository contains the multi-agent configuration for OpenCode, defining agent roles, permissions, quality pipelines, and project memory conventions.
|
||||
|
||||
## Project Structure
|
||||
|
||||
```
|
||||
opencode.jsonc # Main config: default agent, plugins, permissions, MCP servers
|
||||
agents/ # Agent definitions (one .md per agent)
|
||||
lead.md # Primary orchestrator
|
||||
coder.md # Implementation agent
|
||||
reviewer.md # Code review (read-only code, writes .memory/*)
|
||||
tester.md # Test validation (writes .memory/*)
|
||||
explorer.md # Codebase mapping (read-only code, writes .memory/*)
|
||||
researcher.md # Technical investigation (writes .memory/*)
|
||||
librarian.md # Documentation specialist (full edit)
|
||||
critic.md # Plan review gate (writes .memory/*)
|
||||
sme.md # Domain expert (writes .memory/*)
|
||||
designer.md # UI/UX guidance (writes .memory/*)
|
||||
.memory/ # Persistent project memory (knowledge, decisions, plans, research)
|
||||
AGENTS.md # OpenCode instruction file
|
||||
CLAUDE.md # Claude Code instruction file
|
||||
.github/copilot-instructions.md # GitHub Copilot instruction file
|
||||
.cursorrules # This file (Cursor instruction file)
|
||||
```
|
||||
|
||||
## Agent Permission Model
|
||||
|
||||
- **Full edit access:** `lead`, `coder`, `librarian`.
|
||||
- **Memory-only edit access:** `reviewer`, `tester`, `explorer`, `researcher`, `critic`, `sme`, `designer` — `permission.edit: allow` in config, but instructions restrict edits to `.memory/*` only. Code/source edits remain read-only.
|
||||
- OpenCode does not support path-scoped `permission.edit`, so guardrails are instruction-level.
|
||||
|
||||
## Memory System
|
||||
|
||||
`.memory/` is the persistent project knowledge store:
|
||||
- `knowledge.md` — architecture, patterns, key concepts
|
||||
- `decisions.md` — architecture decisions, design choices
|
||||
- `plans/<feature>.md` — active plans with tasks and statuses
|
||||
- `research/<topic>.md` — research findings
|
||||
|
||||
Workflow: read relevant `.memory/` files → work → update `.memory/` files with outcomes.
|
||||
|
||||
## Quality Pipeline
|
||||
|
||||
Standard flow: `explorer/researcher → coder → reviewer → tester → librarian`.
|
||||
Three tiers based on change scope (Tier 1: full, Tier 2: standard, Tier 3: fast).
|
||||
|
||||
## Conventions
|
||||
|
||||
- Cross-tool instruction files (`AGENTS.md`, `CLAUDE.md`, `.github/copilot-instructions.md`, `.cursorrules`) must stay synchronized.
|
||||
- `.memory/knowledge.md` is the canonical source of truth; instruction files are derived views.
|
||||
- Recording discipline: record only outcomes/decisions/discoveries in `.memory/`, never ceremony checkpoints.
|
||||
1
.config/opencode/.cursorrules
Symbolic link
1
.config/opencode/.cursorrules
Symbolic link
@@ -0,0 +1 @@
|
||||
.github/copilot-instructions.md
|
||||
Reference in New Issue
Block a user