Slack Sync Workflow

Sub-daily Slack review writes work-relevant digests to raw/slack/ and promotes only durable facts into the wiki.

Slack sync is the browser-backed communication leg of the wiki capture system. It uses the Browser Testing Skills skill and agent-browser because no local Slack MCP or API token is configured in this checkout. Source: automations/slack-sync.md, 2026-06-30; Browser Testing Skills

Command Surface

agent-browser connect 9222
agent-browser open https://app.slack.com

The automation first tries an existing browser debugging session, then opens Slack in a browser when needed. If Slack is unavailable or unauthenticated, the run records the blocker and does not update syncs.slack. Source: automations/slack-sync.md, 2026-06-30

Trigger And Inputs

Trigger this workflow every four hours from the local Codex scheduler, or manually when Kevin asks for Slack to be reviewed. Required inputs:

  • an authenticated Slack app or web session
  • agent-browser installed locally
  • skills/engineering/slack/SKILL.md
  • the canonical automation contract at automations/slack-sync.md

Slack has no local API/MCP credential in this checkout. Browser access is therefore the implementation detail, while this workflow owns the durable output contract.

Runbook

  1. Read automations/slack-sync.md and skills/engineering/slack/SKILL.md.
  2. Connect with agent-browser connect 9222; if unavailable, open https://app.slack.com.
  3. Inspect Activity, mentions, unread DMs, and high-signal project channels from the last four hours.
  4. Capture a screenshot only when needed to preserve proof for an ambiguous UI state.
  5. Write raw/slack/<YYYY-MM-DD>-<HH>.md with summarized activity, links/timestamps, owners, and action items.
  6. Write outputs/<YYYY-MM-DD>/slack-sync/codex.md with sources reviewed, durable updates applied, blockers, and follow-ups.
  7. Promote durable facts into wiki pages only when the promotion matrix passes.
  8. Update state.json:
    • automations.slack-sync after the scheduled check completes
    • syncs.slack only after Slack was successfully reviewed
  9. Append wiki/log.md.
  10. If wiki pages changed, run npx tsx scripts/build-index.ts and qmd update && qmd embed.

What It Produces

  • raw/slack/<YYYY-MM-DD>-<HH>.md digests for reviewed activity
  • outputs/<date>/slack-sync/codex.md run reports
  • wiki updates only for project decisions, people/company signals, recurring workflows, or agent friction
  • state.json ISO timestamps for syncs.slack and automations.slack-sync after successful review

Promotion Matrix

Slack signal Durable action
Project decision, launch status, architectural change, or owner assignment Update project, decision, or workflow page.
Repeated operational friction or agent failure pattern Update or create the relevant workflow/skill page.
Person/company relationship that affects future context Update existing person/company page; create only when entity rules pass.
Reply-needed item, meeting nudge, one-off request Keep in raw/output action list unless it changes durable state.
Private low-signal conversation Summarize minimally or skip; do not quote verbatim.

Safety Rules

Slack sync is read-only. It must not send messages, react, archive, mark all read, or otherwise mutate Slack state without explicit approval. Low-signal private messages should be summarized only when they create a durable work fact, action item, decision, or link. Source: automations/slack-sync.md, 2026-06-30; Browser Testing Skills

Failure Handling

Failure Response
No browser debugging session Try agent-browser open https://app.slack.com; if still blocked, write blocker output.
Logged out / workspace switch required Record the blocker and leave syncs.slack stale.
UI loaded but no relevant activity Write output with No durable wiki update needed, update both state keys.
Message context is ambiguous Prefer raw/output note over wiki promotion.
Need to send or react Stop and ask Kevin; this workflow is read-only.

Validation

After a manual run or scheduler repair:

npx tsx scripts/check-freshness.ts
sqlite3 ~/.codex/sqlite/codex-dev.db "SELECT id, status, rrule FROM automations WHERE id = 'slack-sync';"

If Slack could not be reviewed, syncs.slack should remain stale. That is the expected signal, not a bug.

Closeout

Slack sync closes at the workflow layer after raw digest, output report, state write decision, and any wiki promotion are all explicit. If Slack produced durable wiki edits, run Build Index Workflow and QMD Embed Workflow. If the run revealed a repeated agent or team-process pattern, update the owning skill or workflow rather than leaving the lesson buried in a digest.

Schedule

Runs every four hours through the local Codex scheduler. The freshness checker treats missing syncs.slack as a real stale integration, so failed auth does not look like successful ingestion. Source: scripts/check-freshness.ts, 2026-06-30

Run Contract

This workflow follows Workflow Run Contract: name the sources, write output or no-op proof, promote only durable facts, update state only when the run really completed, refresh generated surfaces when durable pages or skills change, and log user-visible work.


Timeline