|
| 1 | +# Extensive analysis path |
| 2 | + |
| 3 | +Use this path when the input is a longer recording (over ~60 seconds), contains multiple issues, requirements, or workflow walkthroughs, or the user explicitly wants requirements material. The goal is a full Compound Engineering-compatible artifact set that feeds `ce-brainstorm`. |
| 4 | + |
| 5 | +## Workflow |
| 6 | + |
| 7 | +1. Run the analyzer: |
| 8 | + |
| 9 | + ```bash |
| 10 | + python scripts/analyze_riffrec_zip.py /path/to/input |
| 11 | + ``` |
| 12 | + |
| 13 | + Use `--output-dir <dir>` when the artifact should live somewhere specific. In a repo with `docs/brainstorms/`, the default output goes under `docs/brainstorms/riffrec-feedback/`. |
| 14 | + |
| 15 | +2. Read the generated `analysis.md`, `problem-analysis.md`, `review-prompt.md`, and `requirements-kickoff.md`. |
| 16 | + |
| 17 | +3. Read `source-materials.md` before brainstorm. It is the source-of-truth manifest for the original raw feedback location, transcript, local-only frames, chunks, analysis artifacts, and screenshot paths. Use it to keep brainstorm and planning traceable to the original feedback evidence. |
| 18 | + |
| 19 | +4. Inspect the extracted screenshots for high-signal moments using the platform's image-view tool. Prioritize screenshots selected because of click events near verbal complaints, failed network requests, console errors, or repeated interaction. |
| 20 | + |
| 21 | +5. Fill or refine `problem-analysis.md` using the frame review structure from `review-prompt.md`. The final problem analysis must have exactly these top-level categories: |
| 22 | + |
| 23 | + - **Visual/UI Problems** |
| 24 | + - **Functional Problems** |
| 25 | + - **Requirements** |
| 26 | + - **Usability/UX Problems** |
| 27 | + |
| 28 | + Each numbered item should describe the problem, location, UI element, frame reference, and relevant transcript context when available. Focus on WHAT is wrong, not HOW to fix it. |
| 29 | + |
| 30 | +6. Convert evidence into requirements. Keep these categories distinct: |
| 31 | + |
| 32 | + - **Observed facts:** transcript quotes, click targets, request statuses, screenshot contents. |
| 33 | + - **Inferences:** likely user intent, likely broken control, suspected missing state. |
| 34 | + - **Requirements:** product behavior needed to resolve the problem. |
| 35 | + |
| 36 | +7. When the current workspace contains the product source code, run a source-mapping pass before or during brainstorm. Use the transcript language, visible UI labels, screenshot paths, route names, and generated requirements to search the codebase for likely components, controllers, services, models, tests, and state stores. For larger sessions, split this mapping by product area and use sub-agents when available so independent areas can be inspected in parallel. |
| 37 | + |
| 38 | +8. Add source mapping to the brainstorm material as suspected implementation surfaces, not as proven root cause unless the code clearly proves it. Include confidence levels and short evidence notes explaining why each file or component is relevant. |
| 39 | + |
| 40 | +9. Always continue into brainstorm. Once `analysis.md`, `problem-analysis.md`, `source-materials.md`, and `requirements-kickoff.md` exist, say "Analysis complete. Ready to brainstorm the findings." Then immediately load the `ce-brainstorm` skill with the generated `requirements-kickoff.md`, unless the user explicitly asked only to extract or analyze artifacts. |
| 41 | + |
| 42 | +10. In brainstorm, first ask the user to confirm the captured requirements: "Did this capture the requirements correctly, and what is missing, wrong, or grouped badly?" Do not move to planning until brainstorm has confirmed or corrected the requirements. |
| 43 | + |
| 44 | +## Automatic handoff |
| 45 | + |
| 46 | +Do not end the workflow after extraction in normal use. The intended sequence is: |
| 47 | + |
| 48 | +1. Run the analyzer. |
| 49 | +2. Read `source-materials.md` so brainstorm has direct links to raw feedback, transcript, frames, and analysis artifacts. |
| 50 | +3. Inspect or refine `problem-analysis.md` when the evidence needs human-visible interpretation. |
| 51 | +4. Load the `ce-brainstorm` skill with `requirements-kickoff.md`. |
| 52 | +5. Ask the user to confirm, correct, or regroup the captured requirements. |
| 53 | +6. Let `ce-brainstorm` produce the durable requirements doc under `docs/brainstorms/`. |
| 54 | + |
| 55 | +Only stop after step 1 or 2 when the user asks specifically for raw artifacts, transcript, screenshots, or analysis without brainstorming. |
| 56 | + |
| 57 | +## Capture scale |
| 58 | + |
| 59 | +Prefer over-capture to under-capture. The purpose of this path is to preserve product feedback as structured data for later AI work, not to decide what is worth implementing during extraction. |
| 60 | + |
| 61 | +When analyzing a feedback source: |
| 62 | + |
| 63 | +- Capture every distinct problem, bug, request, expectation, confusion point, and "note to self" that appears in the transcript or frames. |
| 64 | +- Include concrete examples from the source material for each issue when possible: timestamp, transcript phrase, screenshot path, clicked UI element, email/thread ID, or observed state. |
| 65 | +- Include concrete source-code mapping when possible: likely component/service/controller/model/test files, route or API endpoint names, relevant state variables, and confidence level. This mapping should make it obvious where a later implementation agent should start looking. |
| 66 | +- If only video is available, infer likely screens and components from visible UI labels, layout, URLs, route names, copied text, screenshots, and transcript references. Mark uncertain mappings explicitly instead of omitting them. |
| 67 | +- If only audio or notes are available, map from product terminology and workflow descriptions to likely code areas when the repo is present, and label the mapping as transcript-derived. |
| 68 | +- Do not drop lower-priority items during analysis. Mark them as lower priority or secondary if needed, but keep them represented. |
| 69 | +- Separate capture from prioritization. Brainstorm may regroup, split, defer, or reject items later, but the first requirements pass should preserve the full signal. |
| 70 | +- If a feedback session contains many issues, create a comprehensive capture document and state that planning should split it into smaller plans. |
| 71 | +- Treat source mapping as supporting material, not a filter. If a problem cannot yet be mapped to code, keep the problem and mark the source mapping as unknown. |
| 72 | + |
| 73 | +## Source mapping grounding |
| 74 | + |
| 75 | +When mapping feedback to source code, classify each mapping as one of: |
| 76 | + |
| 77 | +- **Likely buggy surface:** the code path exists and directly handles the observed behavior. |
| 78 | +- **Missing or incomplete surface:** the feedback names a behavior, but the repo has no clear UI, route, controller action, or component implementing it yet. |
| 79 | +- **Indirect surface:** the code is adjacent to the behavior, but the exact interaction may happen through rendered email content, third-party UI, generated HTML, or another layer. |
| 80 | +- **Unknown:** no grounded source mapping found yet. |
| 81 | + |
| 82 | +Every source mapping should include: |
| 83 | + |
| 84 | +- Requirement/example ids, such as `R14`, `AE4`, or `EX17`. |
| 85 | +- File paths with line numbers when practical. |
| 86 | +- A short evidence note from code, not just a file guess. |
| 87 | +- Confidence: `High`, `Medium`, `Low`, or `Unknown`. |
| 88 | + |
| 89 | +Prefer saying "I did not find a current inbox implementation for this surface" over forcing a speculative mapping. Missing surfaces are useful product findings and should stay in the brainstorm. |
| 90 | + |
| 91 | +## Output shape |
| 92 | + |
| 93 | +The analyzer writes: |
| 94 | + |
| 95 | +- `analysis.md`: session summary, transcript, selected moments, screenshot links, candidate findings, and review checklist. |
| 96 | +- `problem-analysis.md`: a categorized problem statement scaffold for visual, functional, requirement, and UX findings. |
| 97 | +- `review-prompt.md`: a filled prompt containing screenshot paths and transcript for a deeper visual analysis pass. |
| 98 | +- `source-materials.md`: a manifest linking the original source location, local-only raw files, transcript locations, chunks, local-only frames, and generated artifacts. |
| 99 | +- `requirements-kickoff.md`: a CE-friendly requirements starter with Problem Frame, Actors, Key Flows, R-IDs, Acceptance Examples, Success Criteria, Scope Boundaries, Questions, and Next Steps. |
| 100 | +- `analysis.json`: structured session, event, transcript, moment, and artifact metadata. |
| 101 | +- `frames/`: extracted PNG screenshots for selected moments. Local-only by default. |
| 102 | +- `raw/`: extracted zip contents and copied source media. Local-only by default. |
| 103 | + |
| 104 | +Long media is transcribed in chunks when a single transcription request is too large. Chunk transcripts include timestamp prefixes so the review pass can still connect discussion points to approximate video regions. |
| 105 | + |
| 106 | +For audio-only or notes-only sources, the visual sections intentionally say that no frames are available. In those cases, extract functional problems, requirements, and UX friction from transcript or notes only. |
| 107 | + |
| 108 | +## Review heuristics |
| 109 | + |
| 110 | +Select moments when they contain: |
| 111 | + |
| 112 | +- Verbal complaint cues: "weird", "doesn't work", "can't", "broken", "bug", "problem", "confusing", "should". |
| 113 | +- Clicks on controls shortly before or after a complaint. |
| 114 | +- Repeated clicks on the same control. |
| 115 | +- Failed requests outside known development noise. |
| 116 | +- Console errors, uncaught exceptions, or failed form submissions. |
| 117 | +- Visible toasts, validation errors, disabled controls, empty states, or surprising navigation. |
| 118 | + |
| 119 | +The script's findings are deliberately conservative. Look at screenshots and transcript together before turning a candidate finding into a requirement. |
0 commit comments