How bytedance/deer-flow is laid out, and where to start for common changes.
A
Architecture grade
score 99/100
0
Import cycles
lower is better
400
Files mapped
50 imports between them
98%
Layering
of imports point one way
From the map of which files import which. It shows what depends on what, not a reading order.
Module map
Shade byless more
9 modules, 3 links. A link means one module imports another; thicker lines mean more imports. Links come from 400 of 1,725 source files, so the real counts are higher. Select a module to trace it: blue lines go to what it uses, orange lines come from what uses it.
ModuleFilesUsed byUsesCommits, 90 daysRole
lead_agent31055Foundation
factory1107Foundation
features1100Foundation
memory410062Standalone
__init__1031Entry or leaf
assembly_descriptor1006Standalone
goal_state1002Standalone
human_input1001Standalone
interaction_policy1002Standalone
Where to start reading
Repository root
Repository root
Likely public API
Likely public API
Likely start-up file
Likely start-up file
Suggested starting pointAI
Suggested starting pointAI
Find files for a task
AI
Add a New Skill
Create skill directory under skills/public/ with SKILL.md metadata file following the pattern in skills/public/bootstrap/SKILL.md
Define skill templates and references in skills/public/your-skill/templates/ and skills/public/your-skill/references/
Implement skill capability handlers in extension package following agent_runs.py and assembly.py patterns
Add skill schema contract to contracts/ following skill_review/package_snapshot.v1.schema.json structure
Add a New Message Channel Integration
Extend backend/app/channels/base.py abstract base class with new channel implementation
Implement channel-specific logic following buzz.py pattern for event handling and serialization
Register allowed users/permissions in allowed_users.py for access control
Add channel configuration to deploy/helm/deer-flow/templates/configmap-config.yaml
Add a Custom Extension Plugin
Create plugin module in backend/packages/extension-api/deerflow_extension_api/ implementing extension interfaces
Reference demo_extensions.py for patterns on hooking into agent_runs, auth, and compaction lifecycles
Register plugin in assembly.py dependency injection configuration
Run backend extension tests via backend/Makefile targets to validate integration
Change the public API
Trace runtime behavior
Add or update tests
Change build or automation
RepoPilot lists up to 500 files, so a file missing here may still exist.
Files marked “likely” are guessed from their names.
Code quality and hotspots
Largest source files
Branch points72 per file on average
Code issues0 errors, 57 warnings
Largest file4,064 lines
Hotspot load10 high-risk files
Static checks on the 15 largest source files.
Tests, CI and tooling
CIGitHub Actions19 workflows
Tests1,759 test filesPytest · 1.0 test files per source file (file count, not coverage)
Dependency updatesNo config detected
CI pass rate30%last 50 runs
First reply on issues3 hoursmedian of 10 recently closed issues, bots excluded
Test folders: backend/tests/blocking_io · backend/tests