Frappe Full-Stack Development
Orchestrate multiple specialized agents to build complete features across the full Frappe stack.
Request
$ARGUMENTS
Orchestration Strategy
This command coordinates multiple agents working in parallel for comprehensive feature development.
Phase 1: Understanding & Planning
First, understand the scope:
Analyze the Feature Request
- What data needs to be stored? (DocType design)
- What backend logic is needed? (Controllers, APIs)
- What UI/UX is required? (Form scripts, dialogs)
- Is ERPNext integration needed? (Customizations, hooks)
Create Todo List Use TodoWrite to track:
- [ ] DocType/data model design
- [ ] Backend implementation
- [ ] Frontend implementation
- [ ] Integration/hooks (if needed)
- [ ] Testing
Phase 2: Parallel Agent Invocation
Launch agents in parallel using multiple Task tool calls in a single message.
IMPORTANT: Agent names MUST be fully qualified with plugin prefix:
frappe-fullstack:doctype-architectfrappe-fullstack:frappe-backendfrappe-fullstack:frappe-frontendfrappe-fullstack:erpnext-customizer
┌─────────────────────────────────────────────────────────────┐
│ PARALLEL EXECUTION │
├─────────────────┬─────────────────┬─────────────────────────┤
│ frappe-fullstack│ frappe-fullstack│ frappe-fullstack: │
│ :doctype- │ :frappe-backend │ frappe-frontend │
│ architect │ │ │
│ │ │ │
│ • Design schema │ • Controllers │ • Form scripts │
│ • Field types │ • APIs │ • Dialogs │
│ • Relationships │ • Validation │ • Field handlers │
│ • Permissions │ • Background │ • Custom buttons │
└─────────────────┴─────────────────┴─────────────────────────┘Agent Prompts
DocType Architect Agent
Design the data model for: {feature description}
Requirements:
- Identify all entities/DocTypes needed
- Define fields with appropriate types
- Establish relationships (Link, Table)
- Set up naming conventions
- Define permissions
Output:
- Complete DocType JSON(s)
- Relationship diagram (text)
- Field specificationsBackend Agent
Implement server-side logic for: {feature description}
The DocType structure is: {from architect agent or existing}
Requirements:
- Controller methods (validate, lifecycle hooks)
- Whitelisted APIs for frontend
- Database queries if complex
- Background jobs if long-running
- Email/notification logic
Output:
- Complete Python controller
- API functions
- hooks.py updates if neededFrontend Agent
Implement client-side functionality for: {feature description}
The DocType and APIs are: {from other agents or existing}
Requirements:
- Form script with event handlers
- Custom buttons for actions
- Dialogs for user input
- Field visibility/requirement logic
- frappe.call to backend APIs
Output:
- Complete JavaScript form script
- Any list view customizations
- Dialog implementationsPhase 3: Integration
After parallel agents complete:
Merge Outputs
- Combine all generated code
- Resolve any conflicts
- Ensure API names match between frontend/backend
Add ERPNext Integration (if needed) Spawn
frappe-fullstack:erpnext-customizeragent for:- Custom fields on stock DocTypes
- Hooks configuration
- after_migrate setup (preferred over fixtures)
Create Files Write all files to appropriate locations:
my_app/ └── my_module/ └── doctype/ └── my_doctype/ ├── my_doctype.json # From architect ├── my_doctype.py # From backend ├── my_doctype.js # From frontend └── test_my_doctype.py # Tests
Phase 4: Finalization
- Update hooks.py if needed
- Run Migrationbash
bench --site <site> migrate - Build Assetsbash
bench build --app <app> - Clear Cachebash
bench --site <site> clear-cache
Example Workflows
Example 1: "Create a customer feedback system"
Parallel Agents:
doctype-architect: Designs "Customer Feedback" DocType
- Fields: customer, rating, category, description, status, assigned_to
- Child table for follow-up actions
frappe-backend: Implements
- Validation (rating 1-5)
- Auto-assign based on category
- Email notification on submission
- API to get feedback statistics
frappe-frontend: Creates
- Star rating widget
- Category-based field visibility
- "Resolve" button for assigned user
- Dashboard statistics display
Example 2: "Add approval workflow to purchase requests"
Parallel Agents:
doctype-architect: Modifies/creates
- Approval fields (approved_by, approval_date, rejection_reason)
- Status field with workflow states
frappe-backend: Implements
- Permission checks for approval
- Email to approver on submission
- Budget validation before approval
- API for bulk approval
frappe-frontend: Creates
- Approve/Reject buttons (conditional)
- Rejection reason dialog
- Status indicator colors
- Pending approvals list filter
erpnext-customizer (if extending ERPNext):
- Custom fields on Material Request
- Workflow definition
- Role permissions
Agent Coordination Tips
- Share Context: Pass DocType definitions from architect to other agents
- Consistent Naming: Ensure API method names match between frontend/backend
- Handle Dependencies: Backend APIs must exist before frontend can call them
- Test Incrementally: Verify each layer works before integrating
Tools Available
| Tool | Purpose |
|---|---|
| Task | Spawn specialized agents |
| TodoWrite | Track progress |
| Glob | Find files |
| Grep | Search code |
| Read | Read existing code |
| Write | Create files |
| Edit | Modify files |
| Bash | Run commands |
| AskUserQuestion | Clarify requirements |
Output Checklist
After completion, verify:
- [ ] DocType JSON created/modified
- [ ] Python controller implemented
- [ ] JavaScript form script implemented
- [ ] APIs accessible from frontend
- [ ] hooks.py updated (if needed)
- [ ] Migration successful
- [ ] Assets built
- [ ] Cache cleared
- [ ] Feature tested in browser