You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/workspace/agent-panel.md
+33-7Lines changed: 33 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -239,7 +239,7 @@ Add a login screen.
239
239
240
240
#### Supported Rule Files
241
241
242
-
Dreamflow looks for one of the following files in your project root:
242
+
Dreamflow scans for the following rule files in your project, in this priority order:
243
243
244
244
| Priority | Filename | Typical Purpose |
245
245
| --- | --- | --- |
@@ -249,9 +249,7 @@ Dreamflow looks for one of the following files in your project root:
249
249
| 4️⃣ |[**ARCHITECTURE.md**](https://architecture.md/)| Documents your project’s structure, data flow, and design philosophy for better context. |
250
250
251
251
:::info
252
-
253
-
Only the **first file found** in this order is loaded. If multiple exist, Dreamflow stops scanning after the first match. For example, if .cursorrules exists, it will be used even if `AGENTS.md` is also present.
254
-
252
+
Dreamflow loads only the first matching file based on priority. For example, if `.cursorrules` exists, Dreamflow will ignore `CLAUDE.md`, `AGENTS.md`, and `ARCHITECTURE.md`.
255
253
:::
256
254
257
255
When any of the supported rule files is loaded into the Agent’s context:
Upload the rule file at the **same level as `pubspec.yaml`**. Dreamflow **does not** scan subfolders. It should look like this:
315
+
**1. Root-level Rule File:** Place a global rule file (e.g., `AGENTS.md`, `.cursorrules`, `CLAUDE.md`, or `ARCHITECTURE.md`) in the **project root**, beside `pubspec.yaml`.
316
+
317
+
- This file has **global scope**.
318
+
- It is **always loaded** before every Agent action, no matter which part of the project you're working in.
319
+
- Use it only for your **most important, universal rules**, such as:
**2. Nested Rule File (Feature-Specific Rules)**: You may also create **`AGENTS.md` files inside subfolders**, such as:
329
+
330
+
```
331
+
/features/auth/AGENTS.md
332
+
/features/chat/AGENTS.md
333
+
/lib/widgets/common/AGENTS.md
334
+
```
335
+
336
+
Dreamflow will load these **only when the Agent is generating or editing code inside that folder**. Use nested rule files for:
337
+
338
+
- Feature-specific architecture
339
+
- Module boundaries
340
+
- API constraints
341
+
- UI or widget conventions
342
+
- Domain-level rules
343
+
319
344
**Step 3: Run Agent Action**
320
345
321
346
You can view or edit your rule file anytime from the Dreamflow File Editor. Once it’s saved, run any Agent command (for example, “Add a login screen”). Dreamflow will automatically load your rules and apply them to every generation.
322
347
323
348
#### Best Practices
324
-
349
+
- Keep the root-level `AGENTS.md` small and focused.
350
+
- Use nested `AGENTS.md` files for detailed, module-specific rules to avoid bloating the Agent’s context.
325
351
- Keep the rule file specific, short, and imperative.
326
352
- Keep must-follow standards at the top of the file.
327
353
- Avoid overly long explanations — keep it concise and readable.
0 commit comments