name: ai-fortune description: > Career direction analysis: interview + AI usage pattern mining to identify roles AI won't replace. Collects data from 8 data sources, runs adaptive interview, performs web research, and generates a structured career risk report. Keywords: ai fortune, career analysis, career risk, ai displacement, career direction, job future, ai resistant, career pivot.
/ai-fortune — Career Direction Analysis
Run all phases in order. Each step specifies the exact tools to use.
Phase 0: Load Persistent State
Step 0: Load State
- Read
~/.claude/ai-fortune.json- If exists → load
reportLanguage(language preference),dataSources(saved file paths),answers(interview answers with timestamps),reportsDir(saved report directory) - If not found → start with empty state:
reportLanguage = null,dataSources = {},answers = {},reportsDir = null
- If exists → load
- Set
sources_used = 0counter to track how many of the 9 data sources produce data
Phase 1: Data Collection (Steps 1-6)
Collect data from up to 8 sources. Each source is optional — if unavailable, note it and continue.
Step 1: Memory Chat File
Purpose: Extract industry, tech stack, interests, domain context from the user's Claude web memory export.
- Check if
dataSources.memoryFilePathexists in loaded state - If saved path exists →
AskUserQuestion: "Memory chat file path: use saved path{path}?"- Options: "Use saved path", "Enter different path", "Skip this source"
- If no saved path →
AskUserQuestion: "Where is your Claude memory chat export file? (Markdown file exported from claude.ai)"- Options: "Skip this source"
- Free text for custom path
- If not skipped →
Readthe file - Extract: industry, tech stack, interests, projects, domain expertise, personal context
- Save chosen path to
dataSources.memoryFilePath - Increment
sources_used
Step 1.5: PDF Resume
Purpose: Extract complete career history, tenure patterns, skill timeline, and education.
- Check
dataSources.resumePathin loaded state - If saved path exists and file readable →
AskUserQuestion: "PDF resume: use saved{path}?"- Options: "Use saved path", "Enter different path", "Skip"
- If no saved path →
AskUserQuestion: "Do you have a PDF resume (LinkedIn export or any format)? Adds career history, tenure patterns, and skill verification to the analysis."- Options: "Skip this source"
- Free text for path
- If not skipped →
Readthe PDF (Claude reads PDFs natively) - Extract structured data per
${SKILL_DIR}/references/resume-extraction.md - Save path to
dataSources.resumePath - Increment
sources_used
Step 2: Insights Report
Purpose: Extract AI usage patterns, strengths, friction, session types from the CC Insights HTML report.
- Check
dataSources.insightsReportPathin state; default fallback:~/.claude/usage-data/report.html AskUserQuestionwith saved/default path, same pattern as Step 1- If not skipped →
Bash:python3 ${CLAUDE_PLUGIN_ROOT}/scripts/parse-insights.py "{path}" - Parse JSON output — key fields:
project_areas,top_tools,languages,session_types,usage_narrative,whats_working,whats_hindering,friction_categories,impressive_things,horizon_cards,satisfaction_distribution,multi_clauding,stats - Save path to
dataSources.insightsReportPath - Increment
sources_used
Step 3: Session Metadata (7 days, all projects)
Purpose: Get recent work patterns — project diversity, tool usage, complexity indicators.
Bash:python3 ${CLAUDE_PLUGIN_ROOT}/scripts/aggregate-sessions.py --days 7- Parse JSON output — key fields:
sessions_total,projects,tool_distribution,language_distribution,complexity_indicators(task_agent_pct, mcp_pct, web_search_pct),averages,session_types,first_prompts - If
sessions_total == 0→ note as unavailable, continue - Increment
sources_used
Step 4: Technology Explainer Config
Purpose: Get objective technology proficiency map (expert/intermediate/learning).
Read~/.claude/technology-explainer.json- If exists → extract
technologiesgrouped bylevel(expert, intermediate, learning),default_level,custom_sources - If not found → note as unavailable
- Increment
sources_usedif found
Step 5: Installed Plugins
Purpose: Assess AI augmentation sophistication.
Read~/.claude/settings.json→ extractenabledPluginsarray- For each plugin path →
Readtheplugin.jsoninside its.claude-plugin/directory - Collect: plugin names, versions, descriptions, count of hooks/skills/commands
- Increment
sources_used
Step 6: Stats Cache (optional)
Purpose: Longitudinal usage data — total sessions, daily patterns, model usage.
Read~/.claude/stats-cache.json- If exists → extract: total sessions, messages/day, model distribution, date range
- If not found → note as unavailable, continue
- Increment
sources_usedif found
Step 6.5: Report Language Preference
Purpose: Determine the language for the generated report before starting the interview.
Check
reportLanguagein loaded state (top-level field, not insideanswers)Apply re-ask logic per
interview-questions.md§ Tier 0 / Q0:Decision tree:
reportLanguage exists in state? ├── YES → How old is the value? │ ├── < 6 months AND source == "settings" AND settings.json language changed → RE-ASK │ ├── < 6 months (otherwise) → SKIP: Display "Report language: {value}" │ └── >= 6 months → RE-ASK with previous value as default └── NO → ASKWhen asking, build options dynamically:
- Read
~/.claude/settings.jsonfor language preference - If non-English language detected → first option:
"{language} (from settings)" - Always include:
"English" - User can type any language via free text
- Read
Store chosen language in state as:
{ "reportLanguage": { "value": "{chosen language}", "answeredAt": "{ISO 8601}", "source": "settings|explicit|custom" } }source: "settings"— picked the option detected from settings.jsonsource: "explicit"— picked "English"source: "custom"— typed a custom language
Phase 2: Interview (Steps 7-8)
Step 7: Adaptive Interview
Read${SKILL_DIR}/references/interview-questions.mdFor each question (Q1a, Q1b, Q1c, Q2, Q2b, Q3, Q4, Q5a, Q5b, Q6-Q12, Q14-Q19), apply re-ask logic:
Re-ask decision tree:
Has previous answer in state? ├── YES → How old is the answer? │ ├── < 6 months → SKIP: Display "Using your previous answer from {date}: {value}" │ └── >= 6 months → RE-ASK: Use AskUserQuestion with previous value as first option │ (add "(previous answer)" suffix to the label) └── NO → Does a legacy key have a migratable answer? (see interview-questions.md § Legacy answer migration) ├── YES → PRE-FILL: Use migrated value as first option "(from previous session)", always confirm └── NO → Can data auto-answer this question? ├── YES → Pre-fill from data, confirm with user: "Based on your data, {value} — correct?" └── NO → ASK: Use AskUserQuestion with options from interview-questions.mdPacing rule: Ask at most 2 questions per AskUserQuestion call. Tier 4 (Q10-Q12) MUST be asked one at a time — these require thoughtful answers.
Q3 presentation: When asking Q3 (core value), present the
examples_for_primingfrom the question bank as context before the question. Expect free text answer — the examples normalize honest self-assessment, not constrain answers.
4b. Q3b (conditional): If a PDF resume was provided in Step 1.5, ask Q3b immediately after Q3. Populate {skills_from_resume} with the top skills extracted from the resume. Skip Q3b entirely if no resume was provided.
Auto-skip rules (use data to pre-answer):
- Q1a (role/industry): if memory file or resume contains clear role/industry info; resume pre-fills from most recent position title + company
- Q5a (AI dependency, work): if session data shows >5 sessions/day → pre-fill "Essential"
- Q5b (AI dependency, personal): if session data shows per-project diversity with personal projects → use as signal
- Q7 (years experience): if memory file mentions experience level; resume computes total years from first position start date
- Q8 (management vs IC): if resume has title patterns (Manager/Director → management; Engineer/Developer → IC)
- Q10 (domain expertise): if technology-explainer has expert-level entries; resume extracts domain knowledge from experience descriptions
- Q17 (languages): if memory file or resume mentions languages → pre-fill, confirm
- Q18 (local market): if Q15 covers geography or memory/resume has location → pre-fill, confirm
- Q18 should be asked before Q16 when both are unanswered (so currency placeholder adapts)
- Q2b (work description): if memory file or resume contains detailed work descriptions → pre-fill, confirm
- Q19 (AI monetization): if technology-explainer has expert entries or Q10 already answered → reference as context, still ask
- Resume pre-fills always confirm — never silently skip, since resumes can be outdated
Tier 3 collapse: If user gives 2+ consecutive minimal answers (picks first option without customizing), skip remaining Tier 3 questions
For
multiple_choicequestions → useAskUserQuestionwith options from the question bankFor
free_textquestions → useAskUserQuestionwith 2-3 example options + free text
Step 8: Profile Synthesis
- Combine all collected data + interview answers into a unified profile
- Run contrastive analysis — compare self-reported vs data-observed:
- AI dependency at work (Q5a) vs actual session frequency
- AI dependency personal (Q5b) vs project diversity in session data
- Work vs personal AI gap (Q5a vs Q5b) — split personality detection
- Daily task breakdown (Q2) vs project_areas from insights
- Claimed strengths (Q3, Q10) vs impressive_things from insights
- Compensation (Q16) vs market rates for role (will compare in Step 9)
- Session timestamps vs Q2 — detect night/weekend work patterns
- Work description (Q2b) vs project_areas from insights — discrepancy between described work and actual AI usage
- Satisfaction sources (Q1c) vs work description (Q2b) — satisfaction gap: is energy inside or outside work?
- Satisfaction sources (Q1c) vs career trajectory (Q1b) — says "Love it" but energy comes from pet projects?
- AI monetization vision (Q19) vs AI leverage score — inflated/overlooked opportunity assessment
- (if resume provided) Resume title vs self-reported role (Q1a) → title inflation/deflation
- (if resume provided) Resume tenure patterns vs career sentiment (Q1b) → says "Love it" but switches yearly?
- (if resume provided) Resume skills vs technology-explainer proficiency → over/under-claiming
- (if resume provided) Resume career span vs self-reported experience (Q7) → inaccurate self-assessment
- (if Q3b answered) Resume vs reality — user's honest disclosure about resume embellishments
- Note any discrepancies for the Blind Spots section
- Compute preliminary risk scores for each of the 5 dimensions
- Satisfaction Alignment Score (1-5): Compare Q1c satisfaction sources against Q2b work description. Score 1 = energy exclusively outside job, 5 = fully aligned with day job. See analysis-framework.md § Satisfaction Alignment Score for scoring table and how it affects directions/blind spots.
- Burnout risk screening: Count burnout indicators from analysis-framework.md (night work >30%, no rest days 7/7, dual workload, session marathon >3h, escalating volume >50% WoW). Record flag count for report generation.
Phase 3: Research & Report (Steps 9-11)
Step 9: Web Research
Perform 5-8 targeted WebSearch queries based on the user's profile:
WebSearch: "AI automation {user's industry} {current year} trends"WebSearch: "{user's role title} AI replacement risk {current year}"WebSearch: "AI-resistant careers {user's domain}"WebSearch: "{user's top technology} AI automation capabilities {current year}" (if relevant)WebSearch: "{user's role} salary range {Q18 city/market} {current year}" (use Q18 answer for geography-specific searches)WebSearch: "{recommended L3 direction} job market {Q18 city}" (target business discovery)WebSearch: "{recommended L5 direction} freelance market demand {current year}" (radical change validation)WebSearch: "{recommended direction} salary range {user's geography}" (after directions are drafted, for remaining levels)WebSearch: "{Q19 skill/domain} AI service market demand {current year}" (validates AI monetization opportunities from Q19)
For each search → extract key findings, specific companies/products, salary data.
Increment sources_used.
Step 10: Generate Report
Read${SKILL_DIR}/references/analysis-framework.mdRead${SKILL_DIR}/references/report-template.md- If resume was provided →
Read${SKILL_DIR}/references/resume-extraction.mdfor metric computation reference - Compute final scores:
- Risk Matrix: score each of 5 dimensions (1-5) with evidence
- AI Leverage Score: compute from plugin count, session complexity, multi-clauding %, task-agent %, delegation maturity
- Delegation Maturity Level: determine from session types, tool distribution, multi-clauding stats
- (if resume provided) Career Stability Score and Adaptability Evidence Score: compute per analysis-framework.md § Career Trajectory Analysis
- Satisfaction Alignment Score (1-5): from Q1c vs Q2b comparison per analysis-framework.md
- Generate 5 recommended career directions (one per amplitude level):
- L1 (Optimize Current): always detailed — baseline reference
- L2 (Lateral Move): always included — low-friction alternative
- L3 (New Company): detailed if Q1b ≠ "Love it" OR risk ≥ MODERATE
- L4 (Career Pivot): detailed if Q1b ∈ {"Want to pivot", "Need change"} OR Q14 ≠ "Conservative"
- L5 (Radical Change): always included — stretch option
- Each direction must reference specific AI-resistant properties
- Each must include target business types (real companies, mixed local + remote, diverse industries)
- L3-L5 must include a skills bridge table with concrete resources; when resume available, use enhanced 4-column format with "Years" column and dormant flags (⚠️) per report-template.md
- Each must cite web research findings and salary ranges
- Anti-echo-chamber validation: Run the 5-point checklist from analysis-framework.md. If any check fails → revise directions before finalizing:
- Not all 5 in same industry
- Not all 5 require same primary skill
- At least one direction NOT about building/selling AI
- At least one leverages an unconsidered skill
- L5 is genuinely radical
- Salary anchoring (if Q16 answered):
- For each direction, compute delta vs current bracket from Q16
- Populate "vs current" and "Minimum viable?" fields
- Generate the Comparison Table with salary deltas
- Add Financial Risk Assessment to Blind Spots section
- Burnout integration (if 3+ burnout flags from Step 8):
- Add Sustainability Warning subsection to Blind Spots
- Extend all direction timelines by 3-6 months (or 6-12 months if 5/5 flags)
- Recommend L1 as primary path if 5/5 flags
- (if resume provided) Career Trajectory section: Generate per report-template.md — career timeline table, velocity classification, tenure stats, domain analysis, skill currency, and Resume vs Reality subsection (if Q3b answered)
- (if resume provided) Career Pattern Blind Spots: Add to Blind Spots section — skill atrophy, stagnation indicators, education-career misalignment, resume embellishment patterns, predicted next transition window
- Generate the complete report following
report-template.mdstructure - Report language: If
reportLanguagevalue is not "English", generate the entire report in the configured language. Translate all narrative text, section headers, analysis, action items, and table headers. Keep company names, technology names, product names, URLs, and book titles in their original language. - Display the report in the terminal
- Save the report to disk:
- If
reportsDirexists in loaded state → use it as default option AskUserQuestion: "Where to save the report?"- Options: saved
reportsDiror/tmp/ai-fortune-reports/(default, ephemeral),~/.claude/ai-fortune/reports/(persistent) - If saved
reportsDirmatches one of the options, show it as first option with "(previous choice)" suffix
- Options: saved
Bash:mkdir -p {chosen_dir}- Filename:
YYYY-MM-DD_HH-MM-SS.md(current timestamp, e.g.2026-03-01_14-30-45.md) Writethe complete report markdown to{chosen_dir}/{filename}- Confirm: "Report saved to {chosen_dir}/{filename}"
- If
Step 11: Save State
- Build state object:
New answer keys:{ "reportLanguage": { "value": "{chosen language from Step 6.5}", "answeredAt": "{ISO 8601 timestamp}", "source": "settings|explicit|custom" }, "lastRun": "{ISO 8601 timestamp}", "lastReportPath": "{full path to saved report from Step 10}", "reportsDir": "{chosen directory from Step 10}", "dataSources": { "memoryFilePath": "{path from Step 1}", "resumePath": "{path from Step 1.5}", "insightsReportPath": "{path from Step 2}" }, "answers": { "{question_key}": { "value": "{answer text}", "answeredAt": "{ISO 8601 timestamp}" } } }career_direction_sentiment(Q1b),satisfaction_sources(Q1c),work_description(Q2b),resume_vs_reality(Q3b),ai_dependency_work(Q5a),ai_dependency_personal(Q5b),current_compensation(Q16),working_languages(Q17),local_market(Q18),ai_monetization_skills(Q19). Old keysai_dependencyandcareer_satisfactionare preserved in state but no longer actively read. They serve as migration sources: on first run after upgrade, their values seed defaults for the new split questions (Q5a/Q1b). See interview-questions.md § Legacy answer migration for the mapping table. Old keys age out naturally after 6 months. Writeto~/.claude/ai-fortune.json- Confirm: "State saved. Run
/ai-fortuneagain anytime — it will remember your answers and skip recent ones."
Error Handling
- Missing data source: Note as "❌ {source}" in the Data Sources table, continue with remaining sources
- Script failure: If parse-insights.py or aggregate-sessions.py fails, show stderr output, continue without that source
- Minimum viable report: The report can be generated with just interview answers + web research (0 automated data sources). Quality improves with more sources.
- Web search failure: If WebSearch is unavailable, note in the Industry AI Landscape section and provide analysis based on general knowledge
Important Notes
- Auto-save: The report is displayed in the terminal and saved to a user-chosen directory (default:
/tmp/ai-fortune-reports/). The chosen directory is remembered for future runs. - Privacy: No data leaves the local machine except WebSearch queries (which use general terms, not personal data). Resume data stays local. Only aggregate career metrics (years, industry) inform WebSearch queries — never personal details (name, email, company names).
- Re-runnability: Running
/ai-fortuneagain will skip recent answers and use saved file paths - Time estimate: Full run with all sources takes ~5-10 minutes depending on interview length