Files
Claude-Code-Workflow/.claude/skills/project-analyze/phases/02-project-exploration.md
catlog22 89f6ac6804 feat: Implement multi-phase project analysis workflow with Mermaid diagram generation and CPCC compliance documentation
- Phase 3: Added Mermaid diagram generation for system architecture, function modules, algorithms, class diagrams, sequence diagrams, and error flows.
- Phase 4: Assembled analysis and diagrams into a structured CPCC-compliant document with section templates and figure numbering.
- Phase 5: Developed compliance review process with iterative refinement based on analysis findings and user feedback.
- Added CPCC compliance requirements and quality standards for project analysis reports.
- Established a comprehensive project analysis skill with detailed execution flow and report types.
- Enhanced error handling and recovery mechanisms throughout the analysis phases.
2025-12-26 11:44:29 +08:00

1.8 KiB

Phase 2: Project Exploration

Launch parallel exploration agents based on report type.

Execution

Step 1: Map Exploration Angles

const angleMapping = {
  architecture: ["Layer Structure", "Module Dependencies", "Entry Points", "Data Flow"],
  design: ["Design Patterns", "Class Relationships", "Interface Contracts", "State Management"],
  methods: ["Core Algorithms", "Critical Paths", "Public APIs", "Complex Logic"],
  comprehensive: ["Layer Structure", "Design Patterns", "Core Algorithms", "Data Flow"]
};

const angles = angleMapping[config.type];

Step 2: Launch Parallel Agents

For each angle, launch an exploration agent:

Task({
  subagent_type: "cli-explore-agent",
  description: `Explore: ${angle}`,
  prompt: `
## Exploration Objective
Execute **${angle}** exploration for project analysis report.

## Context
- **Angle**: ${angle}
- **Report Type**: ${config.type}
- **Depth**: ${config.depth}
- **Scope**: ${config.scope}

## Exploration Protocol
1. Structural Discovery (get_modules_by_depth, rg, glob)
2. Pattern Recognition (conventions, naming, organization)
3. Relationship Mapping (dependencies, integration points)

## Output Format
{
  "angle": "${angle}",
  "findings": {
    "structure": [...],
    "patterns": [...],
    "relationships": [...],
    "key_files": [{path, relevance, rationale}]
  },
  "insights": [...]
}
`
})

Step 3: Aggregate Results

Merge all exploration results into unified findings:

const aggregatedFindings = {
  structure: [],      // from all angles
  patterns: [],       // from all angles  
  relationships: [],  // from all angles
  key_files: [],      // deduplicated
  insights: []        // prioritized
};

Output

Save exploration results to exploration-{angle}.json files.