Cat Factory
Home
Get Started
GitHub
Home
Get Started
GitHub
  • Start

    • Introduction
    • Core Concepts
    • Quick Start
    • Tutorial: Your First Task to a Merged Pull Request
  • Guides

    • Recipes

      • Cookbook
    • Plan the work

      • Design Your Board
      • Clarify Requirements
      • Author a Document
      • Plan an Initiative
    • Run pipelines

      • Choose and Edit a Pipeline
      • Run a Pipeline
      • Schedule Recurring Work
      • Review and Merge Pull Requests
      • Control Spend with Budgets
    • Connect

      • Connect a Repository
      • Connect Issue & Document Sources
      • Feed Design Context to Agents
      • Preview and Test a Frontend
    • Models & prompts

      • Connect a Model Provider
      • Apply Standards with Prompt Fragments
      • Run a Claude Skill as a Step
      • Compare Prompts and Models in the Sandbox
    • Collaborate

      • Invite and Manage Your Team
      • Share Services Across Workspaces
      • Register Foundational Services
  • Deploy

    • Run Locally
    • Deploy to Node.js
    • Deploy to Cloudflare
    • Deploy on Kubernetes
    • Lay Out a Kubernetes Cluster
    • Set Up a Local Kubernetes Cluster on Windows
    • Register the GitHub App
    • Set Up Enterprise SSO
    • Set Up Your Deployment Repository
    • Configuration
  • Operate

    • Observability
    • Set Up Notifications
    • Run Jobs on Your Own Runners
    • Provision Ephemeral Environments
    • Debug a Run from Outside the Browser
    • Troubleshooting
    • Upgrades & Data Retention
  • Extend

    • Add a Custom Agent Kind
    • Add a Custom Gate or Judge
    • Add a Custom Provider
    • Extend the App with Frontend Modules
    • Integration Manifests
    • Give Agents External Tools (MCP)
    • Package a Reusable Operation
    • Register an Initiative Preset
    • Public API
    • Official SDKs
    • MCP Server
    • Cloudflare OS Gatekeeper
  • Reference

    • Architecture
    • Agent Isolation Model
    • Security Model & Hardening
    • Packages & Repository Layout
    • GitHub and GitLab Support Matrix
    • Environment Variables
    • API Endpoint Reference
    • Glossary

Packages & Repository Layout

For an extender or a contributor who needs to know which package owns what. Cat Factory is a TypeScript monorepo; this page maps the published packages and the source tree, so you know where to look when extending or debugging the platform.

What a deployment actually depends on

Start here, because the table below is longer than anything you install. A deployment names two packages in its own package.json: one runtime facade for the backend, and the SPA layer for the frontend. Everything else arrives transitively.

PackageDeploymentEntry point
@cat-factory/node-serverNode.js (PostgreSQL + job queue)start()
@cat-factory/workerCloudflare Workers (D1, Durable Objects)createWorker()
@cat-factory/local-serverLocal mode, the same backend wired for one machinestartLocal()
@cat-factory/appEvery deployment's frontendNuxt extends: ['@cat-factory/app']

The facade is a composition root, not a thin re-export: it depends on the core packages and on the opt-in ones, so a capability like GitLab or Bedrock is turned on with configuration rather than with a dependency change. That is why Configuration can promise that setting GITLAB_TOKEN is enough, and it is the fact to check first when a capability that "should be optional" appears to be missing: it is present and unconfigured, not absent.

See Deployment Repository for the shape of the project that consumes these, including the migrations that ship inside the facade.

Core packages

Present in every deployment, whatever it has configured.

PackageResponsibility
@cat-factory/kernelDomain types, constants, repository ports, and the extension registries: the pipeline registry (registerPipeline), the gate registry (registerGate), the step-resolver registry (registerStepResolver), the typed provider registry (defineProviderToken / wireProvider / requireProvider), and the provider-neutral VCS registry (registerVcsProvider / resolveVcsProvider).
@cat-factory/contractsWire formats, validated with Valibot. Also the canonical RESULT_VIEW_IDS an agent kind's presentation.resultView is validated against.
@cat-factory/orchestrationService composition root and workflow engines. Boot-time registration validation (validateRegistrations / validateRegistrationsOnce) lives here, since it cross-checks the gate, agent-kind, and pipeline registries.
@cat-factory/serverRuntime-neutral HTTP controllers, the shared agent-execution machinery (composite/container executors, runner-job client, GitHub App auth), and the web-search proxy.
@cat-factory/agentsAgent catalog, prompt composition, model-provider facade, the agent-kind registry (registerAgentKind), the document-template registry (registerDocTemplate), schema-driven structured output (defineStructuredOutput), and web-research/cache policy.
@cat-factory/gatesThe built-in gate suite (CI, merge-conflicts, post-release health, the on-call escalation, and the document-quality gate), authored entirely through the public registerGate seam. Depends only on @cat-factory/kernel + @cat-factory/contracts, never the engine. A deployment imports it for its side effect and wires each gate's provider via the exported wireX handles. See Add a Custom Agent Kind and Add a Custom Gate or Judge.
@cat-factory/integrationsGitHub, document/task sources (including the experimental Linear connector), ticket trackers, environments, runner pools.
@cat-factory/prompt-fragmentsThe curated, versioned best-practice prompt fragments injected into agent prompts, including the writing-style fragments applied to document tasks. Register your own with registerPromptFragment.
@cat-factory/workspacesThe tenancy base: workspaces and the accounts above them. See Workspaces and accounts.
@cat-factory/spendPricing tables and spend metering — what budgets and the usage endpoint are computed from.
@cat-factory/cachingThe app-level caching seam: createAppCaches builds the named in-memory read-through caches services consume through the kernel AppCaches port. In-memory only; Redis (when REDIS_URL is set on a multi-node Node deployment) is an invalidation bus, never a data tier.
@cat-factory/sandboxThe Sandbox: versioned prompt candidates, experiment matrices, and judge/objective grading, with @cat-factory/sandbox-fixtures supplying the graded no-repo fixtures it runs against.
@cat-factory/appNuxt SPA layer — board UI and Pinia stores. Consumed as a Nuxt layer, not imported.

