flower
/
All briefs
complete draft mcp flower
epic · Let's brainstorm/plan/spec the idea of multi-chain o...

Epic-lead Slice E — Spawn heuristic & opt-in flag (#226)

canonical · plan

Spec

markdown

hand-off · dispatch

Dispatch

Auto-dispatch

when it reaches planned

Design-loop

design pass before build

This brief is complete — dispatch is closed.

#115 done fresh flower · flower/235-epic-lead-slice-e
agent: claude
You are being dispatched from flower Brief #235: Epic-lead Slice E — Spawn heuristic & opt-in flag (#226)

Recall pointer:
- Use recall_brief with id 235 for the full folder if you need provenance.

Target:
- project: flower (/Users/mikeferrara/Documents/code/flower)
- branch: flower/235-epic-lead-slice-e
- worktree: not specified
- kind: fresh

Current brief spec:
# Slice E — Spawn heuristic & opt-in flag

Parent epic: #226. Design: `docs/design/226-epic-lead-orchestration.md` (§Spawn heuristic). **Depends on Slice A (#231).** Target ≤~300 lines. Honors decided fork **#57** (heuristic + judgment).

## Deliverable
1. **`EpicLeadPolicy::recommend(epic): {recommend: bool, reasons: string[]}`** — advisory, over `children_rollup` + `brief_dependencies`. Recommends a lead when ANY:
   - child count ≥ `config('flower.epic_lead.min_children', 3)`.
   - phased: dependency depth ≥ 2 among children (≥1 child `depends_on` another child).
   - fan-out: ≥ N mutually-independent, parallel-dispatchable children.
   - est. multi-hour (>~2h): judgment signal surfaced, MAIN decides.
2. **Per-brief opt-in/opt-out** — `brief.meta.epic_lead ∈ {auto, force, never}` (meta, no migration; recommended for v1). `force` → always spawn; `never` → MAIN inline; `auto` (default) → heuristic + judgment. MAIN's judgment is authoritative over the heuristic in both directions.
3. **Config** — `config/flower.php` `epic_lead` block: `min_children` (3), `max_concurrent` (3), `post_merge_window_minutes` (30).
4. **Surface the recommendation** — show "epic-lead recommended" (+ reasons) in `recall_dispatch_queue` / `/roster` so the operator sees it.

## Tests
- Each threshold trips `recommend` with the right reason; below all + `auto` → no recommend.
- `force`/`never` override the heuristic.
- Policy is advisory only (returns signal, does not spawn).

## Notes
- This slice does not spawn anything — it produces the recommendation MAIN consults. Spawn mechanism is Slice B.

Recent/key trace events:
[1] participant_joined flower-226-worker: (no body)
[2] note_added flower-226-worker: # Slice E — Spawn heuristic & opt-in flag

Design: `docs/design/226-epic-lead-orchestration.md` (§Spawn heuristic). Depends on Slice A. Target ≤~300 lines. Honors decided fork **#57** (heuristic + judgment).

## Deliverable
1. **`EpicLeadPolicy::recommend(epic): {recommend: bool, reasons: string[]}`** — advisory, over `children_rollup` + `brief_dependencies`. Recommends a lead when ANY:
   - child count ≥ `config('flower.epic_lead.min_children', 3)`.
   - phased: dependency depth ≥ 2 among children (≥1 child `depends_on` another child).
   - fan-out: ≥ N mutually-independent, parallel-dispatchable children.
   - est. multi-hour (>~2h): judgment signal surfaced, MAIN decides.
2. **Per-brief opt-in/opt-out** — `brief.meta.epic_lead ∈ {auto, force, never}` (meta, no migration; recommended for v1). `force` → always spawn; `never` → MAIN inline; `auto` (default) → heuristic + judgment. MAIN's judgment is authoritative over the heuristic in both directions.
3. **Config** — `config/flower.php` `epic_lead` block: `min_children` (3), `max_concurrent` (3), `post_merge_window_minutes` (30).
4. **Surface the recommendation** — show "epic-lead recommended" (+ reasons) in `recall_dispatch_queue` / `/roster` so the operator sees it.

## Tests
- Each threshold trips `recommend` with the right reason; below all + `auto` → no recommend.
- `force`/`never` override the heuristic.
- Policy is advisory only (returns signal, does not spawn).

## Notes
- This slice does not spawn anything — it produces the recommendation MAIN consults. Spawn mechanism is Slice B.
[3] parent_set flower-226-worker: Grouped under epic #226.
[4] dependency_added flower-226-worker: Now depends on #231 (Epic-lead Slice A — Lead identity & roster scaffolding (#226)).
[5] plan_proposed flower-226-worker: # Slice E — Spawn heuristic & opt-in flag

Parent epic: #226. Design: `docs/design/226-epic-lead-orchestration.md` (§Spawn heuristic). **Depends on Slice A (#231).** Target ≤~300 lines. Honors decided fork **#57** (heuristic + judgment).

## Deliverable
1. **`EpicLeadPolicy::recommend(epic): {recommend: bool, reasons: string[]}`** — advisory, over `children_rollup` + `brief_dependencies`. Recommends a lead when ANY:
   - child count ≥ `config('flower.epic_lead.min_children', 3)`.
   - phased: dependency depth ≥ 2 among children (≥1 child `depends_on` another child).
   - fan-out: ≥ N mutually-independent, parallel-dispatchable children.
   - est. multi-hour (>~2h): judgment signal surfaced, MAIN decides.
2. **Per-brief opt-in/opt-out** — `brief.meta.epic_lead ∈ {auto, force, never}` (meta, no migration; recommended for v1). `force` → always spawn; `never` → MAIN inline; `auto` (default) → heuristic + judgment. MAIN's judgment is authoritative over the heuristic in both directions.
3. **Config** — `config/flower.php` `epic_lead` block: `min_children` (3), `max_concurrent` (3), `post_merge_window_minutes` (30).
4. **Surface the recommendation** — show "epic-lead recommended" (+ reasons) in `recall_dispatch_queue` / `/roster` so the operator sees it.

## Tests
- Each threshold trips `recommend` with the right reason; below all + `auto` → no recommend.
- `force`/`never` override the heuristic.
- Policy is advisory only (returns signal, does not spawn).

## Notes
- This slice does not spawn anything — it produces the recommendation MAIN consults. Spawn mechanism is Slice B.
[6] participant_joined flower-231-worker: (no body)
[7] unblocked flower-231-worker: Unblocked — #231 reached complete.
[8] participant_joined flower-orchestrator: (no body)
[9] status_change flower-orchestrator: (no body)

Recommended linked context:
{
    "todos": [],
    "scratchpads": []
}

Execution notes:
- Treat the brief as the source of truth.
- Keep work scoped to this dispatch request.
- Use brief_append / brief_update_status when reporting material progress; as your final dispatched-worker step, call brief_dispatch_complete with dispatch_request_id (or brief_id) and actor_ref.
- Codex workers should verify mutating Flower tools with tool_search query `brief_append brief_dispatch_complete flower_feedback` (limit 20) when tool availability is in doubt; report raw SEE/LOAD vs NOT visible instead of silently using local fallbacks.
- Add a git commit trailer `Brief: #235` to every commit for this brief so flower can exact-link commits back to the brief.

provenance · append-only

Trace

live
or paste a screenshot uploading…
  1. link added 22h ago
    agent · system:commit-trailer
  2. participant joined 22h ago
    system · system:commit-trailer
  3. merged 22h ago

    Merged flower/235-epic-lead-slice-e (Slice E — EpicLeadPolicy spawn heuristic + config/flower.php epic_lead block + recall_dispatch_queue surfacing) to master by flower-orchestrator (daemon 40). Suite green 1180.

    agent · flower-orchestrator
  4. status change 23h ago
    agent · flower-235-worker
  5. dispatched 23h ago

    Dispatch request #115 marked done.

    agent · flower-235-worker
  6. note added 23h ago

    Slice E landed on branch `flower/235-epic-lead-slice-e` (commit 3657c92), suite green (1160 tests), pint clean. **What shipped (advisory only — spawns nothing; Slice B owns the mechanism):** - `app/Services/Briefs/EpicLeadPolicy.php` — `recommend(Brief $epic): {recommend, mode, reasons[]}` over `children_rollup` + intra-child `brief_dependencies` (fork #57). Trips on ANY of: child count ≥ `flower.epic_lead.min_children`; phased (≥1 intra-child dependency edge → depth ≥2); fan-out (≥ min_children mutually-independent children); or `meta.est_hours ≥ min_est_hours` (judgment signal surfaced, MAIN decides). Also exposes `mode(Brief)`. - Per-brief opt-in via `brief.meta.epic_lead ∈ {auto,force,never}` (no migration — `meta` already JSON-cast). `force`→always recommend; `never`→never; `auto`→heuristic. MAIN's judgment stays authoritative in both directions. - `config/flower.php` new `epic_lead` block: `min_children` (3), `max_concurrent` (3), `post_merge_window_minutes` (30), `min_est_hours` (2) — all env-overridable. (Added `min_est_hours` beyond the brief's three named keys to make the §Spawn-heuristic >~2h threshold config-as-data, consistent with convention.) - `recall_dispatch_queue` surfaces the recommendation (`epic_lead: {recommend, mode, reasons}`) on each dispatchable epic / explicit opt-in; omitted (null) for plain non-epic briefs on `auto`, so the payload stays lean. `EpicLeadPolicy` injected into the tool; children eager-loaded once for the set. - Tests: `tests/Feature/Briefs/EpicLeadPolicyTest.php` (14) — each threshold with the right reason, below-all+auto → no recommend, force/never override, advisory-only (0 dispatch/daemon side effects), tool surface present-for-epic / omitted-for-plain. **Scope notes / judgment calls (not blockers):** - Child count uses total children (matches `children_rollup.total`), including terminal — stable across a mid-epic re-evaluation. - `/roster` (Livewire) currently shows daemons only, no dispatchable-briefs panel — the faithful dispatch-queue surface MAIN consults is the `recall_dispatch_queue` MCP tool, where I wired it. A `/roster` UI panel would be a new surface (out of a ~300-line advisory slice); deferred as a UI follow-up. - No meta-writer tool added — reading/honoring `meta.epic_lead` is the deliverable; operators set it via existing brief meta paths. Flag if a `brief_set_epic_lead_mode` MCP helper is wanted.

    agent · flower-235-worker
  7. participant joined 23h ago
    system · flower-235-worker
  8. dispatched 23h ago

    Dispatch request #115 queued for flower.

    agent · flower-orchestrator
  9. status change 23h ago
    agent · flower-orchestrator
  10. status change 23h ago
    agent · flower-orchestrator
  11. participant joined 23h ago
    system · flower-orchestrator
  12. unblocked 23h ago

    Unblocked — #231 reached complete.

    system · flower-231-worker
  13. participant joined 23h ago
    system · flower-231-worker
  14. plan proposed 1d ago

    # Slice E — Spawn heuristic & opt-in flag Parent epic: #226. Design: `docs/design/226-epic-lead-orchestration.md` (§Spawn heuristic). **Depends on Slice A (#231).** Target ≤~300 lines. Honors decided fork **#57** (heuristic + judgment). ## Deliverable 1. **`EpicLeadPolicy::recommend(epic): {recommend: bool, reasons: string[]}`** — advisory, over `children_rollup` + `brief_dependencies`. Recommends a lead when ANY: - child count ≥ `config('flower.epic_lead.min_children', 3)`. - phased: dependency depth ≥ 2 among children (≥1 child `depends_on` another child). - fan-out: ≥ N mutually-independent, parallel-dispatchable children. - est. multi-hour (>~2h): judgment signal surfaced, MAIN decides. 2. **Per-brief opt-in/opt-out** — `brief.meta.epic_lead ∈ {auto, force, never}` (meta, no migration; recommended for v1). `force` → always spawn; `never` → MAIN inline; `auto` (default) → heuristic + judgment. MAIN's judgment is authoritative over the heuristic in both directions. 3. **Config** — `config/flower.php` `epic_lead` block: `min_children` (3), `max_concurrent` (3), `post_merge_window_minutes` (30). 4. **Surface the recommendation** — show "epic-lead recommended" (+ reasons) in `recall_dispatch_queue` / `/roster` so the operator sees it. ## Tests - Each threshold trips `recommend` with the right reason; below all + `auto` → no recommend. - `force`/`never` override the heuristic. - Policy is advisory only (returns signal, does not spawn). ## Notes - This slice does not spawn anything — it produces the recommendation MAIN consults. Spawn mechanism is Slice B.

    agent · flower-226-worker
  15. dependency added 1d ago

    Now depends on #231 (Epic-lead Slice A — Lead identity & roster scaffolding (#226)).

    agent · flower-226-worker
  16. parent set 1d ago

    Grouped under epic #226.

    agent · flower-226-worker
  17. note added 1d ago

    # Slice E — Spawn heuristic & opt-in flag Design: `docs/design/226-epic-lead-orchestration.md` (§Spawn heuristic). Depends on Slice A. Target ≤~300 lines. Honors decided fork **#57** (heuristic + judgment). ## Deliverable 1. **`EpicLeadPolicy::recommend(epic): {recommend: bool, reasons: string[]}`** — advisory, over `children_rollup` + `brief_dependencies`. Recommends a lead when ANY: - child count ≥ `config('flower.epic_lead.min_children', 3)`. - phased: dependency depth ≥ 2 among children (≥1 child `depends_on` another child). - fan-out: ≥ N mutually-independent, parallel-dispatchable children. - est. multi-hour (>~2h): judgment signal surfaced, MAIN decides. 2. **Per-brief opt-in/opt-out** — `brief.meta.epic_lead ∈ {auto, force, never}` (meta, no migration; recommended for v1). `force` → always spawn; `never` → MAIN inline; `auto` (default) → heuristic + judgment. MAIN's judgment is authoritative over the heuristic in both directions. 3. **Config** — `config/flower.php` `epic_lead` block: `min_children` (3), `max_concurrent` (3), `post_merge_window_minutes` (30). 4. **Surface the recommendation** — show "epic-lead recommended" (+ reasons) in `recall_dispatch_queue` / `/roster` so the operator sees it. ## Tests - Each threshold trips `recommend` with the right reason; below all + `auto` → no recommend. - `force`/`never` override the heuristic. - Policy is advisory only (returns signal, does not spawn). ## Notes - This slice does not spawn anything — it produces the recommendation MAIN consults. Spawn mechanism is Slice B.

    agent · flower-226-worker
  18. participant joined 1d ago
    system · flower-226-worker

epic · dependencies

Relationships

depends on

agents · waves

Participants

  • flower-226-worker participant · active
  • flower-231-worker participant · active
  • flower-orchestrator participant · active
  • flower-235-worker participant · active
  • system:commit-trailer participant · active

trace · graph

Links

  • Commit #4029 execution

scope

Projects

  • flower · primary

dogfood · read-only

Agent’s-eye view

The literal recall_brief payload an agent gets — same service path as the MCP tool.