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
These are the **non-negotiable rules** that govern how FlowAI works. Every code change must respect them.
93
+
94
+
### Tool-Agnostic Core
95
+
96
+
The pipeline coordination layer (`src/core/`, `src/phases/`) **never** contains tool-specific logic. Each AI tool (Claude, Gemini, Cursor, Copilot) has its own plugin at `src/tools/<name>.sh` — that is the **only** place tool-specific commands, flags, or behaviors may live. You can swap tools freely without touching orchestration code.
97
+
98
+
### Behavior from Scripts, Not Roles or Skills
99
+
100
+
All agent coordination behavior — what to read, where to write, when to exit, how to signal — is defined in `src/phases/*.sh` and `src/core/phase.sh`. Roles describe domain expertise only. Skills add capabilities only. **Neither roles nor skills may contain pipeline coordination logic, signal paths, or artifact rules.** This makes behavior reliable and consistent regardless of which role or skill is assigned.
101
+
102
+
### KISS, DRY, Clean Code, DDD
103
+
104
+
-**KISS** — Each component does one thing. Phase scripts orchestrate; tool plugins launch CLIs; roles describe expertise; skills add capabilities.
105
+
-**DRY** — Shared constants and logic live in one place. Tool plugins reference shared constants — they don't duplicate them.
106
+
-**Clean Code** — Functions are small and named for what they do. No magic globals. Plugin API is discoverable.
The review cycle ensures quality through structured feedback:
112
+
113
+
```
114
+
Implement → Review agent (creates review.md) → User approves or gives feedback
115
+
↓ (if feedback)
116
+
Review agent re-analyzes → Implement agent fixes → Review again
117
+
↓ (if user approves review)
118
+
Master agent final review (reads review.md + all artifacts)
119
+
├── Needs follow-up → feedback sent to Implement → cycle repeats
120
+
└── Ready → User approve / needs changes
121
+
├── Approve → pipeline complete
122
+
└── Needs changes → feedback to Implement → cycle repeats
123
+
```
124
+
125
+
Key points:
126
+
- Review agent writes a full QA report to **`review.md`** — the user can read it before deciding
127
+
- Master reads `review.md` during its final review for full context
128
+
- Both Master AI and the user can send revision context back to Implement
129
+
- The cycle is self-healing: impl → review → master → (feedback) → impl → ...
130
+
131
+
> See [Agent Communication](docs/AGENT-COMMUNICATION.md) for the full approval matrix, signal protocol, and rejection flows.
132
+
133
+
---
134
+
90
135
## Features
91
136
92
137
### 🤖 Multi-Agent Orchestration
@@ -216,9 +261,15 @@ The MCP config is written to `.flowai/mcp.json` and automatically loaded by supp
216
261
217
262
---
218
263
219
-
### 🔄 Review Rejection Loop
264
+
### 🔄 Review Cycle — Multi-Layer Quality Gates
265
+
266
+
The review cycle has **three feedback loops** to catch issues at different levels:
267
+
268
+
1.**Review Agent** writes a full QA report to `review.md` — the user reads it and approves or provides feedback
269
+
2.**Master Agent** runs a final sign-off reading `review.md` + all artifacts — catches cross-cutting issues the reviewer may miss
270
+
3.**User** gets final approval with Master's opinion appended — approve to complete, or send changes back
220
271
221
-
When the review phase rejects an implementation, the review agent writes structured rejection context — what failed, why, and what to fix. On re-run, the implement agent focuses **only on failed items**, not a full re-implementation. This dramatically reduces iteration time and token usage.
272
+
When any loop rejects, the implement agent receives structured rejection context — what failed, why, and what to fix — and focuses **only on failed items**, not a full re-implementation. This dramatically reduces iteration time and token usage.
222
273
223
274
---
224
275
@@ -301,7 +352,7 @@ git tag v0.2.0 && git push origin main --tags
0 commit comments