Add CodeFlow - Multi-Agent Orchestration with CDP Patrol Engine for Cursor IDE#254
Add CodeFlow - Multi-Agent Orchestration with CDP Patrol Engine for Cursor IDE#254joinwell52-AI wants to merge 7 commits intoPatrickJS:mainfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdded a README entry for CodeFlow and introduced a new Cursor IDE Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Initiator as PM/DEV/etc
participant Patrol as CDP Patrol Engine
participant Browser as Cursor IDE (Tab/Sidebar)
participant Agent as Target Agent Session
participant OCR as OCR Fallback
participant Human as Human (Escalation)
Initiator->>Patrol: Create TASK-YYYYMMDD-...-sender-to-recipient.md (with YAML)
Patrol->>Browser: Inspect DOM (tab bar, agent sidebar) for role nodes
Browser-->>Patrol: Return role nodes / coordinates
Patrol->>Agent: Focus/select agent via synthetic mouse/keyboard (CDP)
Patrol->>Agent: Verify selection (aria-selected / sidebar text)
Patrol->>Agent: Check busy state (buttons, spinner, status text)
alt Not busy
Patrol->>Agent: Send message (input events / Enter)
Agent-->>Patrol: Confirm write/update of TASK file (docs/agents/...)
else Busy or CDP failure
Patrol->>Patrol: Retry / queue
alt CDP unavailable or action fails
Patrol->>OCR: Use OCR to locate/verify UI elements
end
alt Retries exhausted
Patrol->>Human: Escalate for manual intervention
end
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@README.md`:
- Line 122: The README entry uses absolute URLs for the CodeFlow, Product page,
and Methodology links; update those to repository-relative links or point them
to new local docs pages and use relative paths instead. Edit the bullet
containing the link texts "CodeFlow", "Product page", and "Methodology" to
replace the full external URLs with relative paths within the repo (or create
local markdown pages under docs/ or promo/ and link to those relatively) so the
links follow the repository README guideline.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
|
|
||
| ### Backend and Full-Stack | ||
|
|
||
| - [CodeFlow](https://github.com/joinwell52-AI/codeflow-pwa) - Multi-role AI team orchestration for Cursor IDE. Desktop EXE patrols agents with OCR-based self-healing, phone PWA sends tasks via WebSocket relay. Includes .mdc rules for PM/DEV/QA/OPS roles and 3 team templates (dev/media/mvp). 87 person-days in 17 days. [Product page](https://joinwell52-ai.github.io/codeflow-pwa/promotion/) | [Methodology](https://joinwell52-ai.github.io/joinwell52/) |
There was a problem hiding this comment.
Use relative links in this README entry to match repository rules.
This new item uses absolute URLs, but this repo’s README guideline requires relative links. Please convert the links in this bullet to repository-relative paths (or move external references to a local docs page and link that relatively).
As per coding guidelines, "Ensure all links in the README.md file are relative and correct."
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@README.md` at line 122, The README entry uses absolute URLs for the CodeFlow,
Product page, and Methodology links; update those to repository-relative links
or point them to new local docs pages and use relative paths instead. Edit the
bullet containing the link texts "CodeFlow", "Product page", and "Methodology"
to replace the full external URLs with relative paths within the repo (or create
local markdown pages under docs/ or promo/ and link to those relatively) so the
links follow the repository README guideline.
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
rules/codeflow-multi-agent-cursorrules-prompt-file/.cursorrules (1)
48-48: Clarify ACK sequence allocation to prevent filename collisions.Line 48 requires immediate ACK but leaves
{seq}undefined. In append-only workflows, ambiguous sequence allocation can produce conflicting filenames.Proposed clarification
-- On receiving `TASK-*-ADMIN01-to-PM01.md`, immediately write an acknowledgement: `TASK-{date}-{seq}-PM01-to-ADMIN01.md` +- On receiving `TASK-*-ADMIN01-to-PM01.md`, immediately write an acknowledgement using the next available sequence: `TASK-{date}-{next_seq}-PM01-to-ADMIN01.md`🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@rules/codeflow-multi-agent-cursorrules-prompt-file/.cursorrules` at line 48, The ACK filename pattern "TASK-{date}-{seq}-PM01-to-ADMIN01.md" referenced for incoming "TASK-*-ADMIN01-to-PM01.md" is underspecified because {seq} is not allocated and can collide; update the rule that emits the ACK to define a deterministic sequence allocation (e.g., derive seq from the incoming task id, append a high-resolution timestamp plus a monotonic counter, or reserve the next sequence via an append-only counter service) and document which approach is used so ACKs are unique; specifically change the rule that writes the ACK filename pattern to compute and insert the chosen seq value (or include original task identifier) before writing the file.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@rules/codeflow-multi-agent-cursorrules-prompt-file/.cursorrules`:
- Line 75: The dev-team listing includes an undefined role "E2E" in the line
"**dev-team**: PM · DEV · QA · OPS · E2E"; either remove "E2E" from that
dev-team entry or add a corresponding E2E role contract/rules block (define
responsibilities, permissions, and any message/interaction rules) matching the
style of other roles (PM, DEV, QA, OPS) so every actor is governed; update
whichever you change consistently throughout the file wherever "E2E" is
referenced.
- Line 49: Replace the non-compliant example filenames (`PM01-to-DEV01.md` etc.)
in the "Decompose tasks into separate files per recipient" instruction with the
protocol-compliant pattern required by this ruleset: use
`TASK-YYYYMMDD-sequence-sender-to-recipient.md` (e.g.,
`TASK-20260414-01-PM01-to-DEV01.md`) so parsing/routing remains deterministic;
update the example tokens in the same rule text (the line containing "Decompose
tasks into separate files per recipient") to show the full required pattern and
at least one concrete example following
`TASK-YYYYMMDD-sequence-sender-to-recipient.md`.
- Line 69: The rule "Reports must include verification command output — not just
\"completed\"" should be updated to require redaction of sensitive data before
persisting outputs: modify the .cursorrules entry containing that exact string
to add explicit instructions to redact secrets/PII (e.g., replace tokens,
passwords, IPs, emails) and to run outputs through a redaction utility or regex
sanitizers (ensure you reference the redaction step in the rule text and/or call
a redactor like sanitizeVerificationOutput()), require a brief redaction log
entry (what was redacted) and fail the task if redaction cannot be performed;
update any related validation code that enforces this rule to call
sanitizeVerificationOutput() (or the project’s redactor) and reject unredacted
outputs.
---
Nitpick comments:
In `@rules/codeflow-multi-agent-cursorrules-prompt-file/.cursorrules`:
- Line 48: The ACK filename pattern "TASK-{date}-{seq}-PM01-to-ADMIN01.md"
referenced for incoming "TASK-*-ADMIN01-to-PM01.md" is underspecified because
{seq} is not allocated and can collide; update the rule that emits the ACK to
define a deterministic sequence allocation (e.g., derive seq from the incoming
task id, append a high-resolution timestamp plus a monotonic counter, or reserve
the next sequence via an append-only counter service) and document which
approach is used so ACKs are unique; specifically change the rule that writes
the ACK filename pattern to compute and insert the chosen seq value (or include
original task identifier) before writing the file.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: dc30bab2-714b-487d-8647-dd10bfe2d671
📒 Files selected for processing (2)
README.mdrules/codeflow-multi-agent-cursorrules-prompt-file/.cursorrules
✅ Files skipped from review due to trivial changes (1)
- README.md
| - Only accept tasks from: `TASK-*-PM01-to-OPS01.md` | ||
| - High-risk operations (restart services, modify Nginx, clear DB, change firewall) require documented confirmation before execution | ||
| - Every deployment must be rollbackable with a backup | ||
| - Reports must include verification command output — not just "completed" |
There was a problem hiding this comment.
Require redaction for OPS verification outputs.
Line 69 mandates command output in reports, but without redaction guidance this can leak secrets/PII into persisted task files.
Proposed fix
- Reports must include verification command output — not just "completed"
+- Reports must include verification command output — not just "completed"
+- Redact secrets/PII from command output before writing to task files🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@rules/codeflow-multi-agent-cursorrules-prompt-file/.cursorrules` at line 69,
The rule "Reports must include verification command output — not just
\"completed\"" should be updated to require redaction of sensitive data before
persisting outputs: modify the .cursorrules entry containing that exact string
to add explicit instructions to redact secrets/PII (e.g., replace tokens,
passwords, IPs, emails) and to run outputs through a redaction utility or regex
sanitizers (ensure you reference the redaction step in the rule text and/or call
a redactor like sanitizeVerificationOutput()), require a brief redaction log
entry (what was redacted) and fail the task if redaction cannot be performed;
update any related validation code that enforces this rule to call
sanitizeVerificationOutput() (or the project’s redactor) and reject unredacted
outputs.
… remove undefined E2E role
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
rules/codeflow-multi-agent-cursorrules-prompt-file/.cursorrules (1)
152-154:⚠️ Potential issue | 🟠 MajorDefine governance for non-core template roles or mark templates as external rule packs.
media-teamandmvp-teamlist roles that have no intake/output/prohibition contracts in this ruleset. That leaves actors ungoverned if those templates are used.Proposed fix (minimal)
- - **media-team**: WRITER · EDITOR · PUBLISHER · COLLECTOR - - **mvp-team**: MARKETER · RESEARCHER · DESIGNER · BUILDER + - **media-team**: WRITER · EDITOR · PUBLISHER · COLLECTOR (requires dedicated role contracts in a media-team .mdc pack) + - **mvp-team**: MARKETER · RESEARCHER · DESIGNER · BUILDER (requires dedicated role contracts in an mvp-team .mdc pack)🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@rules/codeflow-multi-agent-cursorrules-prompt-file/.cursorrules` around lines 152 - 154, The ruleset lists non-core template role groups media-team and mvp-team without any intake/output/prohibition contracts, leaving those actors ungoverned; update the definition of the groups (media-team, mvp-team) to include explicit intake/output/prohibition contracts matching your ruleset schema (e.g., add intake:, output:, prohibit: entries for WRITER, EDITOR, PUBLISHER, COLLECTOR, MARKETER, RESEARCHER, DESIGNER, BUILDER) or, if these role lists are from external template packs, mark those template definitions as external rule packs (e.g., add an external: true or include reference to the external pack) so the contract responsibility is clear; ensure you modify the group definitions that contain the media-team and mvp-team symbols and keep dev-team unchanged if already governed.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@rules/codeflow-multi-agent-cursorrules-prompt-file/.cursorrules`:
- Around line 16-24: Update the File Protocol spec to require all task/report
files be placed under a mandatory agent_bridge/ directory—change the filename
pattern from "TASK-YYYYMMDD-sequence-sender-to-recipient.md" to
"agent_bridge/TASK-YYYYMMDD-sequence-sender-to-recipient.md" and update the
example (e.g., "agent_bridge/TASK-20260414-003-PM-to-DEV.md"); also add a brief
rule that consumers/producers must read/write only from the agent_bridge/ path
so agents, watchers and routers use the same location.
---
Duplicate comments:
In `@rules/codeflow-multi-agent-cursorrules-prompt-file/.cursorrules`:
- Around line 152-154: The ruleset lists non-core template role groups
media-team and mvp-team without any intake/output/prohibition contracts, leaving
those actors ungoverned; update the definition of the groups (media-team,
mvp-team) to include explicit intake/output/prohibition contracts matching your
ruleset schema (e.g., add intake:, output:, prohibit: entries for WRITER,
EDITOR, PUBLISHER, COLLECTOR, MARKETER, RESEARCHER, DESIGNER, BUILDER) or, if
these role lists are from external template packs, mark those template
definitions as external rule packs (e.g., add an external: true or include
reference to the external pack) so the contract responsibility is clear; ensure
you modify the group definitions that contain the media-team and mvp-team
symbols and keep dev-team unchanged if already governed.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 9f2b6ac5-44b6-404e-9f4a-c9619c48eacd
📒 Files selected for processing (1)
rules/codeflow-multi-agent-cursorrules-prompt-file/.cursorrules
|
@coderabbitai resume |
✅ Actions performedReviews resumed. |
… packs per review
What is CodeFlow?
CodeFlow is a human-AI collaboration hub for multi-agent teams in Cursor IDE.
Core Innovation: CDP Patrol Engine
CodeFlow uses Chrome DevTools Protocol to monitor and control Cursor IDE agents — replacing fragile OCR with precise DOM inspection:
div[role='tab']+aria-selectedpyautogui.click(x,y)screen coordsInput.dispatchMouseEventwindow coordsCDP reads Cursor's tab bar (
div[role='tab']) and agent sidebar (span.agent-sidebar-cell-text) to identify all agents, detect active/busy states, switch roles via native mouse events, and send messages by bypassing React controlled components.Graceful degradation: Every CDP operation falls back to OCR automatically. No stuck states.
Other Key Features
.mdcrules defining strict behaviorTASK-YYYYMMDD-seq-sender-to-recipient.mdwith YAML metadataWhy it fits awesome-cursorrules
CodeFlow ships
.cursorrules/.mdcrules that define each AI role's behavior. The rules enforce a strict file-based protocol so every agent action is traceable. The CDP engine is what makes multi-agent orchestration practical — without it, agent switching and busy detection are too slow and unreliable for real production use.Links
Summary by CodeRabbit