원클릭으로
retro-architecture
Extracts system architecture, component design, dependency graphs, deployment topology, and tech stack from legacy code
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Extracts system architecture, component design, dependency graphs, deployment topology, and tech stack from legacy code
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | retro-architecture |
| description | Extracts system architecture, component design, dependency graphs, deployment topology, and tech stack from legacy code |
| argument-hint | Invoked by Retro-Spec Coordinator - do not call directly |
This skill is invoked by the Retro-Spec Coordinator as the FIRST extraction skill (after discovery). It analyzes the legacy codebase to extract and document the system architecture, producing Section 9 (Architecture) of the specification and a dependency graph artifact.
| # | Input | Description |
|---|---|---|
| 1 | skill_path | Path to this SKILL.md file |
| 2 | accumulator_path | Path to the spec file being built |
| 3 | artifacts_dir | Path to companion artifacts directory |
| 4 | discovery_manifest_path | Path to the discovery manifest |
| 5 | source_path | Path to the legacy source code |
| 6 | target_language | Target language for artifacts |
| 7 | project_name | Name of the project being analyzed |
| 8 | module_filter | Modules to analyze |
#tool:search/searchSubagent for broad codebase structure exploration and #tool:search/usages to trace component dependencies.dependency-graph.md in the artifacts directory[INFERRED: confidence] for every architectural claimScan the project structure to identify architectural components:
import/require/use/include statementsFor each identified component:
Search for:
grep: "fetch|axios|http|request|grpc|amqp|kafka|sqs|EventEmitter|emit\(|publish\(|subscribe\("
Analyze infrastructure configuration:
Cross-reference discovery manifest with actual code usage:
Write Section 9 to the accumulator following the SDD spec format:
## 9. Architecture
### 9.1 System Design
<Paragraph describing the overall architecture pattern and rationale>
[INFERRED: confidence] Source: <evidence files>
**Components**:
| Component | Responsibility | Technology | Source Evidence |
|-----------|---------------|------------|-----------------|
| <name> | <role> | <tech> | <file:line range> |
**Component Interaction Diagram** (Mermaid):
```mermaid
graph TD
Client --> Controller[Controller Layer]
Controller --> Service[Service Layer]
Service --> Repo[Repository Layer]
Repo --> DB[(Database)]
| Layer | Technology | Version | Rationale | Source |
|---|---|---|---|---|
| Language | ||||
| Framework | ||||
| ... |
[INFERRED: HIGH] -- Versions from lock files are factual; rationale is inferred.
<actual directory tree of the project, annotated with component roles>
src/
controllers/ # HTTP request handlers (Controller layer)
services/ # Business logic (Service layer)
models/ # Data entities (Model layer)
repositories/ # Data access (Repository layer)
middleware/ # Request interceptors
utils/ # Shared utilities
config/ # Configuration loaders
Services:
| Service | Image/Runtime | Ports | Dependencies |
|---|---|---|---|
| # | Decision | Pattern | Evidence | Confidence |
|---|---|---|---|---|
| DD-01 | | [INFERRED: X] |
---
## Dependency Graph Artifact
Produce `dependency-graph.md` in the artifacts directory:
```markdown
# Dependency Graph -- <project-name>
> Generated by: retro-architecture skill (retro-spec)
> Source: <source_path>
## Module Dependencies
```mermaid
graph LR
A[module-a] --> B[module-b]
A --> C[module-c]
B --> D[module-d]
C --> D
| Module | Depends On | Depended On By |
|---|---|---|
| module-a | module-b, module-c | - |
| module-b | module-d | module-a |
| module-c | module-d | module-a |
| module-d | - | module-b, module-c |
<List any circular dependencies found, or "None detected">
| Module | External Dep | Type | Purpose |
|---|---|---|---|
| <npm/pip/etc.> |
Test failure diagnosis, source code fixes, and regression detection
Environment verification, dependency installation, baseline test verification
Contract-first single-task implementation dispatched by Coder Coordinator
Integration test writing for component boundaries and external dependencies
Unit test writing and execution with coverage threshold enforcement
API reference documentation skill. Produces and updates API endpoint documentation from contract files in .sdd/docs/api-reference.md.