Skip to content

bug: /workflows:research process fails when transcript is first research action #187

@mattthomps1

Description

@mattthomps1

Summary

/workflows:research with a transcript (inline or as first action) fails due to two cascading bugs in the process phase. The brainstorm and plan workflows are unaffected — this is isolated to the research workflow's transcript processing path.

Reproduction

  1. Start with empty research directories (docs/research/ has no files)
  2. Run /workflows:research process this transcript [inline content]
  3. Expected: Transcript gets processed into an interview snapshot
  4. Actual: Claude stalls — creates directories but never produces output

Tested: brainstorm flow ✅, plan flow ✅, research process flow ❌

Root Cause Analysis

There are 2 cascading bugs that compound when processing a transcript is the first research action:

Bug 1: Phase 2 doesn't handle inline transcript content

File: `plugins/compound-engineering/commands/workflows/research.md` (lines 82-114)

Phase 2 (Process) instructs:

Look for `.md` files in `docs/research/transcripts/`.
If no transcripts exist: Report: "No transcripts found..."

But the user provided the transcript inline as the command argument. The workflow has no instruction to:

  • a) Save inline content to a file first, then proceed, or
  • b) Pass inline content directly to the `transcript-insights` skill

The `transcript-insights` skill does support inline content (SKILL.md Step 1: "If content is pasted directly, proceed with that content") — but the workflow command never reaches the skill because it stops at "no transcripts found."

This is the primary bug. The workflow command and the skill have mismatched input handling.

Bug 2: transcript-insights skill Step 2 has no empty-state handling for plans directory

File: `plugins/compound-engineering/skills/transcript-insights/SKILL.md` (lines 31-40)

Even if Bug 1 were fixed, Step 2 says:

List existing research plans by reading frontmatter from files in `docs/research/plans/`:

  • Show title, date, and status for each plan
  • Most recent first, cap at 7 entries
  • Include "Ad-hoc / no plan" as the final option

When `docs/research/plans/` is empty (first research action), there's no explicit handling. The instruction says to list plans AND include "Ad-hoc" as the "final option" — but when there are no plans, "Ad-hoc" should be the only option. The model may stall trying to reconcile listing from an empty directory.

Compare with the `user-research-analyst` agent, which explicitly handles empty state:

Step 8: Handle Empty Research Directory

If `docs/research/` does not exist or contains no files, return: "No user research data found."

Why Other Workflows Are Unaffected

Workflow Why it works
`/workflows:brainstorm` Accepts inline feature descriptions directly — no file dependency
`/workflows:plan` Checks for brainstorm files but has explicit fallback: "If no brainstorm found, run idea refinement"
`/workflows:research` (phase menu) Phase selection just counts files — 0 is valid, menu renders fine
`/workflows:research plan` Creates a plan from scratch — no dependency on existing artifacts
`/workflows:research personas` Explicitly handles empty state: "No processed interviews found"

Only `/workflows:research process` has the cascading empty-state failure.

Proposed Fixes

Fix for Bug 1: Add inline transcript handling to Phase 2

In `commands/workflows/research.md`, before "Check for Transcripts", add:

### Check for Inline Content

If the argument contains transcript content (not just the word "process"):
1. Extract the transcript content from the argument
2. Generate a filename: `YYYY-MM-DD_<meeting-title-slug>_transcript.md`
3. Save to `docs/research/transcripts/[filename]`
4. Proceed to "Process Selected Transcript" with this file

Fix for Bug 2: Add empty-state handling to transcript-insights Step 2

In `skills/transcript-insights/SKILL.md`, update Step 2:

### Step 2: Link to Research Plan

Check for files in `docs/research/plans/`.

**If no plans exist:**
Use AskUserQuestion with a single option: "Ad-hoc / no plan" (and Other for free text).
Set `research_plan: ad-hoc` in frontmatter.

**If plans exist:**
List existing research plans by reading frontmatter...
[rest of current Step 2]

Files Involved

  • plugins/compound-engineering/commands/workflows/research.md — workflow command (Bug 1)
  • plugins/compound-engineering/skills/transcript-insights/SKILL.md — skill (Bug 2)

Environment

  • All docs/research/ directories exist but are empty (sample data was deleted during testing)
  • Git status shows 6 deleted sample research files from prior testing

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions