feat: agents read cross-tool instruction files at session start

AGENTS.md, CLAUDE.md, copilot-instructions.md, and .cursorrules may
contain project knowledge added by other tools or people. Agents now
read these files at session start and merge new knowledge into
.memory/knowledge.md as the canonical source.
This commit is contained in:
2026-03-08 19:51:37 +00:00
parent 204bbb4c84
commit f9880638e9
3 changed files with 7 additions and 1 deletions

View File

@@ -16,7 +16,7 @@ Use markdown files in `.memory/` as the persistent project memory across session
**Workflow: read files → work → update files**
1. **Session start:** Read `.memory/` directory contents and skim `.memory/knowledge.md`.
1. **Session start:** Read `.memory/` directory contents and skim `.memory/knowledge.md`. Also check for cross-tool instruction files (`CLAUDE.md`, `.github/copilot-instructions.md`, `.cursorrules`) — they may contain project knowledge added by other tools.
2. **Before each task:** Read relevant `.memory/*.md` files before reading source files for project understanding.
3. **After each task:** Update the appropriate `.memory/*.md` files with what was built.
@@ -45,6 +45,7 @@ Be specific in summaries: include parameter names, defaults, file locations, and
- When project knowledge changes significantly, update **all** cross-tool instruction files.
- When initializing or bootstrapping a project, create **all** cross-tool instruction files.
- Do not duplicate `.memory/` internals in these files; they describe how to work with the project, not project tracking state.
- **Read existing instruction files** at session start or when joining a new project. Other tools/people may have added project knowledge to `CLAUDE.md` or `.cursorrules` that isn't yet in `.memory/`. Merge any new knowledge into `.memory/knowledge.md` as the canonical source.
## Session Continuity

View File

@@ -280,6 +280,7 @@ Never jump directly to user interruption.
- Before each phase, read only relevant `.memory/` files when context is likely to exist.
- **Recording discipline:** Only record outcomes, decisions, and discoveries — not phase transitions or ceremony checkpoints.
- **Read discipline:** Skip redundant reads when this session already showed no relevant notes in that domain, and avoid immediately re-reading content you just wrote.
- **Commit shared memory artifacts.** The `.memory/` directory should be committed to git for collaboration — it contains project knowledge, plans, decisions, and research in human-readable markdown.
## Parallelization Mandate

View File

@@ -28,6 +28,10 @@ Create (if missing):
Run `git ls-files` to understand the project layout, then read `README.md` and
the highest-signal files for architecture and conventions.
Also check for existing cross-tool instruction files (`AGENTS.md`, `CLAUDE.md`,
`.github/copilot-instructions.md`, `.cursorrules`) — they may contain project
knowledge from other tools or team members that should be incorporated.
Identify:
- What the project does (primary capabilities)
- Core modules/subsystems and responsibilities