chore: align opencode memory docs with .memory project

This commit is contained in:
alex
2026-03-11 11:08:39 +00:00
parent ffd0d31fa5
commit f7a1aac68b
12 changed files with 40 additions and 142 deletions

View File

@@ -47,10 +47,7 @@ Delegate to the `coder` subagent with explicit mode (`new_project` or `existing_
- Required scaffold targets:
- `README.md` — title, purpose, tech stack, quick-start, project structure overview
- `AGENTS.md` real instruction file containing shared project guidance
- `CLAUDE.md` — symlink to `AGENTS.md`
- `.cursorrules` — symlink to `AGENTS.md`
- `.github/copilot-instructions.md` — symlink to `../AGENTS.md`
- `AGENTS.md` — instruction file containing shared project guidance
- `docs/architecture.md` — stub with title + purpose
- `.gitignore` — add stack-appropriate ignores (e.g., `node_modules/`, `__pycache__/`, `target/`)
- other stack-specific scaffold files if clearly implied (e.g., `package.json`, `pyproject.toml`)
@@ -60,14 +57,9 @@ Delegate to the `coder` subagent with explicit mode (`new_project` or `existing_
- create or fill in only missing pieces
- **do not overwrite existing files**
- explicitly instruct coder to check existence before creating each target
- ensure `AGENTS.md` exists as the real instruction file
- create missing symlinks:
- `ln -s AGENTS.md CLAUDE.md`
- `ln -s AGENTS.md .cursorrules`
- `ln -s ../AGENTS.md .github/copilot-instructions.md`
- if `AGENTS.md` is missing but `.github/copilot-instructions.md` exists as a real file, move its content into `AGENTS.md`, then recreate `.github/copilot-instructions.md` as a symlink
- ensure `AGENTS.md` exists as the project instruction file
- if legacy tool-specific instruction files exist, consolidate any repo-specific guidance into `AGENTS.md` and stop maintaining duplicate copies
- examples:
- if `README.md` exists and only `CLAUDE.md` is missing, create `CLAUDE.md` as a symlink to `AGENTS.md`
- if `docs/` is missing, create it and add `docs/architecture.md`
## Step 4 — Documentation review (delegate to `librarian`)
@@ -76,7 +68,7 @@ Always delegate to the `librarian` subagent, for both new and existing projects.
- Ensure `README.md` is accurate and complete for the current project state.
- Ensure `AGENTS.md` exists and captures project-specific workflow decisions from Step 2.
- Verify `CLAUDE.md`, `.cursorrules`, and `.github/copilot-instructions.md` are symlinks to `AGENTS.md`.
- Ensure repo instruction guidance lives in `AGENTS.md` only.
- Ensure stubs are explicitly marked for later completion.
- Keep edits additive and non-destructive for existing projects.
@@ -84,7 +76,7 @@ Always delegate to the `librarian` subagent, for both new and existing projects.
Always create or update basic-memory project notes for this project.
- **Ensure a dedicated per-repo basic-memory project exists.** Use `list_memory_projects` to check. If not found, create one with `create_memory_project` using a short kebab-case name (e.g., `my-web-app`) and the repo's root directory as `project_path`.
- **Ensure a dedicated per-repo basic-memory project exists.** Use `list_memory_projects` to check. If not found, create one with `create_memory_project` using a short kebab-case name (e.g., `my-web-app`) and the repo's `.memory/` subdirectory as `project_path` (e.g., `/path/to/repo/.memory`).
- All subsequent note operations in this step must pass `project="<repo-project-name>"`.
- Use `search_notes` (with `project`) to check for existing project notes to avoid duplicates.
- Use `write_note` (with `project`) to create or update a `knowledge/overview` note with:
@@ -114,4 +106,4 @@ Delegate git operations to `coder` based on discovered state.
Summarize:
- Files created and files updated, with purpose.
- Decisions made and decisions deferred.
- What the user should fill in next (stubs, open questions, follow-up documentation).
- What the user should fill in next (stubs, open questions, follow-up documentation).