APEX-mcp-federation (O_Omega Orchestration Layer)
arifOS-ACT Embedding
Step 1 — ART (Codex: validate each sub-step)
- Attune: What is the real task?
- Recognize: What class of power? (Observer/Maker/Messenger/Mutator/Destroyer/Sovereign)
- Test: fit · authority · evidence · blast · reversible
Step 2 — Kernel Route (Claude: )
- If action class is Maker/Mutter/Destroyer/Sovereign → route to arifOS for F1-F13 judgment
- Governance path must reach arifOS tools, never A-FORGE directly
Step 3 — ACT (Hermes: do it)
- Apply narrow scope
- Constrain blast radius
- Trace witness
- STOP before corruption
Step 4 — Receipt
- Leave evidence: what changed, why, under whose authority
Purpose
Route tasks across MCP servers, coordinate server/tool sequences, and define fallbacks when one substrate fails.
Use When
- A complex task spans multiple distinct organ environments (GEOX, WEALTH, WELL, A-FORGE)
- Coordinating sequential multi-tool calls across different MCP servers
- Defining fallback routes when an MCP server goes offline
- Auditing active FastMCP server registries
- Verifying cross-organ constitutional floors during A2A communication
Do Not Use When
- Task is entirely within a single local directory
- Writing standard localized components
- Task requires structural changes to a specific tool's internal code
Inputs
Procedure
Step 1: Intent Mapping + Brain/Hands Classification
Routing Rules:
- Governance, judgment, floors, memory mutation, sealing → arifOS MCP (8088) FIRST
- Execution, build, shell, browser, jobs → A-FORGE MCP (7072) only after lease
- Domain intelligence → GEOX (8081) / WEALTH (18082) / WELL (18083) as needed
Step 2: Tool Sequence Plan
Schema (each tool call):
{
"tool": "tool_name",
"server": "arifos|aforge|geox|wealth|well",
"input": {},
"output_schema": {},
"depends_on": ["step_id"],
"fallback": "alternative_tool or null",
"governance_gate": true|false
}
Step 3: F8 Cross-Organ Gating + Lease/Judge Handoff
Step 4: Sequential Execution & Verification
Step 5: Fallback Routing
Step 6: Telemetry Serialization
Postconditions
- All sequential tool outputs verified and validated
- Alternative backup routes executed automatically if primary fails
- Complete cross-server trace recorded for F11 auditability
Failure Modes & Escalation
- Substrate Collapse: All MCP servers unreachable → degrade, log ERR_MCP_SUBSTRATE_COLLAPSE, halt high-stakes, prompt user
- Data Pipeline Mismatch: Output A ≠ Input B schema → invoke hold protocol, refuse to pipe, alert developer
Floors
- F2 TRUTH: Tool outputs verified before piping. No silent corruption.
- F3 TRI-WITNESS: Cross-organ consensus required for high-stakes routing.
- F4 CLARITY: Routing plan must be more structured than raw intent.
- F8 GENIUS: Systemic health maintained across organ boundaries.
- F11 AUDITABILITY: Full routing trace logged.
1---2name: apex-tool-approval-gate3description: Gate and route tool use across federation MCP servers according to authority, risk, and fallback policy4agent: 888-APEX5namespace: apex_*6cluster: GATE7capability_tier: fed-reasoning-heavy8ecology_state: WARM9---1011# APEX-mcp-federation (O_Omega Orchestration Layer)1213<cognitive-note model="claude">14This skill uses XML-tagged sections for native Claude parsing. Process each section independently.15Use extended context recall to maintain cross-organ state across the full procedure.16</cognitive-note>1718<cognitive-note model="codex">19This skill uses numbered steps with explicit input/output schemas. Follow each step in order.20Validate schema conformance before proceeding to next step. Log chain-of-thought at each gate.21</cognitive-note>2223<cognitive-note model="hermes">24Direct imperative format. No fluff. Route tasks. Execute sequence. Verify outputs. Report results.25If server fails: fallback. If governance fails: 888_HOLD. If all fails: escalate.26</cognitive-note>2728## arifOS-ACT Embedding2930<act-protocol>31Before using this skill on any mutating, irreversible, or high-blast-radius task:3233**Step 1 — ART (Codex: validate each sub-step)**34- Attune: What is the real task?35- Recognize: What class of power? (Observer/Maker/Messenger/Mutator/Destroyer/Sovereign)36- Test: fit · authority · evidence · blast · reversible3738**Step 2 — Kernel Route (Claude: <kernel-gate>)**39- If action class is Maker/Mutter/Destroyer/Sovereign → route to arifOS for F1-F13 judgment40- Governance path must reach arifOS tools, never A-FORGE directly4142**Step 3 — ACT (Hermes: do it)**43- Apply narrow scope44- Constrain blast radius45- Trace witness46- STOP before corruption4748**Step 4 — Receipt**49- Leave evidence: what changed, why, under whose authority50</act-protocol>5152## Purpose53Route tasks across MCP servers, coordinate server/tool sequences, and define fallbacks when one substrate fails.5455## Use When561. A complex task spans multiple distinct organ environments (GEOX, WEALTH, WELL, A-FORGE)572. Coordinating sequential multi-tool calls across different MCP servers583. Defining fallback routes when an MCP server goes offline594. Auditing active FastMCP server registries605. Verifying cross-organ constitutional floors during A2A communication6162## Do Not Use When631. Task is entirely within a single local directory642. Writing standard localized components653. Task requires structural changes to a specific tool's internal code6667## Inputs68<schema codex="strict">69| Input | Type | Required | Description |70|-------|------|----------|-------------|71| intent | string | yes | High-level pipeline task |72| server_registry | object | yes | Active MCP endpoints |73| client_connections | array | yes | Active SSE/stdio channels |74| fallback_policy | string | no | "graceful" or "fail-fast" |75</schema>7677## Procedure7879<procedure claude="xml-tagged" codex="numbered" hermes="imperative">8081### Step 1: Intent Mapping + Brain/Hands Classification82<step id="1" input="user_intent" output="routing_plan">83- **Codex:** Parse intent → identify required tools → classify each as governance or execution → build routing graph84- **Claude:** Use <intent-analysis> to decompose multi-organ requirements. Recall prior routing state from extended context.85- **Hermes:** What does the user need? Which organ has it? Route.8687**Routing Rules:**88- Governance, judgment, floors, memory mutation, sealing → **arifOS MCP (8088) FIRST**89- Execution, build, shell, browser, jobs → **A-FORGE MCP (7072)** only after lease90- Domain intelligence → **GEOX (8081) / WEALTH (18082) / WELL (18083)** as needed91</step>9293### Step 2: Tool Sequence Plan94<step id="2" input="routing_plan" output="tool_sequence">95- **Codex:** Build ordered tool list. For each: input_schema, output_schema, dependency, fallback. Validate all schemas chain.96- **Claude:** Use <sequence-planning> to construct graph. Identify parallel branches. Insert governance gates.97- **Hermes:** List tools in order. Add arif_judge before any high-risk A-FORGE call. Done.9899**Schema (each tool call):**100```json101{102 "tool": "tool_name",103 "server": "arifos|aforge|geox|wealth|well",104 "input": {},105 "output_schema": {},106 "depends_on": ["step_id"],107 "fallback": "alternative_tool or null",108 "governance_gate": true|false109}110```111</step>112113### Step 3: F8 Cross-Organ Gating + Lease/Judge Handoff114<step id="3" input="tool_sequence" output="gated_sequence">115- Enforce Floor F8 (Genius/Systemic Health)116- Any mutate/atomic forge_* requires valid lease_id117- Governance paths must reach arifOS canonical tools118- **Codex:** Validate lease_id exists before any A-FORGE call. Log gate decision.119- **Claude:** Use <governance-gate> to verify floor compliance. Recall floor state from context.120- **Hermes:** Need lease? Get lease. No lease? 888_HOLD. Simple.121</step>122123### Step 4: Sequential Execution & Verification124<step id="4" input="gated_sequence" output="execution_results">125- Execute step-by-step126- Verify output of each tool before piping to next127- Reject any pipe that lets A-FORGE issue or bypass 888/999 verdicts128- **Codex:** After each step, validate output matches expected schema. Log chain-of-thought.129- **Claude:** Use <verification> after each step. Cross-reference with extended context for anomalies.130- **Hermes:** Run tool. Check output. If bad: stop. If good: next tool.131</step>132133### Step 5: Fallback Routing134<step id="5" input="failure_event" output="fallback_result">135- If server fails or times out:136 1. Identify equivalent alternative tools137 2. Gracefully degrade execution loop138 3. Log failure trace139 4. Notify ASI-observability140 5. On governance substrate failure: escalate to 888_HOLD; NEVER fall back to execution-only path141- **Codex:** Check fallback list in order. First viable alternative wins. Log decision.142- **Claude:** Use <fallback-reasoning> to select best alternative considering full context.143- **Hermes:** Server down? Try backup. Backup down? 888_HOLD. All down? Escalate.144</step>145146### Step 6: Telemetry Serialization147<step id="6" input="execution_results" output="telemetry_log">148- Record cross-organ connection path149- Record which MCP surface was used for judgment vs execution150- Record lease_id (if any)151- Record tool success counts152- Emit to AAA for lease-compliance and seal-latency metrics153</step>154155</procedure>156157## Postconditions1581. All sequential tool outputs verified and validated1592. Alternative backup routes executed automatically if primary fails1603. Complete cross-server trace recorded for F11 auditability161162## Failure Modes & Escalation163- **Substrate Collapse:** All MCP servers unreachable → degrade, log ERR_MCP_SUBSTRATE_COLLAPSE, halt high-stakes, prompt user164- **Data Pipeline Mismatch:** Output A ≠ Input B schema → invoke hold protocol, refuse to pipe, alert developer165166## Floors167- F2 TRUTH: Tool outputs verified before piping. No silent corruption.168- F3 TRI-WITNESS: Cross-organ consensus required for high-stakes routing.169- F4 CLARITY: Routing plan must be more structured than raw intent.170- F8 GENIUS: Systemic health maintained across organ boundaries.171- F11 AUDITABILITY: Full routing trace logged.