agentleFS
mr-ashishpandamr-ashishpanda/claude-workspace-endpoint/CLAUDE.md

claude-workspace-endpoint

CLAUDE.md1 starsChanged 5 months agoMITView on GitHub

Always-loaded operating core. Detailed procedures live in skills that load when relevant (see Skills & config at the bottom). Authoritative spec: docs/prd.md. A local-first service that bridges Slack with Claude Code: it maps Slack channels/threads to local workspace directories, invokes claude inside the mapped workspace when triggered, and posts the response back to the right Slack location. Local-first = no server-side components, relays, cloud services, or hosted control planes in V1; everything runs as one local process. A task pushing…

  • Reads credentials

The file

We split this CLAUDE.md into the rules it gives an agent

4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Always-loaded operating core.

    line 3
  2. Distinctive:

    Verify before "done": Never mark a change complete without running, testing, and observing it.

    line 54
  3. Distinctive:

    Challenge assumptions: If a request conflicts with the PRD, the local-first constraint, or good design, say so and ask before proceeding.

    line 57
  4. Very specific:

    Improve this config: When you hit a recurring command, missing guardrail, or a gap in these files, update the relevant .claude/ config, …

    line 62

≈ “Common” is an estimate: at least 1 in 5 of the 27,641 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

CLAUDE.md — Slack-Claude Bridge

Always-loaded operating core. Detailed procedures live in skills that load when relevant (see Skills & config at the bottom). Authoritative spec: docs/prd.md.

What this is

A local-first service that bridges Slack with Claude Code: it maps Slack channels/threads to local workspace directories, invokes claude inside the mapped workspace when triggered, and posts the response back to the right Slack location.

Local-first = no server-side components, relays, cloud services, or hosted control planes in V1; everything runs as one local process. A task pushing toward a hosted service or coordinator is out of scope (PRD "Out of Scope") — flag it.

Terminology: "the bridge" = our local process (npm run dev), never the AI assistant. Reserve "agent"/"subagent" for AI agents. Use "the bridge" in code, logs, docs, and commits.

Tech stack

  • Runtime: Node.js ≥ 20, ESM, TypeScript (strict).
  • Slack: @slack/bolt (Socket Mode — no public inbound endpoint).
  • CLI: slack-claude (init, map add|list|edit|remove).
  • Persistence: local files under SLACK_CLAUDE_HOME (default .slack-claude/).
  • Test: vitest · Lint: eslint · Format: prettier.

Commands

GoalCommand
Type-checknpm run typecheck
Lintnpm run lint
Testsnpm run test
Full gate (type+lint+test)npm run verify
Formatnpm run format (auto-runs on edit via hook)
Buildnpm run build
Run the bridge (dev / built)npm run dev / npm start
Tail bridge logsnpm run bridge:logs

First time: npm install.

Conventions

  • TypeScript strict; no unjustified any. ESM imports with extensions where NodeNext needs them.
  • Small, single-purpose modules mirroring the src/ layout.
  • One logger that always prefixes the mapping identity.
  • Secrets only via env (.env, gitignored). .env and lockfile edits are blocked by a hook — ask the user to make those edits.
  • Releases are cut by pushing a v<x.y.z> git tag; bump package.json version to match first — CI fails the release when the tag and package.json version disagree.

Operating rules (non-negotiable)

  1. Verify before "done". Never mark a change complete without running, testing, and observing it. If no end-to-end way to test exists, build it (or ask for what only a human can provide). → load the verifying-work skill for the loop and the build-or-ask rule.
  2. Challenge assumptions. If a request conflicts with the PRD, the local-first constraint, or good design, say so and ask before proceeding. Disagreement is welcome; silent wrong work isn't.
  3. Stay in scope. The PRD "Out of Scope" list is binding for V1.
  4. Apply the Review checklist (below) on every review. The built-in /code-review reads it from this file automatically; for a thorough guided pass use the reviewing-changes skill.
  5. Improve this config. When you hit a recurring command, missing guardrail, or a gap in these files, update the relevant .claude/ config, skill, or this file as part of the work — and note it in your summary. Keep it practical.

Review checklist

Apply on every code review, in addition to the generic correctness/security/clarity pass. The built-in /code-review reads these as project rules; reviewing-changes walks them in depth.

  1. Session & scope integrity — channel scope keys on channel_id; thread scope on channel_id + thread_ts; replies post to the correct location; sessions reused per scope and persist across bridge restarts.
  2. Trigger correctness — mention ignores non-mentions; auto handles every in-scope message; all four scope×trigger combinations consistent.
  3. Local-first scope — no hosted service/relay/coordinator, no Slack command beyond @claude status, nothing else from PRD "Out of Scope".
  4. Secret safety — no hardcoded tokens; credentials only from env; nothing secret logged.
  5. Identity — mapping identity appears in Slack responses, logs, and status output.
  6. Naming — our local process is "the bridge", not "agent".

Skills & config

Load a skill when its topic comes up; don't inline its content here.

  • verifying-work — required verification loop; build the test/integration path if missing, else ask for human input. Use before claiming any change done.
  • run-bridge — start the bridge, confirm it connects, tail/inspect logs.
  • reviewing-changes — guided, thorough review that walks the Review checklist with the domain reasoning behind it. Optional: bare /code-review already applies the checklist above.
  • bridge-domain — mappings, session scopes, trigger modes, identity, status command. Load when touching session/scope/trigger logic.

Config files: .claude/settings.json (hooks + permissions + plugins), .claude/hooks/protect-paths.sh (blocks .env/secret/lockfile edits), .claude/hooks/format.sh (Prettier on edit). MCP: the Slack server is available for inspecting channels/threads; consider context7 for live @slack/bolt docs.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.