# surya17155/replica architecture

> Architecture diagram of the GitHub repository surya17155/replica, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/surya17155/replica
- Repository: https://github.com/surya17155/replica

## Overview

Replica is an AI design-to-developer-prompt skill: a user supplies a screenshot, URL, or design description; the skill classifies the design, analyzes motion and assets, assembles a detailed prompt, and checks quality before the user passes it to a coding agent. The graph follows the README’s documented stages and includes the reference library, reusable prompt collection, and skill-routing capability. Relationships are based on README statements; sampled source excerpts do not establish additional runtime wiring.

Main entry points: [`REFERENCE/prompt-output-template-landing-page.md`](https://github.com/surya17155/replica/blob/main/REFERENCE/prompt-output-template-landing-page.md) (Prompt assembly), [`DIRECTOR/decision-trees.md`](https://github.com/surya17155/replica/blob/main/DIRECTOR/decision-trees.md) (Aesthetic classification), [`SKILL.md`](https://github.com/surya17155/replica/blob/main/SKILL.md) (Replica skill), [`DESIGNER/skill-router.md`](https://github.com/surya17155/replica/blob/main/DESIGNER/skill-router.md) (Skill router)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Prompt workflow"]
  node_skill["Replica skill<br/>[SKILL.md]"]
  node_scope["Scope confirmation<br/>[rules-engine.md]"]
  node_classification["Aesthetic classification<br/>[decision-trees.md]"]
  node_motion["Motion analysis"]
  node_assets["Asset inventory<br/>[asset-inventory.md]"]
  node_assembly["Prompt assembly"]
  node_quality["Quality check<br/>[quality-rules.md]"]
  node_prompt["Developer prompt"]
end

subgraph group_knowledge["Design knowledge"]
  node_aesthetics["Aesthetic guides"]
  node_patterns["Component patterns"]
  node_presets["CSS presets"]
  node_motion_specs["Motion specifications"]
  node_image_checklists["Image checklists"]
end

subgraph group_routing["Skill routing"]
  node_router["Skill router<br/>[skill-router.md]"]
  node_skill_catalog["Skill catalog<br/>[skill-catalog.json]"]
  node_skill_decisions["Skill decisions"]
end

subgraph group_library["Prompt library"]
  node_prompt_catalog[("Prompt catalog<br/>[catalog.json]")]
  node_prompt_examples["Prompt examples"]
end

node_user(("Design requester"))
node_coding_agent(("AI coding agent"))
node_website["Built website"]

node_user -->|"submits design"| node_skill
node_skill -->|"confirms scope"| node_scope
node_scope -->|"classifies aesthetic"| node_classification
node_classification -->|"analyzes motion"| node_motion
node_motion -->|"catalogs assets"| node_assets
node_assets -->|"assembles prompt"| node_assembly
node_assembly -->|"checks quality"| node_quality
node_quality -->|"produces prompt"| node_prompt
node_classification -.->|"uses guides"| node_aesthetics
node_classification -.->|"analyzes reference"| node_image_checklists
node_assembly -.->|"specifies components"| node_patterns
node_assembly -.->|"includes CSS"| node_presets
node_assembly -.->|"specifies animation"| node_motion_specs
node_skill -.->|"routes requests"| node_router
node_router -.->|"looks up skills"| node_skill_catalog
node_router -.->|"applies decisions"| node_skill_decisions
node_assembly -.->|"can draw examples"| node_prompt_catalog
node_assembly -.->|"can draw examples"| node_prompt_examples
node_coding_agent -->|"builds design"| node_website
node_user -->|"pastes prompt"| node_coding_agent
node_prompt -->|"guides implementation"| node_coding_agent

click node_skill "https://github.com/surya17155/replica/blob/main/SKILL.md"
click node_scope "https://github.com/surya17155/replica/blob/main/DIRECTOR/rules-engine.md"
click node_classification "https://github.com/surya17155/replica/blob/main/DIRECTOR/decision-trees.md"
click node_motion "https://github.com/surya17155/replica/blob/main/DIRECTOR/motion-effects-decision.md"
click node_assets "https://github.com/surya17155/replica/blob/main/DIRECTOR/asset-inventory.md"
click node_assembly "https://github.com/surya17155/replica/blob/main/REFERENCE/prompt-output-template-landing-page.md"
click node_quality "https://github.com/surya17155/replica/blob/main/DIRECTOR/quality-rules.md"
click node_prompt "https://github.com/surya17155/replica/blob/main/REFERENCE/prompt-output-template-hero.md"
click node_aesthetics "https://github.com/surya17155/replica/tree/main/REFERENCE/aesthetic-cards"
click node_patterns "https://github.com/surya17155/replica/tree/main/REFERENCE/component-patterns"
click node_presets "https://github.com/surya17155/replica/tree/main/REFERENCE/css-presets"
click node_motion_specs "https://github.com/surya17155/replica/tree/main/REFERENCE/motion-effects"
click node_image_checklists "https://github.com/surya17155/replica/blob/main/REFERENCE/image-analysis-checklist-hero.md"
click node_router "https://github.com/surya17155/replica/blob/main/DESIGNER/skill-router.md"
click node_skill_catalog "https://github.com/surya17155/replica/blob/main/DESIGNER/skill-catalog.json"
click node_skill_decisions "https://github.com/surya17155/replica/blob/main/DESIGNER/skill-decision-engine.md"
click node_prompt_catalog "https://github.com/surya17155/replica/blob/main/PROMPTS/github-catalog/catalog.json"
click node_prompt_examples "https://github.com/surya17155/replica/tree/main/PROMPTS/github-interfaces"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_skill,node_scope,node_classification,node_motion,node_assets,node_assembly,node_quality,node_prompt toneBlue
class node_aesthetics,node_patterns,node_presets,node_motion_specs,node_image_checklists toneAmber
class node_router,node_skill_catalog,node_skill_decisions,node_user toneMint
class node_prompt_catalog,node_prompt_examples toneRose
class node_coding_agent,node_website toneIndigo
```

## Components

### Prompt workflow

- [Replica skill](https://github.com/surya17155/replica/blob/main/SKILL.md): `SKILL.md`
- [Scope confirmation](https://github.com/surya17155/replica/blob/main/DIRECTOR/rules-engine.md): `DIRECTOR/rules-engine.md`
- [Aesthetic classification](https://github.com/surya17155/replica/blob/main/DIRECTOR/decision-trees.md): `DIRECTOR/decision-trees.md`
- [Motion analysis](https://github.com/surya17155/replica/blob/main/DIRECTOR/motion-effects-decision.md): `DIRECTOR/motion-effects-decision.md`
- [Asset inventory](https://github.com/surya17155/replica/blob/main/DIRECTOR/asset-inventory.md): `DIRECTOR/asset-inventory.md`
- [Prompt assembly](https://github.com/surya17155/replica/blob/main/REFERENCE/prompt-output-template-landing-page.md): `REFERENCE/prompt-output-template-landing-page.md`
- [Quality check](https://github.com/surya17155/replica/blob/main/DIRECTOR/quality-rules.md): `DIRECTOR/quality-rules.md`
- [Developer prompt](https://github.com/surya17155/replica/blob/main/REFERENCE/prompt-output-template-hero.md): `REFERENCE/prompt-output-template-hero.md`

### Design knowledge

- [Aesthetic guides](https://github.com/surya17155/replica/tree/main/REFERENCE/aesthetic-cards): `REFERENCE/aesthetic-cards`
- [Component patterns](https://github.com/surya17155/replica/tree/main/REFERENCE/component-patterns): `REFERENCE/component-patterns`
- [CSS presets](https://github.com/surya17155/replica/tree/main/REFERENCE/css-presets): `REFERENCE/css-presets`
- [Motion specifications](https://github.com/surya17155/replica/tree/main/REFERENCE/motion-effects): `REFERENCE/motion-effects`
- [Image checklists](https://github.com/surya17155/replica/blob/main/REFERENCE/image-analysis-checklist-hero.md): `REFERENCE/image-analysis-checklist-hero.md`

### Skill routing

- [Skill router](https://github.com/surya17155/replica/blob/main/DESIGNER/skill-router.md): `DESIGNER/skill-router.md`
- [Skill catalog](https://github.com/surya17155/replica/blob/main/DESIGNER/skill-catalog.json): `DESIGNER/skill-catalog.json`
- [Skill decisions](https://github.com/surya17155/replica/blob/main/DESIGNER/skill-decision-engine.md): `DESIGNER/skill-decision-engine.md`

### Prompt library

- [Prompt catalog](https://github.com/surya17155/replica/blob/main/PROMPTS/github-catalog/catalog.json): `PROMPTS/github-catalog/catalog.json`
- [Prompt examples](https://github.com/surya17155/replica/tree/main/PROMPTS/github-interfaces): `PROMPTS/github-interfaces`

### Other components

- **Design requester**
- **AI coding agent**
- **Built website**

## Connections

- Design requester → Replica skill: submits design (evidence: `README.md`)
- Replica skill → Scope confirmation: confirms scope (evidence: `README.md`)
- Scope confirmation → Aesthetic classification: classifies aesthetic (evidence: `README.md`)
- Aesthetic classification → Motion analysis: analyzes motion (evidence: `README.md`)
- Motion analysis → Asset inventory: catalogs assets (evidence: `README.md`)
- Asset inventory → Prompt assembly: assembles prompt (evidence: `README.md`)
- Prompt assembly → Quality check: checks quality (evidence: `README.md`)
- Quality check → Developer prompt: produces prompt (evidence: `README.md`)
- Aesthetic classification → Aesthetic guides: uses guides (evidence: `README.md`)
- Aesthetic classification → Image checklists: analyzes reference (evidence: `README.md`)
- Prompt assembly → Component patterns: specifies components (evidence: `README.md`)
- Prompt assembly → CSS presets: includes CSS (evidence: `README.md`)
- Prompt assembly → Motion specifications: specifies animation (evidence: `README.md`)
- Replica skill → Skill router: routes requests (evidence: `README.md`)
- Skill router → Skill catalog: looks up skills (evidence: `README.md`)
- Skill router → Skill decisions: applies decisions (evidence: `README.md`)
- Prompt assembly → Prompt catalog: can draw examples (evidence: `README.md`)
- Prompt assembly → Prompt examples: can draw examples (evidence: `README.md`)
- AI coding agent → Built website: builds design (evidence: `README.md`)
- Design requester → AI coding agent: pastes prompt (evidence: `README.md`)
- Developer prompt → AI coding agent: guides implementation (evidence: `README.md`)
