# guilhermedemorais-dev/tfd architecture

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

- Interactive diagram: https://gitdiagram.com/guilhermedemorais-dev/tfd
- Repository: https://github.com/guilhermedemorais-dev/tfd

## Overview

TFD is a Codex plugin for coordinating software delivery through specialist agents, review gates, and project artifacts. The main workflow moves from user-approved project setup and product definition through discovery, specification, phased implementation, independent QA, and accepted delivery. The graph also includes task-contract tooling, workflow tracking, installation, and knowledge retrieval. Relationships among documented but unsampled capabilities are based on the README; source-level details are limited to the excerpts and index shown.

Main entry points: [`skills`](https://github.com/guilhermedemorais-dev/tfd/tree/main/skills) (Specialist agents), [`skills/TFD-harness/SKILL.md`](https://github.com/guilhermedemorais-dev/tfd/blob/main/skills/TFD-harness/SKILL.md) (Codex coordinator), [`skills/TFD-qa_spec/SKILL.md`](https://github.com/guilhermedemorais-dev/tfd/blob/main/skills/TFD-qa_spec/SKILL.md) (Independent QA), [`scripts/pipeline.py`](https://github.com/guilhermedemorais-dev/tfd/blob/main/scripts/pipeline.py) (Workflow gates)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_coordination["Coordination"]
  node_codex["Codex coordinator<br/>[SKILL.md]"]
  node_translator["Request translator"]
  node_specialists["Specialist agents"]
  node_qa["Independent QA<br/>[SKILL.md]"]
end

subgraph group_delivery["Delivery stages"]
  node_constitution["Project setup<br/>[SKILL.md]"]
  node_product["Briefing and PRD<br/>[SKILL.md]"]
  node_discovery["Discovery research<br/>[SKILL.md]"]
  node_architecture["Architecture<br/>[SKILL.md]"]
  node_planning["Phase planning<br/>[SKILL.md]"]
  node_implementation["Phased implementation<br/>[SKILL.md]"]
  node_documentation["Delivery documentation<br/>[SKILL.md]"]
end

subgraph group_contracts["Contracts and tracking"]
  node_task_contract["Task contract<br/>[task.json]"]
  node_task_validation["Task validation<br/>[validate_task.py]"]
  node_workflow["Workflow gates<br/>[pipeline.py]"]
  node_task_view["Task rendering<br/>[render_task.py]"]
  node_review_view["Review rendering"]
  node_resume["Task resumption<br/>[resume_task.py]"]
end

subgraph group_knowledge["Knowledge and execution"]
  node_library["TFD knowledge library<br/>[README.md]"]
  node_graphify["Graphify retrieval<br/>[tfd_graph.py]"]
  node_codex_adapter["Codex adapter<br/>[README.md]"]
  node_model_router["Model selection<br/>[model_router.py]"]
  node_context_budget["Context measurement<br/>[context_budget.py]"]
  node_installer["Plugin installer<br/>[install_tfd.py]"]
end

node_user(("User"))

node_user -->|"requests work"| node_codex
node_codex -->|"routes request"| node_translator
node_translator -->|"delegates task"| node_specialists
node_specialists -->|"submits work"| node_qa
node_qa -->|"returns findings"| node_specialists
node_qa -->|"reports PASS"| node_codex
node_codex -->|"presents evidence"| node_user
node_specialists -->|"checks setup"| node_constitution
node_specialists -->|"defines product"| node_product
node_specialists -->|"researches gaps"| node_discovery
node_specialists -->|"defines contracts"| node_architecture
node_specialists -->|"plans phases"| node_planning
node_specialists -->|"implements phase"| node_implementation
node_specialists -->|"documents delivery"| node_documentation
node_qa -->|"reviews specification"| node_product
node_specialists -->|"creates task"| node_task_contract
node_task_validation -->|"validates"| node_task_contract
node_task_view -->|"validates input"| node_task_validation
node_workflow -.->|"tracks gates"| node_task_contract
node_review_view -->|"evaluates workflow"| node_workflow
node_review_view -->|"renders task"| node_task_view
node_resume -->|"evaluates workflow"| node_workflow
node_resume -->|"renders task"| node_task_view
node_library -->|"supplies references"| node_specialists
node_graphify -.->|"retrieves bundle"| node_library
node_codex_adapter -->|"integrates agents"| node_codex
node_model_router -.->|"selects models"| node_codex_adapter
node_context_budget -.->|"measures context"| node_codex_adapter
node_user -->|"requests installation"| node_installer

click node_codex "https://github.com/guilhermedemorais-dev/tfd/blob/main/skills/TFD-harness/SKILL.md"
click node_specialists "https://github.com/guilhermedemorais-dev/tfd/tree/main/skills"
click node_qa "https://github.com/guilhermedemorais-dev/tfd/blob/main/skills/TFD-qa_spec/SKILL.md"
click node_constitution "https://github.com/guilhermedemorais-dev/tfd/blob/main/skills/TFD-devops/SKILL.md"
click node_product "https://github.com/guilhermedemorais-dev/tfd/blob/main/skills/TFD-product/SKILL.md"
click node_discovery "https://github.com/guilhermedemorais-dev/tfd/blob/main/skills/TFD-discovery/SKILL.md"
click node_architecture "https://github.com/guilhermedemorais-dev/tfd/blob/main/skills/TFD-architecture/SKILL.md"
click node_planning "https://github.com/guilhermedemorais-dev/tfd/blob/main/library/plugins/studio-prd/skills/studio-prd/SKILL.md"
click node_implementation "https://github.com/guilhermedemorais-dev/tfd/blob/main/skills/TFD-backend/SKILL.md"
click node_documentation "https://github.com/guilhermedemorais-dev/tfd/blob/main/skills/TFD-documentation/SKILL.md"
click node_task_contract "https://github.com/guilhermedemorais-dev/tfd/blob/main/schemas/task.json"
click node_task_validation "https://github.com/guilhermedemorais-dev/tfd/blob/main/scripts/validate_task.py"
click node_workflow "https://github.com/guilhermedemorais-dev/tfd/blob/main/scripts/pipeline.py"
click node_task_view "https://github.com/guilhermedemorais-dev/tfd/blob/main/scripts/render_task.py"
click node_review_view "https://github.com/guilhermedemorais-dev/tfd/blob/main/scripts/render_task_review.py"
click node_resume "https://github.com/guilhermedemorais-dev/tfd/blob/main/scripts/resume_task.py"
click node_library "https://github.com/guilhermedemorais-dev/tfd/blob/main/library/README.md"
click node_graphify "https://github.com/guilhermedemorais-dev/tfd/blob/main/integrations/graphify/tfd_graph.py"
click node_codex_adapter "https://github.com/guilhermedemorais-dev/tfd/blob/main/hosts/codex/README.md"
click node_model_router "https://github.com/guilhermedemorais-dev/tfd/blob/main/scripts/model_router.py"
click node_context_budget "https://github.com/guilhermedemorais-dev/tfd/blob/main/scripts/context_budget.py"
click node_installer "https://github.com/guilhermedemorais-dev/tfd/blob/main/scripts/install_tfd.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_codex,node_translator,node_specialists,node_qa,node_user toneBlue
class node_constitution,node_product,node_discovery,node_architecture,node_planning,node_implementation,node_documentation toneAmber
class node_task_contract,node_task_validation,node_workflow,node_task_view,node_review_view,node_resume toneMint
class node_library,node_graphify,node_codex_adapter,node_model_router,node_context_budget,node_installer toneRose
```

## Components

### Coordination

- [Codex coordinator](https://github.com/guilhermedemorais-dev/tfd/blob/main/skills/TFD-harness/SKILL.md): `skills/TFD-harness/SKILL.md`
- **Request translator**
- [Specialist agents](https://github.com/guilhermedemorais-dev/tfd/tree/main/skills): `skills`
- [Independent QA](https://github.com/guilhermedemorais-dev/tfd/blob/main/skills/TFD-qa_spec/SKILL.md): `skills/TFD-qa_spec/SKILL.md`

### Delivery stages

- [Project setup](https://github.com/guilhermedemorais-dev/tfd/blob/main/skills/TFD-devops/SKILL.md): `skills/TFD-devops/SKILL.md`
- [Briefing and PRD](https://github.com/guilhermedemorais-dev/tfd/blob/main/skills/TFD-product/SKILL.md): `skills/TFD-product/SKILL.md`
- [Discovery research](https://github.com/guilhermedemorais-dev/tfd/blob/main/skills/TFD-discovery/SKILL.md): `skills/TFD-discovery/SKILL.md`
- [Architecture](https://github.com/guilhermedemorais-dev/tfd/blob/main/skills/TFD-architecture/SKILL.md): `skills/TFD-architecture/SKILL.md`
- [Phase planning](https://github.com/guilhermedemorais-dev/tfd/blob/main/library/plugins/studio-prd/skills/studio-prd/SKILL.md): `library/plugins/studio-prd/skills/studio-prd/SKILL.md`
- [Phased implementation](https://github.com/guilhermedemorais-dev/tfd/blob/main/skills/TFD-backend/SKILL.md): `skills/TFD-backend/SKILL.md`
- [Delivery documentation](https://github.com/guilhermedemorais-dev/tfd/blob/main/skills/TFD-documentation/SKILL.md): `skills/TFD-documentation/SKILL.md`

### Contracts and tracking

- [Task contract](https://github.com/guilhermedemorais-dev/tfd/blob/main/schemas/task.json): `schemas/task.json`
- [Task validation](https://github.com/guilhermedemorais-dev/tfd/blob/main/scripts/validate_task.py): `scripts/validate_task.py`
- [Workflow gates](https://github.com/guilhermedemorais-dev/tfd/blob/main/scripts/pipeline.py): `scripts/pipeline.py`
- [Task rendering](https://github.com/guilhermedemorais-dev/tfd/blob/main/scripts/render_task.py): `scripts/render_task.py`
- [Review rendering](https://github.com/guilhermedemorais-dev/tfd/blob/main/scripts/render_task_review.py): `scripts/render_task_review.py`
- [Task resumption](https://github.com/guilhermedemorais-dev/tfd/blob/main/scripts/resume_task.py): `scripts/resume_task.py`

### Knowledge and execution

- [TFD knowledge library](https://github.com/guilhermedemorais-dev/tfd/blob/main/library/README.md): `library/README.md`
- [Graphify retrieval](https://github.com/guilhermedemorais-dev/tfd/blob/main/integrations/graphify/tfd_graph.py): `integrations/graphify/tfd_graph.py`
- [Codex adapter](https://github.com/guilhermedemorais-dev/tfd/blob/main/hosts/codex/README.md): `hosts/codex/README.md`
- [Model selection](https://github.com/guilhermedemorais-dev/tfd/blob/main/scripts/model_router.py): `scripts/model_router.py`
- [Context measurement](https://github.com/guilhermedemorais-dev/tfd/blob/main/scripts/context_budget.py): `scripts/context_budget.py`
- [Plugin installer](https://github.com/guilhermedemorais-dev/tfd/blob/main/scripts/install_tfd.py): `scripts/install_tfd.py`

### Other components

- **User**

## Connections

- User → Codex coordinator: requests work (evidence: `README.md`)
- Codex coordinator → Request translator: routes request (evidence: `README.md`)
- Request translator → Specialist agents: delegates task (evidence: `README.md`)
- Specialist agents → Independent QA: submits work (evidence: `README.md`)
- Independent QA → Specialist agents: returns findings (evidence: `README.md`)
- Independent QA → Codex coordinator: reports PASS (evidence: `README.md`)
- Codex coordinator → User: presents evidence (evidence: `README.md`)
- Specialist agents → Project setup: checks setup (evidence: `README.md`)
- Specialist agents → Briefing and PRD: defines product (evidence: `README.md`)
- Specialist agents → Discovery research: researches gaps (evidence: `README.md`)
- Specialist agents → Architecture: defines contracts (evidence: `README.md`)
- Specialist agents → Phase planning: plans phases (evidence: `README.md`)
- Specialist agents → Phased implementation: implements phase (evidence: `README.md`)
- Specialist agents → Delivery documentation: documents delivery (evidence: `README.md`)
- Independent QA → Briefing and PRD: reviews specification (evidence: `README.md`)
- Specialist agents → Task contract: creates task (evidence: `README.md`)
- Task validation → Task contract: validates
- Task rendering → Task validation: validates input (evidence: `scripts/render_task.py`)
- Workflow gates → Task contract: tracks gates (evidence: `README.md`)
- Review rendering → Workflow gates: evaluates workflow (evidence: `scripts/render_task_review.py`)
- Review rendering → Task rendering: renders task (evidence: `scripts/render_task_review.py`)
- Task resumption → Workflow gates: evaluates workflow (evidence: `scripts/resume_task.py`)
- Task resumption → Task rendering: renders task (evidence: `scripts/resume_task.py`)
- TFD knowledge library → Specialist agents: supplies references (evidence: `README.md`)
- Graphify retrieval → TFD knowledge library: retrieves bundle (evidence: `README.md`)
- Codex adapter → Codex coordinator: integrates agents (evidence: `README.md`)
- Model selection → Codex adapter: selects models (evidence: `README.md`)
- Context measurement → Codex adapter: measures context (evidence: `README.md`)
- User → Plugin installer: requests installation (evidence: `README.md`)
