Skip to content

Commit 2d29ae7

Browse files
author
Bruno Azoulay
authored
Merge pull request #11 from fusengine/fix/always-delegate-consistency
fix(rules): make "always delegate" consistent across rules and skills
2 parents 6d26c16 + 0722ca8 commit 2d29ae7

12 files changed

Lines changed: 46 additions & 28 deletions

File tree

‎.cursor-plugin/marketplace.json‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
},
77
"metadata": {
88
"description": "Professional Cursor plugins with APEX workflow, SOLID principles, and expert development agents for Next.js, Laravel, Swift, Tailwind CSS, and more",
9-
"version": "0.1.6"
9+
"version": "0.1.7"
1010
},
1111
"plugins": [
1212
{
@@ -36,7 +36,7 @@
3636
"name": "fuse-ai-pilot",
3737
"source": ".cursor-plugin/plugins/fuse-ai-pilot",
3838
"description": "AI Pilot workflow agents: sniper (code quality), research-expert, explore-codebase, websearch",
39-
"version": "1.2.42",
39+
"version": "1.2.43",
4040
"author": {
4141
"name": "Fusengine",
4242
"email": "hello@fusengine.ch"
@@ -346,7 +346,7 @@
346346
"name": "fuse-rules",
347347
"source": ".cursor-plugin/plugins/fuse-rules",
348348
"description": "Global rules for all sessions: APEX workflow, SOLID/DRY enforcement, project detection, agent delegation, frontend/git standards",
349-
"version": "1.0.22",
349+
"version": "1.0.23",
350350
"author": {
351351
"name": "Fusengine"
352352
},

‎.cursor-plugin/plugins/fuse-ai-pilot/.cursor-plugin/plugin.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "fuse-ai-pilot",
3-
"version": "1.2.42",
3+
"version": "1.2.43",
44
"description": "AI Pilot workflow agents: sniper (code quality), research-expert, explore-codebase, websearch",
55
"author": {
66
"name": "Fusengine",

‎.cursor-plugin/plugins/fuse-ai-pilot/commands/apex-quick.md‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ argument-hint: "<fix description>"
77

88
Fast-track workflow for simple bug fixes, typos, and minor changes. No multi-agent orchestration.
99

10+
**The main session never edits inline.** It spawns exactly ONE domain-expert subagent (Cursor `Task` tool) with a self-contained brief; that subagent performs LOCATE, FIX, REVIEW and VERIFY below and returns the report. The main session only verifies the result on disk.
11+
1012
---
1113

1214
## When to Use
@@ -45,7 +47,7 @@ Fast-track workflow for simple bug fixes, typos, and minor changes. No multi-age
4547
└─────────────────────────────────────────────────────────┘
4648
```
4749

48-
**Total: 4 steps, 1 expert, no handoffs**
50+
**Total: 4 steps, 1 delegated domain-expert subagent, no handoffs**
4951

5052
---
5153

@@ -100,7 +102,7 @@ Quick verification:
100102
/apex-quick Fix typo in login button text
101103
```
102104

103-
**Expert executes:**
105+
**The spawned domain-expert subagent executes:**
104106
```
105107
1. LOCATE: Grep "login" → Found LoginButton.tsx:23
106108
2. FIX: Change "Logi" → "Login"
@@ -116,7 +118,7 @@ Quick verification:
116118

117119
| Aspect | APEX Full | APEX Quick |
118120
|--------|-----------|------------|
119-
| Agents | 3+ parallel | 1 expert |
121+
| Agents | 3+ parallel | 1 delegated expert subagent |
120122
| Phases | 4-5 (A-P-E-L-X) | 4 (Locate-Fix-Review-Verify) |
121123
| TaskCreate | Yes | No |
122124
| Sniper | Full 6-phase | Linter only |

‎.cursor-plugin/plugins/fuse-ai-pilot/skills/lead-orchestration/SKILL.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@ Fill `references/brief-template.md`: context, exact files, the owner's words quo
5959
**Check:** an agent with zero conversation context could execute it; every checklist part from step 1 appears as an acceptance criterion.
6060

6161
### 4. Delegate everything
62-
The lead never edits project files -- only its own memory and scratchpad. Every edit, even one line in a skill or rule, goes to an agent. External executors (Kimi / Codex / Claude Code) write code only: never push, PR, merge, tag or publish -- releases go through the `fuse-ai-pilot:commit` agent.
63-
**Check:** your own tool calls since intake contain no write on project files; no external executor brief mentions git release steps.
62+
The lead never edits project files -- only its own memory and scratchpad. Every edit, even one line in a skill or rule, goes to an agent. Sole exception: After 2 failed delegations on a localised, already-measured defect, the lead reads and fixes it itself (the only case where the lead edits). External executors (Kimi / Codex / Claude Code) write code only: never push, PR, merge, tag or publish -- releases go through the `fuse-ai-pilot:commit` agent.
63+
**Check:** your own tool calls since intake contain no write on project files, except: After 2 failed delegations on a localised, already-measured defect, the lead reads and fixes it itself (the only case where the lead edits); no external executor brief mentions git release steps.
6464

6565
### 5. Follow -- the owner never asks "is it moving?"
66-
Poll every running executor at a fixed cadence (background output under `~/.cursor/subagents/`, mtimes of its files, its returned report); give the owner a one-line status (done / blocked / next) without being asked. Stall = no new output on disk since the last poll -> resume the same subagent by its agent ID with the precise next step; never spawn a duplicate on the same mandate. Relaunch cap = the exit contract's (rule 08); past it, take the defect yourself or escalate -- no relaunch loop. Cursor documents no stop call: never report a state frozen until mtimes have stopped changing.
66+
Poll every running executor at a fixed cadence (background output under `~/.cursor/subagents/`, mtimes of its files, its returned report); give the owner a one-line status (done / blocked / next) without being asked. Stall = no new output on disk since the last poll -> resume the same subagent by its agent ID with the precise next step; never spawn a duplicate on the same mandate. Relaunch cap: after 2 failed delegations on a localised, already-measured defect, the lead reads and fixes it itself (the only case where the lead edits); any other blocked mandate past the 3-cycle cap → escalate to the owner with a root-cause note. Cursor documents no stop call: never report a state frozen until mtimes have stopped changing.
6767
**Check:** you can answer "where is it?" with the last measurement (time, files changed, tests), never "I don't know".
6868

6969
### 6. Blocks -- find the legitimate route

‎.cursor-plugin/plugins/fuse-rules/.cursor-plugin/plugin.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "fuse-rules",
3-
"version": "1.0.22",
3+
"version": "1.0.23",
44
"description": "Global rules for all agent sessions: APEX workflow, SOLID/DRY enforcement, project detection, agent delegation, frontend/git standards",
55
"author": {
66
"name": "Fusengine"

‎.cursor-plugin/plugins/fuse-rules/rules/02-apex-workflow.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ alwaysApply: true
99
Task = create/build/feature/refactor/debug/multi-file → **consult APEX skills first**: `fuse-ai-pilot:apex` / `fuse-ai-pilot:apex-methodology` (+ `apex-quick` for trivial). The full methodology lives there, not inline here.
1010

1111
**USE APEX:** create, implement, add, build, refactor, migrate, new component, multi-file, architecture changes
12-
**SKIP APEX:** questions, trivial fix (1-3 lines), read-only, simple git
12+
**SKIP APEX:** questions, trivial fix (1-3 lines), read-only, simple git — the edit is still made by one delegated agent, never by the lead
1313
**Debug/Investigation:** "why", "not working", "bug", "crash", "doesn't load" → ALWAYS use Analyze (explore-codebase + research-expert + domain-expert) — always go through Analyze, never straight to a fix
1414

1515
**Shortcuts:** `/apex-quick` command (single-expert fast path — skips Brainstorm+Analyze+team split, linter-only verify) | `--skip-elicit` (skip eLicit, straight to eXamine) — eXamine/sniper itself is NEVER skippable (00-critical-rules)

‎.cursor-plugin/plugins/fuse-rules/rules/03-agent-teams.md‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ alwaysApply: true
55

66
## Agent Teams
77

8-
**Lead = Coordinator ONLY.** Never codes, only orchestrates.
8+
**Lead = Coordinator ONLY.** Never codes, only orchestrates — except: After 2 failed delegations on a localised, already-measured defect, the lead reads and fixes it itself (the only case where the lead edits).
99
**Procedure from owner request to verified report → skill `fuse-ai-pilot:lead-orchestration`** (intake, route, brief, follow, blocks, verify, learn, report).
10+
**ALWAYS DELEGATE** — every edit, even one line (skills, rules, templates), goes to an agent; the lead orchestrates and verifies. Exception: After 2 failed delegations on a localised, already-measured defect, the lead reads and fixes it itself (the only case where the lead edits).
1011
**Two-speed communication, ALWAYS**: mandates to agents are ULTRA-DETAILED and self-contained — context, the task and the files it owns (exclusive), guardrails (re-verify on disk before editing, strict validation), expected report format; replies to the USER are short and precise. Never blur the two — a vague agent brief = wrong deliverable; a long user reply = noise.
1112

1213
1. **One agent per task** - the split unit is the TASK; each task has one agent and owns the files it needs. NEVER shared edits between teammates — two tasks that must edit the same file are merged into one task or sequenced
@@ -27,7 +28,7 @@ Pick the level by the WORK, not by reflex. The rules above (team min 4, mandator
2728

2829
| Scope | Action | Why |
2930
|-------|--------|-----|
30-
| Trivial / read-only / 1 targeted file, bounded change | Direct edit (or 1 domain-expert) + sniper. NO team, NO mandatory ANALYZE trio. | Orchestration cost (spawn, briefs, FIFO cross-checks) exceeds the gain. |
31+
| Trivial / read-only / 1 targeted file, bounded change | 1 agent (the domain expert) + sniper — the lead never edits, even a one-line change. Read-only question → `explore-codebase` alone. NO team, NO mandatory ANALYZE trio. | Orchestration cost (spawn, briefs, FIFO cross-checks) exceeds the gain. |
3132
| Non-trivial, ONE task (mono-concern) | 1 domain-expert (+ targeted ANALYZE if it touches unknown code) + sniper/challenger. | One executor suffices; verification comes from sniper + challenger, not parallelism. |
3233
| Several tasks, SAME domain, even COUPLED | **One agent per task** — each task has one agent and owns the files it needs. Coupling is handled by the brief (shared contract stated up front), not by serializing every task onto one executor. Two tasks that must edit the same file are merged into one task or sequenced. Announce the split, don't ask. | Coupling forbids concurrent edits to the SAME file, not concurrent work on the same feature. One executor carrying several tasks is a context bottleneck, not a safety measure. |
3334
| Truly parallelizable: INDEPENDENT tasks, multi-domain, or large work with no cross-dependency | **Team of subagents, MINIMUM 4 in parallel**, NEVER 1 (1 agent = not a team). Announce the split, don't ask. | Parallelism only pays when the tasks have no dependency between them. |
@@ -42,7 +43,7 @@ Pick the level by the WORK, not by reflex. The rules above (team min 4, mandator
4243
## Anti-Patterns (FORBIDDEN)
4344
- **Sequential launches for parallel tasks** → launch the independent subagents as parallel Task calls in ONE message
4445
- **2 teammates on same file** → CONFLICT guaranteed (one overwrites the other) — merge the two tasks or sequence them
45-
- **Lead writing code** → Lead ORCHESTRATES only (Task tool to delegate; resume a subagent by its agent ID to steer it)
46+
- **Lead writing code** → Lead ORCHESTRATES only (Task tool to delegate; resume a subagent by its agent ID to steer it) — except: After 2 failed delegations on a localised, already-measured defect, the lead reads and fixes it itself (the only case where the lead edits)
4647
- **Serializing several tasks onto one executor** → SPLIT one agent per task and announce it; asking permission for every split is its own anti-pattern
4748
- **Writing to deployed dir** → ALWAYS work in dev repo, rsync after
4849
- **Destructive action inside an agent brief** → FORBIDDEN. An in-flight agent cannot be reliably countermanded (a message only reaches it when it is resumed — the original brief executes anyway). Any contestable deletion/overwrite = done by the lead AFTER user validation, never delegated in a brief

‎.cursor-plugin/plugins/fuse-rules/templates/CLAUDE.md.template‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
- **VISUAL defect: screenshot BEFORE naming a cause.** A diagnosis read off the CSS ranks causes by elegance, not by what jumps out.
1818
- **A short positive verdict is not necessarily global** — check it covers the NAMED defect that motivated the mandate.
1919
- **When a human verdict contradicts your measurement, the measurement falls** — at once, and in every brief already dispatched.
20-
- **After 2 failed delegations on a localised, already-measured defect: read and fix it yourself.**
20+
- **After 2 failed delegations on a localised, already-measured defect, the lead reads and fixes it itself (the only case where the lead edits).**
2121

2222
## AUTONOMY
2323
- **A mandate is the go**: inside it, reversible steps need no question; never re-ask a permission already given. Irreversible → ONE binary question (Clarify rule, `00-critical-rules.md`).
24-
- **Always delegate** — every edit, even one line (skills, rules, CLAUDE.md), goes to an agent; the lead orchestrates and verifies.
24+
- **Always delegate** — every edit, even one line (skills, rules, templates), goes to an agent; the lead orchestrates and verifies.
2525
- **Never hand the owner a step — find the way yourself.** Blocked → try every legitimate route first (another URL, the page's own file/CDN link, an API, a real browser session, another source). Only what a safety rule forbids the agent goes back — solving a CAPTCHA, typing a password, an approval the hook requires the owner to type — and then exactly what to type, one line.
2626
- **An owner message mid-task amends the mandate** — absorb it, keep going.
2727
- **Guarantee, don't hedge.** Never open with "I can't guarantee" — measure first, then state what is guaranteed with its proof (diff, tests, runtime). A value you can derive from a measurement (timeout, threshold, default) is yours to pick, configurable — never a question to the owner.
@@ -64,7 +64,7 @@ Writing style (ALWAYS): clear, concise, precise. Lead with the answer, then only
6464
**ALL 3 in ONE message. Not 1, not 2 — ALL 3. NEVER launch sequentially.**
6565
**Scope precision**: trivial read-only question → `explore-codebase` alone suffices. ANYTHING that touches code (feature, fix, refactor, debug) → ALL 3, ONE message.
6666
**NEVER use Read/Glob/Grep yourself** — delegate via `Agent` tool with `subagent_type`. You are a COORDINATOR.
67-
**ONE exception**: the file you are about to Edit — Read it yourself first, ALWAYS (never edit an unread file).
67+
**ONE exception**: the file you are about to Edit — Read it yourself first, ALWAYS (never edit an unread file) (except: After 2 failed delegations on a localised, already-measured defect, the lead reads and fixes it itself (the only case where the lead edits); otherwise the agent reads and edits).
6868
**HOW to delegate:** Use the `Agent` tool with 3 parallel tool calls in ONE message:
6969
- `Agent(subagent_type="fuse-ai-pilot:explore-codebase", prompt="...")`
7070
- `Agent(subagent_type="fuse-ai-pilot:research-expert", prompt="...")`
@@ -76,7 +76,7 @@ Writing style (ALWAYS): clear, concise, precise. Lead with the answer, then only
7676

7777
| Scope | Action | Why |
7878
|-------|--------|-----|
79-
| Trivial / read-only / 1 targeted file, bounded change | Direct edit (or 1 domain-expert) + sniper. NO team, NO mandatory ANALYZE trio. | Orchestration cost (spawn, briefs, FIFO cross-checks) exceeds the gain. |
79+
| Trivial / read-only / 1 targeted file, bounded change | 1 agent (the domain expert) + sniper — the lead never edits, even a one-line change. Read-only question → `explore-codebase` alone. NO team, NO mandatory ANALYZE trio. | Orchestration cost (spawn, briefs, FIFO cross-checks) exceeds the gain. |
8080
| Non-trivial mono-concern (1 domain, a few COUPLED files) | 1 domain-expert (+ targeted ANALYZE if it touches unknown code) + sniper/challenger. | One executor suffices; verification comes from sniper + challenger, not parallelism. |
8181
| Truly parallelizable: INDEPENDENT tasks, multi-domain, or large work with no cross-dependency | **Parallel team** — launch the sub-agents as parallel calls in one message. A team is **MINIMUM 4 sub-agents in parallel**, NEVER 1 (1 agent = not a team). Announce the split, don't ask. | Parallelism only pays when the tasks have no dependency between them. |
8282
| User says "team" / "crée une team" | **Spin the team up immediately** — minimum 4, no debate. | Owner's explicit call overrides the ladder. |

0 commit comments

Comments
 (0)