ported/20260305-191444/skills/deep-analysis/SKILL.md
Deep exploration and synthesis workflow with dynamic planning and hub-and-spoke coordination. Use for deep analysis, codebase understanding, or thorough investigation of a focus area.
npx skillsauth add sequenzia/agent-alchemy deep-analysisInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Execute a structured exploration + synthesis workflow using hub-and-spoke coordination. The lead performs rapid reconnaissance to generate dynamic focus areas, composes a team plan for review, workers explore independently, and a synthesizer merges findings with deep investigation.
This skill can be invoked standalone or loaded by other skills as a reusable building block. Approval behavior is configurable.
Goal: Determine whether the team plan requires user approval before execution.
Read settings file:
.agents/agent-alchemy.local.md existsdeep-analysis section with nested settingsDetermine invocation mode:
Resolve settings:
deep-analysis section is absent, use defaults:
direct-invocation-approval: trueinvocation-by-skill-approval: falseSet REQUIRE_APPROVAL:
direct-invocation-approval value (default: true)invocation-by-skill-approval value (default: false)Parse session settings (also under the deep-analysis section):
cache-ttl-hours: Number of hours before exploration cache expires. Default: 24. Set to 0 to disable caching entirely.enable-checkpointing: Whether to write session checkpoints at phase boundaries. Default: true.enable-progress-indicators: Whether to display [Phase N/6] progress messages. Default: true.Goal: Check for cached exploration results, detect interrupted sessions, and initialize the session directory.
Skip this phase entirely if cache TTL is 0 AND checkpointing is disabled.
If cache TTL > 0:
.agents/sessions/exploration-cache/manifest.md existsanalysis_context matches the current analysis context (or is a superset)codebase_path matches the current working directorytimestamp is within the configured TTL hours of nowconfig_checksum haven't been modified since the cache was writtensynthesis.md and recon_summary.md. Skip to Phase 6 step 2 (present/return results).If checkpointing is enabled:
.agents/sessions/__da_live__/checkpoint.md existslast_completed_phaseIf checkpointing is enabled and no cache hit:
.agents/sessions/__da_live__/ directorycheckpoint.md with session metadata (analysis context, codebase path, start timestamp, current phase)progress.md to track phase completionsGoal: Perform codebase reconnaissance, generate dynamic focus areas, and compose a team plan.
Determine analysis context:
Rapid codebase reconnaissance: Search for files, read config files, and map the codebase structure. This should take 1-2 minutes, not deep investigation.
package.json, tsconfig.json, pyproject.toml, etc.) to identify primary language(s) and framework(s)src/**/*.ts, **/*.py to gauge the size and shape of different areasREADME.md, CLAUDE.md, or similar docs if they exist for project contextFallback: If reconnaissance fails (empty project, unusual structure, errors), use static focus area templates from Step 3b.
Generate dynamic focus areas:
Based on reconnaissance findings, create focus areas tailored to the actual codebase. Default to 3 focus areas, but adjust based on codebase size and complexity (2 for small projects, up to 4 for large ones).
Each focus area should include:
Compose the team plan:
Assemble a structured plan document:
Checkpoint (if enabled):
Goal: Present the team plan for user review and approval before allocating resources.
Skip to Phase 3 with a brief note: "Auto-approving team plan (skill-invoked mode). Proceeding with N explorers and 1 synthesizer."
Present the team plan, then prompt the user to choose:
If "Modify" (up to 3 cycles): Apply modifications, re-present for approval
If "Regenerate" (up to 2 cycles): Re-run Phase 1 Step 2 with feedback, re-compose and re-present
Goal: Create the team, delegate to agents, create tasks, and assign work using the approved plan.
Set up the team for the analysis session
Delegate exploration work:
Create tasks for tracking:
Assign exploration tasks with status guards — only assign if status is pending and unowned. Never re-assign a completed or in-progress task.
Goal: Workers explore their assigned areas independently.
After assigning exploration tasks, monitor progress:
Goal: Verify exploration completeness, launch synthesis with deep investigation.
Goal: Collect results, present to user, and tear down the team.
Collect synthesis output from the synthesizer's report
Write exploration cache (if cache TTL > 0):
.agents/sessions/exploration-cache/ directoryPresent or return results:
Shut down all agents and archive/clean up the session
When resuming from an interrupted session, use per-phase strategy:
| Interrupted At | Recovery Strategy | |----------------|-------------------| | Phase 1 | Restart from Phase 1 (reconnaissance is fast) | | Phase 2 | Load saved team plan, re-present for approval | | Phase 3 | Load approved plan, restart team assembly | | Phase 4 | Read completed explorer findings from session dir, only assign missing explorers | | Phase 5 | Load all explorer findings, launch fresh synthesis | | Phase 6 | Load synthesis, proceed to present results and cleanup |
What this component does: Orchestrates a multi-agent codebase exploration and synthesis workflow with dynamic focus area planning, caching, and session recovery.
Capabilities needed:
Adaptation guidance:
.agents/sessions/ provide caching and recovery — implement if your harness supports persistent state, or skip for simpler setupsConfigurable parameters:
direct-invocation-approval (default: true) — Require plan approval when invoked directlyinvocation-by-skill-approval (default: false) — Require approval when loaded by another skillcache-ttl-hours (default: 24) — Hours before exploration cache expires; 0 disables cachingenable-checkpointing (default: true) — Write session checkpoints at phase boundariesenable-progress-indicators (default: true) — Display phase progress messagesdevelopment
Systematic, hypothesis-driven debugging workflow with triage-based track routing. Use when asked to "fix this bug", "debug this", "why is this failing", "this is broken", "investigate this error", "track down this issue", or any debugging situation. Supports --deep flag to force full investigation.
development
Executes diagnostic investigation tasks to test debugging hypotheses. Runs tests, traces execution, checks git history, and reports evidence. (converted from agent)
content-media
Provides architectural pattern knowledge for designing feature implementations including MVC, event-driven, microservices, and CQRS patterns. Use when designing system architecture or choosing implementation patterns.
documentation
Provides Mermaid diagram syntax, best practices, and styling rules for technical visualizations. Use when creating diagrams, flowcharts, sequence diagrams, class diagrams, state diagrams, ER diagrams, architecture diagrams, C4 diagrams, or any visual documentation in markdown.