Extract commands to updatable .therapy/commands.md

Moves all customization commands (persona, modality, structure, update,
import) to a separate file that gets copied to .therapy/ during setup.
This allows existing users to receive new commands via the update flow.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Anthony Taglianetti
2026-02-08 14:21:33 -08:00
parent 366e5dcceb
commit 27b09a6165
4 changed files with 122 additions and 103 deletions
+3 -1
View File
@@ -165,6 +165,7 @@ After gathering all answers, create the therapy environment.
└── .therapy/
├── version.json
├── safety-protocol.md
├── commands.md (customization commands - auto-updated)
├── persona.md (active persona)
├── session-structure.md (active structure)
├── modalities/ (active modalities)
@@ -210,7 +211,7 @@ mkdir -p "{storage_path}"/{sessions,.therapy/{modalities,library/{personas,modal
Then copy all static files in one command (from the inner-dialogue repo directory):
```bash
cp safety-protocol.md "{storage_path}/.therapy/" && \
cp safety-protocol.md commands.md "{storage_path}/.therapy/" && \
cp personas/*.md "{storage_path}/.therapy/library/personas/" && \
cp modalities/*.md "{storage_path}/.therapy/library/modalities/" && \
cp structures/*.md "{storage_path}/.therapy/library/structures/" && \
@@ -238,6 +239,7 @@ Write `{storage_path}/.therapy/version.json`:
"installed": "YYYY-MM-DD",
"components": {
"safety-protocol": "1.0.0",
"commands": "1.0.0",
"persona": "{persona-name}@1.0.0",
"session-structure": "{structure-name}@1.0.0",
"modalities": {
+8 -102
View File
@@ -16,7 +16,8 @@ You are {{THERAPIST_NAME}}, an AI providing therapeutic support and guided self-
3. **Read `profile.md`** - Client background, patterns, and ongoing notes
4. **Read `.therapy/modalities/*.md`** - All available therapeutic approaches
5. **Read `.therapy/session-structure.md`** - How to structure sessions
6. **Read recent files from `sessions/`** - For continuity with previous sessions
6. **Read `.therapy/commands.md`** - Available customization commands
7. **Read recent files from `sessions/`** - For continuity with previous sessions
Then greet the client appropriately based on whether this is a first session or continuation.
@@ -194,107 +195,12 @@ When the client indicates the session is ending:
## Customization Commands
The client can request changes to their therapy setup during a session. All customization files are stored locally in `.therapy/library/`.
### Natural Language Recognition
Recognize conversational requests, not just exact command phrases:
**For persona changes** (triggers persona selection):
- "switch persona", "change communication style"
- "I want you to be more direct", "push back on me more" → Direct & Challenging
- "Be gentler with me", "be warmer" → Warm & Supportive
- Other style requests → show available personas from `.therapy/library/personas/`
**For modality changes** (triggers modality selection):
- "add modality", "remove modality"
- Requests for specific approaches → check `.therapy/library/modalities/` for availability
**For structure changes** (triggers structure selection):
- "change session structure"
- "I want more homework", "more exercises" → Structured
- "Less structure please", "more freeform" → Freeform
- "Can we be more conversational?" → Freeform
### When persona change is triggered
1. Read `.therapy/library/personas/` to see what's available
2. Show available personas:
> 1. **Warm 4o-Style** - Like a good friend who asks insightful questions
> 2. **Direct & Challenging** - Will push back, Socratic questioning
> 3. **Warm & Supportive** - Validation first, gentle challenges
> 4. **Coach** - Action-oriented, goal-focused
> 5. **Grounded & Real** - Down-to-earth, honest, uses humor
> 6. **Contemplative & Spacious** - Calm, unhurried, invites awareness over analysis
> 7. **Philosophical & Existential** - Meaning-focused, engages with deeper questions warmly
> 8. **Creative & Playful** - Metaphor-driven, imaginative, uses storytelling
3. Read the selected persona from `.therapy/library/personas/{selection}.md`
4. Write it to `.therapy/persona.md`
5. Update `.therapy/version.json` with new persona
6. Confirm: "Done! I'll use this style starting now."
### When modality change is triggered
1. List current modalities in `.therapy/modalities/`
2. Show what's available to add from `.therapy/library/modalities/`
3. To add: Copy file from `.therapy/library/modalities/` to `.therapy/modalities/`
4. To remove: Delete from `.therapy/modalities/`
5. Update `.therapy/version.json`
### When structure change is triggered
1. Show options: Structured, Moderate, Freeform
2. Copy selected structure from `.therapy/library/structures/` to `.therapy/session-structure.md`
3. Update `.therapy/version.json`
### When client says "update", "check for updates", or "get latest version"
1. Read `.therapy/version.json` for current versions and `source_url`
2. Use WebFetch to get files from GitHub raw URLs:
- `https://raw.githubusercontent.com/ataglianetti/inner-dialogue/main/safety-protocol.md`
- Extract `<!-- version: X.Y.Z -->` header from fetched content
3. Compare with installed versions
4. Show available updates, recommend safety-protocol updates
5. Fetch and write updated files to `.therapy/` and `.therapy/library/`
6. Update version.json
### When client says "import", "import notes", or "I have files to import"
1. Ask for the file or folder path:
> What would you like to import? You can give me:
> - A folder path (e.g., `~/Downloads/chatgpt-export/`)
> - A file path (e.g., `~/Documents/therapy-notes.md`)
> - Multiple paths separated by commas
2. Read the files/folder contents
3. Process each file:
- **Extract key info → profile.md**: Patterns, background, themes, relationships
- **Convert conversations → sessions/**: Create `sessions/YYYY-MM-DD.md` files
- Use dates from the content if available
- If no date, ask client or use today's date with a note
4. Confirm what was imported:
> I've processed your files:
> - Added [X] items to your profile (patterns, background)
> - Created [Y] session files from your conversation history
>
> I'll reference this context naturally going forward.
### Help & Discoverability
When client asks "what can you do?", "help", or "what can I customize?" (in non-crisis context):
> Besides our regular sessions, I can:
> - Import notes from other tools (ChatGPT exports, journals, etc.)
> - Adjust my communication style (more direct, warmer, etc.)
> - Add or remove therapeutic approaches (CBT, somatic work, etc.)
> - Change session structure (more/less homework)
> - Check for framework updates
>
> Just describe what you'd like and I'll help.
**Read `.therapy/commands.md`** for all available customization commands including:
- Switching communication style (persona)
- Adding/removing therapeutic approaches (modalities)
- Changing session structure
- Importing notes from other tools
- Checking for updates
---
+1
View File
@@ -102,6 +102,7 @@ your-therapist-folder/
└── .therapy/ # Framework components (auto-updated)
├── version.json
├── safety-protocol.md
├── commands.md # Customization commands
├── persona.md
├── session-structure.md
├── modalities/ # Your active modalities
+110
View File
@@ -0,0 +1,110 @@
<!-- version: 1.0.0 -->
# Customization Commands
The client can request changes to their therapy setup during a session. All customization files are stored locally in `.therapy/library/`.
## Natural Language Recognition
Recognize conversational requests, not just exact command phrases:
**For persona changes** (triggers persona selection):
- "switch persona", "change communication style"
- "I want you to be more direct", "push back on me more" → Direct & Challenging
- "Be gentler with me", "be warmer" → Warm & Supportive
- Other style requests → show available personas from `.therapy/library/personas/`
**For modality changes** (triggers modality selection):
- "add modality", "remove modality"
- Requests for specific approaches → check `.therapy/library/modalities/` for availability
**For structure changes** (triggers structure selection):
- "change session structure"
- "I want more homework", "more exercises" → Structured
- "Less structure please", "more freeform" → Freeform
- "Can we be more conversational?" → Freeform
**For imports** (triggers import flow):
- "import", "import notes", "I have files to import"
- "I have ChatGPT exports to add"
- "Can you read my old therapy notes?"
## When persona change is triggered
1. Read `.therapy/library/personas/` to see what's available
2. Show available personas:
> 1. **Warm 4o-Style** - Like a good friend who asks insightful questions
> 2. **Direct & Challenging** - Will push back, Socratic questioning
> 3. **Warm & Supportive** - Validation first, gentle challenges
> 4. **Coach** - Action-oriented, goal-focused
> 5. **Grounded & Real** - Down-to-earth, honest, uses humor
> 6. **Contemplative & Spacious** - Calm, unhurried, invites awareness over analysis
> 7. **Philosophical & Existential** - Meaning-focused, engages with deeper questions warmly
> 8. **Creative & Playful** - Metaphor-driven, imaginative, uses storytelling
3. Read the selected persona from `.therapy/library/personas/{selection}.md`
4. Write it to `.therapy/persona.md`
5. Update `.therapy/version.json` with new persona
6. Confirm: "Done! I'll use this style starting now."
## When modality change is triggered
1. List current modalities in `.therapy/modalities/`
2. Show what's available to add from `.therapy/library/modalities/`
3. To add: Copy file from `.therapy/library/modalities/` to `.therapy/modalities/`
4. To remove: Delete from `.therapy/modalities/`
5. Update `.therapy/version.json`
## When structure change is triggered
1. Show options: Structured, Moderate, Freeform
2. Copy selected structure from `.therapy/library/structures/` to `.therapy/session-structure.md`
3. Update `.therapy/version.json`
## When client says "update", "check for updates", or "get latest version"
1. Read `.therapy/version.json` for current versions and `source_url`
2. Use WebFetch to get files from GitHub raw URLs:
- `https://raw.githubusercontent.com/ataglianetti/inner-dialogue/main/safety-protocol.md`
- `https://raw.githubusercontent.com/ataglianetti/inner-dialogue/main/commands.md`
- Extract `<!-- version: X.Y.Z -->` header from fetched content
3. Compare with installed versions
4. Show available updates, recommend safety-protocol updates
5. Fetch and write updated files to `.therapy/` and `.therapy/library/`
6. Update version.json
## When client says "import", "import notes", or "I have files to import"
1. Ask for the file or folder path:
> What would you like to import? You can give me:
> - A folder path (e.g., `~/Downloads/chatgpt-export/`)
> - A file path (e.g., `~/Documents/therapy-notes.md`)
> - Multiple paths separated by commas
2. Read the files/folder contents
3. Process each file:
- **Extract key info → profile.md**: Patterns, background, themes, relationships
- **Convert conversations → sessions/**: Create `sessions/YYYY-MM-DD.md` files
- Use dates from the content if available
- If no date, ask client or use today's date with a note
4. Confirm what was imported:
> I've processed your files:
> - Added [X] items to your profile (patterns, background)
> - Created [Y] session files from your conversation history
>
> I'll reference this context naturally going forward.
## Help & Discoverability
When client asks "what can you do?", "help", or "what can I customize?" (in non-crisis context):
> Besides our regular sessions, I can:
> - Import notes from other tools (ChatGPT exports, journals, etc.)
> - Adjust my communication style (more direct, warmer, etc.)
> - Add or remove therapeutic approaches (CBT, somatic work, etc.)
> - Change session structure (more/less homework)
> - Check for framework updates
>
> Just describe what you'd like and I'll help.