# titanwings/distilly architecture

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

- Interactive diagram: https://gitdiagram.com/titanwings/distilly
- Repository: https://github.com/titanwings/distilly

## Overview

Distilly is an Agent Skill that turns source material into a source-grounded Person Profile, packaged for reuse as another Agent Skill. The principal flow is material intake, family-specific collection and analysis, profile drafting and validation, then installation into an agent host. The graph includes documented family and research capabilities as well as sampled parsers, collectors, and installer entry points. Some creator orchestration is defined in SKILL.md and prompts rather than sampled executable source, so uncertain internal call links are omitted.

Main entry points: [`SKILL.md`](https://github.com/titanwings/distilly/blob/dot-skill/SKILL.md) (Distilly workflow), [`prompts`](https://github.com/titanwings/distilly/tree/dot-skill/prompts) (Family prompt sets), [`tools/research`](https://github.com/titanwings/distilly/tree/dot-skill/tools/research) (Celebrity research tools), [`tools/skill_writer.py`](https://github.com/titanwings/distilly/blob/dot-skill/tools/skill_writer.py) (Profile writer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_creator["Profile creation"]
  node_distilly["Distilly workflow<br/>[SKILL.md]"]
  node_family_prompts["Family prompt sets"]
  node_intake["Intake and correction"]
  node_colleague["Colleague profile"]
  node_relationship["Relationship profile"]
  node_celebrity["Celebrity profile"]
end

subgraph group_sources["Source collection"]
  node_collectors["Platform collectors"]
  node_mail_parser["Email parser<br/>[email_parser.py]"]
  node_feishu_parser["Feishu parser<br/>[feishu_parser.py]"]
  node_feishu_mcp["Feishu MCP client"]
end

subgraph group_research["Research and analysis"]
  node_research_tools["Celebrity research tools"]
  node_research_merge["Research merger<br/>[merge_research.py]"]
  node_quality_check["Profile quality check<br/>[quality_check.py]"]
end

subgraph group_delivery["Skill packaging"]
  node_profile_writer["Profile writer<br/>[skill_writer.py]"]
  node_skill_schema["Skill schema<br/>[skill_schema.py]"]
  node_generated_skill["Generated Person Skill"]
  node_installer["Host installer<br/>[distilly.mjs]"]
end

node_person(("Profile subject"))
node_user(("Profile creator"))
node_materials["Source materials"]
node_agent_host(("Agent host"))
node_feishu(("Feishu service"))
node_xquik(("Xquik service"))

node_user -->|"starts workflow"| node_distilly
node_person -->|"selects subject"| node_distilly
node_user -->|"provides sources"| node_materials
node_materials -->|"informs profile"| node_distilly
node_distilly -->|"guides intake"| node_intake
node_distilly -->|"selects family"| node_family_prompts
node_family_prompts -->|"includes"| node_colleague
node_family_prompts -->|"includes"| node_relationship
node_family_prompts -->|"includes"| node_celebrity
node_distilly -->|"supports collection"| node_collectors
node_distilly -->|"supports extraction"| node_mail_parser
node_distilly -->|"supports extraction"| node_feishu_parser
node_distilly -->|"supports collection"| node_feishu_mcp
node_collectors -.->|"retrieves sources"| node_feishu
node_feishu_mcp -.->|"calls tools"| node_feishu
node_distilly -->|"supports research"| node_research_tools
node_research_tools -.->|"fetches posts"| node_xquik
node_research_tools -->|"merges findings"| node_research_merge
node_research_merge -->|"supplies metrics"| node_quality_check
node_distilly -->|"writes profile"| node_profile_writer
node_profile_writer -->|"uses schema"| node_skill_schema
node_profile_writer -->|"produces skill"| node_generated_skill
node_installer -->|"installs creator skill"| node_generated_skill
node_generated_skill -->|"invoked by"| node_agent_host

click node_distilly "https://github.com/titanwings/distilly/blob/dot-skill/SKILL.md"
click node_family_prompts "https://github.com/titanwings/distilly/tree/dot-skill/prompts"
click node_intake "https://github.com/titanwings/distilly/tree/dot-skill/prompts"
click node_colleague "https://github.com/titanwings/distilly/tree/dot-skill/prompts"
click node_relationship "https://github.com/titanwings/distilly/tree/dot-skill/prompts/relationship"
click node_celebrity "https://github.com/titanwings/distilly/tree/dot-skill/prompts/celebrity"
click node_collectors "https://github.com/titanwings/distilly/tree/dot-skill/tools"
click node_mail_parser "https://github.com/titanwings/distilly/blob/dot-skill/tools/email_parser.py"
click node_feishu_parser "https://github.com/titanwings/distilly/blob/dot-skill/tools/feishu_parser.py"
click node_feishu_mcp "https://github.com/titanwings/distilly/blob/dot-skill/tools/feishu_mcp_client.py"
click node_research_tools "https://github.com/titanwings/distilly/tree/dot-skill/tools/research"
click node_research_merge "https://github.com/titanwings/distilly/blob/dot-skill/tools/research/merge_research.py"
click node_quality_check "https://github.com/titanwings/distilly/blob/dot-skill/tools/research/quality_check.py"
click node_profile_writer "https://github.com/titanwings/distilly/blob/dot-skill/tools/skill_writer.py"
click node_skill_schema "https://github.com/titanwings/distilly/blob/dot-skill/tools/skill_schema.py"
click node_installer "https://github.com/titanwings/distilly/blob/dot-skill/bin/distilly.mjs"

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_distilly,node_family_prompts,node_intake,node_colleague,node_relationship,node_celebrity toneBlue
class node_collectors,node_mail_parser,node_feishu_parser,node_feishu_mcp toneAmber
class node_research_tools,node_research_merge,node_quality_check toneMint
class node_profile_writer,node_skill_schema,node_generated_skill,node_installer toneRose
class node_person,node_user,node_materials,node_agent_host,node_feishu,node_xquik toneIndigo
```

## Components

### Profile creation

- [Distilly workflow](https://github.com/titanwings/distilly/blob/dot-skill/SKILL.md): `SKILL.md`
- [Family prompt sets](https://github.com/titanwings/distilly/tree/dot-skill/prompts): `prompts`
- [Intake and correction](https://github.com/titanwings/distilly/tree/dot-skill/prompts): `prompts`
- [Colleague profile](https://github.com/titanwings/distilly/tree/dot-skill/prompts): `prompts`
- [Relationship profile](https://github.com/titanwings/distilly/tree/dot-skill/prompts/relationship): `prompts/relationship`
- [Celebrity profile](https://github.com/titanwings/distilly/tree/dot-skill/prompts/celebrity): `prompts/celebrity`

### Source collection

- [Platform collectors](https://github.com/titanwings/distilly/tree/dot-skill/tools): `tools`
- [Email parser](https://github.com/titanwings/distilly/blob/dot-skill/tools/email_parser.py): `tools/email_parser.py`
- [Feishu parser](https://github.com/titanwings/distilly/blob/dot-skill/tools/feishu_parser.py): `tools/feishu_parser.py`
- [Feishu MCP client](https://github.com/titanwings/distilly/blob/dot-skill/tools/feishu_mcp_client.py): `tools/feishu_mcp_client.py`

### Research and analysis

- [Celebrity research tools](https://github.com/titanwings/distilly/tree/dot-skill/tools/research): `tools/research`
- [Research merger](https://github.com/titanwings/distilly/blob/dot-skill/tools/research/merge_research.py): `tools/research/merge_research.py`
- [Profile quality check](https://github.com/titanwings/distilly/blob/dot-skill/tools/research/quality_check.py): `tools/research/quality_check.py`

### Skill packaging

- [Profile writer](https://github.com/titanwings/distilly/blob/dot-skill/tools/skill_writer.py): `tools/skill_writer.py`
- [Skill schema](https://github.com/titanwings/distilly/blob/dot-skill/tools/skill_schema.py): `tools/skill_schema.py`
- **Generated Person Skill**
- [Host installer](https://github.com/titanwings/distilly/blob/dot-skill/bin/distilly.mjs): `bin/distilly.mjs`

### Other components

- **Profile subject**
- **Profile creator**
- **Source materials**
- **Agent host**
- **Feishu service**
- **Xquik service**

## Connections

- Profile creator → Distilly workflow: starts workflow
- Profile subject → Distilly workflow: selects subject
- Profile creator → Source materials: provides sources
- Source materials → Distilly workflow: informs profile
- Distilly workflow → Intake and correction: guides intake
- Distilly workflow → Family prompt sets: selects family
- Family prompt sets → Colleague profile: includes
- Family prompt sets → Relationship profile: includes
- Family prompt sets → Celebrity profile: includes
- Distilly workflow → Platform collectors: supports collection
- Distilly workflow → Email parser: supports extraction
- Distilly workflow → Feishu parser: supports extraction
- Distilly workflow → Feishu MCP client: supports collection
- Platform collectors → Feishu service: retrieves sources
- Feishu MCP client → Feishu service: calls tools
- Distilly workflow → Celebrity research tools: supports research
- Celebrity research tools → Xquik service: fetches posts
- Celebrity research tools → Research merger: merges findings
- Research merger → Profile quality check: supplies metrics
- Distilly workflow → Profile writer: writes profile
- Profile writer → Skill schema: uses schema
- Profile writer → Generated Person Skill: produces skill
- Host installer → Generated Person Skill: installs creator skill
- Generated Person Skill → Agent host: invoked by
