# pkalliagkas1989/ai_code_factory architecture

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

- Interactive diagram: https://gitdiagram.com/pkalliagkas1989/ai_code_factory
- Repository: https://github.com/pkalliagkas1989/ai_code_factory

## Overview

AI Code Factory is a local Claude Code workflow with two main user journeys: `/factory` takes a feature request through specification, implementation, reviews and a human merge decision; `/marketing` produces business-specific drafts, evidence, plans and private results. The map also preserves the documented optional marketing consultation, job dashboard and pitch-capture utilities. Main workflow relationships are documented in the README; source excerpts confirm the capture tool’s dependency on its support module. Other unsampled subsystem details and their internal wiring are intentionally summarized rather than inferred.

Main entry points: [`.claude/skills/factory/scripts/factory.py`](https://github.com/pkalliagkas1989/ai_code_factory/blob/main/.claude/skills/factory/scripts/factory.py) (Job workflow), [`.claude/skills/marketing/SKILL.md`](https://github.com/pkalliagkas1989/ai_code_factory/blob/main/.claude/skills/marketing/SKILL.md) (Marketing command), [`.claude/agents/marketing-consultant.md`](https://github.com/pkalliagkas1989/ai_code_factory/blob/main/.claude/agents/marketing-consultant.md) (Marketing consultant), [`.claude/agents/approver.md`](https://github.com/pkalliagkas1989/ai_code_factory/blob/main/.claude/agents/approver.md) (Approver)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_factory["Feature factory"]
  node_factory_command["Factory command<br/>[SKILL.md]"]
  node_factory_orchestrator["Job workflow<br/>[factory.py]"]
  node_config["Project configuration<br/>[config.md]"]
  node_spec_writer["Spec writer<br/>[spec-writer.md]"]
  node_builder["Feature builder<br/>[builder.md]"]
  node_reviewers["Review agents<br/>[agents]"]
  node_approver["Approver<br/>[approver.md]"]
end

subgraph group_marketing["Marketing workflow"]
  node_marketing_command["Marketing command<br/>[SKILL.md]"]
  node_marketing_consultant["Marketing consultant"]
  node_marketing_researcher["Marketing researcher"]
  node_marketing_records[("Business records")]
  node_marketing_analysis["Results analysis<br/>[analyze.py]"]
end

subgraph group_jobs["Job tracking"]
  node_job_artifacts["Job artifacts"]
  node_dashboard["Job dashboard<br/>[dashboard.html]"]
end

subgraph group_pitch["Pitch capture"]
  node_capture["Frame capture<br/>[capture.mjs]"]
  node_capture_support["Capture support"]
  node_music["Soundtrack synthesis<br/>[music.mjs]"]
end

node_requester(("Feature requester"))
node_human_merge(("Human merge decision"))
node_git["Git worktrees"]
node_marketing_user(("Marketing requester"))

node_requester -->|"requests feature"| node_factory_command
node_factory_command -->|"starts workflow"| node_factory_orchestrator
node_factory_orchestrator -->|"requests specification"| node_spec_writer
node_factory_orchestrator -->|"assigns build"| node_builder
node_factory_orchestrator -->|"runs reviews"| node_reviewers
node_factory_orchestrator -->|"requests approval"| node_approver
node_factory_orchestrator -->|"uses configuration"| node_config
node_factory_orchestrator -->|"records artifacts"| node_job_artifacts
node_factory_orchestrator -->|"creates worktree"| node_git
node_approver -->|"hands off decision"| node_human_merge
node_dashboard -->|"shows job status"| node_job_artifacts
node_marketing_user -->|"requests task"| node_marketing_command
node_marketing_command -->|"produces drafts"| node_marketing_consultant
node_marketing_command -.->|"supports research"| node_marketing_researcher
node_marketing_command -->|"uses business history"| node_marketing_records
node_marketing_command -->|"analyzes results"| node_marketing_analysis
node_factory_orchestrator -.->|"consults optionally"| node_marketing_consultant
node_marketing_consultant -.->|"informs specification"| node_spec_writer
node_marketing_consultant -.->|"informs implementation"| node_builder
node_marketing_consultant -.->|"informs approval"| node_approver
node_capture -->|"uses helpers"| node_capture_support

click node_factory_command "https://github.com/pkalliagkas1989/ai_code_factory/blob/main/.claude/skills/factory/SKILL.md"
click node_factory_orchestrator "https://github.com/pkalliagkas1989/ai_code_factory/blob/main/.claude/skills/factory/scripts/factory.py"
click node_config "https://github.com/pkalliagkas1989/ai_code_factory/blob/main/factory/config.md"
click node_spec_writer "https://github.com/pkalliagkas1989/ai_code_factory/blob/main/.claude/agents/spec-writer.md"
click node_builder "https://github.com/pkalliagkas1989/ai_code_factory/blob/main/.claude/agents/builder.md"
click node_reviewers "https://github.com/pkalliagkas1989/ai_code_factory/tree/main/.claude/agents"
click node_approver "https://github.com/pkalliagkas1989/ai_code_factory/blob/main/.claude/agents/approver.md"
click node_job_artifacts "https://github.com/pkalliagkas1989/ai_code_factory/tree/main/factory/jobs"
click node_dashboard "https://github.com/pkalliagkas1989/ai_code_factory/blob/main/factory/dashboard.html"
click node_marketing_command "https://github.com/pkalliagkas1989/ai_code_factory/blob/main/.claude/skills/marketing/SKILL.md"
click node_marketing_consultant "https://github.com/pkalliagkas1989/ai_code_factory/blob/main/.claude/agents/marketing-consultant.md"
click node_marketing_researcher "https://github.com/pkalliagkas1989/ai_code_factory/blob/main/.claude/agents/marketing-researcher.md"
click node_marketing_records "https://github.com/pkalliagkas1989/ai_code_factory/tree/main/marketing/businesses"
click node_marketing_analysis "https://github.com/pkalliagkas1989/ai_code_factory/blob/main/.claude/skills/marketing/scripts/analyze.py"
click node_capture "https://github.com/pkalliagkas1989/ai_code_factory/blob/main/pitch/source/capture.mjs"
click node_capture_support "https://github.com/pkalliagkas1989/ai_code_factory/blob/main/pitch/source/capture-support.mjs"
click node_music "https://github.com/pkalliagkas1989/ai_code_factory/blob/main/pitch/source/music.mjs"

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_factory_command,node_factory_orchestrator,node_config,node_spec_writer,node_builder,node_reviewers,node_approver toneBlue
class node_marketing_command,node_marketing_consultant,node_marketing_researcher,node_marketing_records,node_marketing_analysis toneAmber
class node_job_artifacts,node_dashboard,node_requester,node_marketing_user toneMint
class node_capture,node_capture_support,node_music toneRose
class node_human_merge,node_git toneIndigo
```

## Components

### Feature factory

- [Factory command](https://github.com/pkalliagkas1989/ai_code_factory/blob/main/.claude/skills/factory/SKILL.md): `.claude/skills/factory/SKILL.md`
- [Job workflow](https://github.com/pkalliagkas1989/ai_code_factory/blob/main/.claude/skills/factory/scripts/factory.py): `.claude/skills/factory/scripts/factory.py`
- [Project configuration](https://github.com/pkalliagkas1989/ai_code_factory/blob/main/factory/config.md): `factory/config.md`
- [Spec writer](https://github.com/pkalliagkas1989/ai_code_factory/blob/main/.claude/agents/spec-writer.md): `.claude/agents/spec-writer.md`
- [Feature builder](https://github.com/pkalliagkas1989/ai_code_factory/blob/main/.claude/agents/builder.md): `.claude/agents/builder.md`
- [Review agents](https://github.com/pkalliagkas1989/ai_code_factory/tree/main/.claude/agents): `.claude/agents`
- [Approver](https://github.com/pkalliagkas1989/ai_code_factory/blob/main/.claude/agents/approver.md): `.claude/agents/approver.md`

### Marketing workflow

- [Marketing command](https://github.com/pkalliagkas1989/ai_code_factory/blob/main/.claude/skills/marketing/SKILL.md): `.claude/skills/marketing/SKILL.md`
- [Marketing consultant](https://github.com/pkalliagkas1989/ai_code_factory/blob/main/.claude/agents/marketing-consultant.md): `.claude/agents/marketing-consultant.md`
- [Marketing researcher](https://github.com/pkalliagkas1989/ai_code_factory/blob/main/.claude/agents/marketing-researcher.md): `.claude/agents/marketing-researcher.md`
- [Business records](https://github.com/pkalliagkas1989/ai_code_factory/tree/main/marketing/businesses): `marketing/businesses`
- [Results analysis](https://github.com/pkalliagkas1989/ai_code_factory/blob/main/.claude/skills/marketing/scripts/analyze.py): `.claude/skills/marketing/scripts/analyze.py`

### Job tracking

- [Job artifacts](https://github.com/pkalliagkas1989/ai_code_factory/tree/main/factory/jobs): `factory/jobs`
- [Job dashboard](https://github.com/pkalliagkas1989/ai_code_factory/blob/main/factory/dashboard.html): `factory/dashboard.html`

### Pitch capture

- [Frame capture](https://github.com/pkalliagkas1989/ai_code_factory/blob/main/pitch/source/capture.mjs): `pitch/source/capture.mjs`
- [Capture support](https://github.com/pkalliagkas1989/ai_code_factory/blob/main/pitch/source/capture-support.mjs): `pitch/source/capture-support.mjs`
- [Soundtrack synthesis](https://github.com/pkalliagkas1989/ai_code_factory/blob/main/pitch/source/music.mjs): `pitch/source/music.mjs`

### Other components

- **Feature requester**
- **Human merge decision**
- **Git worktrees**
- **Marketing requester**

## Connections

- Feature requester → Factory command: requests feature (evidence: `README.md`)
- Factory command → Job workflow: starts workflow (evidence: `README.md`)
- Job workflow → Spec writer: requests specification (evidence: `README.md`)
- Job workflow → Feature builder: assigns build (evidence: `README.md`)
- Job workflow → Review agents: runs reviews (evidence: `README.md`)
- Job workflow → Approver: requests approval (evidence: `README.md`)
- Job workflow → Project configuration: uses configuration (evidence: `README.md`)
- Job workflow → Job artifacts: records artifacts (evidence: `README.md`)
- Job workflow → Git worktrees: creates worktree (evidence: `README.md`)
- Approver → Human merge decision: hands off decision (evidence: `README.md`)
- Job dashboard → Job artifacts: shows job status (evidence: `README.md`)
- Marketing requester → Marketing command: requests task (evidence: `README.md`)
- Marketing command → Marketing consultant: produces drafts (evidence: `README.md`)
- Marketing command → Marketing researcher: supports research
- Marketing command → Business records: uses business history (evidence: `README.md`)
- Marketing command → Results analysis: analyzes results (evidence: `README.md`)
- Job workflow → Marketing consultant: consults optionally (evidence: `README.md`)
- Marketing consultant → Spec writer: informs specification (evidence: `README.md`)
- Marketing consultant → Feature builder: informs implementation (evidence: `README.md`)
- Marketing consultant → Approver: informs approval (evidence: `README.md`)
- Frame capture → Capture support: uses helpers (evidence: `pitch/source/capture.mjs`)
