analyze-project
Forensic root cause analyzer for Antigravity sessions. Classifies scope deltas, rework patterns, root causes, hotspots, and auto-improves prompts/health.
What this skill does
# /analyze-project — Root Cause Analyst Workflow Analyze AI-assisted coding sessions in `~/.gemini/antigravity/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: - user/spec - agent - repo/codebase - validation/testing - legitimate task complexity 3. Whether the opening prompt was sufficient 4. Which files/subsystems repeatedly correlate with struggle 5. What changes would most improve future sessions ## When to Use - You need a postmortem on AI-assisted coding sessions, especially when scope drift or repeated rework occurred. - You want root-cause analysis that separates user/spec issues from agent mistakes, repo friction, or validation gaps. - You need evidence-backed recommendations for improving future prompts, repo health, or delivery workflows. ## Global Rules - Treat `.resolved.N` counts as **iteration signals**, not proof of failure - Separate **human-added scope**, **necessary discovered scope**, and **agent-introduced scope** - Separate **agent error** from **repo friction** - Every diagnosis must include **evidence** and **confidence** - Confidence levels: - **High** = direct artifact/timestamp evidence - **Medium** = multiple supporting signals - **Low** = plausible inference, not directly proven - Evidence precedence: - artifact contents > timestamps > metadata summaries > inference - If evidence is weak, say so --- ## Step 0.5: Session Intent Classification Classify the primary session intent from objective + artifacts: - `DELIVERY` - `DEBUGGING` - `REFACTOR` - `RESEARCH` - `EXPLORATION` - `AUDIT_ANALYSIS` Record: - `session_intent` - `session_intent_confidence` 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 Antigravity `brain/` directory 3. Build a conversation index with: - `conversation_id` - `title` - `objective` - `created` - `last_modified` 4. 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 - `task.md` - `implementation_plan.md` - `walkthrough.md` ### Metadata - `*.metadata.json` ### Version snapshots - `task.md.resolved.0 ... N` - `implementation_plan.md.resolved.0 ... N` - `walkthrough.md.resolved.0 ... N` ### Additional signals - other `.md` artifacts - timestamps across artifact updates - file/folder/subsystem names mentioned in plans/walkthroughs - validation/testing language - explicit acceptance criteria, constraints, non-goals, and file targets Record per conversation: #### Lifecycle - `has_task` - `has_plan` - `has_walkthrough` - `is_completed` - `is_abandoned_candidate` = task exists but no walkthrough #### Revision / change volume - `task_versions` - `plan_versions` - `walkthrough_versions` - `extra_artifacts` #### Scope - `task_items_initial` - `task_items_final` - `task_completed_pct` - `scope_delta_raw` - `scope_creep_pct_raw` #### Timing - `created_at` - `completed_at` - `duration_minutes` #### Content / quality - `objective_text` - `initial_plan_summary` - `final_plan_summary` - `initial_task_excerpt` - `final_task_excerpt` - `walkthrough_summary` - `mentioned_files_or_subsystems` - `validation_requirements_present` - `acceptance_criteria_present` - `non_goals_present` - `scope_boundaries_present` - `file_targets_present` - `constraints_present` --- ## Step 3: Prompt Sufficiency Score the opening request on a 0–2 scale for: - **Clarity** - **Boundedness** - **Testability** - **Architectural specificity** - **Constraint awareness** - **Dependency awareness** Create: - `prompt_sufficiency_score` - `prompt_sufficiency_band` = High / Medium / Low 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: - **Human-added scope** — new asks beyond the original task - **Necessary discovered scope** — work required to complete the original task correctly - **Agent-introduced scope** — likely unnecessary work introduced by the agent Record: - `scope_change_type_primary` - `scope_change_type_secondary` (optional) - `scope_change_confidence` - evidence Keep one short example in mind for calibration: - Human-added: “also refactor nearby code while you’re here” - Necessary discovered: hidden dependency must be fixed for original task to work - Agent-introduced: extra cleanup or redesign not requested and not required --- ## Step 5: Rework Shape Classify each session into one primary pattern: - **Clean execution** - **Early replan then stable finish** - **Progressive scope expansion** - **Reopen/reclose churn** - **Late-stage verification churn** - **Abandoned mid-flight** - **Exploratory / research session** Record: - `rework_shape` - `rework_shape_confidence` - evidence --- ## Step 6: Root Cause Analysis For every non-clean session, assign: ### Primary root cause One of: - `SPEC_AMBIGUITY` - `HUMAN_SCOPE_CHANGE` - `REPO_FRAGILITY` - `AGENT_ARCHITECTURAL_ERROR` - `VERIFICATION_CHURN` - `LEGITIMATE_TASK_COMPLEXITY` ### Secondary root cause Optional if materially relevant ### Root-cause guidance - **SPEC_AMBIGUITY**: opening ask lacked boundaries, targets, criteria, or constraints - **HUMAN_SCOPE_CHANGE**: scope expanded because the user broadened the task - **REPO_FRAGILITY**: hidden coupling, brittle files, unclear architecture, or environment issues forced extra work - **AGENT_ARCHITECTURAL_ERROR**: wrong files, wrong assumptions, wrong approach, hallucinated structure - **VERIFICATION_CHURN**: implementation mostly worked, but testing/validation caused loops - **LEGITIMATE_TASK_COMPLEXITY**: revisions were expected for the difficulty and not clearly avoidable Every root-cause assignment must include: - evidence - why stronger alternative causes were rejected - confidence --- ## Step 6.5: Session Severity Scoring (0–100) Assign each session a severity score to prioritize attention. Components (sum, clamp 0–100): - **Completion failure**: 0–25 (`abandoned = 25`) - **Replanning intensity**: 0–15 - **Scope instability**: 0–15 - **Rework shape severity**: 0–15 - **Prompt sufficiency deficit**: 0–10 (`low = 10`) - **Root cause impact**: 0–10 (`REPO_FRAGILITY` / `AGENT_ARCHITECTURAL_ERROR` highest) - **Hotspot recurrence**: 0–10 Bands: - **0–19 Low** - **20–39 Moderate** - **40–59 Significant** - **60–79 High** - **80–100 Critical** Record: - `session_severity_score` - `severity_band` - `severity_drivers` = top 2–4 contributors - `severity_confidence` 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: - number of conversations touching it - average revisions - completion rate - abandonment rate - common root causes - average severity Goal: identify whether friction is mostly prompt-driven, agent-driven, or concentrated in specific repo areas. --- ## Step 8: Comparative Cohorts Compare: - first-shot successes vs re-planned sessions - completed vs abandoned - high prompt sufficiency vs low prompt sufficiency - narrow-scope vs high-scope-growth - short sessions vs long sessions - low-frictio
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.