{"id":31060889,"url":"https://github.com/junekelly/opencode-memory","last_synced_at":"2025-09-15T10:54:45.969Z","repository":{"id":314648058,"uuid":"1056260943","full_name":"JuneKelly/opencode-memory","owner":"JuneKelly","description":"An incremental learning system for Opencode","archived":false,"fork":false,"pushed_at":"2025-09-13T19:06:45.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-13T21:12:19.300Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JuneKelly.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-09-13T18:02:00.000Z","updated_at":"2025-09-13T19:06:48.000Z","dependencies_parsed_at":"2025-09-13T21:12:27.477Z","dependency_job_id":"7ba02f32-bef8-4cce-a089-3abcb772fcfa","html_url":"https://github.com/JuneKelly/opencode-memory","commit_stats":null,"previous_names":["junekelly/opencode-memory"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/JuneKelly/opencode-memory","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuneKelly%2Fopencode-memory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuneKelly%2Fopencode-memory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuneKelly%2Fopencode-memory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuneKelly%2Fopencode-memory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JuneKelly","download_url":"https://codeload.github.com/JuneKelly/opencode-memory/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuneKelly%2Fopencode-memory/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275246319,"owners_count":25430805,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-15T02:00:09.272Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-09-15T10:54:42.597Z","updated_at":"2025-09-15T10:54:45.956Z","avatar_url":"https://github.com/JuneKelly.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Opencode Memory\n\nA learning system that helps AI coding agents remember project-specific knowledge across sessions, and improve project documentation.\n\nWorks with [opencode](https://opencode.ai).\n\n## Why Use This?\n\nEver find yourself explaining the same project conventions, API quirks, or design decisions to your AI assistant repeatedly? Is your project documentation not very good (yet)?\n\nThis system solves that problem by letting agents:\n\n- Learn from your corrections and explanations\n- Store that knowledge between sessions\n- Apply previous learnings to new tasks\n- Use learnings to suggest improvements to project documentation and conventions\n\nIn the short term (say, while working on a new feature) the agent carries knowledge forward from one session to the next. In the long term, this knowledge can be folded in to the documentation for your project.\n\n## Installation\n\n1. Clone this repository\n2. Copy or symlink files from `command/` to your opencode command directory:\n\n   ```bash\n   cd opencode-memory\n   # Copy into place\n   cp ./command/* ~/.config/opencode/command/\n\n   # Or... symlink into place\n   ln -s $(pwd)/command/* ~/.config/opencode/command/\n   ```\n\n   Note: Adjust the destination path if your opencode installation uses a different location.\n\n## Learning Categories\n\nThe system categorizes and prioritizes learnings to ensure the most valuable knowledge is captured:\n\n1. **User Corrections** (Highest Priority) - Direct corrections to agent behavior\n2. **New Requirements** - Project specifications not in existing docs\n3. **Updated Conventions** - Changes to established patterns\n4. **Fresh Discoveries** - Solutions and workarounds found during sessions\n5. **Preference Clarifications** - User workflow and style preferences\n\n## Usage Workflow\n\n1. **Start a coding session normally** - Work with your AI assistant as usual. Use `@`-mentions to include relevant documentation in the context.\n\n2. **Summarize learnings** - When you've taught the agent something new:\n\n   ```\n   /learning-summarise\n   ```\n\n   The agent will check existing documentation and previous learnings, then present only genuinely NEW knowledge, compared to the context.\n\n3. **Store learnings** - Save the validated learnings:\n\n   ```\n   /learning-store\n   ```\n\n   This appends to `.tmp/memory-learnings.md` with a timestamp.\n\n4. **Recall in future sessions** - Start new sessions with:\n\n   ```\n   /learning-recall\n   ```\n\n   The agent will load and apply previous learnings.\n\n5. **Compact learnings** - Compress knowledge:\n\n   ```\n   /learning-compact\n   ```\n\n   The agent will consolidate all learnings and remove previous sessions, keeping only the distilled knowledge.\n\n6. **Improve documentation** - Apply learnings to your project documentation:\n\n   ```\n   /learning-improve-docs\n   ```\n\n   The agent will identify learnings which represent gaps in project documentation.\n\n7. **Forget** - Reset learnings to zero:\n\n   ```\n   /learning-forget\n   ```\n\n   The agent will reset the memory file to an empty file.\n\n## Commands\n\n- `/learning-summarise`: Extract new learnings from this session\n  - Automatically checks against existing documentation and previous learnings\n  - Filters out duplicate knowledge to maintain high-quality memory\n  - Shows what de-duplication was performed for transparency\n- `/learning-store`: Save validated learnings to temporary storage\n- `/learning-recall`: Load learnings from previous sessions\n- `/learning-compact`: Consolidate all learnings and remove ALL previous sessions (keeps only distilled knowledge for maximum space efficiency)\n- `/learning-improve-docs`: Analyze learnings and suggest documentation improvements\n- `/learning-forget`: Reset memory\n\n## Example Session\n\n```\nUser: The API client should always use the custom error handler from src/utils/errors.ts\nAssistant: I understand. Let me note this requirement.\n\nUser: /learning-summarise\nAssistant: After checking existing documentation and previous learnings, here are the NEW insights from this session:\n- API Integration: Always use the custom error handler from src/utils/errors.ts for API client implementations\n- This ensures consistent error handling across the application\n\nUser: That's correct. Also note that we log errors to Sentry in production.\nAssistant: Updated understanding:\n- API Integration: Always use custom error handler from src/utils/errors.ts\n- Error Logging: Production errors are logged to Sentry\n\nUser: /learning-store\nAssistant: Learnings saved to .tmp/memory-learnings.md\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjunekelly%2Fopencode-memory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjunekelly%2Fopencode-memory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjunekelly%2Fopencode-memory/lists"}