# dretech-ai/dretech-agents architecture

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

- Interactive diagram: https://gitdiagram.com/dretech-ai/dretech-agents
- Repository: https://github.com/dretech-ai/dretech-agents

## Overview

dretech-agents distributes a portfolio-advisor agent as either a standalone skill or a plugin for Claude and Codex. The principal workflow is a user providing portfolio statements for review; the advisor assesses allocation drift, tax opportunities, concentration risk, and retirement trajectory, while keeping memory in local Markdown and excluding account numbers from files it writes. The README documents the plugin’s skill, commands, and hooks, but no source excerpts were provided, so internal calls and command or hook behavior are not inferred.

Main entry points: [`skills/portfolio-advisor/SKILL.md`](https://github.com/dretech-ai/dretech-agents/blob/main/skills/portfolio-advisor/SKILL.md) (Advisor skill), [`plugins/portfolio-advisor`](https://github.com/dretech-ai/dretech-agents/tree/main/plugins/portfolio-advisor) (Plugin package), [`skills/portfolio-advisor`](https://github.com/dretech-ai/dretech-agents/tree/main/skills/portfolio-advisor) (Standalone skill), [`skills/portfolio-advisor/templates`](https://github.com/dretech-ai/dretech-agents/tree/main/skills/portfolio-advisor/templates) (Markdown templates)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_advisor["Portfolio advisor"]
  node_skill["Advisor skill<br/>[SKILL.md]"]
  node_analysis["Portfolio review<br/>[SKILL.md]"]
  node_memory["Markdown templates"]
end

subgraph group_delivery["Agent packaging"]
  node_standalone["Standalone skill"]
  node_plugin["Plugin package"]
  node_commands["Slash commands"]
  node_hooks["Plugin hooks"]
end

node_user(("Portfolio owner"))

node_user -->|"provides statements"| node_skill
node_skill -->|"reviews portfolio"| node_analysis
node_skill -->|"keeps memory in"| node_memory
node_standalone -->|"packages skill"| node_skill
node_plugin -->|"includes skill"| node_skill
node_plugin -->|"includes commands"| node_commands
node_plugin -->|"includes hooks"| node_hooks

click node_skill "https://github.com/dretech-ai/dretech-agents/blob/main/skills/portfolio-advisor/SKILL.md"
click node_analysis "https://github.com/dretech-ai/dretech-agents/blob/main/skills/portfolio-advisor/SKILL.md"
click node_memory "https://github.com/dretech-ai/dretech-agents/tree/main/skills/portfolio-advisor/templates"
click node_standalone "https://github.com/dretech-ai/dretech-agents/tree/main/skills/portfolio-advisor"
click node_plugin "https://github.com/dretech-ai/dretech-agents/tree/main/plugins/portfolio-advisor"
click node_commands "https://github.com/dretech-ai/dretech-agents/tree/main/plugins/portfolio-advisor/commands"
click node_hooks "https://github.com/dretech-ai/dretech-agents/tree/main/plugins/portfolio-advisor/hooks"

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_skill,node_analysis,node_memory toneBlue
class node_standalone,node_plugin,node_commands,node_hooks toneAmber
class node_user toneIndigo
```

## Components

### Portfolio advisor

- [Advisor skill](https://github.com/dretech-ai/dretech-agents/blob/main/skills/portfolio-advisor/SKILL.md): `skills/portfolio-advisor/SKILL.md`
- [Portfolio review](https://github.com/dretech-ai/dretech-agents/blob/main/skills/portfolio-advisor/SKILL.md): `skills/portfolio-advisor/SKILL.md`
- [Markdown templates](https://github.com/dretech-ai/dretech-agents/tree/main/skills/portfolio-advisor/templates): `skills/portfolio-advisor/templates`

### Agent packaging

- [Standalone skill](https://github.com/dretech-ai/dretech-agents/tree/main/skills/portfolio-advisor): `skills/portfolio-advisor`
- [Plugin package](https://github.com/dretech-ai/dretech-agents/tree/main/plugins/portfolio-advisor): `plugins/portfolio-advisor`
- [Slash commands](https://github.com/dretech-ai/dretech-agents/tree/main/plugins/portfolio-advisor/commands): `plugins/portfolio-advisor/commands`
- [Plugin hooks](https://github.com/dretech-ai/dretech-agents/tree/main/plugins/portfolio-advisor/hooks): `plugins/portfolio-advisor/hooks`

### Other components

- **Portfolio owner**

## Connections

- Portfolio owner → Advisor skill: provides statements (evidence: `README.md`)
- Advisor skill → Portfolio review: reviews portfolio (evidence: `README.md`)
- Advisor skill → Markdown templates: keeps memory in (evidence: `README.md`)
- Standalone skill → Advisor skill: packages skill (evidence: `README.md`)
- Plugin package → Advisor skill: includes skill (evidence: `README.md`)
- Plugin package → Slash commands: includes commands (evidence: `README.md`)
- Plugin package → Plugin hooks: includes hooks (evidence: `README.md`)
