Commit Graph
5 Commits
Author SHA1 Message Date
Affaan Mustafa 5c2fbce26e fix(control-pane): reject failed views and coalesce projection sampling 2026-09-12 03:11:12 -04:00
Affaan Mustafa ff03da1dc8 feat(control-pane): live control-plane view with 2D projection and static-threshold advisories
Wire scripts/lib/agent-proximity/ and the #3028 coordination inventory into
the control pane as one read-only live view, ecc.control-plane.view.v1,
shaped as tasks, lanes and events.

- agent-proximity/projection.js: rolling z-score per channel, tails clipped
  at the 2.5th and 97.5th percentile, mapped back to [0, 1], static channel
  weights, PCA (Jacobi on the 3x3 covariance) over x_tree, x_overlap, x_dep.
  Raw mode until the window holds 8 samples. No runtime dependencies.
- agent-proximity/index.js: airspace links now carry the per-channel values.
- agent-proximity/distance.js: rightOfWay(a, b) extracted from advise().
- control-pane/proximity.js: snapshot includes agent summaries (files,
  progress, startedAt) so the view can join sessions to working sets.
- control-pane/control-plane-view.js: builds the view from the snapshot;
  advisory events derived from every pair link against the view's static
  thresholds (ta 0.35, ra 0.7), deterministic ids, steer/hold from
  rightOfWay; lease conflicts from the inventory as events; inventory
  manifest built from live sessions with sanitized ids, declared-only.
- control-pane/server.js: GET /control-plane (self-contained page with the
  2D canvas), GET /api/control-plane, GET /api/control-plane/events; one
  projection window per server so z-scores roll across polls.
- docs/control-plane/VIEW-CONTRACT.md: the task/lane/event contract for
  reuse by the Ito ops control plane.
- docs/control-plane/TCAS-HOOK.md: design for slice (b), not implemented.

The view does not acquire leases, steer or pause agents, and claims no
conflict-reduction number.
2026-09-11 21:03:07 -04:00
Affaan MustafaandGitHub c7d62c0c6a Distinguish declared goals, open sessions and overlap risk in coordination inventory (#3028)
* feat: add read-only coordination inventory and overlap evaluation

* test: make coordination process fixtures platform explicit

* test: report bounded Stop wrapper failure diagnostics

* test: clean up failed memory MCP sessions deterministically

* fix: update js-yaml to patched 4.3.2

* feat(coordination): distinguish declared goals from open sessions
2026-09-10 14:11:51 +03:00
Affaan Mustafa bd1be0c1ce feat(layer4): line-range channel + trigger firing
- Line precision: parse git diff --unified=0 into per-file changed line ranges
  (defaultWorkingSetFor), so two agents in the SAME file but DIFFERENT functions
  no longer false-collide. Overlap channel now uses the overlap coefficient
  (|A∩B|/min(|A|,|B|)) — high when one edit sits inside the other's region, low
  for disjoint ranges; whole-file edit = 1. Docstring + design doc updated.
- Trigger firing: buildProximityTriggers() turns advisories into the concrete
  messages — transmit-intent to both on a Traffic Advisory, steer-away to the
  yielding agent + a hold notice on a Resolution Advisory. buildProximitySnapshot
  now returns triggers; dispatchProximityTriggers(triggers, {sendMessage}) delivers
  them through an injectable sink (the ECC messages table), best-effort.
- 12 new tests (line-range disjoint vs overlapping, parseDiffRanges, triggers,
  dispatch). Full suite 2881/2881; lint green.
2026-06-20 17:30:52 -04:00
Affaan Mustafa 726972d735 feat(layer4): agent-space distance metric + TCAS-style collision avoidance (v0)
The moat layer: spatial deconfliction for multiple agents (and humans) on one
codebase, modeled on aircraft TCAS — measure how close two agents are in
code-space, then transmit-intent (Traffic Advisory) and steer-away (Resolution
Advisory) before they collide at the git layer.

scripts/lib/agent-proximity/:
- distance.js — the math: per-channel collision probabilities combined via
  noisy-OR R = 1 - Π(1 - ω·r). Channels: edit overlap (file + line-range
  Jaccard), dependency coupling (γ^(d-1) over the import graph, direction-
  agnostic — catches 'edit there breaks here' even when tree-distant), and tree
  proximity (LCA-based, soft prior). TCAS advise(): clear / advisory(transmit) /
  resolution(steer), with deterministic right-of-way priority so the maneuver is
  coordinated. closureRate() for approach-speed escalation.
- graph.js — lightweight require/import dependency-graph builder (fs or in-memory).
- index.js — scanAirspace(): pairwise advisories + 3D vector embedding (space-
  filling path embedding pulled toward dependency neighbours) so a 'where are
  the agents' visualization can render the file-cloud and watch agents crawl /
  steer.

docs/design/agent-proximity.md — full mathematical formulation + protocol + viz
+ roadmap (v1 call-graph/symbol channels + live session-diff wiring; v2 cross-
machine airspace over Tailscale, the zero-conflict-swarm demo).

17 tests; full suite 2869/2869; lint green.
2026-06-20 15:40:40 -04:00