Project Memory
Table of Contents
- Overview
- When to Use This Skill
- Core Capabilities
- Templates and References
- Example Workflows
- Integration with Other Skills
- Success Criteria
Overview
Maintain institutional knowledge for projects by establishing a structured memory system in docs/project_notes/. This skill sets up four key memory files (bugs, decisions, key facts, issues) and configures GEMINI.md and AGENTS.md to automatically reference and maintain them. The result is a project that remembers past decisions, solutions to problems, and important configuration details across coding sessions and across different AI tools.
When to Use This Skill
Invoke this skill when:
- Starting a new project that will accumulate knowledge over time
- The project already has recurring bugs or decisions that should be documented
- The user asks to "set up project memory" or "track our decisions"
- The user wants to log a bug fix, architectural decision, or completed work
- Encountering a problem that feels familiar ("didn't we solve this before?")
- Before proposing an architectural change (check existing decisions first)
- Working on projects with multiple developers or AI tools (Claude Code, Cursor, Antigravity, etc.)
Core Capabilities
1. Initial Setup - Create Memory Infrastructure
When invoked for the first time in a project, create the following structure:
docs/
└── project_notes/
├── bugs.md # Bug log with solutions
├── decisions.md # Architectural Decision Records
├── key_facts.md # Project configuration and constants
└── issues.md # Work log with ticket references
Directory naming rationale: Using docs/project_notes/ instead of memory/ makes it look like standard engineering organization, not AI-specific tooling. This increases adoption and maintenance by human developers.
Initial file content: Copy templates from the references/ directory in this skill:
- Use
references/bugs_template.mdfor initialbugs.md - Use
references/decisions_template.mdfor initialdecisions.md - Use
references/key_facts_template.mdfor initialkey_facts.md - Use
references/issues_template.mdfor initialissues.md
Each template includes format examples and usage tips.
2. Configure GEMINI.md - Memory-Aware Behavior
Add or update the following section in the project's GEMINI.md file:
markdown1## Project Memory System 2 3This project maintains institutional knowledge in `docs/project_notes/` for consistency across sessions. 4 5### Memory Files 6 7- **bugs.md** - Bug log with dates, solutions, and prevention notes 8- **decisions.md** - Architectural Decision Records (ADRs) with context and trade-offs 9- **key_facts.md** - Project configuration, credentials, ports, important URLs 10- **issues.md** - Work log with ticket IDs, descriptions, and URLs 11 12### Memory-Aware Protocols 13 14**Before proposing architectural changes:** 15- Check `docs/project_notes/decisions.md` for existing decisions 16- Verify the proposed approach doesn't conflict with past choices 17- If it does conflict, acknowledge the existing decision and explain why a change is warranted 18 19**When encountering errors or bugs:** 20- Search `docs/project_notes/bugs.md` for similar issues 21- Apply known solutions if found 22- Document new bugs and solutions when resolved 23 24**When looking up project configuration:** 25- Check `docs/project_notes/key_facts.md` for credentials, ports, URLs, service accounts 26- Prefer documented facts over assumptions 27 28**When completing work on tickets:** 29- Log completed work in `docs/project_notes/issues.md` 30- Include ticket ID, date, brief description, and URL 31 32**When user requests memory updates:** 33- Update the appropriate memory file (bugs, decisions, key_facts, or issues) 34- Follow the established format and style (bullet lists, dates, concise entries) 35 36### Style Guidelines for Memory Files 37 38- **Prefer bullet lists over tables** for simplicity and ease of editing 39- **Keep entries concise** (1-3 lines for descriptions) 40- **Always include dates** for temporal context 41- **Include URLs** for tickets, documentation, monitoring dashboards 42- **Manual cleanup** of old entries is expected (not automated)
3. Configure AGENTS.md - Multi-Tool Support
If the project has an AGENTS.md file (used for agent workflows or multi-tool projects), add the same memory protocols. This ensures consistency whether using Claude Code, Cursor, Antigravity, or other AI tools.
If AGENTS.md exists: Add the same "Project Memory System" section as above.
If AGENTS.md doesn't exist: Ask the user if they want to create it. Many projects use multiple AI tools and benefit from shared memory protocols.
4. Searching Memory Files
When encountering problems or making decisions, proactively search memory files:
Search bugs.md:
bash1# Look for similar errors 2grep -i "connection refused" docs/project_notes/bugs.md 3 4# Find bugs by date range 5grep "2025-01" docs/project_notes/bugs.md
Search decisions.md:
bash1# Check for decisions about a technology 2grep -i "database" docs/project_notes/decisions.md 3 4# Find all ADRs 5grep "^### ADR-" docs/project_notes/decisions.md
Search key_facts.md:
bash1# Find database connection info 2grep -A 5 "Database" docs/project_notes/key_facts.md 3 4# Look up service accounts 5grep -i "service account" docs/project_notes/key_facts.md
Use Grep tool for more complex searches:
- Search across all memory files:
Grep(pattern="oauth", path="docs/project_notes/") - Context-aware search:
Grep(pattern="bug", path="docs/project_notes/bugs.md", -A=3, -B=3)
5. Updating Memory Files
When the user requests updates or when documenting resolved issues, update the appropriate memory file:
Adding a bug entry:
markdown1### YYYY-MM-DD - Brief Bug Description 2- **Issue**: What went wrong 3- **Root Cause**: Why it happened 4- **Solution**: How it was fixed 5- **Prevention**: How to avoid it in the future
Adding a decision:
markdown1### ADR-XXX: Decision Title (YYYY-MM-DD) 2 3**Context:** 4- Why the decision was needed 5- What problem it solves 6 7**Decision:** 8- What was chosen 9 10**Alternatives Considered:** 11- Option 1 -> Why rejected 12- Option 2 -> Why rejected 13 14**Consequences:** 15- Benefits 16- Trade-offs
Adding key facts:
- Organize by category (GCP Project, Database, API, Local Development, etc.)
- Use bullet lists for clarity
- Include both production and development details
- Add URLs for easy navigation
- See
references/key_facts_template.mdfor security guidelines on what NOT to store
Adding work log entry:
markdown1### YYYY-MM-DD - TICKET-ID: Brief Description 2- **Status**: Completed / In Progress / Blocked 3- **Description**: 1-2 line summary 4- **URL**: https://jira.company.com/browse/TICKET-ID 5- **Notes**: Any important context
6. Memory File Maintenance
Periodically clean old entries:
- User is responsible for manual cleanup (no automation)
- Remove very old bug entries (6+ months) that are no longer relevant
- Archive completed work from issues.md (3+ months old)
- Keep all decisions (they're lightweight and provide historical context)
- Update key_facts.md when project configuration changes
Conflict resolution:
- If proposing something that conflicts with decisions.md, explain why revisiting the decision is warranted
- Update the decision entry if the choice changes
- Add date of revision to show evolution
Templates and References
This skill includes template files in references/ that demonstrate proper formatting:
- references/bugs_template.md - Bug entry format with examples
- references/decisions_template.md - ADR format with examples
- references/key_facts_template.md - Key facts organization with examples (includes security guidelines)
- references/issues_template.md - Work log format with examples
When creating initial memory files, copy these templates to docs/project_notes/ and customize them for the project.
Example Workflows
Scenario 1: Encountering a Familiar Bug
User: "I'm getting a 'connection refused' error from the database"
-> Search docs/project_notes/bugs.md for "connection"
-> Find previous solution: "Use AlloyDB Auth Proxy on port 5432"
-> Apply known fix
Scenario 2: Proposing an Architectural Change
Internal: "User might benefit from using SQLAlchemy for migrations"
-> Check docs/project_notes/decisions.md
-> Find ADR-002: Already decided to use Alembic
-> Use Alembic instead, maintaining consistency
Scenario 3: User Requests Memory Update
User: "Add that CORS fix to our bug log"
-> Read docs/project_notes/bugs.md
-> Add new entry with date, issue, solution, prevention
-> Confirm addition to user
Scenario 4: Looking Up Project Configuration
Internal: "Need to connect to database"
-> Check docs/project_notes/key_facts.md
-> Find Database Configuration section
-> Use documented connection string and credentials
Tips for Effective Memory Management
- Be proactive: Check memory files before proposing solutions
- Be concise: Keep entries brief (1-3 lines for descriptions)
- Be dated: Always include dates for temporal context
- Be linked: Include URLs to tickets, docs, monitoring dashboards
- Be selective: Focus on recurring or instructive issues, not every bug
Integration with Other Skills
The project-memory skill complements other skills:
- requirements-documenter: Requirements -> Decisions (ADRs reference requirements)
- root-cause-debugger: Bug diagnosis -> Bug log (document solutions after fixes)
- code-quality-reviewer: Quality issues -> Decisions (document quality standards)
- docs-sync-editor: Code changes -> Key facts (update when config changes)
When using these skills together, consider updating memory files as a follow-up action.
Success Criteria
This skill is successfully deployed when:
docs/project_notes/directory exists with all four memory files- GEMINI.md includes "Project Memory System" section with protocols
- AGENTS.md includes the same protocols (if file exists or user requested)
- Memory files follow template format and style guidelines
- AI assistant checks memory files before proposing changes
- User can easily request memory updates ("add this to bugs.md")
- Memory files look like standard engineering documentation, not AI artifacts