# startanew7/assay architecture

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

- Interactive diagram: https://gitdiagram.com/startanew7/assay
- Repository: https://github.com/startanew7/assay

## Overview

Assay is a framework for defining and validating agent-evaluation tasks, then rendering a read-only contract and separate executor/evaluator prompts. The main workflow is task definition → CLI selection and validation → variable construction and template rendering → manual handoff to independent agents. Evaluation is intentionally external: Assay does not invoke models or provide a sandbox. Source excerpts show the core runtime; some broader capabilities are included where the README documents them.

Main entry points: [`assay/render.py`](https://github.com/startanew7/assay/blob/main/assay/render.py) (Prompt renderer), [`assay/cli.py`](https://github.com/startanew7/assay/blob/main/assay/cli.py) (Assay CLI), [`tasks`](https://github.com/startanew7/assay/tree/main/tasks) (Task workspace), [`assay/task.py`](https://github.com/startanew7/assay/blob/main/assay/task.py) (Load and validate)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_authoring["Task authoring"]
  node_task_def["Task definition"]
  node_scaffold["Task scaffolding<br/>[scaffold.py]"]
end

subgraph group_runtime["CLI and task runtime"]
  node_cli["Assay CLI<br/>[cli.py]"]
  node_task_loader["Load and validate<br/>[task.py]"]
end

subgraph group_generation["Prompt generation"]
  node_variables["Template variables<br/>[variables.py]"]
  node_renderer["Prompt renderer<br/>[render.py]"]
  node_templates["Prompt templates"]
end

subgraph group_handoff["Agent handoff"]
  node_artifacts["Contract and prompts"]
  node_executor(("Execution agent"))
  node_workspace["Task workspace"]
  node_evaluator(("Evaluation agent"))
  node_report["Scores and evidence"]
end

node_user(("Task author"))

node_user -->|"defines task"| node_task_def
node_user -->|"runs commands"| node_cli
node_cli -->|"loads and validates"| node_task_loader
node_cli -->|"creates skeleton"| node_scaffold
node_cli -->|"renders task"| node_renderer
node_task_loader -->|"reads definition"| node_task_def
node_renderer -->|"builds variables"| node_variables
node_renderer -->|"reads templates"| node_templates
node_renderer -->|"writes outputs"| node_artifacts
node_renderer -->|"writes contract"| node_workspace
node_artifacts -->|"hands off prompt"| node_executor
node_workspace -->|"provides workspace"| node_executor
node_artifacts -->|"hands off prompt"| node_evaluator
node_executor -->|"implements task"| node_workspace
node_evaluator -->|"produces assessment"| node_report

click node_task_def "https://github.com/startanew7/assay/tree/main/tasks"
click node_cli "https://github.com/startanew7/assay/blob/main/assay/cli.py"
click node_task_loader "https://github.com/startanew7/assay/blob/main/assay/task.py"
click node_scaffold "https://github.com/startanew7/assay/blob/main/assay/scaffold.py"
click node_variables "https://github.com/startanew7/assay/blob/main/assay/variables.py"
click node_renderer "https://github.com/startanew7/assay/blob/main/assay/render.py"
click node_templates "https://github.com/startanew7/assay/tree/main/assay/templates"
click node_workspace "https://github.com/startanew7/assay/tree/main/tasks"

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_task_def,node_scaffold toneBlue
class node_cli,node_task_loader toneAmber
class node_variables,node_renderer,node_templates toneMint
class node_artifacts,node_executor,node_workspace,node_evaluator,node_report,node_user toneRose
```

## Components

### Task authoring

- [Task definition](https://github.com/startanew7/assay/tree/main/tasks): `tasks`
- [Task scaffolding](https://github.com/startanew7/assay/blob/main/assay/scaffold.py): `assay/scaffold.py`

### CLI and task runtime

- [Assay CLI](https://github.com/startanew7/assay/blob/main/assay/cli.py): `assay/cli.py`
- [Load and validate](https://github.com/startanew7/assay/blob/main/assay/task.py): `assay/task.py`

### Prompt generation

- [Template variables](https://github.com/startanew7/assay/blob/main/assay/variables.py): `assay/variables.py`
- [Prompt renderer](https://github.com/startanew7/assay/blob/main/assay/render.py): `assay/render.py`
- [Prompt templates](https://github.com/startanew7/assay/tree/main/assay/templates): `assay/templates`

### Agent handoff

- **Contract and prompts**
- **Execution agent**
- [Task workspace](https://github.com/startanew7/assay/tree/main/tasks): `tasks`
- **Evaluation agent**
- **Scores and evidence**

### Other components

- **Task author**

## Connections

- Task author → Task definition: defines task (evidence: `README.md`)
- Task author → Assay CLI: runs commands (evidence: `README.md`)
- Assay CLI → Load and validate: loads and validates (evidence: `assay/cli.py`)
- Assay CLI → Task scaffolding: creates skeleton (evidence: `assay/cli.py`)
- Assay CLI → Prompt renderer: renders task (evidence: `assay/cli.py`)
- Load and validate → Task definition: reads definition (evidence: `assay/task.py`)
- Prompt renderer → Template variables: builds variables (evidence: `assay/render.py`)
- Prompt renderer → Prompt templates: reads templates (evidence: `assay/render.py`)
- Prompt renderer → Contract and prompts: writes outputs (evidence: `README.md`)
- Prompt renderer → Task workspace: writes contract (evidence: `README.md`)
- Contract and prompts → Execution agent: hands off prompt (evidence: `README.md`)
- Task workspace → Execution agent: provides workspace (evidence: `README.md`)
- Contract and prompts → Evaluation agent: hands off prompt (evidence: `README.md`)
- Execution agent → Task workspace: implements task (evidence: `README.md`)
- Evaluation agent → Scores and evidence: produces assessment (evidence: `README.md`)
