# olivomarco/github-copilot-token-optimization architecture

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

- Interactive diagram: https://gitdiagram.com/olivomarco/github-copilot-token-optimization
- Repository: https://github.com/olivomarco/github-copilot-token-optimization

## Overview

This repository is a community-authored guide to reducing GitHub Copilot token waste, not a runtime application. Its main user flow is to understand the cost model, identify a source of waste, consult the matching chapter, and evaluate changes by useful completed work and total cost. The README explicitly maps waste categories to chapters and points readers to the practical setup checklist. Relationships below reflect those documented links; no implementation source was provided.

Main entry points: [`docs/01-why-tokens-matter.md`](https://github.com/olivomarco/github-copilot-token-optimization/blob/main/docs/01-why-tokens-matter.md) (Token costs), [`docs/10-practical-setup.md`](https://github.com/olivomarco/github-copilot-token-optimization/blob/main/docs/10-practical-setup.md) (Practical setup), [`docs/02-prompt-compression.md`](https://github.com/olivomarco/github-copilot-token-optimization/blob/main/docs/02-prompt-compression.md) (Prompt compression), [`docs/03-language-comparison.md`](https://github.com/olivomarco/github-copilot-token-optimization/blob/main/docs/03-language-comparison.md) (Language tradeoffs)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_foundations["Foundations"]
  node_why["Token costs"]
  node_setup["Practical setup"]
end

subgraph group_prompting["Prompting and output"]
  node_prompt["Prompt compression"]
  node_language["Language tradeoffs"]
  node_output["Output control"]
end

subgraph group_workflow["Context and workflow"]
  node_context["Context management"]
  node_alwayson["Always-on context"]
  node_mcp["MCP and tools"]
  node_habits["Workflow choices"]
end

subgraph group_evaluation["Evaluation and governance"]
  node_outcomes["Outcome per token"]
  node_models["Models and pricing"]
  node_governance["Enterprise governance"]
  node_comparisons["Comparisons and data"]
end

node_reader(("Guide reader"))

node_reader -->|"start with"| node_setup
node_reader -->|"learn costs"| node_why
node_reader -->|"address long answers"| node_output
node_reader -->|"address unclear prompts"| node_prompt
node_reader -->|"compare languages"| node_language
node_reader -->|"manage context"| node_context
node_reader -->|"assess guidance"| node_alwayson
node_reader -->|"assess tool costs"| node_mcp
node_reader -->|"optimize workflow"| node_habits
node_reader -->|"avoid rework"| node_outcomes
node_reader -->|"select models"| node_models
node_reader -->|"set controls"| node_governance
node_reader -->|"evaluate claims"| node_comparisons

click node_why "https://github.com/olivomarco/github-copilot-token-optimization/blob/main/docs/01-why-tokens-matter.md"
click node_setup "https://github.com/olivomarco/github-copilot-token-optimization/blob/main/docs/10-practical-setup.md"
click node_prompt "https://github.com/olivomarco/github-copilot-token-optimization/blob/main/docs/02-prompt-compression.md"
click node_language "https://github.com/olivomarco/github-copilot-token-optimization/blob/main/docs/03-language-comparison.md"
click node_output "https://github.com/olivomarco/github-copilot-token-optimization/blob/main/docs/05-output-control.md"
click node_context "https://github.com/olivomarco/github-copilot-token-optimization/blob/main/docs/04-context-management.md"
click node_alwayson "https://github.com/olivomarco/github-copilot-token-optimization/blob/main/docs/07-agents-md-problem.md"
click node_mcp "https://github.com/olivomarco/github-copilot-token-optimization/blob/main/docs/08-mcp-tool-costs.md"
click node_habits "https://github.com/olivomarco/github-copilot-token-optimization/blob/main/docs/06-workflow-optimization.md"
click node_outcomes "https://github.com/olivomarco/github-copilot-token-optimization/blob/main/docs/13-outcome-per-token.md"
click node_models "https://github.com/olivomarco/github-copilot-token-optimization/blob/main/docs/11-models-and-pricing.md"
click node_governance "https://github.com/olivomarco/github-copilot-token-optimization/blob/main/docs/12-enterprise-governance.md"
click node_comparisons "https://github.com/olivomarco/github-copilot-token-optimization/blob/main/docs/09-comparisons-data.md"

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_why,node_setup toneBlue
class node_prompt,node_language,node_output toneAmber
class node_context,node_alwayson,node_mcp,node_habits toneMint
class node_outcomes,node_models,node_governance,node_comparisons toneRose
class node_reader toneIndigo
```

## Components

### Foundations

- [Token costs](https://github.com/olivomarco/github-copilot-token-optimization/blob/main/docs/01-why-tokens-matter.md): `docs/01-why-tokens-matter.md`
- [Practical setup](https://github.com/olivomarco/github-copilot-token-optimization/blob/main/docs/10-practical-setup.md): `docs/10-practical-setup.md`

### Prompting and output

- [Prompt compression](https://github.com/olivomarco/github-copilot-token-optimization/blob/main/docs/02-prompt-compression.md): `docs/02-prompt-compression.md`
- [Language tradeoffs](https://github.com/olivomarco/github-copilot-token-optimization/blob/main/docs/03-language-comparison.md): `docs/03-language-comparison.md`
- [Output control](https://github.com/olivomarco/github-copilot-token-optimization/blob/main/docs/05-output-control.md): `docs/05-output-control.md`

### Context and workflow

- [Context management](https://github.com/olivomarco/github-copilot-token-optimization/blob/main/docs/04-context-management.md): `docs/04-context-management.md`
- [Always-on context](https://github.com/olivomarco/github-copilot-token-optimization/blob/main/docs/07-agents-md-problem.md): `docs/07-agents-md-problem.md`
- [MCP and tools](https://github.com/olivomarco/github-copilot-token-optimization/blob/main/docs/08-mcp-tool-costs.md): `docs/08-mcp-tool-costs.md`
- [Workflow choices](https://github.com/olivomarco/github-copilot-token-optimization/blob/main/docs/06-workflow-optimization.md): `docs/06-workflow-optimization.md`

### Evaluation and governance

- [Outcome per token](https://github.com/olivomarco/github-copilot-token-optimization/blob/main/docs/13-outcome-per-token.md): `docs/13-outcome-per-token.md`
- [Models and pricing](https://github.com/olivomarco/github-copilot-token-optimization/blob/main/docs/11-models-and-pricing.md): `docs/11-models-and-pricing.md`
- [Enterprise governance](https://github.com/olivomarco/github-copilot-token-optimization/blob/main/docs/12-enterprise-governance.md): `docs/12-enterprise-governance.md`
- [Comparisons and data](https://github.com/olivomarco/github-copilot-token-optimization/blob/main/docs/09-comparisons-data.md): `docs/09-comparisons-data.md`

### Other components

- **Guide reader**

## Connections

- Guide reader → Practical setup: start with (evidence: `README.md`)
- Guide reader → Token costs: learn costs (evidence: `README.md`)
- Guide reader → Output control: address long answers (evidence: `README.md`)
- Guide reader → Prompt compression: address unclear prompts (evidence: `README.md`)
- Guide reader → Language tradeoffs: compare languages (evidence: `README.md`)
- Guide reader → Context management: manage context (evidence: `README.md`)
- Guide reader → Always-on context: assess guidance (evidence: `README.md`)
- Guide reader → MCP and tools: assess tool costs (evidence: `README.md`)
- Guide reader → Workflow choices: optimize workflow (evidence: `README.md`)
- Guide reader → Outcome per token: avoid rework (evidence: `README.md`)
- Guide reader → Models and pricing: select models (evidence: `README.md`)
- Guide reader → Enterprise governance: set controls (evidence: `README.md`)
- Guide reader → Comparisons and data: evaluate claims (evidence: `README.md`)
