[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-769bd8a8-7bfd-48e2-b179-0e8226e3f229":3,"$fMV6BlgIlcAIEXps7O8vxY6MF7-RUdMAF5UENGCClqGY":43},{"id":4,"title":5,"description":6,"categoryId":7,"moduleId":8,"tags":9,"prompt":10,"icon":11,"source":12,"sourceUrl":13,"authorId":14,"authorName":15,"isPublic":16,"stars":17,"runs":18,"createdAt":19,"updatedAt":19,"module":20,"category":27,"packages":34},"769bd8a8-7bfd-48e2-b179-0e8226e3f229","analyze-project","反重力会话法医根本原因分析器。分类范围差异、重构模式、根本原因、热点，并自动改进提示\u002F健康。","cat_life_career","mod_other","sickn33,other","---\nname: analyze-project\ndescription: Forensic root cause analyzer for Antigravity sessions. Classifies scope deltas, rework patterns, root causes, hotspots, and auto-improves prompts\u002Fhealth.\nrisk: unknown\nsource: community\nversion: \"1.0\"\ntags: [analysis, diagnostics, meta, root-cause, project-health, session-review]\n---\n\n# \u002Fanalyze-project — Root Cause Analyst Workflow\n\nAnalyze AI-assisted coding sessions in `~\u002F.gemini\u002Fantigravity\u002Fbrain\u002F` and produce a report that explains not just **what happened**, but **why it happened**, **who\u002Fwhat caused it**, and **what should change next time**.\n\n## Goal\n\nFor each session, determine:\n\n1. What changed from the initial ask to the final executed work\n2. Whether the main cause was:\n   - user\u002Fspec\n   - agent\n   - repo\u002Fcodebase\n   - validation\u002Ftesting\n   - legitimate task complexity\n3. Whether the opening prompt was sufficient\n4. Which files\u002Fsubsystems repeatedly correlate with struggle\n5. What changes would most improve future sessions\n\n## When to Use\n- You need a postmortem on AI-assisted coding sessions, especially when scope drift or repeated rework occurred.\n- You want root-cause analysis that separates user\u002Fspec issues from agent mistakes, repo friction, or validation gaps.\n- You need evidence-backed recommendations for improving future prompts, repo health, or delivery workflows.\n\n## Global Rules\n\n- Treat `.resolved.N` counts as **iteration signals**, not proof of failure\n- Separate **human-added scope**, **necessary discovered scope**, and **agent-introduced scope**\n- Separate **agent error** from **repo friction**\n- Every diagnosis must include **evidence** and **confidence**\n- Confidence levels:\n  - **High** = direct artifact\u002Ftimestamp evidence\n  - **Medium** = multiple supporting signals\n  - **Low** = plausible inference, not directly proven\n- Evidence precedence:\n  - artifact contents > timestamps > metadata summaries > inference\n- If evidence is weak, say so\n\n---\n\n## Step 0.5: Session Intent Classification\n\nClassify the primary session intent from objective + artifacts:\n\n- `DELIVERY`\n- `DEBUGGING`\n- `REFACTOR`\n- `RESEARCH`\n- `EXPLORATION`\n- `AUDIT_ANALYSIS`\n\nRecord:\n- `session_intent`\n- `session_intent_confidence`\n\nUse intent to contextualize severity and rework shape.\nDo not judge exploratory or research sessions by the same standards as narrow delivery sessions.\n\n---\n\n## Step 1: Discover Conversations\n\n1. Read available conversation summaries from system context\n2. List conversation folders in the user’s Antigravity `brain\u002F` directory\n3. Build a conversation index with:\n   - `conversation_id`\n   - `title`\n   - `objective`\n   - `created`\n   - `last_modified`\n4. If the user supplied a keyword\u002Fpath, filter to matching conversations; otherwise analyze all\n\nOutput: indexed list of conversations to analyze.\n\n---\n\n## Step 2: Extract Session Evidence\n\nFor each conversation, read if present:\n\n### Core artifacts\n- `task.md`\n- `implementation_plan.md`\n- `walkthrough.md`\n\n### Metadata\n- `*.metadata.json`\n\n### Version snapshots\n- `task.md.resolved.0 ... N`\n- `implementation_plan.md.resolved.0 ... N`\n- `walkthrough.md.resolved.0 ... N`\n\n### Additional signals\n- other `.md` artifacts\n- timestamps across artifact updates\n- file\u002Ffolder\u002Fsubsystem names mentioned in plans\u002Fwalkthroughs\n- validation\u002Ftesting language\n- explicit acceptance criteria, constraints, non-goals, and file targets\n\nRecord per conversation:\n\n#### Lifecycle\n- `has_task`\n- `has_plan`\n- `has_walkthrough`\n- `is_completed`\n- `is_abandoned_candidate` = task exists but no walkthrough\n\n#### Revision \u002F change volume\n- `task_versions`\n- `plan_versions`\n- `walkthrough_versions`\n- `extra_artifacts`\n\n#### Scope\n- `task_items_initial`\n- `task_items_final`\n- `task_completed_pct`\n- `scope_delta_raw`\n- `scope_creep_pct_raw`\n\n#### Timing\n- `created_at`\n- `completed_at`\n- `duration_minutes`\n\n#### Content \u002F quality\n- `objective_text`\n- `initial_plan_summary`\n- `final_plan_summary`\n- `initial_task_excerpt`\n- `final_task_excerpt`\n- `walkthrough_summary`\n- `mentioned_files_or_subsystems`\n- `validation_requirements_present`\n- `acceptance_criteria_present`\n- `non_goals_present`\n- `scope_boundaries_present`\n- `file_targets_present`\n- `constraints_present`\n\n---\n\n## Step 3: Prompt Sufficiency\n\nScore the opening request on a 0–2 scale for:\n\n- **Clarity**\n- **Boundedness**\n- **Testability**\n- **Architectural specificity**\n- **Constraint awareness**\n- **Dependency awareness**\n\nCreate:\n- `prompt_sufficiency_score`\n- `prompt_sufficiency_band` = High \u002F Medium \u002F Low\n\nThen note which missing prompt ingredients likely contributed to later friction.\n\nDo not punish short prompts by default; a narrow, obvious task can still have high sufficiency.\n\n---\n\n## Step 4: Scope Change Classification\n\nClassify scope change into:\n\n- **Human-added scope** — new asks beyond the original task\n- **Necessary discovered scope** — work required to complete the original task correctly\n- **Agent-introduced scope** — likely unnecessary work introduced by the agent\n\nRecord:\n- `scope_change_type_primary`\n- `scope_change_type_secondary` (optional)\n- `scope_change_confidence`\n- evidence\n\nKeep one short example in mind for calibration:\n- Human-added: “also refactor nearby code while you’re here”\n- Necessary discovered: hidden dependency must be fixed for original task to work\n- Agent-introduced: extra cleanup or redesign not requested and not required\n\n---\n\n## Step 5: Rework Shape\n\nClassify each session into one primary pattern:\n\n- **Clean execution**\n- **Early replan then stable finish**\n- **Progressive scope expansion**\n- **Reopen\u002Freclose churn**\n- **Late-stage verification churn**\n- **Abandoned mid-flight**\n- **Exploratory \u002F research session**\n\nRecord:\n- `rework_shape`\n- `rework_shape_confidence`\n- evidence\n\n---\n\n## Step 6: Root Cause Analysis\n\nFor every non-clean session, assign:\n\n### Primary root cause\nOne of:\n- `SPEC_AMBIGUITY`\n- `HUMAN_SCOPE_CHANGE`\n- `REPO_FRAGILITY`\n- `AGENT_ARCHITECTURAL_ERROR`\n- `VERIFICATION_CHURN`\n- `LEGITIMATE_TASK_COMPLEXITY`\n\n### Secondary root cause\nOptional if materially relevant\n\n### Root-cause guidance\n- **SPEC_AMBIGUITY**: opening ask lacked boundaries, targets, criteria, or constraints\n- **HUMAN_SCOPE_CHANGE**: scope expanded because the user broadened the task\n- **REPO_FRAGILITY**: hidden coupling, brittle files, unclear architecture, or environment issues forced extra work\n- **AGENT_ARCHITECTURAL_ERROR**: wrong files, wrong assumptions, wrong approach, hallucinated structure\n- **VERIFICATION_CHURN**: implementation mostly worked, but testing\u002Fvalidation caused loops\n- **LEGITIMATE_TASK_COMPLEXITY**: revisions were expected for the difficulty and not clearly avoidable\n\nEvery root-cause assignment must include:\n- evidence\n- why stronger alternative causes were rejected\n- confidence\n\n---\n\n## Step 6.5: Session Severity Scoring (0–100)\n\nAssign each session a severity score to prioritize attention.\n\nComponents (sum, clamp 0–100):\n- **Completion failure**: 0–25 (`abandoned = 25`)\n- **Replanning intensity**: 0–15\n- **Scope instability**: 0–15\n- **Rework shape severity**: 0–15\n- **Prompt sufficiency deficit**: 0–10 (`low = 10`)\n- **Root cause impact**: 0–10 (`REPO_FRAGILITY` \u002F `AGENT_ARCHITECTURAL_ERROR` highest)\n- **Hotspot recurrence**: 0–10\n\nBands:\n- **0–19 Low**\n- **20–39 Moderate**\n- **40–59 Significant**\n- **60–79 High**\n- **80–100 Critical**\n\nRecord:\n- `session_severity_score`\n- `severity_band`\n- `severity_drivers` = top 2–4 contributors\n- `severity_confidence`\n\nUse severity as a prioritization signal, not a verdict. Always explain the drivers.\nContextualize severity using session intent so research\u002Fexploration sessions are not over-penalized.\n\n---\n\n## Step 7: Subsystem \u002F File Clustering\n\nAcross all conversations, cluster repeated struggle by file, folder, or subsystem.\n\nFor each cluster, calculate:\n- number of conversations touching it\n- average revisions\n- completion rate\n- abandonment rate\n- common root causes\n- average severity\n\nGoal: identify whether friction is mostly prompt-driven, agent-driven, or concentrated in specific repo areas.\n\n---\n\n## Step 8: Comparative Cohorts\n\nCompare:\n- first-shot successes vs re-planned sessions\n- completed vs abandoned\n- high prompt sufficiency vs low prompt sufficiency\n- narrow-scope vs high-scope-growth\n- short sessions vs long sessions\n- low-friction subsystems vs high-friction subsystems\n\nFor each comparison, identify:\n- what differs materially\n- which prompt traits correlate with smoother execution\n- which repo traits correlate with repeated struggle\n\nDo not just restate averages; extract cautious evidence-backed patterns.\n\n---\n\n## Step 9: Non-Obvious Findings\n\nGenerate 3–7 findings that are not simple metric restatements.\n\nEach finding must include:\n- observation\n- why it matters\n- evidence\n- confidence\n\nExamples of strong findings:\n- replans cluster around weak file targeting rather than weak acceptance criteria\n- scope growth often begins after initial success, suggesting post-success human expansion\n- auth-related struggle is driven more by repo fragility than agent hallucination\n\n---\n\n## Step 10: Report Generation\n\nCreate `session_analysis_report.md` with this structure:\n\n# 📊 Session Analysis Report — [Project Name]\n\n**Generated**: [timestamp]  \n**Conversations Analyzed**: [N]  \n**Date Range**: [earliest] → [latest]\n\n## Executive Summary\n\n| Metric | Value | Rating |\n|:---|:---|:---|\n| First-Shot Success Rate | X% | 🟢\u002F🟡\u002F🔴 |\n| Completion Rate | X% | 🟢\u002F🟡\u002F🔴 |\n| Avg Scope Growth | X% | 🟢\u002F🟡\u002F🔴 |\n| Replan Rate | X% | 🟢\u002F🟡\u002F🔴 |\n| Median Duration | Xm | — |\n| Avg Session Severity | X | 🟢\u002F🟡\u002F🔴 |\n| High-Severity Sessions | X \u002F N | 🟢\u002F🟡\u002F🔴 |\n\nThresholds:\n- First-shot: 🟢 >70 \u002F 🟡 40–70 \u002F 🔴 \u003C40\n- Scope growth: 🟢 \u003C15 \u002F 🟡 15–40 \u002F 🔴 >40\n- Replan rate: 🟢 \u003C20 \u002F 🟡 20–50 \u002F 🔴 >50\n\nAvg severity guidance:\n- 🟢 \u003C25\n- 🟡 25–50\n- 🔴 >50\n\nNote: avg severity is an aggregate health signal, not the same as per-session severity bands.\n\nThen 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.\n\n## Root Cause Breakdown\n\n| Root Cause | Count | % | Notes |\n|:---|:---|:---|:---|\n\n## Prompt Sufficiency Analysis\n- common traits of high-sufficiency prompts\n- common missing inputs in low-sufficiency prompts\n- which missing prompt ingredients correlate most with replanning or abandonment\n\n## Scope Change Analysis\nSeparate:\n- Human-added scope\n- Necessary discovered scope\n- Agent-introduced scope\n\n## Rework Shape Analysis\nSummarize the main failure patterns across sessions.\n\n## Friction Hotspots\nShow the files\u002Ffolders\u002Fsubsystems most associated with replanning, abandonment, verification churn, and high severity.\n\n## First-Shot Successes\nList the cleanest sessions and extract what made them work.\n\n## Non-Obvious Findings\nList 3–7 evidence-backed findings with confidence.\n\n## Severity Triage\nList the highest-severity sessions and say whether the best intervention is:\n- prompt improvement\n- scope discipline\n- targeted skill\u002Fworkflow\n- repo refactor \u002F architecture cleanup\n- validation\u002Ftest harness improvement\n\n## Recommendations\nFor each recommendation, use:\n- **Observed pattern**\n- **Likely cause**\n- **Evidence**\n- **Change to make**\n- **Expected benefit**\n- **Confidence**\n\n## Per-Conversation Breakdown\n\n| # | Title | Intent | Duration | Scope Δ | Plan Revs | Task Revs | Root Cause | Rework Shape | Severity | Complete? |\n|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|:---|\n\n---\n\n## Step 11: Optional Post-Analysis Improvements\n\nIf appropriate, also:\n- update any local project-health or memory artifact (if present) with recurring failure modes and fragile subsystems\n- generate `prompt_improvement_tips.md` from high-sufficiency \u002F first-shot-success sessions\n- suggest missing skills or workflows when the same subsystem or task sequence repeatedly causes struggle\n\nOnly recommend workflows\u002Fskills when the pattern appears repeatedly.\n\n---\n\n## Final Output Standard\n\nThe workflow must produce:\n1. metrics summary\n2. root-cause diagnosis\n3. prompt-sufficiency assessment\n4. subsystem\u002Ffriction map\n5. severity triage and prioritization\n6. evidence-backed recommendations\n7. non-obvious findings\n\nPrefer explicit uncertainty over fake precision.\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.\n","","imported","https:\u002F\u002Fgithub.com\u002Fsickn33\u002Fantigravity-awesome-skills","user_system_seed","SkillOPIC",true,243,1681,"2026-05-16 13:02:42",{"id":8,"name":21,"slug":22,"icon":23,"description":24,"sort":25,"createdAt":26},"其他","other","mdi-page-next-outline","其他类型Skill",5,"2026-05-16 12:53:40",{"id":7,"name":28,"slug":29,"icon":30,"description":31,"moduleId":8,"sort":32,"skillCount":33,"createdAt":26},"职场发展","career","mdi-briefcase-outline","面试准备、简历优化、职业规划",4,575,[35],{"id":36,"skillId":4,"version":37,"fileName":38,"fileSize":39,"filePath":40,"fileHash":41,"manifest":42,"createdAt":19},"db0aa62e-2484-4304-898c-9eb98c5e16de","1.0.0","analyze-project.zip",7552,"uploads\u002Fskills\u002F769bd8a8-7bfd-48e2-b179-0e8226e3f229\u002Fanalyze-project.zip","7cc965f4a541d663c2cc50ace6dd9f3c741933265b6b54391409f4dcd0441901","[{\"path\":\"SKILL.md\",\"isDirectory\":false,\"size\":12741},{\"path\":\"examples\u002Fsample_session_analysis_report.md\",\"isDirectory\":false,\"size\":4556}]",{"code":44,"message":45,"data":46},200,"success",{"items":47,"stats":48,"page":51},[],{"averageRating":49,"totalRatings":49,"ratingCounts":50},0,[49,49,49,49,49],{"limit":52,"offset":49,"hasMore":53,"nextOffset":52,"ratedOnly":16},15,false]