Analyze project

From henryalouf/ruflow · View interactive version

Analyze project is an AI agent skill from the GitHub repository henryalouf/ruflow. Forensic root cause analyzer for Claude Code sessions. Classifies scope deltas, rework patterns, root causes, hotspots, and auto-improves prompts/health.

How to use this skill

Skill file

/analyze-project — Root Cause Analyst Workflow

Analyze AI-assisted coding sessions in ~/.gemini/claude-code/brain/ and produce a report that explains not just what happened, but why it happened, who/what caused it, and what should change next time.

Goal

For each session, determine:

  1. What changed from the initial ask to the final executed work
  2. Whether the main cause was:
  1. Whether the opening prompt was sufficient
  2. Which files/subsystems repeatedly correlate with struggle
  3. What changes would most improve future sessions

When to Use

Global Rules


Step 0.5: Session Intent Classification

Classify the primary session intent from objective + artifacts:

Record:

Use intent to contextualize severity and rework shape.

Do not judge exploratory or research sessions by the same standards as narrow delivery sessions.


Step 1: Discover Conversations

  1. Read available conversation summaries from system context
  2. List conversation folders in the user’s Claude Code brain/ directory
  3. Build a conversation index with:
  1. If the user supplied a keyword/path, filter to matching conversations; otherwise analyze all

Output: indexed list of conversations to analyze.


Step 2: Extract Session Evidence

For each conversation, read if present:

Core artifacts

Metadata

Version snapshots

Additional signals

Record per conversation:

Lifecycle
Revision / change volume
Scope
Timing
Content / quality

Step 3: Prompt Sufficiency

Score the opening request on a 0–2 scale for:

Create:

Then note which missing prompt ingredients likely contributed to later friction.

Do not punish short prompts by default; a narrow, obvious task can still have high sufficiency.


Step 4: Scope Change Classification

Classify scope change into:

Record:

Keep one short example in mind for calibration:


Step 5: Rework Shape

Classify each session into one primary pattern:

Record:


Step 6: Root Cause Analysis

For every non-clean session, assign:

Primary root cause

One of:

Secondary root cause

Optional if materially relevant

Root-cause guidance

Every root-cause assignment must include:


Step 6.5: Session Severity Scoring (0–100)

Assign each session a severity score to prioritize attention.

Components (sum, clamp 0–100):

Bands:

Record:

Use severity as a prioritization signal, not a verdict. Always explain the drivers.

Contextualize severity using session intent so research/exploration sessions are not over-penalized.


Step 7: Subsystem / File Clustering

Across all conversations, cluster repeated struggle by file, folder, or subsystem.

For each cluster, calculate:

Goal: identify whether friction is mostly prompt-driven, agent-driven, or concentrated in specific repo areas.


Step 8: Comparative Cohorts

Compare:

For each comparison, identify:

Do not just restate averages; extract cautious evidence-backed patterns.


Step 9: Non-Obvious Findings

Generate 3–7 findings that are not simple metric restatements.

Each finding must include:

Examples of strong findings:


Step 10: Report Generation

Create session_analysis_report.md with this structure:

📊 Session Analysis Report — [Project Name]

Generated: [timestamp]

Conversations Analyzed: [N]

Date Range: [earliest] → [latest]

Executive Summary

| Metric | Value | Rating |

|:---|:---|:---|

| First-Shot Success Rate | X% | 🟢/🟡/🔴 |

| Completion Rate | X% | 🟢/🟡/🔴 |

| Avg Scope Growth | X% | 🟢/🟡/🔴 |

| Replan Rate | X% | 🟢/🟡/🔴 |

| Median Duration | Xm | — |

| Avg Session Severity | X | 🟢/🟡/🔴 |

| High-Severity Sessions | X / N | 🟢/🟡/🔴 |

Thresholds:

Avg severity guidance:

Note: avg severity is an aggregate health signal, not the same as per-session severity bands.

Then add a short narrative summary of what is going well, what is breaking down, and whether the main issue is prompt quality, repo fragility, workflow discipline, or validation churn.

Root Cause Breakdown

| Root Cause | Count | % | Notes |

|:---|:---|:---|:---|

Prompt Sufficiency Analysis

Scope Change Analysis

Separate:

Rework Shape Analysis

Summarize the main failure patterns across sessions.

Friction Hotspots

Show the files/folders/subsystems most associated with replanning, abandonment, verification churn, and high severity.

First-Shot Successes

List the cleanest sessions and extract what made them work.

Non-Obvious Findings

List 3–7 evidence-backed findings with confidence.

Severity Triage

List the highest-severity sessions and say whether the best intervention is:

Recommendations

For each recommendation, use:

Per-Conversation Breakdown

| # | Title | Intent | Duration | Scope Δ | Plan Revs | Task Revs | Root Cause | Rework Shape | Severity | Complete? |

|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|


Step 11: Optional Post-Analysis Improvements

If appropriate, also:

Only recommend workflows/skills when the pattern appears repeatedly.


Final Output Standard

The workflow must produce:

  1. metrics summary
  2. root-cause diagnosis
  3. prompt-sufficiency assessment
  4. subsystem/friction map
  5. severity triage and prioritization
  6. evidence-backed recommendations
  7. non-obvious findings

Prefer explicit uncertainty over fake precision.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.