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:
- Employee or lawyer selects an AI-generated answer in Slack.
- Slack shortcut calls Planisphere.
- Planisphere returns citation review, privilege block, attestation request, or evidence seal action.
- Slack displays buttons for the review route.
- 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 andsecret_refwithout storing raw secret material.- Enabled Slack route targets require
config.channel_idandsecret_ref; bad setup returns422without mutating the tenant route target. - Slack modal review requires interactivity in the tenant Slack app: the app
receives a fresh
trigger_idfrom a Block Kit action, callsviews.openwith the preparedmodal_view, then sends the signedview_submissionpayload back to the Planisphere callback URL. docs/examples/javascript/slackReviewServer.mjsis a dependency-free copyable tenant-app bridge for that flow. It forwards Slack's exact signed form body to Planisphere, calls Slackviews.openwith the returned modal request, and forwards signedview_submissionpayloads back to the existing review callback.POST /integrations/callbacks/{tenant_id}/slack/{target}/open-review-modalvalidates the signed Slackblock_actionspayload for theplanisphere_open_law_mirror_reviewaction and returns the raw-safeviews.openrequest envelope. It does not call Slack or return bot-token material.GET /tenant/integrations/readinessshows 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}/deliverprepares a Slack Block Kit payload with approve, reject, and escalate actions. The delivery wrapper and Slack metadata includereview_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_viewblueprint for law reviews. A Slack app can open it withviews.openfrom an interactive trigger, collect the five categorical mirror grades plus decision/reason, then submit Slack's signedview_submissionform payload back to the Planisphere callback. The modal metadata carries onlyaction_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, notsent, so manual inspection never posts to a tenant Slack workspace by accident. - The outbox worker can post the prepared review packet through Slack
chat.postMessageonly when--send-externalis supplied, the tenant integration includesconfig.channel_id, andsecret_refresolves to a bot token server-side. Safe delivery preview does not callviews.open. secret://planisphere/tenant-demo/slack/bot-tokenresolves server-side fromPLANISPHERE_SECRET_PLANISPHERE_TENANT_DEMO_SLACK_BOT_TOKEN, or fromPLANISPHERE_SECRET_REF_MAPwhen 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://..., orazure-kv://...; readiness reports provider/error metadata without returning token values. - Slack interactivity can call
/integrations/callbacks/{tenant_id}/slack/{target}/review-decisionwith the standard Slack signed form payload. Configureconfig.callback_secret_reforconfig.signing_secret_refto 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:
- Extension watches for copy/export/send/file actions inside AI tools.
- Extension sends
source_key,proposed_action, and optional redacted text. - Planisphere returns employee-safe next steps.
- 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.