Skip to content

Slack And Browser Integration Sketch

Slack and browser integrations are the fastest way to prove Planisphere covers real team behavior.

Slack

The existing private core already has a Slack-shaped adapter for legal AI work. It turns a Slack message/shortcut payload into a source event and law action proposal without storing raw text in metadata.

Good first workflow:

  1. Employee or lawyer selects an AI-generated answer in Slack.
  2. Slack shortcut calls Planisphere.
  3. Planisphere returns citation review, privilege block, attestation request, or evidence seal action.
  4. Slack displays buttons for the review route.
  5. Planisphere records the review receipt.

Current API state:

  • A slack:* review route creates a route dispatch record.
  • PUT /tenant/integrations/slack/{target} stores the tenant's Slack route config and secret_ref without storing raw secret material.
  • Enabled Slack route targets require config.channel_id and secret_ref; bad setup returns 422 without mutating the tenant route target.
  • Slack modal review requires interactivity in the tenant Slack app: the app receives a fresh trigger_id from a Block Kit action, calls views.open with the prepared modal_view, then sends the signed view_submission payload back to the Planisphere callback URL.
  • docs/examples/javascript/slackReviewServer.mjs is a dependency-free copyable tenant-app bridge for that flow. It forwards Slack's exact signed form body to Planisphere, calls Slack views.open with the returned modal request, and forwards signed view_submission payloads back to the existing review callback.
  • POST /integrations/callbacks/{tenant_id}/slack/{target}/open-review-modal validates the signed Slack block_actions payload for the planisphere_open_law_mirror_review action and returns the raw-safe views.open request envelope. It does not call Slack or return bot-token material.
  • GET /tenant/integrations/readiness shows whether the Slack route is disabled, incomplete, waiting on server-side secret resolution, or ready for an explicit operator send.
  • POST /routing/outbox/{dispatch_key}/deliver prepares a Slack Block Kit payload with approve, reject, and escalate actions. The delivery wrapper and Slack metadata include review_callback_contract, which names the optional law mirror fields and grade categories a richer Slack review surface can collect before calling the signed callback.
  • The same delivery wrapper includes a modal_view blueprint for law reviews. A Slack app can open it with views.open from an interactive trigger, collect the five categorical mirror grades plus decision/reason, then submit Slack's signed view_submission form payload back to the Planisphere callback. The modal metadata carries only action_key, dispatch_key, mirror version, and mirror digest; raw prompt/client text is not part of the modal.
  • The API delivery route marks this as prepared, not sent, so manual inspection never posts to a tenant Slack workspace by accident.
  • The outbox worker can post the prepared review packet through Slack chat.postMessage only when --send-external is supplied, the tenant integration includes config.channel_id, and secret_ref resolves to a bot token server-side. Safe delivery preview does not call views.open.
  • secret://planisphere/tenant-demo/slack/bot-token resolves server-side from PLANISPHERE_SECRET_PLANISPHERE_TENANT_DEMO_SLACK_BOT_TOKEN, or from PLANISPHERE_SECRET_REF_MAP when mapped to an env var name. Raw bot tokens are not stored in tenant integration records or delivery summaries.
  • Production deployments can also use optional cloud refs such as aws-sm://..., gcp-sm://..., or azure-kv://...; readiness reports provider/error metadata without returning token values.
  • Slack interactivity can call /integrations/callbacks/{tenant_id}/slack/{target}/review-decision with the standard Slack signed form payload. Configure config.callback_secret_ref or config.signing_secret_ref to the Slack signing secret. The callback records approve/reject/escalate button receipts and graded modal receipts without storing the raw Slack payload.
  • A production Slack app still needs install/OAuth flow, request URL setup, and workspace administration outside this API surface.

Browser

A browser extension can cover AI usage before formal vendor integrations exist.

Good first workflow:

  1. Extension watches for copy/export/send/file actions inside AI tools.
  2. Extension sends source_key, proposed_action, and optional redacted text.
  3. Planisphere returns employee-safe next steps.
  4. The UI lets the employee route the packet instead of guessing what the block means.

Browser routes can use the same outbox path. A browser extension should treat needs_review as a pause/resume workflow: show the employee the next_step, send the outbox item to the configured reviewer, and retain the evidence packet href for later status checks.