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 policy4---56# APEX-mcp-federation (O_Omega Orchestration Layer)78<cognitive-note model="claude">9This skill uses XML-tagged sections for native Claude parsing. Process each section independently.10Use extended context recall to maintain cross-organ state across the full procedure.11</cognitive-note>1213<cognitive-note model="codex">14This skill uses numbered steps with explicit input/output schemas. Follow each step in order.15Validate schema conformance before proceeding to next step. Log chain-of-thought at each gate.16</cognitive-note>1718<cognitive-note model="hermes">19Direct imperative format. No fluff. Route tasks. Execute sequence. Verify outputs. Report results.20If server fails: fallback. If governance fails: 888_HOLD. If all fails: escalate.21</cognitive-note>2223## arifOS-ACT Embedding2425<act-protocol>26Before using this skill on any mutating, irreversible, or high-blast-radius task:2728**Step 1 — ART (Codex: validate each sub-step)**29- Attune: What is the real task?30- Recognize: What class of power? (Observer/Maker/Messenger/Mutator/Destroyer/Sovereign)31- Test: fit · authority · evidence · blast · reversible3233**Step 2 — Kernel Route (Claude: <kernel-gate>)**34- If action class is Maker/Mutter/Destroyer/Sovereign → route to arifOS for F1-F13 judgment35- Governance path must reach arifOS tools, never A-FORGE directly3637**Step 3 — ACT (Hermes: do it)**38- Apply narrow scope39- Constrain blast radius40- Trace witness41- STOP before corruption4243**Step 4 — Receipt**44- Leave evidence: what changed, why, under whose authority45</act-protocol>4647## Purpose48Route tasks across MCP servers, coordinate server/tool sequences, and define fallbacks when one substrate fails.4950## Use When511. A complex task spans multiple distinct organ environments (GEOX, WEALTH, WELL, A-FORGE)522. Coordinating sequential multi-tool calls across different MCP servers533. Defining fallback routes when an MCP server goes offline544. Auditing active FastMCP server registries555. Verifying cross-organ constitutional floors during A2A communication5657## Do Not Use When581. Task is entirely within a single local directory592. Writing standard localized components603. Task requires structural changes to a specific tool's internal code6162## Inputs63<schema codex="strict">64| Input | Type | Required | Description |65|-------|------|----------|-------------|66| intent | string | yes | High-level pipeline task |67| server_registry | object | yes | Active MCP endpoints |68| client_connections | array | yes | Active SSE/stdio channels |69| fallback_policy | string | no | "graceful" or "fail-fast" |70</schema>7172## Procedure7374<procedure claude="xml-tagged" codex="numbered" hermes="imperative">7576### Step 1: Intent Mapping + Brain/Hands Classification77<step id="1" input="user_intent" output="routing_plan">78- **Codex:** Parse intent → identify required tools → classify each as governance or execution → build routing graph79- **Claude:** Use <intent-analysis> to decompose multi-organ requirements. Recall prior routing state from extended context.80- **Hermes:** What does the user need? Which organ has it? Route.8182**Routing Rules:**83- Governance, judgment, floors, memory mutation, sealing → **arifOS MCP (8088) FIRST**84- Execution, build, shell, browser, jobs → **A-FORGE MCP (7072)** only after lease85- Domain intelligence → **GEOX (8081) / WEALTH (18082) / WELL (18083)** as needed86</step>8788### Step 2: Tool Sequence Plan89<step id="2" input="routing_plan" output="tool_sequence">90- **Codex:** Build ordered tool list. For each: input_schema, output_schema, dependency, fallback. Validate all schemas chain.91- **Claude:** Use <sequence-planning> to construct graph. Identify parallel branches. Insert governance gates.92- **Hermes:** List tools in order. Add arif_judge before any high-risk A-FORGE call. Done.9394**Schema (each tool call):**95```json96{97 "tool": "tool_name",98 "server": "arifos|aforge|geox|wealth|well",99 "input": {},100 "output_schema": {},101 "depends_on": ["step_id"],102 "fallback": "alternative_tool or null",103 "governance_gate": true|false104}105```106</step>107108### Step 3: F8 Cross-Organ Gating + Lease/Judge Handoff109<step id="3" input="tool_sequence" output="gated_sequence">110- Enforce Floor F8 (Genius/Systemic Health)111- Any mutate/atomic forge_* requires valid lease_id112- Governance paths must reach arifOS canonical tools113- **Codex:** Validate lease_id exists before any A-FORGE call. Log gate decision.114- **Claude:** Use <governance-gate> to verify floor compliance. Recall floor state from context.115- **Hermes:** Need lease? Get lease. No lease? 888_HOLD. Simple.116</step>117118### Step 4: Sequential Execution & Verification119<step id="4" input="gated_sequence" output="execution_results">120- Execute step-by-step121- Verify output of each tool before piping to next122- Reject any pipe that lets A-FORGE issue or bypass 888/999 verdicts123- **Codex:** After each step, validate output matches expected schema. Log chain-of-thought.124- **Claude:** Use <verification> after each step. Cross-reference with extended context for anomalies.125- **Hermes:** Run tool. Check output. If bad: stop. If good: next tool.126</step>127128### Step 5: Fallback Routing129<step id="5" input="failure_event" output="fallback_result">130- If server fails or times out:131 1. Identify equivalent alternative tools132 2. Gracefully degrade execution loop133 3. Log failure trace134 4. Notify ASI-observability135 5. On governance substrate failure: escalate to 888_HOLD; NEVER fall back to execution-only path136- **Codex:** Check fallback list in order. First viable alternative wins. Log decision.137- **Claude:** Use <fallback-reasoning> to select best alternative considering full context.138- **Hermes:** Server down? Try backup. Backup down? 888_HOLD. All down? Escalate.139</step>140141### Step 6: Telemetry Serialization142<step id="6" input="execution_results" output="telemetry_log">143- Record cross-organ connection path144- Record which MCP surface was used for judgment vs execution145- Record lease_id (if any)146- Record tool success counts147- Emit to AAA for lease-compliance and seal-latency metrics148</step>149150</procedure>151152## Postconditions1531. All sequential tool outputs verified and validated1542. Alternative backup routes executed automatically if primary fails1553. Complete cross-server trace recorded for F11 auditability156157## Failure Modes & Escalation158- **Substrate Collapse:** All MCP servers unreachable → degrade, log ERR_MCP_SUBSTRATE_COLLAPSE, halt high-stakes, prompt user159- **Data Pipeline Mismatch:** Output A ≠ Input B schema → invoke hold protocol, refuse to pipe, alert developer160161## Floors162- F2 TRUTH: Tool outputs verified before piping. No silent corruption.163- F3 TRI-WITNESS: Cross-organ consensus required for high-stakes routing.164- F4 CLARITY: Routing plan must be more structured than raw intent.165- F8 GENIUS: Systemic health maintained across organ boundaries.166- F11 AUDITABILITY: Full routing trace logged.