droidpartment
v3.2.17
Published
π Multi-agent orchestration for Factory AI with 18 specialized agents, wave execution, learning memory, and zero dependencies. Production-grade autonomous development.
Maintainers
Readme
π― Why Droidpartment?
Unlike generic AI coding assistants, Droidpartment provides structured, battle-tested workflows powered by specialized agents who understand software development. Each agent has deep domain expertiseβfrom architecture to security to testingβworking together seamlessly.
| Problem | Without Droidpartment | With Droidpartment | |---------|----------------------|-------------------| | Task Planning | AI jumps straight to coding | Automatic PRD β Architecture β Stories breakdown | | Quality | Hope it works | Parallel audits: Security + QA + Code Review | | Memory | Forgets everything | Learns from every session, remembers mistakes | | Workflow | Chaotic, unpredictable | Wave execution with [P]/[S] markers | | Context | Gets lost in long sessions | Automatic handoffs between agents |
β¨ Key Benefits
- Wave Execution - Tasks grouped into waves for optimal parallel/sequential execution
- Document Artifacts - Automatic PRD.md β ARCHITECTURE.md β STORIES.md flow
- Learning Memory - Captures lessons, patterns, and mistakes across sessions
- Zero Config - Just install and describe your task
- 18 Specialists - Each agent has deep expertise in one domain
π Quick Start
Get Started in 3 Steps
# 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
Zero External Dependencies β
These Python modules have no external dependencies - they work with Python 3.6+.
How They Work Together
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 workflowResult: 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:
Zero Configuration Required
After npm install droidpartment, hooks register automatically. No manual setup needed.
Four Automatic Hooks
| 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 |
Benefits
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)
How It Works
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 efficiencyHooks Location
After installation, hooks are located at:
- Personal:
~/.factory/memory/hooks/ - Project:
./.factory/memory/hooks/
Registered automatically in ~/.factory/settings.json
Troubleshooting
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 β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ¨ Key Features
- π― 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
# Install globally
npm install -g droidpartment
droidpartment
# Or one-time with npx
npx droidpartmentAfter install:
- Open Factory AI settings:
/settings - Go to Experimental β Enable Custom Droids
- 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.
v3.2.0: Strict Enforcement Rules
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)Task Classification
| 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 |
The Rules
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)Self-Verification (v3.2.0)
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
π§ Memory & Output
| Agent | Role |
|-------|------|
| dpt-memory | Learning system (START/END) |
| dpt-output | Format results + stats |
π Planning
| Agent | Role |
|-------|------|
| dpt-product | Requirements, user stories |
| dpt-research | Best practices (official docs) |
| dpt-arch | Architecture, ADRs |
| dpt-scrum | Task breakdown |
π» Implementation
| Agent | Role |
|-------|------|
| dpt-dev | ALL code implementation |
| dpt-data | Database, queries |
| dpt-api | API design (REST) |
| dpt-ux | UI/UX, accessibility |
β Quality (Can Run Parallel!)
| Agent | Role |
|-------|------|
| dpt-sec | Security (OWASP, CWE) |
| dpt-lead | Code review (SOLID) |
| dpt-qa | Testing (pyramid) |
| dpt-review | Simplicity (YAGNI) |
| dpt-perf | Performance |
π§ Support
| Agent | Role |
|-------|------|
| dpt-ops | DevOps, CI/CD |
| dpt-docs | Documentation |
| dpt-grammar | Text clarity |
π Example Flows
Bug Fix Flow
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" LASTFeature Flow
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" LASTAudit Flow
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 knowledgeLearning Metrics
| Status | Meaning | |--------|---------| | π Improving | Prevented > New mistakes | | β‘οΈ Stable | Prevented = New mistakes | | β οΈ Needs Attention | Prevented < New mistakes |
Every Task Ends With:
MEMORY STATUS:
Project: MyProject
Lessons: 15 (+2)
Mistakes: 8 (+1)
Prevented: 12
Learning: π Improvingπ How Agents Are Called
Use Task tool (NOT Skill tool!):
Task(
subagent_type: "dpt-dev",
description: "Implement feature",
prompt: "Implement [requirement] in [file]. Follow existing patterns."
)Parallel (Independent)
// These can run at the same time!
Task(subagent_type: "dpt-sec", ...)
Task(subagent_type: "dpt-lead", ...)
Task(subagent_type: "dpt-qa", ...)Sequential (Must Wait)
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
Main Commands
| 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 |
Options
| 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 |
Examples
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:
Quick References
- Agent Efficiency Protocol - How all 18 agents use Python infrastructure
- Memory System Guide - Understand lessons and patterns
- Workflow Examples - See real task flows
Agent Templates
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-grammarAll templates support:
- β Plan system integration
- β Python infrastructure (cache_manager, memory_system, handoff_protocol)
- β PDCA hooks (Plan-Do-Check-Act)
- β Cross-agent communication
Python Infrastructure
Location: ~/.factory/droids/python/
Three Core Modules:
cache_manager.py - Environment caching
from cache_manager import get_agent_context, get_environment_info context = get_agent_context("dpt-dev") env = get_environment_info()memory_system.py - Cross-agent results storage
from memory_system import store_in_session, get_from_session store_in_session("dpt-dev", "results", {"status": "done"})handoff_protocol.py - Agent coordination
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.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing) - Open a Pull Request
π License
MIT Β© 2025 Nasri
