Skip to content

feat(riffrec-feedback-analysis): add Riffrec feedback skill with three-path routing#747

Open
kieranklaassen wants to merge 3 commits intomainfrom
feat/riffrec-feedback-analysis-skill
Open

feat(riffrec-feedback-analysis): add Riffrec feedback skill with three-path routing#747
kieranklaassen wants to merge 3 commits intomainfrom
feat/riffrec-feedback-analysis-skill

Conversation

@kieranklaassen
Copy link
Copy Markdown
Collaborator

Summary

  • New skill riffrec-feedback-analysis that turns Riffrec recordings (or any video/audio/notes) into structured product feedback.
  • Lean SKILL.md routes between three paths so trigger-time payload stays small:
    • Setup — install Riffrec in a project; no analyzer run.
    • Quick bug report — short recordings / single issues; analyzer to a temp dir, one concise inline bug report, no docs/brainstorms/ writes, no ce-brainstorm handoff. Auto-escalates if multiple issues surface.
    • Extensive analysis — full pipeline (analysis.md, problem-analysis.md, source-materials.md, requirements-kickoff.md, source mapping) with automatic handoff to ce-brainstorm.
  • Adapted from the personal ~/.codex/skills/ copy: absolute paths swapped for relative, ce-brainstorm referenced as a bare skill per plugin convention, Riffrec repo surfaced in SKILL.md and README.

Test plan

  • bun run release:validate clean — 49 agents, 39 skills, 0 MCP servers
  • bun test tests/frontmatter.test.ts — 260/260 pass (incl. new skill)
  • bun test tests/skill-shell-safety.test.ts — 82/82 pass
  • Manual smoke test of the routing in a real session with a Riffrec zip

🤖 Generated with Claude Code

…e-path routing

Convert Riffrec recordings, videos, audio, or notes into structured
feedback. Routes to one of three references at trigger time so the
loaded payload stays small:

- Setup: install Riffrec in a project (links to kieranklaassen/riffrec).
- Quick bug report: short recordings or single issues — analyzer to
  temp dir, one concise inline bug report, no docs/brainstorms writes,
  no ce-brainstorm handoff. Auto-escalates if the recording turns out
  to contain multiple issues.
- Extensive analysis: the full pipeline — analysis.md, problem-analysis,
  source-materials, requirements-kickoff, source mapping, and automatic
  handoff into ce-brainstorm.

Skill content adapted from the personal ~/.codex copy: absolute paths
replaced with relative ones, ce-brainstorm referenced as a bare skill
per plugin convention, and the Riffrec capture tool surfaced in SKILL.md,
the install reference, and the README row.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4795dc4ea9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +93 to +95
resolved = member_path.resolve()
if not str(resolved).startswith(str(dest.resolve())):
raise RuntimeError(f"Unsafe zip member path: {member.filename}")
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Validate zip members with path-boundary check

The zip extraction guard uses str(resolved).startswith(str(dest.resolve())), which is bypassable by sibling-prefixed paths (for example, a member resolving to /tmp/raw-evil/... still starts with /tmp/raw). In this skill, a crafted riffrec-*.zip can therefore write outside raw/, potentially overwriting arbitrary files in writable directories. Use a boundary-safe check such as os.path.commonpath([dest_resolved, resolved]) == str(dest_resolved) (or Path.is_relative_to on Python 3.9+) before writing each member.

Useful? React with 👍 / 👎.

return {"status": "failed", "text": "", "reason": "ffmpeg is not installed; cannot chunk media"}

chunks_dir.mkdir(parents=True, exist_ok=True)
chunk_count = max(1, int((duration or chunk_seconds) // chunk_seconds) + (1 if duration % chunk_seconds else 0))
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Derive chunk count without requiring known duration

When a full transcription fails and chunk retry is triggered, chunk_count becomes 1 whenever duration is 0/unknown, so only the first chunk is transcribed and the rest of long media is silently dropped. This happens in environments where duration probing fails (e.g., missing/failed ffprobe) and yields incomplete analysis output that appears successful. The chunking loop should continue extracting chunks until ffmpeg indicates EOF (or probe duration another way) instead of assuming one chunk when duration is unavailable.

Useful? React with 👍 / 👎.

kieranklaassen and others added 2 commits May 1, 2026 15:50
…ew skills/agents

Rename the skill from `riffrec-feedback-analysis` to
`ce-riffrec-feedback-analysis` to match the plugin's naming convention.
The directory, SKILL.md `name:` frontmatter, and README row all carry
the prefix.

Make the rule mechanically enforced so this mistake doesn't recur:

- tests/frontmatter.test.ts: new tests assert every compound-engineering
  skill directory and agent file starts with `ce-`. A small allowlist
  pins the three legacy unprefixed skills (every-style-editor, file-todos,
  lfg) -- new skills cannot be added there.
- plugins/compound-engineering/AGENTS.md: strengthen the Naming
  Convention section to call the prefix mandatory, point at the test,
  and forbid extending the allowlist.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Capture the convention-with-visible-exceptions failure mode that let
PR #747 ship a non-prefixed skill, and the fix: pair the prose rule
with a frontmatter test plus an explicit legacy allowlist.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fb211bdebc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

All non-setup paths share the same analyzer:

```bash
python scripts/analyze_riffrec_zip.py /path/to/input
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Invoke analyzer with python3 in skill instructions

The runbook uses python scripts/analyze_riffrec_zip.py, but this script is Python 3 code and many developer environments only provide python3 (or map python inconsistently). In those environments, the analyzer step fails before any artifacts are produced, breaking both quick and extensive paths. Use python3 (or an executable script invocation) consistently in the documented command so the workflow is runnable by default.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant