-
Notifications
You must be signed in to change notification settings - Fork 1.3k
feat(riffrec-feedback-analysis): add Riffrec feedback skill with three-path routing #747
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
4795dc4
feat(riffrec-feedback-analysis): add Riffrec feedback skill with thre…
kieranklaassen dffbc3f
fix(riffrec-feedback-analysis): apply ce- prefix and enforce it for n…
kieranklaassen fb211bd
docs(skill-design): document ce- prefix rule and test enforcement
kieranklaassen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
110 changes: 110 additions & 0 deletions
110
docs/solutions/skill-design/ce-prefix-required-for-skills-and-agents-2026-05-01.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,110 @@ | ||
| --- | ||
| title: New skills and agents must use the ce- prefix; enforce it in tests, not just prose | ||
| date: 2026-05-01 | ||
| category: skill-design | ||
| module: compound-engineering | ||
| problem_type: convention | ||
| component: plugins/compound-engineering | ||
| severity: low | ||
| applies_when: | ||
| - Adding a new skill directory under plugins/compound-engineering/skills/ | ||
| - Adding a new agent file under plugins/compound-engineering/agents/ | ||
| - Authoring or reviewing a PR that introduces a new component to the plugin | ||
| tags: | ||
| - naming-convention | ||
| - ce-prefix | ||
| - skill-authoring | ||
| - test-enforcement | ||
| - plugin-conventions | ||
| related: | ||
| - docs/solutions/skill-design/beta-skills-framework.md | ||
| related_pr: https://github.com/EveryInc/compound-engineering-plugin/pull/747 | ||
| --- | ||
|
|
||
| ## Problem | ||
|
|
||
| `plugins/compound-engineering/AGENTS.md` already stated that "all skills and agents use the `ce-` prefix to unambiguously identify them as compound-engineering components." But the rule was prose-only, and three legacy skills (`every-style-editor`, `file-todos`, `lfg`) sit unprefixed in the same directory as their `ce-`-prefixed siblings. The combination — a soft rule plus visible exceptions — let a new skill (`riffrec-feedback-analysis`) ship in PR #747 without the prefix. The user caught it post-merge of the first commit, requiring a rename commit on the same PR. | ||
|
|
||
| A prose convention that has visible counterexamples and no machine check is, in practice, an *advisory* convention. Any author skim-reading the directory listing sees `every-style-editor` next to `ce-brainstorm` and reasonably concludes the prefix is optional. | ||
|
|
||
| ## Root cause | ||
|
|
||
| Two layered problems: | ||
|
|
||
| 1. **The rule was unenforced.** Nothing in CI or the test suite would fail when a non-`ce-` skill was added. The frontmatter test asserts that the skill's `name:` matches its directory and that the directory uses `[a-z0-9-]+`, but does not check for the `ce-` prefix. | ||
| 2. **The exception list was implicit.** Three legacy skills predate the rule. Without an explicit allowlist, "predates the rule" looks identical to "the rule doesn't apply" when reading the filesystem. | ||
|
|
||
| ## Solution | ||
|
|
||
| Make the rule mechanically enforced and pin the exceptions explicitly. | ||
|
|
||
| ### 1. Test enforcement | ||
|
|
||
| Added to `tests/frontmatter.test.ts` inside the existing `frontmatter YAML validity` block: | ||
|
|
||
| ```ts | ||
| if (pluginRoot === "plugins/compound-engineering") { | ||
| const SKILL_PREFIX_ALLOWLIST = new Set([ | ||
| "every-style-editor", | ||
| "file-todos", | ||
| "lfg", | ||
| ]) | ||
| test(`${pluginRoot}/${rel} skill name uses ce- prefix`, () => { | ||
| const dirName = path.basename(path.dirname(rel)) | ||
| if (SKILL_PREFIX_ALLOWLIST.has(dirName)) return | ||
| expect( | ||
| dirName.startsWith("ce-"), | ||
| `Skill "${dirName}" must use the ce- prefix. ` + | ||
| `If this is a legacy skill that predates the rule, add it to ` + | ||
| `SKILL_PREFIX_ALLOWLIST in tests/frontmatter.test.ts.`, | ||
| ).toBe(true) | ||
| }) | ||
| } | ||
| ``` | ||
|
|
||
| A parallel test at the agent level (no allowlist, since every existing agent already conforms): | ||
|
|
||
| ```ts | ||
| if ( | ||
| pluginRoot === "plugins/compound-engineering" && | ||
| /^agents\/[^/]+\.agent\.md$/.test(rel) | ||
| ) { | ||
| test(`${pluginRoot}/${rel} agent name uses ce- prefix`, () => { | ||
| const fileName = path.basename(rel, ".agent.md") | ||
| expect( | ||
| fileName.startsWith("ce-"), | ||
| `Agent "${fileName}" must use the ce- prefix.`, | ||
| ).toBe(true) | ||
| }) | ||
| } | ||
| ``` | ||
|
|
||
| The test failure message tells the author exactly what to do — either rename the skill or, if it is genuinely legacy, edit the allowlist (which a reviewer can then push back on). | ||
|
|
||
| ### 2. Strengthened prose | ||
|
|
||
| Updated `plugins/compound-engineering/AGENTS.md` to call the prefix mandatory, name the legacy exceptions, point at the test, and forbid extending the allowlist. The prose now says "no exceptions" and tells authors that the test will fail. Prose alone wouldn't have prevented the original mistake, but pairing it with the test gives a single internally consistent story. | ||
|
|
||
| ### 3. Persistent author memory | ||
|
|
||
| Saved a feedback memory at `~/.claude/projects/-Users-kieranklaassen-compound-engineering-plugin/memory/feedback_ce_prefix_required.md` so future sessions on this repo load the rule automatically and apply it before the test fires. | ||
|
|
||
| ## Prevention | ||
|
|
||
| For any plugin convention that is currently prose-only, ask: | ||
|
|
||
| - Is there at least one visible counterexample in the codebase that an author could mistake for permission? | ||
| - Is there a mechanical check that would fail on violation? | ||
|
|
||
| If the answer to the first is yes and the second is no, the convention will eventually be violated. The fix is one of: | ||
|
|
||
| - Add a test that asserts the convention with a hard-coded allowlist for legacy exceptions. | ||
| - Migrate the legacy exceptions so the rule is universal and no allowlist is needed. | ||
|
|
||
| The allowlist pattern is preferred when migration is risky (renaming an installed skill breaks user invocations) but the rule applies cleanly going forward. | ||
|
|
||
| ## Related | ||
|
|
||
| - `plugins/compound-engineering/AGENTS.md` — Naming Convention section now documents the rule and the allowlist. | ||
| - `tests/frontmatter.test.ts` — implements the enforcement. | ||
| - PR #747 — the original mistake and the rename + enforcement that came with it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
plugins/compound-engineering/skills/ce-riffrec-feedback-analysis/SKILL.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| --- | ||
| name: ce-riffrec-feedback-analysis | ||
| description: Riffrec product-feedback workflow. ALWAYS load when the user posts a `riffrec-*.zip`, a bundle with `session.json` + `events.json` + `recording.webm` + `voice.webm`, a video/audio recording for product feedback, or asks how to capture and share Riffrec sessions. Routes between setup, quick bug report, and extensive analysis. | ||
| --- | ||
|
|
||
| # Riffrec Feedback Analysis | ||
|
|
||
| Turn raw product feedback into structured evidence for downstream agents. This skill is the consumption side of [Riffrec](https://github.com/kieranklaassen/riffrec), a capture tool that records synchronized screen + voice + event sessions and emits a `riffrec-*.zip` bundle. | ||
|
|
||
| ## Choose the path | ||
|
|
||
| Route to the matching reference based on the input. Read only that reference; do not load the others. | ||
|
|
||
| - **Setup** — user has no recording yet and asks how to install Riffrec, capture a session, or share feedback. Read `references/install-riffrec.md`. | ||
| - **Quick bug report** — input is a short recording (under ~60 seconds), the user describes a single specific issue, or asks for "quick", "small", or "just transcribe". Read `references/quick-bug-report.md`. Emit one concise bug report; skip the full artifact set and brainstorm handoff. | ||
| - **Extensive analysis** — input is a longer recording, contains multiple issues / requirements / workflow walkthroughs, or the user wants requirements or brainstorm material. Read `references/extensive-analysis.md`. Always continue into the `ce-brainstorm` skill. | ||
|
|
||
| When the input is ambiguous (e.g., a zip arrived without context), inspect the recording length and event count before choosing. If still unclear, ask the user which path applies before running anything heavy. | ||
|
|
||
| ## Common rules | ||
|
|
||
| - Keep raw recordings, audio chunks, zip contents, session dumps, and extracted screenshots local-only by default. Do not commit `raw/` or `frames/` directories unless the user explicitly asks and privacy is acceptable. | ||
| - Text/metadata artifacts (requirements docs, analysis summaries, problem analyses, source manifests) may be committed when they are needed for traceability and contain no sensitive data. | ||
| - Use repo-relative screenshot paths in any committed doc so later agents can open the evidence without absolute local paths. | ||
|
|
||
| ## Analyzer entrypoint | ||
|
|
||
| All non-setup paths share the same analyzer: | ||
|
|
||
| ```bash | ||
| python scripts/analyze_riffrec_zip.py /path/to/input | ||
| ``` | ||
|
|
||
| Accepted inputs: a Riffrec `.zip`, an `.mp4` / `.mov` / `.webm` video, an `.m4a` / `.mp3` / `.wav` audio file, or a meeting-notes `.md`. Use `--output-dir <dir>` to control where artifacts land. In repos with `docs/brainstorms/`, the default is `docs/brainstorms/riffrec-feedback/`. The quick path overrides the output dir to a temp location so nothing pollutes the repo. | ||
|
|
||
| The Compound Engineering output format used by the extensive path is documented in `references/compound-engineering-feedback-format.md`. | ||
116 changes: 116 additions & 0 deletions
116
...ce-riffrec-feedback-analysis/references/compound-engineering-feedback-format.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,116 @@ | ||
| # Compound Engineering Feedback Format | ||
|
|
||
| Use this shape when converting Riffrec evidence into a durable brainstorm or planning input. | ||
|
|
||
| ## Finding | ||
|
|
||
| ```markdown | ||
| ### F1. <Short problem title> | ||
|
|
||
| - **Severity:** P0/P1/P2/P3 | ||
| - **Observed:** <What happened, grounded in transcript/events/screenshots> | ||
| - **Expected:** <What the user appeared to expect or what the product should do> | ||
| - **Evidence:** <Moment IDs and screenshot links> | ||
| - **Confidence:** High/Medium/Low, with reason | ||
| - **Requirement candidates:** R1, R2 | ||
| ``` | ||
|
|
||
| ## Requirements Kickoff | ||
|
|
||
| ```markdown | ||
| --- | ||
| date: YYYY-MM-DD | ||
| topic: <topic> | ||
| --- | ||
|
|
||
| # <Topic Title> | ||
|
|
||
| ## Problem Frame | ||
|
|
||
| <Who is affected, what is changing, and why it matters.> | ||
|
|
||
| --- | ||
|
|
||
| ## Actors | ||
|
|
||
| - A1. User: <Role in the recorded workflow> | ||
| - A2. Product surface: <System under test> | ||
| - A3. Agent/assistant, if relevant: <Role in the workflow> | ||
|
|
||
| --- | ||
|
|
||
| ## Key Flows | ||
|
|
||
| - F1. Recorded feedback triage | ||
| - **Trigger:** A Riffrec zip is available for review. | ||
| - **Actors:** A1, A2 | ||
| - **Steps:** <3-7 product steps seen in the recording> | ||
| - **Outcome:** <What should be true after the fix> | ||
| - **Covered by:** R1, R2 | ||
|
|
||
| --- | ||
|
|
||
| ## Requirements | ||
|
|
||
| **Observed product behavior** | ||
| - R1. <Concrete product behavior requirement> | ||
|
|
||
| **Feedback evidence and reviewability** | ||
| - R2. <Requirement about making the issue observable or preventing recurrence> | ||
|
|
||
| --- | ||
|
|
||
| ## Acceptance Examples | ||
|
|
||
| - AE1. **Covers R1.** Given <state>, when <action>, <outcome>. | ||
|
|
||
| --- | ||
|
|
||
| ## Success Criteria | ||
|
|
||
| - <Human outcome> | ||
| - <Downstream agent handoff quality> | ||
|
|
||
| --- | ||
|
|
||
| ## Scope Boundaries | ||
|
|
||
| - <Deliberate non-goal> | ||
|
|
||
| --- | ||
|
|
||
| ## Key Decisions | ||
|
|
||
| - <Decision>: <Rationale> | ||
|
|
||
| --- | ||
|
|
||
| ## Dependencies / Assumptions | ||
|
|
||
| - <Material dependency or assumption> | ||
|
|
||
| --- | ||
|
|
||
| ## Outstanding Questions | ||
|
|
||
| ### Resolve Before Planning | ||
|
|
||
| - <Only product questions that block planning> | ||
|
|
||
| ### Deferred to Planning | ||
|
|
||
| - [Technical] <Questions better answered during codebase exploration> | ||
|
|
||
| --- | ||
|
|
||
| ## Next Steps | ||
|
|
||
| -> /ce-brainstorm to confirm, correct, and regroup the captured requirements before any planning. | ||
| ``` | ||
|
|
||
| ## Evidence Rules | ||
|
|
||
| - Prefer moment IDs and screenshot links over prose-only claims. | ||
| - Mark visual interpretation as an inference when the screenshot does not prove intent. | ||
| - Requirements should describe product behavior, not implementation details. | ||
| - Do not include absolute local paths in CE docs; use repo-relative paths when possible. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The runbook uses
python scripts/analyze_riffrec_zip.py, but this script is Python 3 code and many developer environments only providepython3(or mappythoninconsistently). In those environments, the analyzer step fails before any artifacts are produced, breaking both quick and extensive paths. Usepython3(or an executable script invocation) consistently in the documented command so the workflow is runnable by default.Useful? React with 👍 / 👎.