- Shell 100%
|
|
||
|---|---|---|
| adapters/cursor | ||
| frameworks | ||
| references | ||
| scripts | ||
| LICENSE | ||
| README.md | ||
| SKILL.md | ||
Riff
Multi-framework Socratic brainstorming for AI coding assistants.
Riff facilitates structured ideation sessions using multiple thinking frameworks as lenses, delivered through Socratic questioning. Each session runs multiple rounds where the AI selects the best-fit framework, a principle is randomly chosen, and it's mapped onto your specific problem as a provocative question. Your responses are captured to a markdown ideation file.
Works with Claude Code, Codex, and Cursor.
┌─────────────────────────────────────────┐
│ frameworks/*.md │
│ │
│ ┌───────┐ ┌────────┐ ┌─────────────┐ │
│ │ TRIZ │ │SCAMPER │ │ C-K Theory │ │
│ │(40) │ │(7) │ │ (8) │ │
│ └───────┘ └────────┘ └─────────────┘ │
│ ┌───────┐ ┌────────┐ ┌─────────────┐ │
│ │Cynefin│ │Lateral │ │ Oblique │ │
│ │(5) │ │Think(8)│ │ Strat(10) │ │
│ └───────┘ └────────┘ └─────────────┘ │
│ ... and 6 more │
└──────────────┬──────────────────────────┘
│ LLM reads when_to_use
│ and selects best fit
▼
┌──────────┐ problem ┌──────────────────────────────┐ principle ┌──────────┐
│ │ ────────── │ │ ─────────▶ │ │
│ You │ │ LLM Facilitator │ │ riff.sh │
│ │ ◀───────── │ │ ◀───────── │(random + │
│ │ Socratic │ maps principle onto your │ random │ file I/O)│
└──────────┘ question │ specific problem context │ pick └──────────┘
│ └──────────────┬───────────────┘ │
│ │ │
│ your thinking │ append round │
└─────────────────────────────────┼─────────────────────────────────┘
▼
┌─────────────────────────────┐
│ ~/.claude/riffs/ │
│ problem-name-ideation.md │
│ │
│ ## Round 1 — Segmentation │
│ (#1, triz) │
│ Q: ... │
│ Your response... │
│ │
│ ## Round 2 — Eliminate │
│ (#6, scamper) │
│ Q: ... │
│ Your response... │
└─────────────────────────────┘
Available Frameworks
| Framework | Principles | Best for |
|---|---|---|
| TRIZ | 40 | Contradictions, trade-offs, system design conflicts |
| SCAMPER | 7 | Improving existing products, features, or processes |
| C-K Theory | 8 | Radical innovation, greenfield design, breaking fixation |
| Theory of Constraints | 6 | Bottlenecks, throughput, pipeline optimisation |
| Cynefin | 5 | Sense-making, strategic decisions under uncertainty |
| Nine Windows | 9 | Systems thinking across time and abstraction levels |
| Lateral Thinking | 8 | Breaking fixation, reframing, challenging assumptions |
| Morphological Analysis | 6 | Combinatorial exploration, mapping solution spaces |
| Six Thinking Hats | 6 | Balanced evaluation, separating facts from feelings |
| USIT | 6 | Rapid inventive solutions for focused technical problems |
| Oblique Strategies | 10 | Creative blocks, artistic work, generative provocation |
| Synectics | 7 | Analogy-driven creativity, cross-domain connections |
The AI selects the most relevant framework each round based on your problem and how the conversation evolves. You can also lock to a specific framework.
Installation
Claude Code
Global (available in all projects):
git clone ssh://git@codeberg.org/anuna/riff-skill.git ~/.claude/skills/riff
Project-level (available only in this project, committable to version control):
git clone ssh://git@codeberg.org/anuna/riff-skill.git .claude/skills/riff
Codex
git clone ssh://git@codeberg.org/anuna/riff-skill.git ~/.agents/skills/riff
The SKILL.md format is compatible with both Claude Code and Codex.
Cursor
First, clone the repo to a shared location:
git clone ssh://git@codeberg.org/anuna/riff-skill.git ~/.riff
Then copy the Cursor rule into your project:
mkdir -p .cursor/rules
cp ~/.riff/adapters/cursor/riff.mdc .cursor/rules/
Or to install globally, add ~/.riff/adapters/cursor/riff.mdc to your user rules.
Usage
Claude Code: /riff How should we handle auth for multi-tenant APIs?
Codex: $riff How should we handle auth for multi-tenant APIs?
Cursor: @riff How should we handle auth for multi-tenant APIs?
Or use natural language triggers like "brainstorm", "ideate", "explore this problem", or "help me think through".
Session options
- Rounds: Defaults to 5 rounds. Say "let's do 3 rounds" to change.
- Framework: Auto-selected per round by default. Say "use only TRIZ" or "use C-K theory" to lock to one framework.
- Continue a session: Provide the path to an existing ideation file.
Output
Ideation files are saved to ~/.claude/riffs/ by default. Set the RIFF_DIR environment variable to change the output location.
How it works
- You provide a problem statement or design question
- Each round, the AI selects the best-fit thinking framework
- A principle is randomly selected from that framework (avoiding repeats)
- The facilitator generates a Socratic question mapping the principle onto your problem
- You respond with your thinking
- The exchange is captured to a markdown file with framework tags
- After all rounds, a summary of discoveries is presented
Adding frameworks
Create a markdown file in frameworks/ with this format:
---
name: Framework Name
id: short-id
description: One-line summary.
when_to_use: >
Natural language description of when this framework is most useful.
The AI reads this to decide when to select your framework.
tags: [relevant, tags]
---
# Framework Name
1|Principle Name|Fallback Socratic question for this principle
2|Another Principle|Another fallback question
The AI will automatically discover and use new framework files.
Acknowledgements
Inspired by a conversation with inventor Steve Brodie.