1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//! Multi-Agent Coordination bounded context (Phase 27).
//!
//! Implements ADR-018 (multi-agent coordination via Claude Code's Agent
//! tool) and the `feature_orchestration.yml` contracts (`RUF-ORC-001..010`
//! plus the `MAC-INV-001..010` invariants).
//!
//! The bounded context owns runtime coordination across the nine CFA
//! specialist agents under `.claude/agents/cfa/`. The chief-analyst agent
//! is the orchestrator at session time; specialists are invoked through
//! Claude Code's Agent tool. The CFA platform itself does not run a
//! separate multi-agent runtime — this module records the trace, exposes
//! the entity graph, and emits A* plan trees over the registered MCP-tool
//! and slash-command action space.
//!
//! ## Module layout
//!
//! - [`types`] — domain types (`AgentInvocation`, `EntityRef`, `EntityKind`,
//! `EntityRelation`, `RelationKind`, `GoapPlan`, `PlanStep`, `PlanAction`,
//! `StepStatus`, `InvocationStatus`).
//! - [`agent_invoke`] — Claude Code Agent-tool delegation tracking, agent
//! slug validation against the registered CFA agent set, and parent-chain
//! cycle detection.
//! - [`entity_graph`] — `petgraph`-backed entity graph that owns entity
//! extraction for the platform. Tag-based extractor for tickers, CUSIPs,
//! sectors, issuers, and fund identifiers. (The Phase 26 stub that
//! previously lived in the memory context was removed in Phase 28
//! cleanup; this module is the sole owner.)
//! - [`goap_adapter`] — action-catalogue adapter exposing the registered
//! MCP tools and CFA slash commands as the planner's action space.
//! - [`planner`] — A* planner over the action catalogue using
//! [`pathfinding::directed::astar::astar`], with deterministic plan
//! hashing (djb2) and bounded replanning (default 3 per `MAC-INV-006`).
//! - [`budget`] — per-`(tenant, specialist)` plan budget verdicts; default
//! 8 steps per invocation and 1 concurrent invocation per specialist
//! (`RUF-ORC-009`).
//!
//! ## Feature gating
//!
//! The whole module is gated behind the `multi_agent` cargo feature at
//! the crate root (`lib.rs`). Internal files do not repeat the gate.
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;