Commit 9e40a86
feat(local-coord-mcp): reassignment suggestion engine (Task #14)
Engine emits candidate envelopes INTO the quarantine (server-origin,
sender_idx=0xFE sentinel) for supervisor review via the existing
coord_review + coord_approve / coord_reject flow. Never auto-modifies
affinities.
New FFI + tools:
coord_set_declared_affinities(token, tags_csv) — self-reported strengths
coord_scan_suggestions(token) — runs scan, enqueues candidates
Scanner rules:
overclaim: avg_confidence >= 80% AND effective_affinity < 30% -> op_kind=fyi
promote: effective_affinity >= 70% AND tag not declared -> op_kind=fyi
remove: effective_affinity <= 20% AND attempts >= 5 -> op_kind=clarify
coord_report_outcome now takes an optional confidence_pct (8th arg,
-1 for unset). Log format extends track_update with a trailing
confidence byte (backward-compatible via length-check). coord_register
accepts an optional declared_affinities array.
coord_review adapter output adds an "origin" field
("peer" | "server-engine") so supervisors can tell engine-synthesised
suggestions from real peer messages.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 3e9eae8 commit 9e40a86
6 files changed
Lines changed: 534 additions & 24 deletions
File tree
- cartridges/local-coord-mcp
- adapter
- ffi
- mcp-bridge
- lib
Lines changed: 83 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
112 | 136 | | |
113 | 137 | | |
114 | 138 | | |
| |||
374 | 398 | | |
375 | 399 | | |
376 | 400 | | |
377 | | - | |
378 | | - | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
379 | 406 | | |
380 | 407 | | |
381 | 408 | | |
| |||
429 | 456 | | |
430 | 457 | | |
431 | 458 | | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
432 | 468 | | |
433 | 469 | | |
434 | 470 | | |
| |||
450 | 486 | | |
451 | 487 | | |
452 | 488 | | |
453 | | - | |
| 489 | + | |
454 | 490 | | |
455 | 491 | | |
456 | 492 | | |
457 | 493 | | |
458 | 494 | | |
459 | 495 | | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
460 | 540 | | |
461 | 541 | | |
462 | 542 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
48 | 55 | | |
49 | 56 | | |
50 | 57 | | |
| |||
325 | 332 | | |
326 | 333 | | |
327 | 334 | | |
328 | | - | |
| 335 | + | |
329 | 336 | | |
330 | 337 | | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
331 | 344 | | |
332 | 345 | | |
333 | 346 | | |
| |||
382 | 395 | | |
383 | 396 | | |
384 | 397 | | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
385 | 438 | | |
386 | 439 | | |
387 | | - | |
| 440 | + | |
388 | 441 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
327 | 327 | | |
328 | 328 | | |
329 | 329 | | |
330 | | - | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
331 | 334 | | |
332 | 335 | | |
333 | 336 | | |
| |||
339 | 342 | | |
340 | 343 | | |
341 | 344 | | |
| 345 | + | |
342 | 346 | | |
343 | 347 | | |
344 | | - | |
| 348 | + | |
345 | 349 | | |
346 | 350 | | |
347 | 351 | | |
348 | 352 | | |
349 | 353 | | |
350 | 354 | | |
351 | 355 | | |
352 | | - | |
| 356 | + | |
| 357 | + | |
353 | 358 | | |
354 | 359 | | |
355 | 360 | | |
| |||
463 | 468 | | |
464 | 469 | | |
465 | 470 | | |
| 471 | + | |
466 | 472 | | |
467 | 473 | | |
468 | 474 | | |
469 | 475 | | |
470 | 476 | | |
| 477 | + | |
471 | 478 | | |
472 | 479 | | |
473 | 480 | | |
474 | 481 | | |
475 | 482 | | |
476 | 483 | | |
477 | 484 | | |
| 485 | + | |
478 | 486 | | |
479 | 487 | | |
480 | 488 | | |
| |||
611 | 619 | | |
612 | 620 | | |
613 | 621 | | |
614 | | - | |
| 622 | + | |
615 | 623 | | |
616 | 624 | | |
617 | 625 | | |
| |||
642 | 650 | | |
643 | 651 | | |
644 | 652 | | |
| 653 | + | |
645 | 654 | | |
0 commit comments