Common Labs - Radioactive experiments. Turn back! You will find no API stability here.
Common Fabric is a nascent distributed computing platform that provides both a runtime and storage layer. The design allows instrumentation of all information flow in the system, enabling safe & private collaboration at scale.
Patterns are reactive programs that can be linked together to create data and program networks. They're written in TypeScript/JSX and run in a secure sandbox environment. Patterns can:
- Process and transform data
- Render interactive UIs using
cf-prefixed components - React to changes from linked patterns
- Connect to external APIs
Pieces are deployed instances of patterns running in Common Fabric spaces. Pieces can be linked together to create complex workflows where data flows automatically between connected components.
Spaces are collaborative environments where pieces live and interact. Users can run their own spaces or use hosted versions.
- Install Deno 2
- Clone this repo
- Install the Git hooks:
deno task install-hooks - Start local dev servers:
./scripts/start-local-dev.sh - Access the application at http://localhost:8000
For Claude Code users, run /deps to verify prerequisites and
/start-local-dev to start the dev servers. See
LOCAL_DEV_SERVERS.md for
troubleshooting.
This is a multi-package monorepo with several key components:
Backend (Toolshed): The hosted platform backend, written in Deno2, that provides the distributed runtime and storage.
Frontend (Shell): A web client interface written with Lit Web Components for interacting with Common Fabric spaces.
CLI (cf): Command-line interface for managing pieces, linking patterns, and
deploying to spaces. Run deno task cf --help for command reference.
UI Components (packages/ui): Custom VDOM layer and cf-
prefixed components for pattern UIs.
Examples & Patterns (packages/patterns): Example patterns for building with Common Fabric.
Pattern Development: Patterns can be developed using the repo-local
skills/pattern-dev/ skill package. Claude compatibility still exposes this as
/pattern-dev. See Pattern Documentation for patterns,
components, and handlers.
This repository includes repo-local skills plus runtime-specific discovery surfaces and Claude compatibility commands for common workflows:
skills/pattern-dev/- Develop patterns with LLM assistanceskills/pattern-test/- Write and run pattern testsskills/pattern-deploy/- Deploy patterns and test with CLI/start-local-dev- Start local dev servers/deps- Dependency and integration setup/fix-issue- Fix a specific issue/oracle- Investigate how things actually work
skills/ is the canonical authored source. Codex discovers repo-local skills
through /.agents/skills/, while Claude compatibility preserves the existing
/pattern-dev, /pattern-test, and related skill names through
/.claude/skills/.
Required:
- Deno 2 - Runtime for backend and tooling
Recommended Integrations:
- GitHub CLI - For PR and issue workflows
- Claude Code MCP integrations (run
/depsin Claude Code for setup):- Playwright MCP for browser-based pattern testing
- CI/CD: All changes must pass automated checks before merging
- Testing: Tests are critical - run with
deno task test - Linting: Use
deno task checkfor type checking - Formatting: Always run
deno fmtbefore committing - See CLAUDE.md for detailed coding guidelines
For a more detailed guide, see ./packages/toolshed/README.md.
cd ./packages/toolshed
deno task devBy default the backend will run at http://localhost:8000
Recommended: Use ./scripts/start-local-dev.sh to start both backend and
frontend together. See
LOCAL_DEV_SERVERS.md for details.
Manual setup (if you need to run servers separately):
# Against local backend (use dev-local, NOT dev)
cd ./packages/shell
TOOLSHED_PORT=8000 deno task dev-localImportant: deno task dev points to the production backend. Use
deno task dev-local when running against a local Toolshed instance.
The frontend dev server runs at http://localhost:5173. Access the application at http://localhost:8000, where toolshed proxies to shell.
If you are not running a local backend, you can point to the cloud:
cd ./packages/shell
deno task dev