frappe-builder 1.1.0-dev.17 → 1.1.0-dev.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.fb/state.db
CHANGED
|
Binary file
|
|
@@ -2,13 +2,13 @@ feature_id: po-approval
|
|
|
2
2
|
feature_name: "PO Approval"
|
|
3
3
|
mode: full
|
|
4
4
|
phase: testing
|
|
5
|
-
updated_at: 2026-03-28T11:
|
|
5
|
+
updated_at: 2026-03-28T11:05:52.239Z
|
|
6
6
|
|
|
7
7
|
components:
|
|
8
8
|
- id: final-comp
|
|
9
9
|
sort_order: 0
|
|
10
10
|
status: complete
|
|
11
|
-
completed_at: 2026-03-28T11:
|
|
11
|
+
completed_at: 2026-03-28T11:05:52.239Z
|
|
12
12
|
|
|
13
13
|
progress:
|
|
14
14
|
done: 1
|
package/AGENTS.md
CHANGED
|
@@ -62,214 +62,19 @@ When a developer asks to start a feature in quick mode, follow this exact sequen
|
|
|
62
62
|
|
|
63
63
|
---
|
|
64
64
|
|
|
65
|
-
## Specialist
|
|
66
|
-
|
|
67
|
-
**
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
-
|
|
73
|
-
-
|
|
74
|
-
-
|
|
75
|
-
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
- **Feature:** one-line description
|
|
82
|
-
- **DocTypes:** list of DocTypes involved (existing or new)
|
|
83
|
-
- **Roles:** list of roles and their access level
|
|
84
|
-
- **Flows:** numbered steps of the business process
|
|
85
|
-
- **Acceptance Criteria:** numbered, testable ACs (each must be independently verifiable)
|
|
86
|
-
- **Out of scope:** explicit list of what is NOT included
|
|
87
|
-
|
|
88
|
-
### Constraints
|
|
89
|
-
- Do not design schemas or write code in this phase
|
|
90
|
-
- Ask at most 3 clarifying questions per turn — do not overwhelm
|
|
91
|
-
- Phase is done when `requirements.md` is written and developer confirms scope
|
|
92
|
-
|
|
93
|
-
---
|
|
94
|
-
|
|
95
|
-
## Specialist: frappe-architect (Architecture Phase)
|
|
96
|
-
|
|
97
|
-
**Phase:** architecture
|
|
98
|
-
**Role:** Solution Architect — design the Frappe-native technical solution.
|
|
99
|
-
|
|
100
|
-
### Responsibilities
|
|
101
|
-
- Read `{artifact_dir}/planning-artifacts/requirements.md` before designing anything
|
|
102
|
-
- Design DocType schema: fields, field types, child tables, naming series
|
|
103
|
-
- Define relationships: links, dynamic links, tree structures
|
|
104
|
-
- Plan server-side logic: controllers, hooks, scheduled jobs
|
|
105
|
-
- Specify permission model: roles, DocType permissions, field-level permissions
|
|
106
|
-
|
|
107
|
-
### Output
|
|
108
|
-
Write `{artifact_dir}/planning-artifacts/architecture.md` when design is complete.
|
|
109
|
-
|
|
110
|
-
Structure:
|
|
111
|
-
- **DocTypes:** table of DocType → fields (name, type, required, description)
|
|
112
|
-
- **Relationships:** link/dynamic-link map
|
|
113
|
-
- **Server logic:** list of controllers, hooks, whitelisted methods
|
|
114
|
-
- **Permissions:** table of role → DocType → read/write/create/delete
|
|
115
|
-
- **Decisions:** brief list of key architectural choices and why (Frappe built-in used instead of custom)
|
|
116
|
-
|
|
117
|
-
### Constraints
|
|
118
|
-
- No implementation in this phase — design only
|
|
119
|
-
- Must use Frappe built-ins before any custom solution
|
|
120
|
-
- Phase is done when `architecture.md` is written and covers all DocTypes from requirements
|
|
121
|
-
|
|
122
|
-
---
|
|
123
|
-
|
|
124
|
-
## Specialist: frappe-planner (Planning Phase)
|
|
125
|
-
|
|
126
|
-
**Phase:** planning
|
|
127
|
-
**Role:** Technical Planner — break architecture into ordered, sized implementation components.
|
|
128
|
-
|
|
129
|
-
### Responsibilities
|
|
130
|
-
- Read `{artifact_dir}/planning-artifacts/architecture.md` before planning
|
|
131
|
-
- Decompose architecture into discrete components (DocType, server script, form script, test, etc.)
|
|
132
|
-
- Order components by dependency: schema first, logic second, UI third, tests alongside
|
|
133
|
-
- Identify risks and blockers before implementation starts
|
|
134
|
-
- Call `create_component` for each component — this registers them in state and populates sprint-status.yaml
|
|
135
|
-
|
|
136
|
-
### Output
|
|
137
|
-
Write `{artifact_dir}/planning-artifacts/plan.md` when planning is complete.
|
|
138
|
-
|
|
139
|
-
Structure:
|
|
140
|
-
- **Components:** ordered table of component_id → type → description → depends_on
|
|
141
|
-
- **Risks:** bullet list of blockers or unknowns
|
|
142
|
-
- **Sequence:** numbered implementation order with rationale
|
|
143
|
-
|
|
144
|
-
Also: call `create_component` for every component in the plan. The plan is not done until all components are registered in state.
|
|
145
|
-
|
|
146
|
-
### Constraints
|
|
147
|
-
- No code in this phase
|
|
148
|
-
- Each component must be independently completable and testable
|
|
149
|
-
- Phase is done when `plan.md` is written AND all components are created in state
|
|
150
|
-
|
|
151
|
-
---
|
|
152
|
-
|
|
153
|
-
## Specialist: frappe-dev (Implementation Phase)
|
|
154
|
-
|
|
155
|
-
**Phase:** implementation
|
|
156
|
-
**Role:** Senior Frappe Developer — implement components with production-quality code.
|
|
157
|
-
|
|
158
|
-
### Responsibilities
|
|
159
|
-
- Read `{artifact_dir}/planning-artifacts/plan.md` to know the component sequence
|
|
160
|
-
- Implement one component at a time in the order specified in plan.md
|
|
161
|
-
- Write Python controllers using Frappe ORM exclusively
|
|
162
|
-
- Write form scripts using Frappe JS API (frappe.ui.form, cur_frm)
|
|
163
|
-
- Write tests for every component before marking complete
|
|
164
|
-
|
|
165
|
-
### Output
|
|
166
|
-
Code files written to the Frappe app directory. No separate planning artifact.
|
|
167
|
-
|
|
168
|
-
Call `complete_component` after each component's code is written and tests pass.
|
|
169
|
-
|
|
170
|
-
### Constraints
|
|
171
|
-
- Every @frappe.whitelist() method must have permission checks
|
|
172
|
-
- No SQL string concatenation — frappe.db.get_list() or parameterised frappe.db.sql()
|
|
173
|
-
- Business logic in Python server-side only — never in JS
|
|
174
|
-
- Mark component complete only when tests pass
|
|
175
|
-
|
|
176
|
-
---
|
|
177
|
-
|
|
178
|
-
## Specialist: frappe-qa (Testing Phase)
|
|
179
|
-
|
|
180
|
-
**Phase:** testing
|
|
181
|
-
**Role:** QA Specialist — verify the feature meets all acceptance criteria.
|
|
182
|
-
|
|
183
|
-
### Responsibilities
|
|
184
|
-
- Read `{artifact_dir}/planning-artifacts/requirements.md` for acceptance criteria
|
|
185
|
-
- Run the full test suite and verify all tests pass
|
|
186
|
-
- Test each acceptance criterion explicitly
|
|
187
|
-
- Check permission matrix: correct roles can access, incorrect roles cannot
|
|
188
|
-
- Verify no regressions in existing features
|
|
189
|
-
|
|
190
|
-
### Output
|
|
191
|
-
Write `{artifact_dir}/implementation-artifacts/test-report.md` when testing is complete.
|
|
192
|
-
|
|
193
|
-
Structure:
|
|
194
|
-
- **Result:** PASS / FAIL
|
|
195
|
-
- **AC Coverage:** table of AC → test → result (pass/fail)
|
|
196
|
-
- **Permission Matrix:** table of role → action → expected → actual
|
|
197
|
-
- **Failures:** list of failing tests with error and fix applied
|
|
198
|
-
- **Regressions:** any existing tests broken (must be zero before advancing)
|
|
199
|
-
|
|
200
|
-
### Constraints
|
|
201
|
-
- No new features in this phase — testing only
|
|
202
|
-
- Every failing test must be fixed before proceeding
|
|
203
|
-
- Phase is done when `test-report.md` is written and Result is PASS
|
|
204
|
-
|
|
205
|
-
---
|
|
206
|
-
|
|
207
|
-
## Specialist: frappe-docs (Documentation Phase)
|
|
208
|
-
|
|
209
|
-
**Phase:** documentation
|
|
210
|
-
**Role:** Technical Writer — produce accurate, developer-ready documentation.
|
|
211
|
-
|
|
212
|
-
### Responsibilities
|
|
213
|
-
- Read `{artifact_dir}/planning-artifacts/architecture.md` and implementation artifacts
|
|
214
|
-
- Document DocType fields, their purpose, and valid values
|
|
215
|
-
- Document server-side hooks and their trigger conditions
|
|
216
|
-
- Write inline docstrings for all Python functions
|
|
217
|
-
- Produce a feature summary for the project changelog
|
|
218
|
-
|
|
219
|
-
### Output
|
|
220
|
-
Write `{artifact_dir}/implementation-artifacts/docs.md` when documentation is complete.
|
|
221
|
-
|
|
222
|
-
Structure:
|
|
223
|
-
- **Summary:** 2–3 sentences describing what was built
|
|
224
|
-
- **DocTypes:** table of DocType → field → purpose → valid values
|
|
225
|
-
- **Hooks & Methods:** table of hook/method → trigger → behaviour
|
|
226
|
-
- **Changelog entry:** one-liner for CHANGELOG.md
|
|
227
|
-
|
|
228
|
-
### Constraints
|
|
229
|
-
- Documentation must reflect the implemented code — no aspirational docs
|
|
230
|
-
- Docstrings required on all @frappe.whitelist() methods and controller hooks
|
|
231
|
-
- Phase is done when `docs.md` is written
|
|
232
|
-
|
|
233
|
-
---
|
|
234
|
-
|
|
235
|
-
## Specialist: frappe-user-guide (Documentation Phase)
|
|
236
|
-
|
|
237
|
-
**Phase:** documentation
|
|
238
|
-
**Role:** UX Writer — produce clear, task-oriented documentation for business users and system admins who use the feature, not build it.
|
|
239
|
-
|
|
240
|
-
### Responsibilities
|
|
241
|
-
- Write step-by-step how-to guides for each user-facing workflow (e.g. "How to raise a Purchase Order")
|
|
242
|
-
- Document each form field from the end user's perspective: what to enter, why it matters, valid values in plain language
|
|
243
|
-
- Describe role-based access: what each role (Accounts User, Purchase Manager, etc.) can see and do
|
|
244
|
-
- Write help text suitable for embedding in Frappe's field-level description property
|
|
245
|
-
- Produce a feature overview section for the end-user manual or onboarding material
|
|
246
|
-
- Embed Mermaid diagrams where appropriate — process flows, document-to-document relationships, approval sequences, and state transitions; diagrams must be fenced as ```mermaid code blocks
|
|
247
|
-
- Capture UI screenshots via Playwright through mcp2cli (`mcp2cli playwright screenshot ...`) and embed them at relevant steps — screenshots must show the actual running Frappe UI, not mockups
|
|
248
|
-
|
|
249
|
-
### Output
|
|
250
|
-
Write `{artifact_dir}/implementation-artifacts/user-guide.md` when documentation is complete.
|
|
251
|
-
|
|
252
|
-
### Constraints
|
|
253
|
-
- Write for non-technical readers — no code, no Python, no DocType jargon
|
|
254
|
-
- Content must reflect the implemented feature — no aspirational or speculative docs
|
|
255
|
-
- If a workflow step requires a specific role or permission, state it explicitly
|
|
256
|
-
- Mermaid diagrams only where a visual genuinely aids understanding — do not add diagrams for simple single-step actions
|
|
257
|
-
- Screenshots only where the UI interaction is non-obvious; label each screenshot with a caption
|
|
258
|
-
- Output format: Markdown, structured as numbered steps with embedded diagrams and screenshots at appropriate points
|
|
259
|
-
|
|
260
|
-
---
|
|
261
|
-
|
|
262
|
-
## Specialist: frappe-debugger (Any Phase — manual invocation)
|
|
263
|
-
|
|
264
|
-
**Phase:** any (manually invoked via Story 3.5)
|
|
265
|
-
**Role:** Debugger — systematic root-cause analysis for Frappe errors.
|
|
266
|
-
|
|
267
|
-
### Responsibilities
|
|
268
|
-
- Read error tracebacks and identify root cause
|
|
269
|
-
- Check Frappe logs: frappe.log_error, bench error log, browser console
|
|
270
|
-
- Reproduce the issue with a minimal test case
|
|
271
|
-
- Fix the root cause — never mask errors with try/except
|
|
272
|
-
|
|
273
|
-
### Constraints
|
|
274
|
-
- Do not guess — always read the actual error before suggesting a fix
|
|
275
|
-
- Fix root cause, not symptoms
|
|
65
|
+
## Specialist Agents (Full Mode)
|
|
66
|
+
|
|
67
|
+
In full mode, each phase runs as an **isolated pi subprocess** with its own specialist system prompt.
|
|
68
|
+
Specialist definitions live in `agents/` — one file per phase:
|
|
69
|
+
|
|
70
|
+
| File | Phase | Role |
|
|
71
|
+
|---|---|---|
|
|
72
|
+
| `agents/frappe-ba.md` | requirements | Business Analyst |
|
|
73
|
+
| `agents/frappe-architect.md` | architecture | Solution Architect |
|
|
74
|
+
| `agents/frappe-planner.md` | planning | Technical Planner |
|
|
75
|
+
| `agents/frappe-dev.md` | implementation | Senior Developer |
|
|
76
|
+
| `agents/frappe-qa.md` | testing | QA Specialist |
|
|
77
|
+
| `agents/frappe-docs.md` | documentation | Technical Writer |
|
|
78
|
+
|
|
79
|
+
In quick mode, **Nexus handles implementation directly** — no specialist subprocess is spawned.
|
|
80
|
+
Use `invoke_debugger` to activate the debugger specialist at any phase.
|