mirror of
https://github.com/bendtherules/opencode-plugin-compaction-prompt.git
synced 2026-08-18 13:42:55 +00:00
feat: auto-register plugin-compaction-init slash command
Adds a custom OpenCode command that scaffolds the compaction memory file with ## Keep and ## Discard sections of classification rules. The configured memoryFile path is substituted into both the command description and the prompt template, and any arguments passed after the command name are appended as user instructions.
This commit is contained in:
@@ -36,6 +36,11 @@ You can also add it manually to your global `opencode.jsonc`:
|
||||
|
||||
Create `.opencode/compaction.md` in the project when you have project-specific context to preserve. The file is optional.
|
||||
|
||||
### /plugin-compaction-init <instructions>
|
||||
|
||||
- Writes the memory file at the configured `memoryFile` path with a top instruction line and `## Keep` and `## Discard` sections containing classification rules for which messages to preserve or drop.
|
||||
- **Recommended**: pass user instructions to extend the default rules with concrete topics — specific areas of discussion you want kept or dropped.
|
||||
|
||||
## Options
|
||||
|
||||
| Option | Default | Description |
|
||||
|
||||
Reference in New Issue
Block a user