# mukesh-50/demorepo001 architecture

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

- Interactive diagram: https://gitdiagram.com/mukesh-50/demorepo001
- Repository: https://github.com/mukesh-50/demorepo001

## Overview

This repository generates Playwright tests from manual cases, observes the target page, and iterates on failures before offering commit and push prompts. The framework workflow is the main runtime path; the README also documents a single-file equivalent and GitHub Actions test runs after pushes. Some capabilities are documented but their implementation excerpts were not provided, so those links cite the README rather than implying source inspection.

Main entry points: [`workflow/graph.py`](https://github.com/mukesh-50/demorepo001/blob/main/workflow/graph.py) (Workflow graph), [`workflow/nodes/ai.py`](https://github.com/mukesh-50/demorepo001/blob/main/workflow/nodes/ai.py) (Test generation and repair), [`workflow/nodes/runner.py`](https://github.com/mukesh-50/demorepo001/blob/main/workflow/nodes/runner.py) (Save and run tests), [`main.py`](https://github.com/mukesh-50/demorepo001/blob/main/main.py) (Workflow entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry and settings"]
  node_main["Workflow entry<br/>[main.py]"]
  node_config["Settings<br/>[config.py]"]
end

subgraph group_workflow["Generation workflow"]
  node_graph["Workflow graph<br/>[graph.py]"]
  node_state["Workflow state<br/>[state.py]"]
  node_decisions["Branch decisions<br/>[decisions.py]"]
  node_case_reader["Case reader<br/>[test_case.py]"]
  node_browser["Page inspection<br/>[browser.py]"]
  node_ai["Test generation and repair<br/>[ai.py]"]
  node_prompts["AI prompts<br/>[prompts.py]"]
  node_runner["Save and run tests<br/>[runner.py]"]
  node_single_file["Single-file workflow<br/>[v1_single_file.py]"]
end

subgraph group_artifacts["Test artifacts"]
  node_manual_cases["Manual cases"]
  node_generated_tests["Generated tests"]
end

subgraph group_delivery["Git and CI"]
  node_git_ops["Human and Git operations<br/>[git_ops.py]"]
  node_github_actions["Push test workflow<br/>[main.yml]"]
end

node_user(("Engineer"))
node_target_site(("Target website"))
node_openai(("OpenAI model"))
node_playwright(("Playwright runner"))
node_git_remote(("Git remote"))

node_user -->|"starts"| node_main
node_manual_cases -->|"discovers"| node_main
node_main -->|"reads settings"| node_config
node_main -->|"invokes"| node_graph
node_graph -->|"uses state"| node_state
node_graph -->|"routes through"| node_decisions
node_graph -->|"dispatches"| node_case_reader
node_graph -->|"dispatches"| node_browser
node_graph -->|"dispatches"| node_ai
node_graph -->|"dispatches"| node_runner
node_graph -->|"dispatches"| node_git_ops
node_case_reader -->|"then inspects"| node_browser
node_browser -->|"reads page"| node_target_site
node_browser -->|"provides snapshot"| node_ai
node_ai -->|"builds prompts"| node_prompts
node_ai -->|"requests generation"| node_openai
node_ai -->|"provides test code"| node_runner
node_runner -->|"writes"| node_generated_tests
node_runner -->|"runs tests"| node_playwright
node_runner -->|"failure feedback"| node_ai
node_user -->|"answers prompts"| node_git_ops
node_git_ops -->|"commits"| node_generated_tests
node_git_ops -->|"pushes"| node_git_remote
node_git_remote -->|"triggers tests"| node_github_actions
node_single_file -->|"uses same cases"| node_manual_cases
node_single_file -->|"produces tests"| node_generated_tests

click node_manual_cases "https://github.com/mukesh-50/demorepo001/tree/main/test_cases"
click node_main "https://github.com/mukesh-50/demorepo001/blob/main/main.py"
click node_config "https://github.com/mukesh-50/demorepo001/blob/main/config.py"
click node_graph "https://github.com/mukesh-50/demorepo001/blob/main/workflow/graph.py"
click node_state "https://github.com/mukesh-50/demorepo001/blob/main/workflow/state.py"
click node_decisions "https://github.com/mukesh-50/demorepo001/blob/main/workflow/decisions.py"
click node_case_reader "https://github.com/mukesh-50/demorepo001/blob/main/workflow/nodes/test_case.py"
click node_browser "https://github.com/mukesh-50/demorepo001/blob/main/workflow/nodes/browser.py"
click node_ai "https://github.com/mukesh-50/demorepo001/blob/main/workflow/nodes/ai.py"
click node_prompts "https://github.com/mukesh-50/demorepo001/blob/main/workflow/prompts.py"
click node_runner "https://github.com/mukesh-50/demorepo001/blob/main/workflow/nodes/runner.py"
click node_generated_tests "https://github.com/mukesh-50/demorepo001/tree/main/tests"
click node_git_ops "https://github.com/mukesh-50/demorepo001/blob/main/workflow/nodes/git_ops.py"
click node_github_actions "https://github.com/mukesh-50/demorepo001/blob/main/.github/workflows/main.yml"
click node_single_file "https://github.com/mukesh-50/demorepo001/blob/main/v1_single_file.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_main,node_config toneBlue
class node_graph,node_state,node_decisions,node_case_reader,node_browser,node_ai,node_prompts,node_runner,node_single_file toneAmber
class node_manual_cases,node_generated_tests toneMint
class node_git_ops,node_github_actions toneRose
class node_user,node_target_site,node_openai,node_playwright,node_git_remote toneIndigo
```

## Components

### Entry and settings

- [Workflow entry](https://github.com/mukesh-50/demorepo001/blob/main/main.py): `main.py`
- [Settings](https://github.com/mukesh-50/demorepo001/blob/main/config.py): `config.py`

### Generation workflow

- [Workflow graph](https://github.com/mukesh-50/demorepo001/blob/main/workflow/graph.py): `workflow/graph.py`
- [Workflow state](https://github.com/mukesh-50/demorepo001/blob/main/workflow/state.py): `workflow/state.py`
- [Branch decisions](https://github.com/mukesh-50/demorepo001/blob/main/workflow/decisions.py): `workflow/decisions.py`
- [Case reader](https://github.com/mukesh-50/demorepo001/blob/main/workflow/nodes/test_case.py): `workflow/nodes/test_case.py`
- [Page inspection](https://github.com/mukesh-50/demorepo001/blob/main/workflow/nodes/browser.py): `workflow/nodes/browser.py`
- [Test generation and repair](https://github.com/mukesh-50/demorepo001/blob/main/workflow/nodes/ai.py): `workflow/nodes/ai.py`
- [AI prompts](https://github.com/mukesh-50/demorepo001/blob/main/workflow/prompts.py): `workflow/prompts.py`
- [Save and run tests](https://github.com/mukesh-50/demorepo001/blob/main/workflow/nodes/runner.py): `workflow/nodes/runner.py`
- [Single-file workflow](https://github.com/mukesh-50/demorepo001/blob/main/v1_single_file.py): `v1_single_file.py`

### Test artifacts

- [Manual cases](https://github.com/mukesh-50/demorepo001/tree/main/test_cases): `test_cases`
- [Generated tests](https://github.com/mukesh-50/demorepo001/tree/main/tests): `tests`

### Git and CI

- [Human and Git operations](https://github.com/mukesh-50/demorepo001/blob/main/workflow/nodes/git_ops.py): `workflow/nodes/git_ops.py`
- [Push test workflow](https://github.com/mukesh-50/demorepo001/blob/main/.github/workflows/main.yml): `.github/workflows/main.yml`

### Other components

- **Engineer**
- **Target website**
- **OpenAI model**
- **Playwright runner**
- **Git remote**

## Connections

- Engineer → Workflow entry: starts (evidence: `README.md`)
- Manual cases → Workflow entry: discovers (evidence: `main.py`)
- Workflow entry → Settings: reads settings (evidence: `main.py`)
- Workflow entry → Workflow graph: invokes (evidence: `main.py`)
- Workflow graph → Workflow state: uses state (evidence: `workflow/graph.py`)
- Workflow graph → Branch decisions: routes through (evidence: `workflow/graph.py`)
- Workflow graph → Case reader: dispatches (evidence: `workflow/graph.py`)
- Workflow graph → Page inspection: dispatches (evidence: `workflow/graph.py`)
- Workflow graph → Test generation and repair: dispatches (evidence: `workflow/graph.py`)
- Workflow graph → Save and run tests: dispatches (evidence: `workflow/graph.py`)
- Workflow graph → Human and Git operations: dispatches (evidence: `workflow/graph.py`)
- Case reader → Page inspection: then inspects
- Page inspection → Target website: reads page (evidence: `workflow/nodes/browser.py`)
- Page inspection → Test generation and repair: provides snapshot (evidence: `README.md`)
- Test generation and repair → AI prompts: builds prompts (evidence: `workflow/nodes/ai.py`)
- Test generation and repair → OpenAI model: requests generation (evidence: `workflow/nodes/ai.py`)
- Test generation and repair → Save and run tests: provides test code (evidence: `README.md`)
- Save and run tests → Generated tests: writes (evidence: `workflow/nodes/runner.py`)
- Save and run tests → Playwright runner: runs tests (evidence: `workflow/nodes/runner.py`)
- Save and run tests → Test generation and repair: failure feedback (evidence: `README.md`)
- Engineer → Human and Git operations: answers prompts (evidence: `README.md`)
- Human and Git operations → Generated tests: commits (evidence: `workflow/nodes/git_ops.py`)
- Human and Git operations → Git remote: pushes (evidence: `workflow/nodes/git_ops.py`)
- Git remote → Push test workflow: triggers tests (evidence: `README.md`)
- Single-file workflow → Manual cases: uses same cases (evidence: `README.md`)
- Single-file workflow → Generated tests: produces tests (evidence: `README.md`)