Opt-in capability packages

Each of these adds one capability and is inert until the deployment configures it. They ship inside the runtime facades, so the column that matters is the last one.

PackageAddsTurned on by
@cat-factory/gitlabGitLab backend for the provider-neutral VCS layer: the neutral VCS client over GitLab's REST v4 API, a webhook verifier and mapper, project provisioning, and a PAT identity resolver for sign-in. Single-token model, one connection per deployment.GITLAB_TOKEN, or GITLAB_PAT in local mode. See the VCS support matrix.
@cat-factory/eksAWS EKS runner and environment backends. Reuses the native Kubernetes transport behind a short-lived IAM (SigV4-presigned STS) apiserver token, with no runtime AWS SDK.Registering eksRunnerBackend / eksEnvironmentBackend to offer the eks backend kind. See Kubernetes → Amazon EKS.
@cat-factory/provider-bedrockThe bedrock model provider, mixed into the composite provider.BEDROCK_REGION + AWS credentials + BEDROCK_MODELS. See Configuration.
@cat-factory/provider-cloudflareThe workers-ai model provider (an in-process binding on the Worker, OpenAI-compatible REST elsewhere).The Worker's AI binding, or CLOUDFLARE_ACCOUNT_ID + CLOUDFLARE_API_TOKEN off Cloudflare.
@cat-factory/provider-s3An S3 blob backend for binary-artifact storage, over the kernel BinaryBlobBackend port. Node deployments only.Picking S3 as the account's content store, in the app rather than the environment.
@cat-factory/observability-otelAn OpenTelemetry (OTLP/HTTP) publisher for LLM generations, container tool spans, structured logs, and deployment-level run-health gauges. The workerd-safe fetch exporter on Cloudflare, the official SDK on Node.OTEL_ENABLED + OTEL_EXPORTER_OTLP_*. See Observability.
@cat-factory/observability-langfuseA Langfuse trace sink for the same generations and tool spans, over fetch on both runtimes.LANGFUSE_ENABLED + both project keys. See Observability.
@cat-factory/consensusMulti-model consensus on eligible steps — specialist panel, debate, ranked voting — gated on the task's estimate.CONSENSUS_ENABLED.

@cat-factory/cli is the odd one out: it is a tool rather than a dependency. npm create @cat-factory/cli scaffolds a standalone local-mode deployment on the published libraries — generating the crypto secrets, minting a GitHub/GitLab PAT, and writing the populated, git-ignored .env files. Its core functions (buildPlan, generateSecrets, …) are exported for programmatic use.

Extending a deployment

The model-provider, agent-kind, gate, step-resolver, provider, and pipeline registries are opt-in extension seams. A deployment (e.g. a proprietary org package) can mix in providers, agent kinds, polling gates, and predefined pipelines without forking, registering each as a startup import side effect. The built-in gate suite ships as @cat-factory/gates, authored through the same registerGate seam a deployment uses. See Add a Custom Agent Kind and Add a Custom Gate or Judge and Architecture → Extending a deployment.

Repository layout

kibertoad/cat-factory holds the platform. Every package above lives at the path its name suggests: @cat-factory/<name> is backend/packages/<name>, with the four exceptions the tree names.

cat-factory/
├── backend/
│   ├── packages/      one directory per @cat-factory/* library above
│   ├── runtimes/      the composition roots: node/, cloudflare/, local/
│   │                  → @cat-factory/node-server, /worker, /local-server
│   ├── internal/      never published: the acceptance, conformance, e2e and
│   │                  benchmark harnesses, and example-custom-agent/
│   └── docs/          the backend's own design notes and ADRs
├── frontend/app/      @cat-factory/app, the Nuxt SPA layer
├── sdk/               the four official clients (typescript/, python/, go/,
│                      java/), plus mcp/ and gatekeeper/
├── deploy/            worked example deployments — the shape your own
│                      deployment repository copies
└── docs/              openapi.json and the canonical environment-variable
                       list, both of which this site renders

Two directories in that tree are the source of pages here rather than reading of their own: docs/openapi.json is rendered as the API Endpoint Reference, and docs/environment-variables.md as Environment Variables. Both pages carry a generated banner and a CI check, so neither can drift from the code.

backend/docs/ is where the platform's own design notes live — deeper than this site goes, written for someone changing the code rather than deploying it. Read them from a checkout; they assume one.


The platform is MIT licensed. Source, issues, and contribution guidelines live at kibertoad/cat-factory.

Next: Architecture for how these pieces fit together at runtime, or Add a Custom Agent Kind to build against them.

Edit this page on GitHub
Last Updated: 8/10/26, 9:53 AM
Prev
Security Model & Hardening
Next
GitHub and GitLab Support Matrix