# pvkarthikk/tars architecture

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

- Interactive diagram: https://gitdiagram.com/pvkarthikk/tars
- Repository: https://github.com/pvkarthikk/tars

## Overview

TARS is a coding-agent plugin whose skills guide task execution, rework, task closure/resumption, and personal learning. The primary workflow runs a task through gating, edits, and validation, then records its outcome; memory and mined workflow patterns inform later tasks. The README documents these capabilities and the helper-script interface. The Python helper is the only indexed source excerpt, so finer-grained internal calls and unsampled skill behavior are not asserted.

Main entry points: [`skills/tars-task/SKILL.md`](https://github.com/pvkarthikk/tars/blob/main/skills/tars-task/SKILL.md) (Task execution), [`scripts/tars.py`](https://github.com/pvkarthikk/tars/blob/main/scripts/tars.py) (TARS state CLI), [`skills/tars-rework/SKILL.md`](https://github.com/pvkarthikk/tars/blob/main/skills/tars-rework/SKILL.md) (Rework handling), [`rules/AGENTS.md`](https://github.com/pvkarthikk/tars/blob/main/rules/AGENTS.md) (Canonical agent rules)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Task workflow"]
  node_task["Task execution<br/>[SKILL.md]"]
  node_rework["Rework handling<br/>[SKILL.md]"]
  node_accept["Task closure<br/>[SKILL.md]"]
  node_resume["Task resumption<br/>[SKILL.md]"]
end

subgraph group_memory["Memory and patterns"]
  node_learn["Rule capture<br/>[SKILL.md]"]
  node_learning[("Personal learning store<br/>[tars.py]")]
  node_patterns["Workflow pattern mining<br/>[tars.py]"]
end

subgraph group_integration["Harness integration"]
  node_rules["Canonical agent rules<br/>[AGENTS.md]"]
  node_agent["TARS agent<br/>[tars.md]"]
  node_copilotagent["Copilot agent pointer<br/>[tars.agent.md]"]
  node_copilotrules["Copilot rules pointer"]
  node_plugin["Harness manifests<br/>[plugin.json]"]
  node_antigravity(("Antigravity"))
  node_copilot(("GitHub Copilot"))
  node_claude(("Claude Code"))
end

subgraph group_state["Local task state"]
  node_helper["TARS state CLI<br/>[tars.py]"]
  node_taskstate[("Scratchpad tasks<br/>[tars.py]")]
  node_outcomes[("Archived outcomes<br/>[tars.py]")]
end

node_user(("Developer"))
node_project[("Working repository")]
node_git["Git"]

node_user -->|"invokes"| node_task
node_user -->|"invokes"| node_rework
node_user -->|"invokes"| node_accept
node_user -->|"invokes"| node_resume
node_user -->|"invokes"| node_learn
node_task -->|"uses commands"| node_helper
node_rework -->|"routes extensions"| node_task
node_rework -->|"records learning"| node_helper
node_accept -->|"archives outcome"| node_outcomes
node_resume -->|"lists and switches"| node_taskstate
node_learn -->|"records rules"| node_helper
node_task -->|"checks patterns"| node_patterns
node_patterns -->|"mines accepted outcomes"| node_outcomes
node_helper -->|"manages task state"| node_taskstate
node_helper -->|"scores and indexes"| node_learning
node_task -->|"edits and validates"| node_project
node_task -->|"checks working tree"| node_git
node_antigravity -->|"loads"| node_plugin
node_copilot -->|"loads"| node_plugin
node_claude -->|"loads"| node_plugin
node_agent -->|"points to"| node_rules
node_copilotagent -->|"points to"| node_rules
node_copilotrules -->|"points to"| node_rules

click node_task "https://github.com/pvkarthikk/tars/blob/main/skills/tars-task/SKILL.md"
click node_rework "https://github.com/pvkarthikk/tars/blob/main/skills/tars-rework/SKILL.md"
click node_accept "https://github.com/pvkarthikk/tars/blob/main/skills/tars-accept/SKILL.md"
click node_resume "https://github.com/pvkarthikk/tars/blob/main/skills/tars-resume/SKILL.md"
click node_learn "https://github.com/pvkarthikk/tars/blob/main/skills/tars-learn/SKILL.md"
click node_helper "https://github.com/pvkarthikk/tars/blob/main/scripts/tars.py"
click node_taskstate "https://github.com/pvkarthikk/tars/blob/main/scripts/tars.py"
click node_outcomes "https://github.com/pvkarthikk/tars/blob/main/scripts/tars.py"
click node_learning "https://github.com/pvkarthikk/tars/blob/main/scripts/tars.py"
click node_patterns "https://github.com/pvkarthikk/tars/blob/main/scripts/tars.py"
click node_rules "https://github.com/pvkarthikk/tars/blob/main/rules/AGENTS.md"
click node_agent "https://github.com/pvkarthikk/tars/blob/main/agents/tars.md"
click node_copilotagent "https://github.com/pvkarthikk/tars/blob/main/com.github.copilot/agents/tars.agent.md"
click node_copilotrules "https://github.com/pvkarthikk/tars/blob/main/com.github.copilot/rules/tars.instructions.md"
click node_plugin "https://github.com/pvkarthikk/tars/blob/main/plugin.json"

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,node_rework,node_accept,node_resume toneBlue
class node_learn,node_learning,node_patterns,node_project toneAmber
class node_rules,node_agent,node_copilotagent,node_copilotrules,node_plugin,node_antigravity,node_copilot,node_claude toneMint
class node_helper,node_taskstate,node_outcomes toneRose
class node_user,node_git toneIndigo
```

## Components

### Task workflow

- [Task execution](https://github.com/pvkarthikk/tars/blob/main/skills/tars-task/SKILL.md): `skills/tars-task/SKILL.md`
- [Rework handling](https://github.com/pvkarthikk/tars/blob/main/skills/tars-rework/SKILL.md): `skills/tars-rework/SKILL.md`
- [Task closure](https://github.com/pvkarthikk/tars/blob/main/skills/tars-accept/SKILL.md): `skills/tars-accept/SKILL.md`
- [Task resumption](https://github.com/pvkarthikk/tars/blob/main/skills/tars-resume/SKILL.md): `skills/tars-resume/SKILL.md`

### Memory and patterns

- [Rule capture](https://github.com/pvkarthikk/tars/blob/main/skills/tars-learn/SKILL.md): `skills/tars-learn/SKILL.md`
- [Personal learning store](https://github.com/pvkarthikk/tars/blob/main/scripts/tars.py): `scripts/tars.py`
- [Workflow pattern mining](https://github.com/pvkarthikk/tars/blob/main/scripts/tars.py): `scripts/tars.py`

### Harness integration

- [Canonical agent rules](https://github.com/pvkarthikk/tars/blob/main/rules/AGENTS.md): `rules/AGENTS.md`
- [TARS agent](https://github.com/pvkarthikk/tars/blob/main/agents/tars.md): `agents/tars.md`
- [Copilot agent pointer](https://github.com/pvkarthikk/tars/blob/main/com.github.copilot/agents/tars.agent.md): `com.github.copilot/agents/tars.agent.md`
- [Copilot rules pointer](https://github.com/pvkarthikk/tars/blob/main/com.github.copilot/rules/tars.instructions.md): `com.github.copilot/rules/tars.instructions.md`
- [Harness manifests](https://github.com/pvkarthikk/tars/blob/main/plugin.json): `plugin.json`
- **Antigravity**
- **GitHub Copilot**
- **Claude Code**

### Local task state

- [TARS state CLI](https://github.com/pvkarthikk/tars/blob/main/scripts/tars.py): `scripts/tars.py`
- [Scratchpad tasks](https://github.com/pvkarthikk/tars/blob/main/scripts/tars.py): `scripts/tars.py`
- [Archived outcomes](https://github.com/pvkarthikk/tars/blob/main/scripts/tars.py): `scripts/tars.py`

### Other components

- **Developer**
- **Working repository**
- **Git**

## Connections

- Developer → Task execution: invokes (evidence: `README.md`)
- Developer → Rework handling: invokes (evidence: `README.md`)
- Developer → Task closure: invokes (evidence: `README.md`)
- Developer → Task resumption: invokes (evidence: `README.md`)
- Developer → Rule capture: invokes (evidence: `README.md`)
- Task execution → TARS state CLI: uses commands (evidence: `README.md`)
- Rework handling → Task execution: routes extensions (evidence: `README.md`)
- Rework handling → TARS state CLI: records learning (evidence: `README.md`)
- Task closure → Archived outcomes: archives outcome (evidence: `README.md`)
- Task resumption → Scratchpad tasks: lists and switches (evidence: `README.md`)
- Rule capture → TARS state CLI: records rules (evidence: `README.md`)
- Task execution → Workflow pattern mining: checks patterns (evidence: `README.md`)
- Workflow pattern mining → Archived outcomes: mines accepted outcomes (evidence: `README.md`)
- TARS state CLI → Scratchpad tasks: manages task state (evidence: `scripts/tars.py`)
- TARS state CLI → Personal learning store: scores and indexes (evidence: `scripts/tars.py`)
- Task execution → Working repository: edits and validates (evidence: `README.md`)
- Task execution → Git: checks working tree (evidence: `README.md`)
- Antigravity → Harness manifests: loads (evidence: `README.md`)
- GitHub Copilot → Harness manifests: loads (evidence: `README.md`)
- Claude Code → Harness manifests: loads (evidence: `README.md`)
- TARS agent → Canonical agent rules: points to (evidence: `README.md`)
- Copilot agent pointer → Canonical agent rules: points to (evidence: `README.md`)
- Copilot rules pointer → Canonical agent rules: points to (evidence: `README.md`)
