# hxy1073/ecommerce-product-ads-skill architecture

> Architecture diagram of the GitHub repository hxy1073/ecommerce-product-ads-skill, 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/hxy1073/ecommerce-product-ads-skill
- Repository: https://github.com/hxy1073/ecommerce-product-ads-skill

## Overview

This repository is a reusable ecommerce key-visual design skill, not an autonomous image-generation application. Its principal workflow turns supplied product facts and protected assets into concepts, an approved visual direction, generated artwork, QA, a human delivery decision, and a final PNG. The README documents the creative stages; sampled Python code supports workspace initialization and deterministic validation. Stage-level implementation details beyond those documents were not inspected.

Main entry points: [`scripts/validate.py`](https://github.com/hxy1073/ecommerce-product-ads-skill/blob/main/scripts/validate.py) (Deterministic validation), [`input`](https://github.com/hxy1073/ecommerce-product-ads-skill/tree/main/input) (Task inputs), [`SKILL.md`](https://github.com/hxy1073/ecommerce-product-ads-skill/blob/main/SKILL.md) (Final human check), [`work/visual_strategy.yaml`](https://github.com/hxy1073/ecommerce-product-ads-skill/blob/main/work/visual_strategy.yaml) (Visual direction)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workspace["Task workspace"]
  node_inputs["Task inputs"]
  node_bootstrap["Workspace bootstrap<br/>[bootstrap.py]"]
  node_state["Stage decisions<br/>[state.yaml]"]
end

subgraph group_creative["Creative workflow"]
  node_brief["Product brief<br/>[brief.yaml]"]
  node_concepts["Concept options<br/>[concepts.yaml]"]
  node_concept_choice["Concept checkpoint<br/>[SKILL.md]"]
  node_direction["Visual direction"]
  node_layout["Composition layout<br/>[layout.json]"]
  node_direction_choice["Direction checkpoint<br/>[SKILL.md]"]
end

subgraph group_delivery["Review and delivery"]
  node_qa["Design QA<br/>[qa_report.md]"]
  node_final_check["Final human check<br/>[SKILL.md]"]
  node_export["PNG export"]
end

subgraph group_support["Skill resources"]
  node_references["Design knowledge"]
  node_validator["Deterministic validation<br/>[validate.py]"]
end

node_user(("Task owner"))
node_imagegen["ImageGen"]

node_user -->|"supplies assets"| node_inputs
node_inputs -->|"initializes workspace"| node_bootstrap
node_bootstrap -->|"resumes stage"| node_state
node_inputs -->|"analyzes facts"| node_brief
node_brief -->|"informs concepts"| node_concepts
node_concepts -->|"presents options"| node_concept_choice
node_user -->|"selects concept"| node_concept_choice
node_concept_choice -->|"guides direction"| node_direction
node_references -->|"informs styling"| node_direction
node_direction -->|"defines composition"| node_layout
node_layout -->|"presents direction"| node_direction_choice
node_user -->|"approves direction"| node_direction_choice
node_direction_choice -->|"prompts artwork"| node_imagegen
node_imagegen -->|"provides artwork"| node_qa
node_qa -->|"informs review"| node_final_check
node_user -->|"chooses outcome"| node_final_check
node_final_check -.->|"requests iteration"| node_imagegen
node_final_check -->|"approves delivery"| node_export
node_user -->|"runs checks"| node_validator
node_validator -->|"checks inputs"| node_inputs
node_validator -->|"checks workflow"| node_state
node_validator -->|"checks PNG"| node_export

click node_inputs "https://github.com/hxy1073/ecommerce-product-ads-skill/tree/main/input"
click node_bootstrap "https://github.com/hxy1073/ecommerce-product-ads-skill/blob/main/scripts/bootstrap.py"
click node_brief "https://github.com/hxy1073/ecommerce-product-ads-skill/blob/main/work/brief.yaml"
click node_concepts "https://github.com/hxy1073/ecommerce-product-ads-skill/blob/main/work/concepts.yaml"
click node_concept_choice "https://github.com/hxy1073/ecommerce-product-ads-skill/blob/main/SKILL.md"
click node_direction "https://github.com/hxy1073/ecommerce-product-ads-skill/blob/main/work/visual_strategy.yaml"
click node_layout "https://github.com/hxy1073/ecommerce-product-ads-skill/blob/main/work/layout.json"
click node_direction_choice "https://github.com/hxy1073/ecommerce-product-ads-skill/blob/main/SKILL.md"
click node_qa "https://github.com/hxy1073/ecommerce-product-ads-skill/blob/main/work/qa_report.md"
click node_final_check "https://github.com/hxy1073/ecommerce-product-ads-skill/blob/main/SKILL.md"
click node_state "https://github.com/hxy1073/ecommerce-product-ads-skill/blob/main/work/state.yaml"
click node_export "https://github.com/hxy1073/ecommerce-product-ads-skill/tree/main/output"
click node_references "https://github.com/hxy1073/ecommerce-product-ads-skill/tree/main/references"
click node_validator "https://github.com/hxy1073/ecommerce-product-ads-skill/blob/main/scripts/validate.py"

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_inputs,node_bootstrap,node_state toneBlue
class node_brief,node_concepts,node_concept_choice,node_direction,node_layout,node_direction_choice toneAmber
class node_qa,node_final_check,node_export toneMint
class node_references,node_validator,node_user toneRose
class node_imagegen toneIndigo
```

## Components

### Task workspace

- [Task inputs](https://github.com/hxy1073/ecommerce-product-ads-skill/tree/main/input): `input`
- [Workspace bootstrap](https://github.com/hxy1073/ecommerce-product-ads-skill/blob/main/scripts/bootstrap.py): `scripts/bootstrap.py`
- [Stage decisions](https://github.com/hxy1073/ecommerce-product-ads-skill/blob/main/work/state.yaml): `work/state.yaml`

### Creative workflow

- [Product brief](https://github.com/hxy1073/ecommerce-product-ads-skill/blob/main/work/brief.yaml): `work/brief.yaml`
- [Concept options](https://github.com/hxy1073/ecommerce-product-ads-skill/blob/main/work/concepts.yaml): `work/concepts.yaml`
- [Concept checkpoint](https://github.com/hxy1073/ecommerce-product-ads-skill/blob/main/SKILL.md): `SKILL.md`
- [Visual direction](https://github.com/hxy1073/ecommerce-product-ads-skill/blob/main/work/visual_strategy.yaml): `work/visual_strategy.yaml`
- [Composition layout](https://github.com/hxy1073/ecommerce-product-ads-skill/blob/main/work/layout.json): `work/layout.json`
- [Direction checkpoint](https://github.com/hxy1073/ecommerce-product-ads-skill/blob/main/SKILL.md): `SKILL.md`

### Review and delivery

- [Design QA](https://github.com/hxy1073/ecommerce-product-ads-skill/blob/main/work/qa_report.md): `work/qa_report.md`
- [Final human check](https://github.com/hxy1073/ecommerce-product-ads-skill/blob/main/SKILL.md): `SKILL.md`
- [PNG export](https://github.com/hxy1073/ecommerce-product-ads-skill/tree/main/output): `output`

### Skill resources

- [Design knowledge](https://github.com/hxy1073/ecommerce-product-ads-skill/tree/main/references): `references`
- [Deterministic validation](https://github.com/hxy1073/ecommerce-product-ads-skill/blob/main/scripts/validate.py): `scripts/validate.py`

### Other components

- **Task owner**
- **ImageGen**

## Connections

- Task owner → Task inputs: supplies assets (evidence: `README.md`)
- Task inputs → Workspace bootstrap: initializes workspace (evidence: `scripts/bootstrap.py`)
- Workspace bootstrap → Stage decisions: resumes stage (evidence: `scripts/bootstrap.py`)
- Task inputs → Product brief: analyzes facts (evidence: `README.md`)
- Product brief → Concept options: informs concepts (evidence: `README.md`)
- Concept options → Concept checkpoint: presents options (evidence: `README.md`)
- Task owner → Concept checkpoint: selects concept (evidence: `README.md`)
- Concept checkpoint → Visual direction: guides direction (evidence: `README.md`)
- Design knowledge → Visual direction: informs styling (evidence: `README.md`)
- Visual direction → Composition layout: defines composition (evidence: `README.md`)
- Composition layout → Direction checkpoint: presents direction (evidence: `README.md`)
- Task owner → Direction checkpoint: approves direction (evidence: `README.md`)
- Direction checkpoint → ImageGen: prompts artwork (evidence: `README.md`)
- ImageGen → Design QA: provides artwork (evidence: `README.md`)
- Design QA → Final human check: informs review (evidence: `README.md`)
- Task owner → Final human check: chooses outcome (evidence: `README.md`)
- Final human check → ImageGen: requests iteration (evidence: `README.md`)
- Final human check → PNG export: approves delivery (evidence: `README.md`)
- Task owner → Deterministic validation: runs checks (evidence: `README.md`)
- Deterministic validation → Task inputs: checks inputs (evidence: `scripts/validate.py`)
- Deterministic validation → Stage decisions: checks workflow (evidence: `scripts/validate.py`)
- Deterministic validation → PNG export: checks PNG (evidence: `scripts/validate.py`)
