Skip to content

Commit 2bdbef5

Browse files
authored
Merge pull request #51 from FlutterFlow/feature/multiple-agents
Add Multiple Agents Info
2 parents 5e206ce + 53373cb commit 2bdbef5

1 file changed

Lines changed: 64 additions & 20 deletions

File tree

docs/workspace/agent-panel.md

Lines changed: 64 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ The AI automatically has access to:
5656
- The widget you currently have selected
5757
- Recent changes you've made
5858
- Your project's dependencies and configuration
59-
- Your project-level guideline files (.cursorrules, CLAUDE.md, AGENTS.md, or ARCHITECTURE.md) to keep generated code consistent.
59+
- Your project-level guideline files to keep generated code consistent.
6060

6161

6262
### Image Attachments
@@ -231,30 +231,18 @@ Without project rules, you repeat long instructions in every prompt, for example
231231
Add a login screen and use the BLoC pattern for state management, follow Clean Architecture, and place new features under /features/...
232232
```
233233

234-
With project rules, you can define these standards once in a file such as [`AGENTS.md`](http://AGENTS.md) and then simply ask:
234+
With project rules, you can define these standards once and then simply ask:
235235

236236
```
237237
Add a login screen.
238238
```
239239

240-
#### Supported Rule Files
241-
242-
Dreamflow looks for one of the following files in your project root:
243-
244-
| Priority | Filename | Typical Purpose |
245-
| --- | --- | --- |
246-
| 1️⃣ | **.cursorrules** | Originally designed for the Cursor IDE but supported in Dreamflow for compatibility with existing codebases. |
247-
| 2️⃣ | [**CLAUDE.md**](https://code.claude.com/docs/en/overview) | Anthropic-style AI instruction file that can include guidelines for tone, safety, or project-specific context. |
248-
| 3️⃣ | [**AGENTS.md**](https://agents.md/) | Defines how AI agents should behave in your project, including coding standards, architecture patterns, and testing rules. |
249-
| 4️⃣ | [**ARCHITECTURE.md**](https://architecture.md/) | Documents your project’s structure, data flow, and design philosophy for better context. |
250240

251241
:::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-
242+
Dreamflow supports common rule file formats such as [**`CLAUDE.md`**](https://code.claude.com/docs/en/overview), **`.cursorrules`**, and [**`ARCHITECTURE.md`**](https://architecture.md/), but it is **recommended to use the [`AGENTS.md`](https://agents.md/) file**.
255243
:::
256244

257-
When any of the supported rule files is loaded into the Agent’s context:
245+
When the rule file is loaded into the Agent’s context:
258246

259247
- The file’s contents are **appended to the system prompt** and used to fine-tune how the Agent generates, edits, and structures code.
260248
- These rules are applied to **every Agent action**, ensuring consistent behavior across your entire project.
@@ -266,7 +254,35 @@ Follow these steps to add project rules:
266254

267255
**Step 1: Create Rule File**
268256

269-
Create one of the supported rule files with the help of ChatGPT or Claude. While creating the file, include your project’s coding standards, architecture pattern, folder structure, testing requirements, and security guidelines.
257+
To create a rule, open the **Agent** panel, select the **Rules** button, and click **Generate AGENTS.md**. Once the file is created, it will appear in the project root.
258+
259+
<div style={{
260+
position: 'relative',
261+
paddingBottom: 'calc(52.67989417989418% + 41px)', // Keeps the aspect ratio and additional padding
262+
height: 0,
263+
width: '100%'}}>
264+
<iframe
265+
src="https://demo.arcade.software/VOm5GiXp1QVuKRxO0q8X?embed&show_copy_link=true"
266+
title=""
267+
style={{
268+
position: 'absolute',
269+
top: 0,
270+
left: 0,
271+
width: '100%',
272+
height: '100%',
273+
colorScheme: 'light'
274+
}}
275+
frameborder="0"
276+
loading="lazy"
277+
webkitAllowFullScreen
278+
mozAllowFullScreen
279+
allowFullScreen
280+
allow="clipboard-write">
281+
</iframe>
282+
</div>
283+
<p></p>
284+
285+
You can also manually create rule files with the help of ChatGPT or Claude. While creating the file, include your project’s coding standards, architecture pattern, folder structure, testing requirements, and security guidelines.
270286

271287
Here’s a sample prompt you can use to generate your `AGENTS.md` file:
272288

@@ -310,18 +326,46 @@ features/[feature]/presentation/
310326
- Sanitize UI error messages.
311327
```
312328

313-
**Step 2: Place File in Project Root**
329+
**Step 2: Place Rule File**
314330

315-
Upload the rule file at the **same level as `pubspec.yaml`**. Dreamflow **does not** scan subfolders. It should look like this:
331+
You can add project rules at **two levels**:
332+
333+
**1. Root-level Rule File:** Place a rule file in the **project root**, beside `pubspec.yaml`.
334+
335+
- This file has **global scope**.
336+
- It is **always loaded** before every Agent action, no matter which part of the project you're working in.
337+
- Use it only for your **most important, universal rules**, such as:
338+
- Architecture pattern (BLoC, Riverpod, MVVM…)
339+
- Folder structure
340+
- Naming conventions
341+
- Coding style
342+
- Security guidelines
316343

317344
![project-rule-file.avif](imgs/project-rule-file.avif)
318345

346+
**2. Nested Rule File (Feature-Specific Rules)**: You may also create **`AGENTS.md` files inside subfolders**, such as:
347+
348+
```
349+
/features/auth/AGENTS.md
350+
/features/chat/AGENTS.md
351+
/lib/widgets/common/AGENTS.md
352+
```
353+
354+
Dreamflow will load these **only when the Agent is generating or editing code inside that folder**. Use nested rule files for:
355+
356+
- Feature-specific architecture
357+
- Module boundaries
358+
- API constraints
359+
- UI or widget conventions
360+
- Domain-level rules
361+
319362
**Step 3: Run Agent Action**
320363

321364
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.
322365

323366
#### Best Practices
324-
367+
- Keep the root-level `AGENTS.md` small and focused.
368+
- Use nested `AGENTS.md` files for detailed, module-specific rules to avoid bloating the Agent’s context.
325369
- Keep the rule file specific, short, and imperative.
326370
- Keep must-follow standards at the top of the file.
327371
- Avoid overly long explanations — keep it concise and readable.

0 commit comments

Comments
 (0)