Claude Cowork Integration
Claude Cowork Integration Runtime
Claude is integrated as a governed external reasoning worker. bp Sphere owns context, evidence, policy, authority, replay, learning, and enterprise memory; Claude receives a redacted context pack and can only use read-only or draft-only Sphere tools.
Target architecture
The integration exposes a secure Sphere context gateway to Claude Cowork. Claude never receives raw SAP, Ariba, Databricks, ServiceNow, Outlook, or Teams access.
1. Remote MCP
POST /mcp exposes governed Sphere tools to Claude Cowork over HTTPS. This is the production analyst/supervisor connector path.
2. Claude API
POST /api/claude-cowork/claude-api/draft-memo lets Sphere call Claude headlessly when ANTHROPIC_API_KEY is configured.
3. Claude Code CLI
For engineering automation on the NVIDIA server, use headless CLI tasks separately from business decision workflows. Repo access does not grant finance write authority.
Boundary model
| Layer | Claude gets | Sphere retains |
|---|---|---|
| Context | Case brief, mission, role, evidence summary, allowed tools | Full graph, raw SOR, policies, lineage, audit logs |
| Retrieval | Only through Sphere MCP/API tools | SAP, Ariba, Databricks, ServiceNow, Outlook, Teams adapters |
| Actions | Draft memo, explanation, escalation draft, test plan | Execute, approve, write-back, escalate, replay |
| Memory | Session-scoped working memory | Enterprise finance memory and learning runtime |
| Governance | Tool permissions and redacted context | Identity, policy, evidence, lineage, human authority |
Context pack contract
What Claude receives
claude_cowork_context_pack_v1 with tenant, mission, role, selected case, business goal, facts, policy checks, evidence refs, lineage refs, allowed tools, forbidden actions, and required output schema.
What is withheld
Raw source records, unrestricted enterprise graph, direct system credentials, policy execution authority, write-back permissions, and enterprise memory mutation rights.
Usability pattern
Claude Cowork is useful only when it feels like a natural extension of case work. Sphere should open Claude with a selected case, a visible context card, prebuilt prompts, structured output expectations, and save/replay actions.
Context Card
Sharing with Claude: case, supplier profile, invoice/PO/receipt/prior-payment evidence refs, duplicate policy, similar prior cases, role, and authority boundary.
Authority Label
Claude Recommendation · Human Approval Required · No SAP write performed · No payment released
Deep Links
Every response points back to case, evidence pack, replay record, policy check, and similar cases in Sphere.
Consistent entry points
| Location | Action label | Rule |
|---|---|---|
| Case Drawer | Ask Claude Cowork | Consistent business action label |
| Evidence Pack | Explain with Claude | Consistent business action label |
| Policy Section | Interpret policy | Consistent business action label |
| Replay View | Review decision path | Consistent business action label |
| Supervisor Queue | Draft escalation | Consistent business action label |
| Agent Audit Page | Review agent logic | Consistent business action label |
Suggested prompts
| # | Prompt | Pattern |
|---|---|---|
| 1 | Analyze this case | Prebuilt prompt, not blank chat |
| 2 | Find missing evidence | Prebuilt prompt, not blank chat |
| 3 | Explain why this was flagged | Prebuilt prompt, not blank chat |
| 4 | Compare with similar cases | Prebuilt prompt, not blank chat |
| 5 | Draft supplier clarification | Prebuilt prompt, not blank chat |
| 6 | Draft supervisor escalation | Prebuilt prompt, not blank chat |
| 7 | Review agent recommendation | Prebuilt prompt, not blank chat |
| 8 | Review policy position | Prebuilt prompt, not blank chat |
Structured output
| # | Section | Requirement |
|---|---|---|
| 1 | Finding | Required in Claude response |
| 2 | Risk | Required in Claude response |
| 3 | Evidence used | Required in Claude response |
| 4 | Missing evidence | Required in Claude response |
| 5 | Policy position | Required in Claude response |
| 6 | Recommended next step | Required in Claude response |
| 7 | Human decision required | Required in Claude response |
| 8 | Confidence | Required in Claude response |
| 9 | Links back to Sphere | Required in Claude response |
After Claude responds
| # | Action | Boundary |
|---|---|---|
| 1 | Save analysis to case | Human-controlled post-response action |
| 2 | Save as supervisor note | Human-controlled post-response action |
| 3 | Create escalation draft | Human-controlled post-response action |
| 4 | Create supplier query draft | Human-controlled post-response action |
| 5 | Add to replay | Human-controlled post-response action |
| 6 | Discard | Human-controlled post-response action |
Skill Manifest is separate from context
SKILL.md helps humans and models understand a reusable capability, but it does not share enterprise context. Sphere now exposes a governed Skill Manifest plus a selected-case Context Pack and MCP tools.
Skill Manifest
Defines what the skill is, owner, mission, authority, risk, evidence requirements, policies, tools, output schema, replay, learning, and model support.
Context Pack
Defines the selected case: facts, evidence refs, policy checks, lineage refs, similar cases, allowed tools, forbidden actions, and output schema.
MCP tools
Allow Claude to retrieve approved context and draft outputs through Sphere. Claude never receives direct SAP, Ariba, Databricks, Teams, Outlook, or ServiceNow access.
| Example skill | claude_cowork.duplicate_invoice_investigator |
|---|---|
| Execution mode | llm_first |
| Authority | reason_and_draft_only |
| Prompt separation | Skill manifest references prompt templates; it does not embed provider-specific prompt text. |
| Replay required | True |
Remote MCP / API tools
| Tool | Mode | Purpose |
|---|---|---|
| get_case_context | read_only | Gives Claude selected case context |
| get_case_summary | read_only | Returns governed case summary |
| get_my_p2p_work_queue | read_only | Returns the role-scoped P2P invoice queue through the Experience API |
| open_invoice_detail | read_only | Returns the same P2P invoice detail contract used by the web drawer |
| show_invoice_evidence | read_only | Returns the source-bound evidence stage for a P2P invoice |
| show_allowed_actions | read_only | Returns action eligibility from the shared authority runtime |
| show_decision_replay | read_only | Returns the replay stage for a P2P invoice |
| search_evidence_pack | read_only | Retrieves approved evidence snippets |
| get_policy_position | read_only | Returns controls and authority gates |
| get_lineage | read_only | Shows source systems, freshness, and SOR/cache status |
| compare_similar_cases | read_only | Finds prior outcomes and learning patterns |
| draft_decision_memo | draft_only | Produces structured recommendation draft |
| create_human_task_draft | draft_only | Drafts Teams/Outlook escalation without sending |
| create_servicenow_ticket | draft_only | Submits a governed ticket-creation intent; never writes directly to ServiceNow |
| open_pr_context | read_only | Shares implementation issue/code context |
| run_readonly_audit | read_only | Runs non-mutating audit checks |
Four gates
| Gate | Rule | Enforcement |
|---|---|---|
| context_gate | minimum required case context only | Sphere-enforced before Claude receives context or tool result |
| tool_gate | read-only tools unless draft-only | Sphere-enforced before Claude receives context or tool result |
| authority_gate | no write-back without Sphere approval | Sphere-enforced before Claude receives context or tool result |
| replay_gate | context, tools, output, and human decision are logged | Sphere-enforced before Claude receives context or tool result |
Forbidden actions
release_payment, update_sap, override_policy, approve_invoice, change_master_data, post_journal, send_supplier_message, create_source_system_write
Memory rule
Claude has session memory only. Enterprise learning and decision memory stay in Sphere.
Control rule
No payment release, SAP update, policy override, invoice approval, journal posting, or master-data change can be performed by Claude.
Implemented API shape
| Method | Endpoint | Purpose |
|---|---|---|
| GET | /api/claude-cowork/manifest | Capability stance and governance model. |
| GET | /api/claude-cowork/experience | Role-specific entry points, suggested prompts, output guide, save actions, and links. |
| POST | /api/claude-cowork/context-pack | Build redacted context pack for a selected case. |
| POST | /api/claude-cowork/model-skill-context | Build provider-neutral Skill Manifest + Context Pack + MCP tool package. |
| GET | /api/claude-cowork/mcp/manifest | Remote MCP/API connector manifest and tool list. |
| POST | /api/claude-cowork/tool-call | Execute read-only or draft-only Sphere tool contract. |
| POST | /api/claude-cowork/draft-memo | Create decision-support memo output shape. |
| POST | /api/claude-cowork/claude-api/draft-memo | Optional headless Claude API call when ANTHROPIC_API_KEY is configured. |
| POST | /api/claude-cowork/replay | Log prompt, context pack, tool calls, output, and human decision. |
| GET | /api/enterprise-skill-contracts/manifest/{skill_id} | Inspect governed enterprise skill manifest. |
| POST | /mcp | Remote MCP JSON-RPC endpoint for Claude Cowork custom connector. |