| name | sw:compound |
| description | Save session learnings to knowledge stores so future sessions get smarter. Captures change outcomes, intervention results, and cross-initiative patterns. Use after any /sw:diagnose, /sw:intervene, /sw:direct, /sw:motivate, or /sw:shape session, or when returning with real-world results. |
| argument-hint | [optional: what you learned, or 'outcome' to record real-world results] |
<compound_context> #$ARGUMENTS </compound_context>
Compound
Capture what you learned so the next session starts smarter. Every diagnosis insight, intervention outcome, and cross-initiative pattern gets saved where future sessions can find it.
When to Use
- After a
/sw:diagnose session -- capture what surprised you about where the change is stuck
- After an
/sw:intervene, /sw:direct, /sw:motivate, or /sw:shape session -- capture what you learned about designing interventions
- When returning with real-world results -- record what happened when interventions were implemented
- When you notice a cross-initiative pattern -- "environment tweaks consistently outperform training programs for our team"
- "Save what I learned", "Record the outcome", "What did we learn?"
Before Starting
Detect Context
Check what happened recently by searching the knowledge stores:
-
Read docs/switch/current-diagnosis.md -- check the created date in frontmatter. If created today or referenced in conversation, this is likely a post-diagnosis session.
-
Search docs/switch/interventions/ -- check for files created today or referenced in conversation. If found, this is likely a post-intervention session.
-
Check arguments -- if the user said "outcome" or described real-world results, this is an outcome recording session.
If context is ambiguous, ask:
"What are you compounding? Pick the session type:
- Diagnosis insights -- what you learned about this change challenge
- Intervention learnings -- what you learned while designing interventions
- Outcome recording -- real-world results from implemented changes
- Cross-initiative pattern -- something you've noticed across multiple change efforts"
Search for Prior Learnings
Before capturing new learnings, search the relevant store for existing insights that might overlap or conflict.
For diagnosis insights: Read docs/switch/current-diagnosis.md and check for existing Learnings section.
For intervention learnings: Read recent intervention files. Check their Outcome Notes sections.
For cross-initiative patterns: Search docs/switch/patterns/ for existing patterns on similar topics.
The Sequence
Three steps, lighter enforcement than the diagnostic or intervention skills. The friction here is in specificity -- making the user articulate what's non-obvious.
Step 1: Extract the Learning
The question depends on the session type.
After diagnosis:
"What did you learn about this change challenge that wasn't obvious before? Not what you decided -- that's in the diagnosis. What surprised you about where the change is stuck?"
After intervention design:
"What did you learn about designing interventions for this situation? Which tactics felt grounded and which felt like guesses? Did the Rider/Elephant/Path framing reveal something the initial diagnosis missed?"
After implementation (outcome recording):
"What happened when you implemented these changes? Be specific -- 'it went well' isn't a learning. 'The environment tweak worked immediately but the habit-building took 3 weeks to show results' is."
Cross-initiative pattern:
"What pattern have you noticed? State it as a rule: 'When we [do X], [Y happens].' Then tell me the evidence -- which initiatives or interventions demonstrate the pattern?"
What you're looking for:
- Something non-obvious -- not a restatement of what's already saved
- Specificity -- tied to named interventions, dimensions, or real events
- Actionable implication -- how should this change future sessions?
Enforcement triggers: See references/enforcement-prompts.md.
Step 2: Check for Conflicts
Search the knowledge stores for prior learnings or decisions that the new learning might contradict or supersede.
Conflict detection:
- Does the new learning contradict the sticking point ranking in the diagnosis?
- Does it contradict outcome conclusions from a prior intervention?
- Does it suggest the diagnosis or an intervention approach should change?
If a conflict is found:
"This new learning conflicts with a prior decision:
Prior: [quote the prior decision with its source file and date]
New: [state the new learning]
Options:
- Update the prior -- the new learning supersedes it. I'll update [file] and note the change.
- Archive the prior -- keep the old decision as history, replace with the new learning.
- Keep both -- the prior was right in its context, the new learning applies to a different context.
- Discard the new -- on reflection, the prior decision still holds."
Use AskUserQuestion to get the user's decision. Do not resolve conflicts automatically.
If no conflict: Proceed to Step 3.
Step 3: Save the Learning
Where and how the learning gets saved depends on the session type.
Diagnosis Insights
Add a ## Learnings section to docs/switch/current-diagnosis.md (or append to existing):
## Learnings
### [Date] -- [One-line summary]
**Insight:** [The non-obvious learning]
**Evidence:** [What happened that revealed this]
**Implication:** [How this should change future sessions]
If the learning suggests the diagnosis should change, note it:
"This learning suggests updating the diagnosis. Want to run /sw:diagnose revise [section]?"
Intervention Learnings
Update the ## Outcome Notes section of the relevant intervention file in docs/switch/interventions/:
## Outcome Notes
- [Date]: [What was learned during design or implementation]
- Insight: [What this tells us about this type of intervention]
- Next action: [What to do differently]
Outcome Recording
Update the specific intervention file:
- Update the
## Outcome Notes section with results
- Update YAML frontmatter: set
status: implemented or status: completed
If the user doesn't specify which intervention, list recent ones:
"Which intervention are you recording outcomes for? [list recent files]"
Cross-Initiative Patterns
Create a new file using the template from references/pattern-template.md:
Filename: docs/switch/patterns/pattern-{slug}-{date}.md
After Saving
Use AskUserQuestion:
Question: "Learning saved to [file]. What next?"
Options:
- Update the diagnosis -- Run
/sw:diagnose to revise based on what you learned
- Design new interventions -- Run
/sw:intervene with updated context
- Record another learning -- Run
/sw:compound again
- Done for now -- The learning is saved; future sessions will find it
Important Rules
-
Learnings must be non-obvious. If it's already in the diagnosis or intervention plan, it doesn't need saving again.
-
Specificity over volume. One sharp insight ("the 'shrink the change' first step was too big -- nobody did it until we cut it to 2 minutes") beats five vague ones.
-
Conflicts are valuable. When a new learning contradicts a prior decision, that's signal. Surface it explicitly.
-
Outcome notes are gold. The most valuable learnings come from real-world implementation. Encourage users to come back and record what happened.
-
Don't over-save. Not every session produces a learning worth saving. If the diagnosis or intervention plan captures everything, say so.
-
Cross-initiative patterns need evidence. One initiative is a hypothesis. Two or more is a pattern worth saving.
Pipeline Mode
When invoked with disable-model-invocation context:
- Skip all AskUserQuestion prompts
- Auto-detect session type from most recently modified files
- Extract learnings from conversation context
- Save without confirmation
- Skip conflict resolution -- flag conflicts for manual review
- Tag output as
source: "pipeline mode -- review recommended"