flower
/
All briefs
complete note flower

Brief dependency chains with agent-affinity (v2 of #31)

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.

provenance · append-only

Trace

live
or paste a screenshot uploading…
  1. link added 4d ago
    agent · system:commit-trailer
  2. link added 4d ago
    agent · system:commit-trailer
  3. link added 4d ago
    agent · system:commit-trailer
  4. participant joined 4d ago
    system · system:commit-trailer
  5. status change 4d ago
    agent · flower-orchestrator
  6. note added 4d ago

    Implementation complete on branch flower/brief-affinity; not merged. Commits: a4d956f Capture dispatch affinity targets; c31524e Surface dependency affinity hints; 0b096ec Show brief affinity in dispatchable view. All include `Brief: #32`. Behavior: dispatch_requests now record optional agent_tool/session_id alongside existing target worktree; completion/unblock stores and returns affinity hints for dependents; recall_dispatch_queue and /briefs dispatchable view surface the hint only when predecessor lane/agent metadata exists. No auto-spawn behavior added. Verification: focused brief/MCP/recall/UI/Foundation tests passed (34 tests, 378 assertions); QueryEfficiencyAuditTest passed; Pint passed; full `~/bin/php artisan test` passed (463 tests, 462 passed, 1 skipped, 3280 assertions).

    agent · codex:flower/wt2
  7. link added 4d ago
    agent · flower-orchestrator
  8. note added 4d ago

    Started implementation on branch flower/brief-affinity from master. Grounded via recall_brief #32 and prior #31 relation/dispatch recall; building additive affinity capture + surface only, with no auto-spawn behavior.

    agent · codex:flower/wt2
  9. participant joined 4d ago
    system · codex:flower/wt2
  10. status change 4d ago
    agent · flower-orchestrator
  11. refinement 4d ago

    ## Problem (v2 of #31) #31 shipped brief epic-grouping (`parent_brief_id`) + depends-on gating (`brief_dependencies`, dispatch refused when blocked, unblock-on-complete returning newly-unblocked ids). v2 adds **agent-affinity for dependency chains**: when a completed brief unblocks a dependent, prefer re-dispatching the successor to the SAME lane/agent that did the predecessor (warm context continuity). ## Scope (additive on #31's BriefRelationService + DispatchService) 1. **Capture affinity:** when a brief is dispatched, record the target lane/agent (target_worktree + agent_tool + session_id) on the dispatch_request / brief. On completion + unblock, this becomes the affinity hint for dependents. 2. **Surface it:** annotate each dispatchable brief in `recall_dispatch_queue` (and the #31 newly_unblocked return) with its `affinity` hint (suggested lane/agent from the predecessor). Add to `/briefs` dispatchable view. 3. **Honor it (hint only):** the orchestrator can dispatch a chained successor to the affinity target by default. **Do NOT auto-spawn agents** — affinity is a hint; dispatch stays orchestrator-mediated. ## Acceptance - Dispatched briefs record their lane/agent; unblocked dependents carry an affinity hint surfaced in `recall_dispatch_queue`. - Additive, no behavior change when no affinity exists. Tests; suite green. `Brief: #32` trailer. - No auto-spawn. ## Notes Touches briefs/DispatchService/BriefRelationService/recall — serialize its merge after #42 if they touch DispatchService (resolve additively). #33 (merge/collapse, v3) comes after this. ## Provenance v2 of #31 (operator: chaining scope = depends-on gating done in v1; agent-affinity = v2). Refined by orchestrator 2026-07-01. Chain onto #31.

    agent · flower-orchestrator
  12. spec snapshot 4d ago

    ## Goal (v2 of Brief #31 — depends on #31's depends-on gating) Build on #31: when a brief on a dependency chain completes and its dependent unblocks, HAND the dependent to the SAME agent that did the predecessor if that agent is free — else requeue for the orchestrator. ## Scope - Add an optional preferred-agent affinity on a dependency edge (or brief). - On complete → unblock a dependent: if it has a preferred agent (e.g. the one that did the predecessor) and that agent is idle, dispatch to it directly + alert "next task on your chain"; else return to the queue. - Design-agent scenario: a follow-up arrives while the design agent is on a task → chain it onto the in-process brief, assigned to that agent → when it finishes it's alerted to the next link. ## Depends on Brief #31 (epic grouping + depends-on gating). CHAIN this onto #31 once #31 lands. ## Provenance Brief #31 refinement (2026-07-01): chain-with-agent-affinity deferred to v2; operator asked to capture as a p2 brief to chain onto #31.

    system · flower-orchestrator
  13. plan proposed 4d ago

    ## Goal (v2 of Brief #31 — depends on #31's depends-on gating) Build on #31: when a brief on a dependency chain completes and its dependent unblocks, HAND the dependent to the SAME agent that did the predecessor if that agent is free — else requeue for the orchestrator. ## Scope - Add an optional preferred-agent affinity on a dependency edge (or brief). - On complete → unblock a dependent: if it has a preferred agent (e.g. the one that did the predecessor) and that agent is idle, dispatch to it directly + alert "next task on your chain"; else return to the queue. - Design-agent scenario: a follow-up arrives while the design agent is on a task → chain it onto the in-process brief, assigned to that agent → when it finishes it's alerted to the next link. ## Depends on Brief #31 (epic grouping + depends-on gating). CHAIN this onto #31 once #31 lands. ## Provenance Brief #31 refinement (2026-07-01): chain-with-agent-affinity deferred to v2; operator asked to capture as a p2 brief to chain onto #31.

    agent · flower-orchestrator
  14. note added 4d ago

    v2 of #31: same-agent handoff on chain unblock, else requeue. Chains onto #31.

    agent · flower-orchestrator
  15. participant joined 4d ago
    system · flower-orchestrator

epic · dependencies

Relationships

epic parent

depends on

No dependencies — dispatchable once planned.

agents · waves

Participants

  • flower-orchestrator participant · active
  • codex:flower/wt2 participant · active
  • system:commit-trailer participant · active

trace · graph

Links

  • Commit #1213 execution
  • Commit #1214 execution
  • Commit #1215 execution
  • Scratchpad #346 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.