π Multi-agent orchestration for Factory AI with 18 specialized agents, wave execution, learning memory, and zero dependencies. Production-grade autonomous development.
npm install droidpartment
____ ____ ___ ___ ____ ____ _ ____ _____ __ __ _____ _ _ _____
| _ \| _ \ / _ \|_ _| _ \| _ \ / \ | _ \_ _| \/ | ____| \ | |_ _|
| | | | |_) | | | || || | | | |_) / _ \ | |_) || | | |\/| | _| | \| | | |
| |_| | _ <| |_| || || |_| | __/ ___ \| _ < | | | | | | |___| |\ | | |
|____/|_| \_\\___/|___|____/|_| /_/ \_\_| \_\|_| |_| |_|_____|_| \_| |_|
18 specialized agents β’ Wave execution β’ Automatic memory β’ Zero dependencies
Quick Start β’
Why Droidpartment β’
The Experts β’
How It Works β’
Commands
bash
1. Install
npx droidpartment install
2. Enable in Factory AI
/settings β Experimental β Custom Droids β
3. Just describe your task!
"Build a user authentication system with JWT"
`
That's it. Droidpartment automatically:
- Detects task complexity
- Creates PRD and architecture
- Breaks down into stories
- Implements with parallel audits
- Captures lessons learned
---
π How It Works
`
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β WAVE EXECUTION FLOW β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β Wave 1 [INIT] β
β ββ [P] dpt-memory(START) β
β ββ [P] dpt-research β
β β β
β Wave 2 [PLAN] β
β ββ [S] dpt-product β PRD.md β
β β β
β Wave 3 [DESIGN] β
β ββ [S] dpt-arch β ARCHITECTURE.md β
β β β
β Wave 4 [BREAKDOWN] β
β ββ [S] dpt-scrum β STORIES.md β
β β β
β Wave 5 [IMPLEMENT] β
β ββ [P] dpt-dev (component 1) β
β ββ [P] dpt-dev (component 2) β
β β β
β Wave 6 [AUDIT] β
β ββ [P] dpt-qa (testing) β
β ββ [P] dpt-sec (security) β
β ββ [P] dpt-lead (code review) β
β β β
β Wave 7 [FINALIZE] β
β ββ [S] dpt-memory(END) β
β ββ [S] dpt-output β
β β
β [P] = Parallel (run simultaneously) β
β [S] = Sequential (wait for previous) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
`
---
π How Droidpartment Compares
| Feature | Droidpartment | Generic AI | Other Frameworks |
|---------|---------------|------------|------------------|
| Specialized Agents | 18 experts | 1 generalist | Varies |
| Learning Memory | β
Automatic | β None | β οΈ Manual |
| Wave Execution | β
Built-in | β No | β οΈ Some |
| Document Artifacts | β
PRD/Arch/Stories | β No | β οΈ Some |
| Parallel Audits | β
QA+Sec+Review | β No | β οΈ Manual |
| Feedback Loops | β
Auto-revision | β No | β οΈ Manual |
| Dependencies | 0 | Varies | Many |
| Platform | Factory AI | Any | Varies |
---
π Python Backend Infrastructure
v3.2.0 introduces Python-powered efficiency to all agents
Droidpartment includes Python modules that eliminate duplicate work:
- context_index.py - Project structure caching and file targeting
- shared_context.py - Agent output storage and parallel handoffs
- workflow_state.py - Wave execution and topology management
$3
These Python modules have no external dependencies - they work with Python 3.6+.
$3
`
Agent 1 β cache_manager β Gets environment without re-discovery
β
memory_system β Stores results in session
β
handoff_protocol β Prepares optimized handoff
β
Agent 2 β memory_system β Retrieves Agent 1's results
β
cache_manager β Uses same cached environment
β
Continues workflow
`
Result: Each task eliminates redundant discovery work and reduces token usage by 20-40%.
---
πͺ Automatic Factory Hooks
v3.2.0 introduces automatic Factory hooks that trigger at key lifecycle points:
$3
After npm install droidpartment, hooks register automatically. No manual setup needed.
$3
| Hook | Triggers | What It Does |
|------|----------|-------------|
| SessionStart | Session begins | Loads cache + initializes memory ONCE (shared by all 18 agents) |
| SubagentStop | Agent completes | Transfers context automatically to next agent |
| PostToolUse | After each tool | Tracks progress and updates memory in real-time |
| SessionEnd | Session ends | Saves statistics + archives learning + cleanup |
$3
Before Hooks:
- 18 agents each discover environment independently (180+ seconds wasted)
- Manual memory management required (dpt-memory END calls)
- No automatic progress tracking
- 1,080-1,440 tokens wasted per session on duplicate discovery
After Hooks (v3.2.0):
- Environment discovered ONCE, shared by all 18 agents (10 seconds total)
- Memory management 100% automatic
- Real-time progress tracking
- 1,080-1,440 tokens saved per session (70-100% efficiency gain)
$3
`
USER REQUEST
β
[SessionStart Hook] β Automatic
ββ Load cache (once)
ββ Init memory
dpt-memory β dpt-dev β dpt-qa β All use shared cache
β β
[SubagentStop] [PostToolUse] β Automatic
[SessionEnd Hook] β Automatic
ββ Save + cleanup
Result: Zero manual intervention, maximum efficiency
`
$3
After installation, hooks are located at:
- Personal: ~/.factory/memory/hooks/
- Project: ./.factory/memory/hooks/
Registered automatically in ~/.factory/settings.json
$3
If hooks don't execute:
- Verify Python 3 installed: python3 --version
- Check hook registration: cat ~/.factory/settings.json | grep hooks
- Re-run installer: npx droidpartment --update
---
π§ What Is This?
Droidpartment is a team of 18 specialized AI agents for Factory AI that work together like a real software development department. The main droid delegates to experts instead of doing everything itself.
`
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β YOU: "fix the bug in auth" β
β β
β MAIN DROID: (follows mandatory workflow) β
β 1. dpt-memory β "START - bug fix for auth" β
β 2. dpt-dev β Implements the fix β
β 3. dpt-qa β Tests the fix β
β 4. dpt-memory β "END - captures lessons" β
β 5. dpt-output β Formats results with stats β
β β
β MEMORY: Lessons: 12 (+3) | Mistakes Prevented: 5 β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
`
$3
- π― Expert Specialists - Each agent masters one domain
- π§ Memory System - Learns from every task, prevents repeated mistakes
- β‘ Parallel Execution - Run independent audits simultaneously
- π Learning Curve - Gets smarter with every session
- π PDCA Cycle - Plan-Do-Check-Act methodology built-in
- β
Strict Enforcement - Main droid FORBIDDEN from coding directly
- πͺ Factory Hooks - Automatic memory management at lifecycle points
---
π Quick Start
`bash
Install globally
npm install -g droidpartment
droidpartment
Or one-time with npx
npx droidpartment
`
After install:
1. Open Factory AI settings: /settings
2. Go to Experimental β Enable Custom Droids
3. Restart CLI
That's it! Hooks register automatically - memory management, context sharing, and progress tracking work out-of-the-box.
---
β οΈ Mandatory Workflow (STRICT ENFORCEMENT)
The main droid MUST use custom droids. It is FORBIDDEN from coding directly.
$3
`
FORBIDDEN ACTIONS:
β NEVER use Edit/Create for code without calling dpt-dev FIRST
β NEVER use TodoWrite without calling dpt-scrum FIRST (3+ steps)
β NEVER start ANY task without dpt-memory START
β NEVER complete ANY task without dpt-memory END
β NEVER respond without dpt-output (multi-step tasks)
`
$3
| User Request Contains | Task Type | Required Flow |
|----------------------|-----------|---------------|
| "audit", "review", "check" | AUDIT | memory β sec+lead+qa+perf β memory β output |
| "fix", "bug", "error" | BUG_FIX | memory β dev β qa β memory β output |
| "add", "create", "build" | FEATURE | memory β product β arch β scrum β dev β qa β sec β memory β output |
| "update", "change" | IMPLEMENTATION | memory β scrum β dev β lead β qa β memory β output |
$3
`
RULE 1: ALWAYS start with dpt-memory
RULE 2: Classify task β follow REQUIRED flow
RULE 3: NEVER code directly β use dpt-dev
RULE 4: NEVER skip steps
RULE 5: Memory END β then Output (sequential)
`
$3
Before every action, main droid must ask:
`
"CHECKPOINT: Am I following the droid workflow?"
"CHECKPOINT: Did dpt-dev provide this code, or am I writing it myself?"
`
---
π₯ The Experts
$3
| Agent | Role |
|-------|------|
| dpt-memory | Learning system (START/END) |
| dpt-output | Format results + stats |
$3
| Agent | Role |
|-------|------|
| dpt-product | Requirements, user stories |
| dpt-research | Best practices (official docs) |
| dpt-arch | Architecture, ADRs |
| dpt-scrum | Task breakdown |
$3
| Agent | Role |
|-------|------|
| dpt-dev | ALL code implementation |
| dpt-data | Database, queries |
| dpt-api | API design (REST) |
| dpt-ux | UI/UX, accessibility |
$3
| Agent | Role |
|-------|------|
| dpt-sec | Security (OWASP, CWE) |
| dpt-lead | Code review (SOLID) |
| dpt-qa | Testing (pyramid) |
| dpt-review | Simplicity (YAGNI) |
| dpt-perf | Performance |
$3
| Agent | Role |
|-------|------|
| dpt-ops | DevOps, CI/CD |
| dpt-docs | Documentation |
| dpt-grammar | Text clarity |
---
π Example Flows
$3
`
1. dpt-memory β "START - bug fix for [issue]" WAIT
2. dpt-dev β "Fix the bug in [file]" WAIT
3. dpt-qa β "Test the fix" WAIT
4. dpt-memory β "END - bug fixed, lessons..." WAIT
5. dpt-output β "Format results" LAST
`
$3
`
1. dpt-memory β "START - new feature [name]" WAIT
2. dpt-product β "Define requirements" WAIT
3. dpt-arch β "Design architecture" WAIT
4. dpt-scrum β "Break down tasks" WAIT
5. dpt-dev β "Implement feature" WAIT
6. dpt-qa β "Test feature" PARALLEL
7. dpt-sec β "Security check" PARALLEL
8. dpt-memory β "END - feature complete" WAIT
9. dpt-output β "Format results" LAST
`
$3
`
1. dpt-memory β "START - audit [project]" WAIT
2. dpt-sec β "Security audit" PARALLEL
3. dpt-lead β "Code review" PARALLEL
4. dpt-qa β "Test coverage" PARALLEL
5. dpt-perf β "Performance check" PARALLEL
6. dpt-memory β "END - audit complete" WAIT
7. dpt-output β "Format results" LAST
`
---
π§ Memory System
Droidpartment learns from every task!
`
~/.factory/memory/
βββ π lessons.yaml β What worked
βββ π― patterns.yaml β Reusable solutions
βββ β οΈ mistakes.yaml β What to avoid (+prevention)
βββ π projects/
βββ {project}/ β Project-specific knowledge
`
$3
| Status | Meaning |
|--------|---------|
| π Improving | Prevented > New mistakes |
| β‘οΈ Stable | Prevented = New mistakes |
| β οΈ Needs Attention | Prevented < New mistakes |
$3
`
MEMORY STATUS:
Project: MyProject
Lessons: 15 (+2)
Mistakes: 8 (+1)
Prevented: 12
Learning: π Improving
`
---
π How Agents Are Called
Use Task tool (NOT Skill tool!):
`javascript
Task(
subagent_type: "dpt-dev",
description: "Implement feature",
prompt: "Implement [requirement] in [file]. Follow existing patterns."
)
`
$3
`javascript
// These can run at the same time!
Task(subagent_type: "dpt-sec", ...)
Task(subagent_type: "dpt-lead", ...)
Task(subagent_type: "dpt-qa", ...)
`
$3
`javascript
Task(subagent_type: "dpt-memory", prompt: "START...") // WAIT
Task(subagent_type: "dpt-dev", ...) // WAIT
Task(subagent_type: "dpt-memory", prompt: "END...") // WAIT
Task(subagent_type: "dpt-output", ...) // LAST
`
---
π οΈ Commands
$3
| Command | Description |
|---------|-------------|
| npx droidpartment | Interactive install/update |
| npx droidpartment install | Install to ~/.factory |
| npx droidpartment update | Update to latest version |
| npx droidpartment reinstall | Fresh install (uninstall + install) |
| npx droidpartment status | Check installation status |
| npx droidpartment memory | Manage/clean memory files |
| npx droidpartment uninstall | Remove completely |
$3
| Option | Description |
|--------|-------------|
| -y, --yes | Auto-confirm all prompts |
| -q, --quiet | Minimal output |
| -v, --verbose | Detailed output |
| --project | Install to ./.factory (project-level) |
| --force | Force operation |
| --dry-run | Preview changes |
| --purge | Delete memory on uninstall |
| --help | Show help |
| --version | Show version |
$3
`bash
npx droidpartment install -y # Quick install
npx droidpartment update # Update to latest
npx droidpartment status # Check status
npx droidpartment install --dry-run # Preview install
npx droidpartment uninstall --purge # Remove + delete memory
`
---
π Install Locations
| Location | Path | Best For |
|----------|------|----------|
| Personal | ~/.factory/ | Works in ALL projects β¨ |
| Project | ./.factory/ | Team sharing via git |
---
π‘ Philosophy
`
ββββββββββββββββββββββββββββββββββββββββββ
β π― DELEGATE > DO IT YOURSELF β
β π¨βπ» EXPERT > GENERALIST β
β β‘ PARALLEL > SEQUENTIAL (when safe) β
β π§ LEARN FROM EVERY MISTAKE β
β π GET SMARTER EVERY RUN β
β β
FOLLOW THE WORKFLOW β
ββββββββββββββββββββββββββββββββββββββββββ
`
---
πΊοΈ Roadmap
- [x] 18 Expert agents
- [x] Memory system with learning
- [x] PDCA task flows
- [x] Parallel execution
- [x] Mandatory workflow enforcement
- [x] v3.2.0: Strict enforcement with FORBIDDEN actions + nested Task guard
- [ ] Web dashboard for memory visualization
- [ ] Cross-project pattern sharing
- [ ] Team memory sync
---
π Learning Resources
Start here to understand how to use Droidpartment:
$3
- Agent Efficiency Protocol - How all 18 agents use Python infrastructure
- Memory System Guide - Understand lessons and patterns
- Workflow Examples - See real task flows
$3
Each agent has a dedicated markdown file explaining:
- How to call the agent
- What tools it uses
- How it integrates with the plan system
- Python module usage for efficiency
18 Agent Templates:
`
Memory & Output: dpt-memory, dpt-output
Planning: dpt-product, dpt-research, dpt-arch, dpt-scrum
Implementation: dpt-dev, dpt-data, dpt-api, dpt-ux
Quality: dpt-sec, dpt-lead, dpt-qa, dpt-review, dpt-perf
Support: dpt-ops, dpt-docs, dpt-grammar
`
All templates support:
- β
Plan system integration
- β
Python infrastructure (cache_manager, memory_system, handoff_protocol)
- β
PDCA hooks (Plan-Do-Check-Act)
- β
Cross-agent communication
$3
Location: ~/.factory/droids/python/
Three Core Modules:
1. cache_manager.py - Environment caching
`python
from cache_manager import get_agent_context, get_environment_info
context = get_agent_context("dpt-dev")
env = get_environment_info()
`
2. memory_system.py - Cross-agent results storage
`python
from memory_system import store_in_session, get_from_session
store_in_session("dpt-dev", "results", {"status": "done"})
`
3. handoff_protocol.py - Agent coordination
`python
from handoff_protocol import prepare_handoff_to
handoff = prepare_handoff_to("dpt-dev", "dpt-qa", results)
`
---
π€ Contributing
Contributions welcome! Please feel free to submit a Pull Request.
1. Fork the repository
2. Create your feature branch (git checkout -b feature/amazing)
3. Commit your changes (git commit -m 'Add amazing feature')
4. Push to the branch (git push origin feature/amazing`)
Made with π€ for the Factory AI community
If this helps you, give it a β!