Add /remember, /config commands and memory helper scripts

New commands:
- /remember: Quick shortcut to save to memory (auto-categorizes)
- /config: View and manage configuration settings

New automation scripts:
- memory-add.py: Add items to PA memory with auto-categorization
- memory-list.py: List memory items by category

The /remember command provides a quick way to save:
- "Always use X" → preferences
- "Decided to use X" → decisions
- "Project at ~/path" → projects
- Other → facts

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
OpenCode Test
2026-01-01 12:23:39 -08:00
parent 84fe45f4dc
commit 55327c2e05
6 changed files with 399 additions and 0 deletions

View File

@@ -12,6 +12,8 @@ Slash commands for quick actions. User-invoked (type `/command` to trigger).
| `/help` | `/commands`, `/skills` | Show available commands and skills |
| `/status` | `/overview`, `/dashboard` | Quick status across all domains |
| `/summarize` | `/save-session` | Summarize and save session to memory |
| `/remember` | `/save`, `/note` | Quick save to memory |
| `/config` | `/settings`, `/prefs` | View/manage configuration |
| `/maintain` | `/maintenance`, `/admin` | Configuration maintenance |
| `/programmer` | | Code development tasks |
| `/gcal` | `/calendar`, `/cal` | Google Calendar access |

111
commands/config.md Normal file
View File

@@ -0,0 +1,111 @@
---
name: config
description: View and manage configuration settings
aliases: [settings, prefs]
---
# /config Command
View and manage Claude Code configuration.
## Subcommands
| Subcommand | Description |
|------------|-------------|
| (none) | Show current configuration summary |
| `show` | Show full configuration |
| `autonomy` | View/set autonomy level |
| `context` | View/set context level |
| `model` | View current model policy |
| `plugins` | List installed plugins |
## Usage
```
/config # Summary view
/config show # Full configuration
/config autonomy # Current autonomy level
/config autonomy moderate # Set autonomy level
/config context # Current context level
/config context minimal # Set for session
/config model # Model policy
/config plugins # Installed plugins
```
## Implementation
### Summary View (/config)
```
⚙️ Configuration Summary
Autonomy: conservative (default)
Context: moderate (default)
Model: opus (primary)
Plugins: 6 installed
Skills: 6 available
Commands: 16 available
Config files:
~/.claude/settings.json
~/.claude/state/autonomy-levels.json
~/.claude/state/model-policy.json
```
### Autonomy (/config autonomy)
Read from: `~/.claude/state/sysadmin/session-autonomy.json`
Levels:
- `conservative` - Confirm all write operations
- `moderate` - Auto-approve routine writes
- `trusted` - Auto-approve most operations
```bash
# View
cat ~/.claude/state/sysadmin/session-autonomy.json
# Set (writes to session-autonomy.json)
echo '{"level": "moderate", "set_at": "timestamp"}' > session-autonomy.json
```
### Context (/config context)
Read from: `~/.claude/state/personal-assistant/session-context.json`
Levels:
- `none` - Skip context gathering
- `minimal` - Light context
- `moderate` - Balanced (default)
- `comprehensive` - Deep context scan
### Model (/config model)
Read from: `~/.claude/state/model-policy.json`
Shows:
- Default models per agent
- Escalation rules
- Cost considerations
### Plugins (/config plugins)
Read from: `~/.claude/plugins/installed_plugins.json`
```
Installed Plugins:
• superpowers (4.0.2) - superpowers-marketplace
• frontend-design (6d3752c) - claude-plugins-official
• commit-commands (6d3752c) - claude-plugins-official
• typescript-lsp (1.0.0) - claude-plugins-official
• pyright-lsp (1.0.0) - claude-plugins-official
• superpowers-developing-for-claude-code (0.3.1) - superpowers-marketplace
```
## Notes
- Changes to autonomy/context are session-only unless using `--set-default`
- Model policy changes require editing model-policy.json directly
- Plugin management via `/plugin` command

76
commands/remember.md Normal file
View File

@@ -0,0 +1,76 @@
---
name: remember
description: Quick shortcut to save something to memory
aliases: [save, note]
---
# /remember Command
Quick shortcut to save information to PA memory.
## Usage
```
/remember <what to remember>
/remember Always use dark mode in editors
/remember Project X uses PostgreSQL 15
/remember Prefer functional style over OOP
```
## Implementation
This is a shortcut for `/pa --remember -- "<instruction>"`.
When invoked:
1. Parse the text after `/remember`
2. Determine the category:
- Contains "prefer", "always", "never" → **preference**
- Contains "decided", "chose", "use" → **decision**
- Contains project/path references → **project**
- Otherwise → **fact**
3. Generate entry:
```json
{
"id": "<uuid>",
"date": "YYYY-MM-DD",
"content": "<the text>",
"status": "active"
}
```
4. Append to appropriate file:
- `~/.claude/state/personal-assistant/memory/preferences.json`
- `~/.claude/state/personal-assistant/memory/decisions.json`
- `~/.claude/state/personal-assistant/memory/projects.json`
- `~/.claude/state/personal-assistant/memory/facts.json`
5. Confirm to user:
```
✓ Saved to preferences:
"Always use dark mode in editors"
```
## Examples
| Input | Category | File |
|-------|----------|------|
| "Always use tabs not spaces" | preference | preferences.json |
| "Decided to use Rust for CLI tools" | decision | decisions.json |
| "homelab repo is at ~/repos/homelab" | project | projects.json |
| "Server IP is 192.168.1.100" | fact | facts.json |
## Quick Access
This is the fastest way to save something:
```
/remember SSH key is in ~/.ssh/homelab_key
```
vs the full command:
```
/pa --remember -- "SSH key is in ~/.ssh/homelab_key"
```