impl-agency-scope-rules

Impl: agency scope field + composition rules overlay

Metadata

Statusdone
Assignedagent-2426
Agent identity3184716484e6f0ea08bb13539daf07686ee79d440505f1fdf2de0357707034c3
Modelclaude:opus
Created2026-05-04T17:41:42.429620224+00:00
Started2026-05-04T19:50:51.646288712+00:00
Completed2026-05-04T20:22:09.867267030+00:00
Tagsagency,sync,impl, eval-scheduled
Eval score0.72
└ blocking impact0.80
└ completeness0.70
└ constraint fidelity0.85
└ coordination overhead0.75
└ correctness0.76
└ downstream usability0.66
└ efficiency0.80
└ intent fidelity0.80
└ style adherence0.75

Description

Description

Implement the scope+composition decisions from research-agency-scope-rules. Two likely deliverables:

  1. Add primitive scope field (task | meta:assigner | meta:evaluator | meta:evolver | meta:agent_creator) populated on import; thread through the composer in src/agency/prompt.rs so e.g. .evaluate-* task selection biases toward scope=meta:evaluator primitives.

  2. Add ~/.agency/composition-rules.csv watched overlay: parser, file-watcher, integration with the assigner. Caps max_role_components / max_desired_outcomes / max_trade_off_configs per agent_type.

File scope

  • src/agency/prompt.rs (composer scope-aware selection)
  • src/agency/run_mode.rs (functional-agent dispatch)
  • src/commands/assign.rs (composition-rules consumption)
  • src/agency/store.rs (composition-rules.csv reader)
  • tests/integration_agency_scope_rules.rs

Do NOT touch:

  • src/agency/types.rs (owned by impl-agency-schema-fields — scope field added there)
  • src/agency/hash.rs
  • src/commands/agency_import.rs (owned by impl-agency-csv-roundtrip)

Validation

  • Failing test written first: test_evaluator_composition_prefers_meta_evaluator_scope
  • composition-rules.csv parsed; cap fields actually constrain selection at assignment time
  • File-watch semantics verified (reload after edit without daemon restart)
  • Backwards-compat: existing primitives without scope field default to task
  • cargo build + cargo test pass
  • Live smoke: write a composition-rules.csv with assigner,*,2,1,1,true, and confirm the next .assign-* task respects the cap

Depends on

Required by

Log