Compare commits
2 Commits
564ccd2559
...
03b968513b
| Author | SHA1 | Date | |
|---|---|---|---|
| 03b968513b | |||
| e545d38314 |
72
flake.lock
generated
72
flake.lock
generated
@@ -130,11 +130,11 @@
|
|||||||
},
|
},
|
||||||
"den": {
|
"den": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1775551420,
|
"lastModified": 1775633596,
|
||||||
"narHash": "sha256-8ICGLVOpuXc8b1YirfsAQcPEW5sV4bpGHHDny8Pww0I=",
|
"narHash": "sha256-xKG0CR/ivtpEB7ako+3hObH2rrXZLhEZ7x7wtfyT1h8=",
|
||||||
"owner": "vic",
|
"owner": "vic",
|
||||||
"repo": "den",
|
"repo": "den",
|
||||||
"rev": "8101ec865c0bf4027d40b9fd8951e3e435a86d64",
|
"rev": "6ca251e7ccbd0cee63b9f08213be35856c53343c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -191,11 +191,11 @@
|
|||||||
"rust-analyzer-src": "rust-analyzer-src"
|
"rust-analyzer-src": "rust-analyzer-src"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1775547409,
|
"lastModified": 1775634720,
|
||||||
"narHash": "sha256-dNIhLmwrR7N78amgliAJvFx58RjrhDWorV9B9Kiayeo=",
|
"narHash": "sha256-R5ETx0HEFybabKxkUkhssq/F+mjUqsKLBrOHl4L+EcA=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "fenix",
|
"repo": "fenix",
|
||||||
"rev": "a260dea172f86c7afa65cec0c6e6a9dd91530017",
|
"rev": "dd74d9dec9b1d02044714cea439a138716e9545e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -441,11 +441,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1775544097,
|
"lastModified": 1775622785,
|
||||||
"narHash": "sha256-fwI8PbrUT4W+z+J4TAS/D69So/MLan1WZjUsYQpoSvI=",
|
"narHash": "sha256-/yFxO+7oS1SymDfJ2iVO7K5vJKcYfe9XGIJ+quLqz0Q=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "2bd16b16a77d68a1e14c1b4da725a6590181a706",
|
"rev": "527e47b78fe67213072f706bf933a9705a8c4974",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -457,11 +457,11 @@
|
|||||||
"homebrew-cask": {
|
"homebrew-cask": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1775539955,
|
"lastModified": 1775635369,
|
||||||
"narHash": "sha256-jVS9kkf+Y4FUfu5ltzq4jwlEx1N7+cvRSwdk7ux75+g=",
|
"narHash": "sha256-50sHorVfGdFsptE9mPNH3bK4n52qCNATcwiKkZHUMdY=",
|
||||||
"owner": "homebrew",
|
"owner": "homebrew",
|
||||||
"repo": "homebrew-cask",
|
"repo": "homebrew-cask",
|
||||||
"rev": "fc060312dd0dd57e6444a456add5d4db9489c9cc",
|
"rev": "3c70b3e0a7d7b8917376bc1680f0f96a80251a3d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -473,11 +473,11 @@
|
|||||||
"homebrew-core": {
|
"homebrew-core": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1775548259,
|
"lastModified": 1775628396,
|
||||||
"narHash": "sha256-npftQO8OD15pF8V1MqDnyrCyenwxtKaUik8aLrFbtmY=",
|
"narHash": "sha256-1bQOqEFycUYXNUA52IwK7N0Zc8KW6YqzWwGf5fHujl0=",
|
||||||
"owner": "homebrew",
|
"owner": "homebrew",
|
||||||
"repo": "homebrew-core",
|
"repo": "homebrew-core",
|
||||||
"rev": "89258560df88cda16cd05de0aa7d7174697e9e0b",
|
"rev": "2fa402988e1c54ade4f2bad0af97b35d0c1e7ca6",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -593,11 +593,11 @@
|
|||||||
"treefmt-nix": "treefmt-nix"
|
"treefmt-nix": "treefmt-nix"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1775532444,
|
"lastModified": 1775619181,
|
||||||
"narHash": "sha256-3tDtwXFP3KXUUnnsh3HxnxBoZtUdAiaQLIJCGHQIYQI=",
|
"narHash": "sha256-McIhvwQTDZKRmCGJoHlAOAkPR2SrExTA+BMjYrSIr7Q=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "llm-agents.nix",
|
"repo": "llm-agents.nix",
|
||||||
"rev": "14987a4f161451bfb2154e6a29c039bce636f8ad",
|
"rev": "a6a61ddf000bb1ef8a5ee96e403fa3859ba4f9ab",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -637,11 +637,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1775520277,
|
"lastModified": 1775628196,
|
||||||
"narHash": "sha256-dUI8/Mc6CfA+EmfrYByt+oNIEvdRLtSSDVS54O0YpBM=",
|
"narHash": "sha256-C9H4CHXo/yMEiYYi2BcUwCreCOqsF1DaMR2gimduPNE=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "neovim-nightly-overlay",
|
"repo": "neovim-nightly-overlay",
|
||||||
"rev": "b63186e453b0ad340760648293aa1ccf75528c46",
|
"rev": "79ca5eedb2f68e2681eba7523acd43a12c3225d1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -653,11 +653,11 @@
|
|||||||
"neovim-src": {
|
"neovim-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1775514165,
|
"lastModified": 1775605133,
|
||||||
"narHash": "sha256-mAUtXA5BfCH5SRInzfJdaHY9egHrVLED0DsQzgBW4Fk=",
|
"narHash": "sha256-QBi9quAM8C1ja7pu/lOZPkOP57/sbjA5Q+JJ/yNR81o=",
|
||||||
"owner": "neovim",
|
"owner": "neovim",
|
||||||
"repo": "neovim",
|
"repo": "neovim",
|
||||||
"rev": "b36eafd5dafae561763e5dc2ba73b3f0b74c63fe",
|
"rev": "de674491800c0ecb6f6658512829a3d21c47fe5f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -734,11 +734,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_4": {
|
"nixpkgs_4": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1775464765,
|
"lastModified": 1775579569,
|
||||||
"narHash": "sha256-nex6TL2x1/sVHCyDWcvl1t/dbTedb9bAGC4DLf/pmYk=",
|
"narHash": "sha256-/m3yyS/EnXqoPGBJYVy4jTOsirdgsEZ3JdN2gGkBr14=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "83e29f2b8791f6dec20804382fcd9a666d744c07",
|
"rev": "dfd9566f82a6e1d55c30f861879186440614696e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -750,11 +750,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_5": {
|
"nixpkgs_5": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1775551183,
|
"lastModified": 1775635120,
|
||||||
"narHash": "sha256-KFLAmWQ5cL68wHa/5lKSAJKnF+1t9Xd7oQsEiNpxBZk=",
|
"narHash": "sha256-SC/WelgyA2aOu6wL0Xtdjzf0OSX13bq6a17XplBW3/8=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "7109126b640f6e533d769f9612054523c7ee22cb",
|
"rev": "f23b37e0792211086ab84b03f6b37308c421140b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -868,11 +868,11 @@
|
|||||||
"rust-analyzer-src": {
|
"rust-analyzer-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1775499626,
|
"lastModified": 1775591515,
|
||||||
"narHash": "sha256-6PyDFl9fJu12xfdjgEiQKEVjX6/cdkN1DeKRLKwUz44=",
|
"narHash": "sha256-/Q7IIUUzbayeosJ1q17mQPlJIb5OxxhtHrevVWHSuwk=",
|
||||||
"owner": "rust-lang",
|
"owner": "rust-lang",
|
||||||
"repo": "rust-analyzer",
|
"repo": "rust-analyzer",
|
||||||
"rev": "129f6167ab924c42fb16d4e3d1b31b6e725c7523",
|
"rev": "32ab058e5bde44fa06c5aba65edd6d2a4a16bbd0",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -944,11 +944,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1775365543,
|
"lastModified": 1775619836,
|
||||||
"narHash": "sha256-f50qrK0WwZ9z5EdaMGWOTtALgSF7yb7XwuE7LjCuDmw=",
|
"narHash": "sha256-VcC/+MMMldwQKcST2y/QTndGLusSxjeUvYwFwzZKKko=",
|
||||||
"owner": "Mic92",
|
"owner": "Mic92",
|
||||||
"repo": "sops-nix",
|
"repo": "sops-nix",
|
||||||
"rev": "a4ee2de76efb759fe8d4868c33dec9937897916f",
|
"rev": "de5f2d596eb896a5728afcd15f823f59cb9ecfdb",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
@@ -10,9 +10,9 @@ You are an autonomous deep worker for software engineering.
|
|||||||
|
|
||||||
Build context by examining the codebase first. Do not assume. Think through the nuances of the code you encounter. Complete tasks end-to-end within the current turn. Persevere when tool calls fail. Only end your turn when the problem is solved and verified.
|
Build context by examining the codebase first. Do not assume. Think through the nuances of the code you encounter. Complete tasks end-to-end within the current turn. Persevere when tool calls fail. Only end your turn when the problem is solved and verified.
|
||||||
|
|
||||||
When blocked: try a different approach, decompose the problem, challenge assumptions, explore how others solved it. Asking the user is the last resort after exhausting alternatives.
|
When blocked: ask the user. Do not go around trying different things when none of them work.
|
||||||
|
|
||||||
## Do Not Ask — Just Do
|
## Questions
|
||||||
|
|
||||||
FORBIDDEN:
|
FORBIDDEN:
|
||||||
- Asking permission ("Should I proceed?", "Would you like me to...?") — JUST DO IT
|
- Asking permission ("Should I proceed?", "Would you like me to...?") — JUST DO IT
|
||||||
@@ -26,8 +26,7 @@ FORBIDDEN:
|
|||||||
CORRECT:
|
CORRECT:
|
||||||
- Keep going until COMPLETELY done
|
- Keep going until COMPLETELY done
|
||||||
- Run verification without asking
|
- Run verification without asking
|
||||||
- Make decisions; course-correct on concrete failure
|
- Ask questions when course-correction is required
|
||||||
- Note assumptions in your final message, not as questions mid-work
|
|
||||||
|
|
||||||
## Intent Extraction
|
## Intent Extraction
|
||||||
|
|
||||||
|
|||||||
150
modules/_opencode/command/supermemory-init.md
Normal file
150
modules/_opencode/command/supermemory-init.md
Normal file
@@ -0,0 +1,150 @@
|
|||||||
|
---
|
||||||
|
description: Initialize Supermemory with comprehensive codebase knowledge
|
||||||
|
---
|
||||||
|
|
||||||
|
# Initializing Supermemory
|
||||||
|
|
||||||
|
You are initializing persistent memory for this codebase. This is not just data collection - you're building context that will make you significantly more effective across all future sessions.
|
||||||
|
|
||||||
|
## Understanding Context
|
||||||
|
|
||||||
|
You are a **stateful** coding agent. Users expect to work with you over extended periods - potentially the entire lifecycle of a project. Your memory is how you get better over time and maintain continuity.
|
||||||
|
|
||||||
|
## What to Remember
|
||||||
|
|
||||||
|
### 1. Procedures (Rules & Workflows)
|
||||||
|
Explicit rules that should always be followed:
|
||||||
|
- "Never commit directly to main - always use feature branches"
|
||||||
|
- "Always run lint before tests"
|
||||||
|
- "Use conventional commits format"
|
||||||
|
|
||||||
|
### 2. Preferences (Style & Conventions)
|
||||||
|
Project and user coding style:
|
||||||
|
- "Prefer functional components over class components"
|
||||||
|
- "Use early returns instead of nested conditionals"
|
||||||
|
- "Always add JSDoc to exported functions"
|
||||||
|
|
||||||
|
### 3. Architecture & Context
|
||||||
|
How the codebase works and why:
|
||||||
|
- "Auth system was refactored in v2.0 - old patterns deprecated"
|
||||||
|
- "The monorepo used to have 3 modules before consolidation"
|
||||||
|
- "This pagination bug was fixed before - similar to PR #234"
|
||||||
|
|
||||||
|
## Memory Scopes
|
||||||
|
|
||||||
|
**Project-scoped** (\`scope: "project"\`):
|
||||||
|
- Build/test/lint commands
|
||||||
|
- Architecture and key directories
|
||||||
|
- Team conventions specific to this codebase
|
||||||
|
- Technology stack and framework choices
|
||||||
|
- Known issues and their solutions
|
||||||
|
|
||||||
|
**User-scoped** (\`scope: "user"\`):
|
||||||
|
- Personal coding preferences across all projects
|
||||||
|
- Communication style preferences
|
||||||
|
- General workflow habits
|
||||||
|
|
||||||
|
## Research Approach
|
||||||
|
|
||||||
|
This is a **deep research** initialization. Take your time and be thorough (~50+ tool calls). The goal is to genuinely understand the project, not just collect surface-level facts.
|
||||||
|
|
||||||
|
**What to uncover:**
|
||||||
|
- Tech stack and dependencies (explicit and implicit)
|
||||||
|
- Project structure and architecture
|
||||||
|
- Build/test/deploy commands and workflows
|
||||||
|
- Contributors & team dynamics (who works on what?)
|
||||||
|
- Commit conventions and branching strategy
|
||||||
|
- Code evolution (major refactors, architecture changes)
|
||||||
|
- Pain points (areas with lots of bug fixes)
|
||||||
|
- Implicit conventions not documented anywhere
|
||||||
|
|
||||||
|
## Research Techniques
|
||||||
|
|
||||||
|
### File-based
|
||||||
|
- README.md, CONTRIBUTING.md, AGENTS.md, CLAUDE.md
|
||||||
|
- Package manifests (package.json, Cargo.toml, pyproject.toml, go.mod)
|
||||||
|
- Config files (.eslintrc, tsconfig.json, .prettierrc)
|
||||||
|
- CI/CD configs (.github/workflows/)
|
||||||
|
|
||||||
|
### Git-based
|
||||||
|
- \`git log --oneline -20\` - Recent history
|
||||||
|
- \`git branch -a\` - Branching strategy
|
||||||
|
- \`git log --format="%s" -50\` - Commit conventions
|
||||||
|
- \`git shortlog -sn --all | head -10\` - Main contributors
|
||||||
|
|
||||||
|
### Explore Agent
|
||||||
|
Fire parallel explore queries for broad understanding:
|
||||||
|
\`\`\`
|
||||||
|
Task(explore, "What is the tech stack and key dependencies?")
|
||||||
|
Task(explore, "What is the project structure? Key directories?")
|
||||||
|
Task(explore, "How do you build, test, and run this project?")
|
||||||
|
Task(explore, "What are the main architectural patterns?")
|
||||||
|
Task(explore, "What conventions or patterns are used?")
|
||||||
|
\`\`\`
|
||||||
|
|
||||||
|
## How to Do Thorough Research
|
||||||
|
|
||||||
|
**Don't just collect data - analyze and cross-reference.**
|
||||||
|
|
||||||
|
Bad (shallow):
|
||||||
|
- Run commands, copy output
|
||||||
|
- List facts without understanding
|
||||||
|
|
||||||
|
Good (thorough):
|
||||||
|
- Cross-reference findings (if inconsistent, dig deeper)
|
||||||
|
- Resolve ambiguities (don't leave questions unanswered)
|
||||||
|
- Read actual file content, not just names
|
||||||
|
- Look for patterns (what do commits tell you about workflow?)
|
||||||
|
- Think like a new team member - what would you want to know?
|
||||||
|
|
||||||
|
## Saving Memories
|
||||||
|
|
||||||
|
Use the \`supermemory\` tool for each distinct insight:
|
||||||
|
|
||||||
|
\`\`\`
|
||||||
|
supermemory(mode: "add", content: "...", type: "...", scope: "project")
|
||||||
|
\`\`\`
|
||||||
|
|
||||||
|
**Types:**
|
||||||
|
- \`project-config\` - tech stack, commands, tooling
|
||||||
|
- \`architecture\` - codebase structure, key components, data flow
|
||||||
|
- \`learned-pattern\` - conventions specific to this codebase
|
||||||
|
- \`error-solution\` - known issues and their fixes
|
||||||
|
- \`preference\` - coding style preferences (use with user scope)
|
||||||
|
|
||||||
|
**Guidelines:**
|
||||||
|
- Save each distinct insight as a separate memory
|
||||||
|
- Be concise but include enough context to be useful
|
||||||
|
- Include the "why" not just the "what" when relevant
|
||||||
|
- Update memories incrementally as you research (don't wait until the end)
|
||||||
|
|
||||||
|
**Good memories:**
|
||||||
|
- "Uses Bun runtime and package manager. Commands: bun install, bun run dev, bun test"
|
||||||
|
- "API routes in src/routes/, handlers in src/handlers/. Hono framework."
|
||||||
|
- "Auth uses Redis sessions, not JWT. Implementation in src/lib/auth.ts"
|
||||||
|
- "Never use \`any\` type - strict TypeScript. Use \`unknown\` and narrow."
|
||||||
|
- "Database migrations must be backward compatible - we do rolling deploys"
|
||||||
|
|
||||||
|
## Upfront Questions
|
||||||
|
|
||||||
|
Before diving in, ask:
|
||||||
|
1. "Any specific rules I should always follow?"
|
||||||
|
2. "Preferences for how I communicate? (terse/detailed)"
|
||||||
|
|
||||||
|
## Reflection Phase
|
||||||
|
|
||||||
|
Before finishing, reflect:
|
||||||
|
1. **Completeness**: Did you cover commands, architecture, conventions, gotchas?
|
||||||
|
2. **Quality**: Are memories concise and searchable?
|
||||||
|
3. **Scope**: Did you correctly separate project vs user knowledge?
|
||||||
|
|
||||||
|
Then ask: "I've initialized memory with X insights. Want me to continue refining, or is this good?"
|
||||||
|
|
||||||
|
## Your Task
|
||||||
|
|
||||||
|
1. Ask upfront questions (research depth, rules, preferences)
|
||||||
|
2. Check existing memories: \`supermemory(mode: "list", scope: "project")\`
|
||||||
|
3. Research based on chosen depth
|
||||||
|
4. Save memories incrementally as you discover insights
|
||||||
|
5. Reflect and verify completeness
|
||||||
|
6. Summarize what was learned and ask if user wants refinement
|
||||||
@@ -33,6 +33,7 @@ in {
|
|||||||
small_model = "openai/gpt-5.1-codex-mini";
|
small_model = "openai/gpt-5.1-codex-mini";
|
||||||
plugin = [
|
plugin = [
|
||||||
"opencode-claude-auth"
|
"opencode-claude-auth"
|
||||||
|
"opencode-supermemory"
|
||||||
];
|
];
|
||||||
permission = {
|
permission = {
|
||||||
external_directory = {
|
external_directory = {
|
||||||
|
|||||||
Reference in New Issue
Block a user