Generates Growth Map from Claude Code session patterns and insights data, integrating epistemic profile for protocol recommendations with execution and epistemic resolution.
From epistemic-cooperativenpx claudepluginhub jongwony/epistemic-protocols --plugin epistemic-cooperativeThis skill uses the workspace's default tool permissions.
references/html-template.mdEnables AI agents to execute x402 payments with per-task budgets, spending controls, and non-custodial wallets via MCP tools. Use when agents pay for APIs, services, or other agents.
Designs and optimizes AI agent action spaces, tool definitions, observation formats, error recovery, and context for higher task completion rates.
Compares coding agents like Claude Code and Aider on custom YAML-defined codebase tasks using git worktrees, measuring pass rate, cost, time, and consistency.
Generate a Growth Map from a user's Claude Code sessions — integrating /insights data with session analysis for protocol recommendations with dual-layer resolution (execution + epistemic). Falls back to Epistemic Profile when insights data is unavailable.
Invoke this skill when:
Skip when:
SCAN → EXTRACT → MAP → PRESENT → GUIDE
| Phase | Owner | Tool | Decision Point |
|---|---|---|---|
| 1. Scan | Subagent + Main | Bash, Read, Glob | Project discovery + insights detection |
| 2. Extract | Subagent (session-analyzer) | Grep, Read | Pattern extraction from JSONL |
| 3. Map | Main | — | Pattern → Protocol matching |
| 4. Present | Main | Gate, Write, Bash | User confirmation + Growth Map HTML |
| 5. Guide | Main | Gate | Protocol trial CTA |
| Source | Method | Extracts |
|---|---|---|
sessions-index.json (recent 3 projects) | Read | firstPrompt (start patterns), summary (result patterns), messageCount (conversation length) |
| Session JSONL (up to 3 per project) | Grep "tool_use" | Tool usage frequency distribution (Edit/Read/Bash/AskUserQuestion ratios) |
| Session JSONL | Grep command-name | Slash command history (existing protocol usage) |
| Session JSONL | Grep "Bash" + keywords | Execution patterns (deploy, push, test, install frequency) |
| Session JSONL (pattern evidence) | Grep (context) + Read (offset/limit) | Context snippets: (user message, AI response) pairs near pattern evidence |
| Source | Method | Extracts |
|---|---|---|
~/.claude/CLAUDE.md | Read | Workflow style keywords (team, delegation, safety) |
~/.claude/rules/ | Glob | Rule file presence (which domains are rule-governed) |
~/.claude/settings.json | Read (hooks only) | Hook usage patterns |
| MEMORY.md (if exists) | Read | Existing insights, recurring patterns |
| Source | Method | Extracts |
|---|---|---|
~/.claude/usage-data/facets/{session_id}.json | Read | friction_counts, friction_detail, goal_categories, session_type, outcome, user_satisfaction_counts, brief_summary, underlying_goal, primary_success, claude_helpfulness |
~/.claude/usage-data/session-meta/{session_id}.json | Read | tool_counts, git_commits, git_pushes, languages, uses_task_agent, duration_minutes, first_prompt, user_response_times, message_hours |
Join key: session_id from sessions-index.json matches filename in both directories.
Availability: Only exists if user has run /insights (built-in command). Read-only consumption — never write to these caches.
| Source | Method | Extracts |
|---|---|---|
~/.claude/usage-data/report.html | Read + best-effort parsing | at_a_glance, interaction_style, what_works, friction_analysis, suggestions, on_the_horizon, project_areas |
Availability: Only exists after /insights execution. Enables Growth Map Path A (epistemic-lens analysis using insights as targeting input). Parsing is best-effort — HTML structure changes trigger graceful fallback to Epistemic Profile mode.
Relationship: insights = 1st pass (behavioral sweep), report = 2nd pass (epistemic resolution). Report consumes insights' analyzed data as input, not output — generates orthogonal epistemic analysis that insights cannot produce.
Independence: growth_map_path (A/B from insights availability) is orthogonal to Phase 2 Path A/B (facets availability per project). Growth Map path controls analysis depth; facets path controls extraction method.
Call project-scanner subagent to handle all project discovery. Phase 1 inherently requires 5+ Bash calls (directory listing, stat, file reads), always exceeding the delegation threshold. Pre-planned delegation avoids reactive interruption.
The subagent:
~/.claude/projects/stat for modification time)-Users-choi-myproject → ~/myproject). Records project path ↔ session mapping for Phase 4 resume commandssessions-index.json~/.claude/CLAUDE.md, ~/.claude/rules/, ~/.claude/settings.json, MEMORY.mdInsights detection (main agent, concurrent with project-scanner — no dependency on subagent output):
~/.claude/usage-data/report.html — existence checkid= attributes), then Read with offset/limit per section. Never Read entire file if >500 lines.
growth_map_path = A, store extracted sections as targeting inputs for epistemic-lens analysisgrowth_map_path = B (graceful degradation, no error)growth_map_path = BMain agent awaits both project-scanner output and insights detection, then proceeds to Phase 2.
Edge cases:
~/.claude/projects/ does not exist or is empty: subagent reports absence (secondary sources still scanned), main agent skips Phase 2 extraction (steps 1-3), proceeds to Phase 2 step 5 (secondary sources from Phase 1 output) and Phase 3, set Tier 3sessions-index.json cannot be parsed (corrupted JSON): subagent skips that project, continues with remaining/ and . replaced by -. Subagent uses heuristics (home directory prefix, known directory structure) to reconstruct readable ~/... pathsIf no sessions-index.json found in any project, skip Phase 2 extraction (steps 1-3), proceed to Phase 2 step 5 (secondary sources from Phase 1 output) and Phase 3, set fallback tier to Tier 3.
~/.claude/usage-data/facets/*.json once, intersect returned filenames (stem = session_id) with selected session IDs. Determine path per project:
firstPrompt text from sessions-index.json for ambiguity/exploration keywords:
improve, optimize, ideas for, something likeexplore, investigate, look into and Korean equivalents~/.claude/CLAUDE.md: keywords indicating team work, delegation preferences, safety focus~/.claude/rules/: which domains have explicit rules (communication, boundaries, etc.)~/.claude/settings.json: hook configurations (safety consciousness indicator)Apply the mapping tables below to match observed patterns to protocols.
Present analysis summary via gate interaction:
On confirmation, generate Growth Map HTML artifact via Write tool:
~/.claude/.report/growth-map.htmlgrowth_map_path:Path A — Growth Map (insights as targeting input, epistemic-lens output):
Architecture: 2-Pass Compiler. insights = 1st pass (behavioral sweep), report = 2nd pass (epistemic resolution). Each section uses insights data as input to generate analysis insights cannot produce — protocol adoption patterns, epistemic coverage gaps, deficit detection.
| # | Section | Insights Input (targeting) | Report Output (orthogonal) |
|---|---|---|---|
| ① | Epistemic Snapshot | at_a_glance (context) | Protocol coverage delta: which decision types are structured vs unstructured. Gap between friction frequency and protocol adoption |
| ② | Epistemic Profile | interaction_style (baseline) | Protocol adoption trajectory: which protocols used when, adoption curve over time, preference patterns (planning vs verification vs execution) |
| ③ | Protocol Impact | what_works (positive-session targets) | Cases where protocol usage correlated with better outcomes: protocol-present sessions vs protocol-absent sessions with similar goals |
| ④ | Growth Opportunities | friction_analysis + suggestions | Anti-patterns (protocol applicable but absent) + dual-layer resolution cards |
| ⑥ | Recommendations + Install | Report mapping tables | Protocol recommendations + install commands + batch install |
| ⑦ | Next Protocols | on_the_horizon (context) | Protocol adoption path: which protocols to learn next based on work trajectory + epistemic gap analysis |
Note: ⑤ Coverage is reserved for Phase 2 (dashboard absorption). Uses project_areas from Quaternary + coverage-scanner data.
④ Growth Opportunities — dual-layer cards: Each friction item as a card with two resolution layers:
suggestions/command CTA (structural fix) — sourced from report anti-pattern analysisPath B — Epistemic Profile (report-only fallback):
/insights first for a richer Growth Map"Refer to references/html-template.md for the HTML skeleton, CSS classes, and section templates.
Open HTML artifact in default browser via Bash: open ~/.claude/.report/growth-map.html
Check plugin installation: verify whether recommended protocols are installed
~/.claude/plugins/cache/epistemic-protocols/{plugin-name}/*/skills/*/SKILL.md. If found, the protocol is installed./clarify right now in your current session")claude plugin install epistemic-protocols/{plugin-name} or marketplace URLscripts/install.sh)Present a concrete usage scenario for the top recommendation:
/clarify to articulate intent first can reduce rework cycles"Close with: "Refer to the HTML profile for remaining recommendations. You can re-run /report anytime for updated analysis."
| Observable Pattern | Detection Method | Protocol | Rationale |
|---|---|---|---|
| Vague first prompts ("improve", "optimize", "ideas for") | firstPrompt keyword match | Telos /goal | Starting without defined goals |
| Same file edited 3+ times | Edit path frequency; user disambiguates: same intent repeatedly → /clarify, different concerns → /gap | Hermeneia OR Syneidesis | Repeated edits without prior gap check or intent clarification |
| Exploration ratio 3:1+ across multiple sessions | (Read+Grep+Glob) / (Edit+Write) threshold | Prothesis /frame | Sustained exploration without analytical framework |
| Bash contains deploy/push/apply keywords | Bash input keyword match | Prosoche /attend | Executing without risk assessment |
| Verification keywords in firstPrompt (user-authored text only) | firstPrompt keyword match: "explain", "what did you do", "help me understand", "verify", "check" | Katalepsis /grasp | Need to verify comprehension of results |
| Observable Pattern | Source | Protocol | Rationale |
|---|---|---|---|
| Many hook configurations | settings.json hooks | Prosoche /attend (reinforcing) | User already values safety mechanisms |
| Communication-related rule files | Glob rules/ | Hermeneia /clarify (reinforcing) | Explicit communication rule management |
Applied only when facets data is available (Path A). Complements Primary and Secondary — does not replace them.
| Friction Key | Protocol | Rationale | Signal Type |
|---|---|---|---|
wrong_approach | Telos /goal | Wrong direction due to undefined goal | Primary |
wrong_approach + rework situation | Syneidesis /gap | Approach gap undetected, accompanied by rework | Primary |
misunderstood_request | Hermeneia /clarify | Intent-expression mismatch | Primary |
excessive_changes | Syneidesis /gap | Scope boundary gap undetected | Primary |
context_loss | Aitesis /inquire | Information loss due to insufficient context | Primary |
wrong_file_edited | Prosoche /attend | Execution risk not assessed | Primary |
buggy_code, api_errors/api_error, tool_errors/tool_error/tool_failure/tool_limitation, external_blocker/external_dependency, merge_conflict, minor_correction, excessive_verification/excessive_tool_calls, unrelated_environment_issue/deployment_gap, agent_* | — | Infrastructure/environment friction — not epistemic deficit | Environmental |
Signal Type: Primary = directly maps to protocol deficit. Environmental = reported only (no mapping).
Interaction: friction Primary signals are additive with existing Primary/Secondary signals. Same-protocol evidence escalates strength (Weak+friction=Strong).
Co-change: friction keys must be synchronized with agents/session-analyzer.md Targeted Step Tier 2 behavioral proxies.
Composition rules (protocol chaining based on pattern combinations) are deferred to a future version.
Applied only when growth_map_path = A. Friction-to-protocol mapping uses the Tertiary table (unchanged). This table maps non-friction insights signals as targeting inputs for Growth Map ④ Growth Opportunities dual-layer cards.
| Metric | Signal | Protocol | Rationale |
|---|---|---|---|
suggestions.usage_patterns | behavioral recommendation | — (execution layer) | CLAUDE.md / config suggestion |
suggestions.features_to_try | tool adoption gap | — (execution layer) | Feature utilization improvement |
| session_type = exploration (high ratio) | framework absence | Prothesis / Telos | Sustained exploration without structure |
| user_satisfaction low sessions | deep-dive target | — (priority signal) | Protocol absence in dissatisfied sessions |
| response_time long segments | deliberation point | — (priority signal) | Epistemic deficit candidate |
Tier 1 (3+ strong patterns): Map precisely to observed patterns.
Tier 2 (1-2 weak patterns): Map observed patterns + add supplementary "also useful in these situations" recommendations.
Tier 3 (No patterns / new user): Recommend the Starter Trio — three universally applicable protocols:
/clarify — When you want to convey intent more precisely/goal — When what to build is still unclear/gap — When you want to check for blind spots before decidingSelection rationale: covers the three most common entry points — intent clarification, goal construction, and decision auditing. Low entry barrier, independently usable.
Aitesis is pattern-matched via the Tertiary Mapping Table (context_loss friction key, Path A only). The following protocol is not yet pattern-matched and remains available for manual invocation:
/contextualize — Detect application-context mismatch after execution. Use when correct output may not fit the actual deployment context.Epharmoge will be integrated into pattern-based detection in a future version as reliable detection heuristics are developed.
Refer to references/html-template.md for the full HTML skeleton, CSS classes, and detailed artifact guidelines.
/report multiple times produces updated results based on latest data. Previous artifacts are overwritten.growth_map_path = B fallback, not an error. HTML structure changes are expected — minimize CSS class/ID dependency.growth_map_path = A, use insights' LLM-analyzed data as targeting input — do not re-analyze raw sessions for what insights already processed (token efficiency). Generate orthogonal epistemic analysis: insights identifies WHAT happened (behavioral narrative), report analyzes WHICH epistemic structures were absent (protocol-lens). Never echo insights narrative directly into HTML sections — transform it into protocol adoption analysis, coverage gap detection, and anti-pattern identification.