Skip to content

Repository & Ownership Map

JobCtrl is a TypeScript workspace beside a separately packaged Python automation runtime, plus native distribution and browser surfaces. This page maps each production concern to one source owner so contributors can start at the deciding boundary instead of following a screen name across the tree.

Read this if you know what behavior should change but not which directory or layer owns it.

Source Shape

Solid arrows point from a shared package to the code that imports it. Runtime traffic is intentionally absent; it belongs to the System Overview and Runtime & Processes.

Top-Level Owners

PathOwnsDoes not own
apps/web/React/Vite product UI, routes, view composition, frontend contexts, ports, adapters, cache invalidation, stories, and browser testsServer truth, SQLite writes, raw fetch policy in feature code, or workflow execution
apps/api/Fastify routes, loopback and mutation security, REST semantics, read/write mapping, projection refresh, SSE framing, and the TypeScript side of JSON-RPCLLM/browser automation or direct Temporal workflow definitions
apps/extension/The Manifest V3 capture and assisted-autofill client, its loopback API client, local queue, and extension-specific privacy testsArbitrary remote API access or application submission authority
apps/demo-edge/The deployment-gated demo edge API, consented measurement contract, and retention workerLocal product data, production automation, or the local API contract
workers/automation/The jobctrl Python package: CLI, JSON-RPC server, domain model, SQLite adapters, Temporal workflows/activities, provider calls, discovery, materials, and apply executionBrowser-facing HTTP routes or web state
packages/domain-types/Selected TypeScript domain vocabulary: identifiers, shared states, the TypeScript domain-event union, and projection shapes consumed across packagesPython aggregate behavior and invariants, I/O, REST transport, or SQLite rows
packages/contracts/Shared REST request/response schemas and DTOs, enums used on the wire, and TypeScript JSON-RPC envelopes/method schemasFetch behavior, route registration, or domain-event ownership
packages/api-client/Typed HTTP calls, URL/query encoding, request timeouts, and API error behaviorBusiness validation or server-side routing
packages/tsconfig/Shared TypeScript compiler presetsProduct behavior
launcher/Native jobctrl supervisor/installer, instance identity, release selection, update, rollback, and installed lifecycleSource-development supervision or domain commands themselves
packaging/distribution/Machine-readable payload, component, capability, provider-pack, signing, and redistribution contractsRuntime business behavior
scripts/Source-stack supervision and repository-level build, release, documentation, privacy, and contract checksA second home for domain logic
.github/workflows/CI, publication, deployment, and protected release orchestrationLocally reproducible product behavior
docs/Canonical user, contributor, architecture, API, requirement, decision, QA, and delivery recordsImplementation authority when documentation and current code diverge

Inside The Runnable Boundaries

The TypeScript API

SurfaceOwner
Route registration and HTTP status/security behaviorapps/api/src/server.ts plus focused route modules
API DTO/schema import surfaceapps/api/src/contracts.ts, re-exporting @jobctrl/contracts
Projection-backed query mappingapps/api/src/read-model.ts
Simple local state transitions and canonical TS writesapps/api/src/write-model.ts and the owning focused modules
TypeScript projection materializationapps/api/src/projections.ts
TS-to-Python dispatchapps/api/src/json-rpc-adapter.ts
Server-Sent Events (SSE) framing and replayapps/api/src/event-stream.ts

The API may host pure, low-latency state transitions. JSON-RPC methods divide into synchronous provider-backed calls and workflow-start calls; only the latter ask the Python side to start Temporal. Some TypeScript use cases also persist canonical queued intent or stage state around that dispatch. Those rows record product intent and visibility—they are not a second Temporal queue.

The Web App

SurfaceOwner
Domain-owned UI behaviorapps/web/src/contexts/<context>/
Page composition and view-local ephemeral stateapps/web/src/views/<view>/
Routes and URL compositionapps/web/src/routes/
Browser capability abstractionsapps/web/src/shared/ports/
Local implementations of those portsapps/web/src/shared/adapters/local/
Cross-context event invalidationapps/web/src/contexts/operations/invalidation-router.ts
Deployment-gated demo client behaviorapps/web/src/demo/

Views compose contexts. A context does not import a view, and feature code goes through ports instead of calling browser globals or the API client directly. The full rules live in Frontend Architecture.

The Python Runtime

SurfaceOwner
Aggregates, value objects, use cases, and domain eventsworkers/automation/src/jobctrl/domain/<context>/ and domain/events/
Driven capability interfacesworkers/automation/src/jobctrl/domain/ports/
SQLite, provider, browser, network, projection, and Temporal adaptersworkers/automation/src/jobctrl/infrastructure/
Registered workflows and activitiesworkers/automation/src/jobctrl/infrastructure/temporal/registry.py plus context workflow/activity modules
Human-facing driving adapterworkers/automation/src/jobctrl/cli.py
API-facing driving adapterworkers/automation/src/jobctrl/infrastructure/rpc/

Domain modules do not own database or provider mechanics. Repositories and other adapters translate between domain values and physical storage or external capabilities.

Start A Change At Its Owner

ChangeStart hereThen check
Python aggregate state or invariantOwning module under workers/automation/src/jobctrl/domain/TypeScript mirror when the concept crosses runtimes, persistence adapters, and every consumer
Shared TypeScript identity, state, projection, or event vocabularypackages/domain-types/Matching Python mirror where applicable, parity coverage, and every consumer
REST request/response shapepackages/contracts/src/schemas.tsAPI route, API client, web consumer, focused API docs
JSON-RPC method or envelopepackages/contracts/src/rpc.tsPython domain/rpc/messages.py, dispatcher, adapter, tests
HTTP status, auth/origin rule, or route behaviorapps/api/Contract schema and API reference
Heavy or durable commandOwning Python use case/workflowJSON-RPC registration, workflow visibility, projections
Canonical database factOwning repository/write module and schema initializationEvent emission, projections, storage docs, migration compatibility
Projection fieldCanonical source first, then Python/TS projection ownersDTO, API mapping, parity fixture, web invalidation
UI mutation or renderingOwning apps/web/src/contexts/ moduleOperations read hook, composing view, story/a11y/product-path QA
Extension capture/autofillapps/extension/Loopback API capability route and privacy boundary
Installed lifecycle or payloadlauncher/, packaging/distribution/, and matching scripts/distribution-*Release workflow and distribution contract
DocumentationThe canonical owner in Documentation StandardsIndex/sidebar/link consistency and docs verification

Boundary Rules

  • Do not copy a domain type into a route, component, or database helper. Import the logical type and translate only at a real boundary.
  • Do not put fetch behavior in packages/contracts or business validation in packages/api-client.
  • Do not treat a projection row as a write model. Change the canonical owner, emit the event when appropriate, then rebuild the projection.
  • Do not make the TypeScript API enqueue Temporal work directly. The local API dispatches JSON-RPC; the Python runtime owns workflow startup.
  • Keep test ownership next to the surface where practical: API tests under apps/api/test, frontend tests colocated or under apps/web/e2e, package tests inside the package, and Python tests under workers/automation/tests.

Future Architecture (Not Implemented)

Hosted Postgres, object storage, queue/outbox, managed Temporal, and hosted API adapters are evolution seams documented under the Backend Domain Model and its cloud evolution. They are not a second production tree today. This map describes the current local and bundled source owners only.