# harshavardhan-qz/ba-qa-agents architecture

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

- Interactive diagram: https://gitdiagram.com/harshavardhan-qz/ba-qa-agents
- Repository: https://github.com/harshavardhan-qz/ba-qa-agents

## Overview

Westfield is a Claude Code–hosted agent platform that turns Jira issues or free-text requirements into evidence-labeled refinement packages and, optionally, automation plans and generated tests. The orchestrator routes work to requirements analysis or automation agents; automation can delegate UI/API exploration and pass findings to code generation. Agents persist traceable artifacts with shared run metadata. The local Knowledge Fabric provides keyword search and document context over a mock store. Agent relationships and capabilities follow README documentation; unsampled agent definitions are represented at their documented paths.

Main entry points: [`scripts/save_agent_output.py`](https://github.com/harshavardhan-qz/ba-qa-agents/blob/main/scripts/save_agent_output.py) (Artifact Persistence), [`.claude/agents/ba-qa-agent.md`](https://github.com/harshavardhan-qz/ba-qa-agents/blob/main/.claude/agents/ba-qa-agent.md) (BA/QA Analysis), [`.claude/agents/automation-agent.md`](https://github.com/harshavardhan-qz/ba-qa-agents/blob/main/.claude/agents/automation-agent.md) (Automation Planner), [`.claude/agents/westfield-orchestrator.md`](https://github.com/harshavardhan-qz/ba-qa-agents/blob/main/.claude/agents/westfield-orchestrator.md) (Workflow Orchestrator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_orchestration["Orchestration"]
  node_orchestrator["Workflow Orchestrator"]
end

subgraph group_requirements["Requirements Refinement"]
  node_baqa["BA/QA Analysis<br/>[ba-qa-agent.md]"]
  node_analysis_skill["Analysis Procedure<br/>[SKILL.md]"]
  node_refinement_contract["Refinement Contract"]
  node_refinement_validator["Contract Validator"]
end

subgraph group_automation["Automation Planning"]
  node_automation_agent["Automation Planner"]
  node_ui_agent["UI Exploration<br/>[ui-agent.md]"]
  node_api_agent["API Exploration<br/>[api-agent.md]"]
  node_codegen["Test Code Generation<br/>[code-gen-agent.md]"]
end

subgraph group_knowledge["Knowledge Fabric"]
  node_knowledge_server["Knowledge MCP Server<br/>[server.py]"]
  node_search["Knowledge Search"]
  node_context["Document Context<br/>[get_context.py]"]
  node_knowledge_base[("Mock Knowledge Store<br/>[knowledge_base.py]")]
end

subgraph group_artifacts["Traceable Artifacts"]
  node_artifact_writer["Artifact Persistence"]
  node_run_artifacts["Run Artifacts"]
end

node_requester(("User"))
node_jira["Jira / Rovo"]
node_playwright["Playwright MCP"]

node_requester -->|"submits request"| node_orchestrator
node_orchestrator -->|"routes refinement"| node_baqa
node_orchestrator -->|"routes planning"| node_automation_agent
node_baqa -->|"follows procedure"| node_analysis_skill
node_baqa -.->|"retrieves issues"| node_jira
node_baqa -.->|"retrieves grounding"| node_knowledge_server
node_baqa -.->|"validates package"| node_refinement_validator
node_refinement_validator -->|"checks contract"| node_refinement_contract
node_automation_agent -->|"delegates UI"| node_ui_agent
node_automation_agent -->|"delegates API"| node_api_agent
node_automation_agent -->|"delegates generation"| node_codegen
node_ui_agent -.->|"explores through"| node_playwright
node_knowledge_server -->|"dispatches search"| node_search
node_knowledge_server -->|"dispatches context"| node_context
node_search -->|"reads documents"| node_knowledge_base
node_context -->|"reads documents"| node_knowledge_base
node_orchestrator -->|"persists output"| node_artifact_writer
node_baqa -->|"persists output"| node_artifact_writer
node_automation_agent -->|"persists output"| node_artifact_writer
node_ui_agent -->|"persists output"| node_artifact_writer
node_api_agent -->|"persists output"| node_artifact_writer
node_codegen -->|"persists output"| node_artifact_writer
node_artifact_writer -->|"writes artifacts"| node_run_artifacts

click node_orchestrator "https://github.com/harshavardhan-qz/ba-qa-agents/blob/main/.claude/agents/westfield-orchestrator.md"
click node_baqa "https://github.com/harshavardhan-qz/ba-qa-agents/blob/main/.claude/agents/ba-qa-agent.md"
click node_analysis_skill "https://github.com/harshavardhan-qz/ba-qa-agents/blob/main/.claude/skills/requirement-analysis/SKILL.md"
click node_refinement_contract "https://github.com/harshavardhan-qz/ba-qa-agents/blob/main/schemas/requirement_refinement_result.schema.json"
click node_refinement_validator "https://github.com/harshavardhan-qz/ba-qa-agents/blob/main/scripts/validate_requirement_refinement_result.py"
click node_automation_agent "https://github.com/harshavardhan-qz/ba-qa-agents/blob/main/.claude/agents/automation-agent.md"
click node_ui_agent "https://github.com/harshavardhan-qz/ba-qa-agents/blob/main/.claude/agents/ui-agent.md"
click node_api_agent "https://github.com/harshavardhan-qz/ba-qa-agents/blob/main/.claude/agents/api-agent.md"
click node_codegen "https://github.com/harshavardhan-qz/ba-qa-agents/blob/main/.claude/agents/code-gen-agent.md"
click node_knowledge_server "https://github.com/harshavardhan-qz/ba-qa-agents/blob/main/mcp-servers/knowledge-fabric/server.py"
click node_search "https://github.com/harshavardhan-qz/ba-qa-agents/blob/main/mcp-servers/knowledge-fabric/tools/search_knowledge.py"
click node_context "https://github.com/harshavardhan-qz/ba-qa-agents/blob/main/mcp-servers/knowledge-fabric/tools/get_context.py"
click node_knowledge_base "https://github.com/harshavardhan-qz/ba-qa-agents/blob/main/mcp-servers/knowledge-fabric/tools/knowledge_base.py"
click node_artifact_writer "https://github.com/harshavardhan-qz/ba-qa-agents/blob/main/scripts/save_agent_output.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_orchestrator,node_requester toneBlue
class node_baqa,node_analysis_skill,node_refinement_contract,node_refinement_validator toneAmber
class node_automation_agent,node_ui_agent,node_api_agent,node_codegen toneMint
class node_knowledge_server,node_search,node_context,node_knowledge_base toneRose
class node_artifact_writer,node_run_artifacts,node_jira,node_playwright toneIndigo
```

## Components

### Orchestration

- [Workflow Orchestrator](https://github.com/harshavardhan-qz/ba-qa-agents/blob/main/.claude/agents/westfield-orchestrator.md): `.claude/agents/westfield-orchestrator.md`

### Requirements Refinement

- [BA/QA Analysis](https://github.com/harshavardhan-qz/ba-qa-agents/blob/main/.claude/agents/ba-qa-agent.md): `.claude/agents/ba-qa-agent.md`
- [Analysis Procedure](https://github.com/harshavardhan-qz/ba-qa-agents/blob/main/.claude/skills/requirement-analysis/SKILL.md): `.claude/skills/requirement-analysis/SKILL.md`
- [Refinement Contract](https://github.com/harshavardhan-qz/ba-qa-agents/blob/main/schemas/requirement_refinement_result.schema.json): `schemas/requirement_refinement_result.schema.json`
- [Contract Validator](https://github.com/harshavardhan-qz/ba-qa-agents/blob/main/scripts/validate_requirement_refinement_result.py): `scripts/validate_requirement_refinement_result.py`

### Automation Planning

- [Automation Planner](https://github.com/harshavardhan-qz/ba-qa-agents/blob/main/.claude/agents/automation-agent.md): `.claude/agents/automation-agent.md`
- [UI Exploration](https://github.com/harshavardhan-qz/ba-qa-agents/blob/main/.claude/agents/ui-agent.md): `.claude/agents/ui-agent.md`
- [API Exploration](https://github.com/harshavardhan-qz/ba-qa-agents/blob/main/.claude/agents/api-agent.md): `.claude/agents/api-agent.md`
- [Test Code Generation](https://github.com/harshavardhan-qz/ba-qa-agents/blob/main/.claude/agents/code-gen-agent.md): `.claude/agents/code-gen-agent.md`

### Knowledge Fabric

- [Knowledge MCP Server](https://github.com/harshavardhan-qz/ba-qa-agents/blob/main/mcp-servers/knowledge-fabric/server.py): `mcp-servers/knowledge-fabric/server.py`
- [Knowledge Search](https://github.com/harshavardhan-qz/ba-qa-agents/blob/main/mcp-servers/knowledge-fabric/tools/search_knowledge.py): `mcp-servers/knowledge-fabric/tools/search_knowledge.py`
- [Document Context](https://github.com/harshavardhan-qz/ba-qa-agents/blob/main/mcp-servers/knowledge-fabric/tools/get_context.py): `mcp-servers/knowledge-fabric/tools/get_context.py`
- [Mock Knowledge Store](https://github.com/harshavardhan-qz/ba-qa-agents/blob/main/mcp-servers/knowledge-fabric/tools/knowledge_base.py): `mcp-servers/knowledge-fabric/tools/knowledge_base.py`

### Traceable Artifacts

- [Artifact Persistence](https://github.com/harshavardhan-qz/ba-qa-agents/blob/main/scripts/save_agent_output.py): `scripts/save_agent_output.py`
- **Run Artifacts**

### Other components

- **User**
- **Jira / Rovo**
- **Playwright MCP**

## Connections

- User → Workflow Orchestrator: submits request (evidence: `README.md`)
- Workflow Orchestrator → BA/QA Analysis: routes refinement (evidence: `README.md`)
- Workflow Orchestrator → Automation Planner: routes planning (evidence: `README.md`)
- BA/QA Analysis → Analysis Procedure: follows procedure (evidence: `README.md`)
- BA/QA Analysis → Jira / Rovo: retrieves issues (evidence: `README.md`)
- BA/QA Analysis → Knowledge MCP Server: retrieves grounding (evidence: `README.md`)
- BA/QA Analysis → Contract Validator: validates package
- Contract Validator → Refinement Contract: checks contract (evidence: `scripts/validate_requirement_refinement_result.py`)
- Automation Planner → UI Exploration: delegates UI (evidence: `README.md`)
- Automation Planner → API Exploration: delegates API (evidence: `README.md`)
- Automation Planner → Test Code Generation: delegates generation (evidence: `README.md`)
- UI Exploration → Playwright MCP: explores through (evidence: `README.md`)
- Knowledge MCP Server → Knowledge Search: dispatches search (evidence: `mcp-servers/knowledge-fabric/server.py`)
- Knowledge MCP Server → Document Context: dispatches context (evidence: `mcp-servers/knowledge-fabric/server.py`)
- Knowledge Search → Mock Knowledge Store: reads documents (evidence: `mcp-servers/knowledge-fabric/tools/search_knowledge.py`)
- Document Context → Mock Knowledge Store: reads documents (evidence: `mcp-servers/knowledge-fabric/tools/get_context.py`)
- Workflow Orchestrator → Artifact Persistence: persists output (evidence: `README.md`)
- BA/QA Analysis → Artifact Persistence: persists output (evidence: `README.md`)
- Automation Planner → Artifact Persistence: persists output (evidence: `README.md`)
- UI Exploration → Artifact Persistence: persists output (evidence: `README.md`)
- API Exploration → Artifact Persistence: persists output (evidence: `README.md`)
- Test Code Generation → Artifact Persistence: persists output (evidence: `README.md`)
- Artifact Persistence → Run Artifacts: writes artifacts (evidence: `scripts/save_agent_output.py`)
