Platform Architecture & Capabilities

14 Module Families · 112 Documented Capabilities

Fossil Studio provides a hermetic web execution foundation. Below is the complete platform capability register mapped to exact runtime contracts, APIs, configuration manifests, and process flows.

Family 1

Public Site and CMS (Entries 1–14)

Ahead-of-time static compilation, Liquid layouts, CommonMark Markdown, Pikchr vector graphics, clean canonical URLs, and asset preservation. See in action: Story 1 — Instant Ops →

IDCapabilityExact Method / Runtime ContractProcess & Operational BehaviorStatus
1Ahead-of-time SSG generationbuild.pages.{input,output}; buildPages()Reads .md and .json sources and compiles static HTML artifacts into public/.Implemented
2Liquid layout chainingFrontmatter layout; fossil.ssg.renderPage()Resolves parent layouts, provides page/site scope, and renders Liquid templates around converted body.Implemented
3Reusable Liquid includesLiquid {% raw %}{% include 'name.html' %}{% endraw %}Resolves partial templates from _includes/ and injects them during layout compilation.Implemented
4CommonMark Markdown parsingparseFrontmatter(); fossil.ssg.markdownToHtml()Extracts YAML frontmatter, converts CommonMark body to HTML, and retains first heading.Implemented
5Embedded Pikchr diagramsfossil.markdown(markdown)Compiles fenced ```pikchr code blocks into responsive inline SVGs inside native C engine.Implemented
6JSON-authored content pagescontent/*.json; fossil.ssg.markdownToHtml()Parses standalone JSON files, renders the content field with Markdown rules, and exposes attributes.Implemented
7Arbitrarily nested sectionsRecursive list(input + '/'); outputPagePath()Preserves subdirectories: index.md becomes directory index; other files become nested HTML files.Implemented
8Clean canonical URLscanonicalUrl(); / routingMaps source files to extensionless URLs; runtime redirects .html and trailing slashes to canonical paths.Implemented
9Data-driven navigation & datasets_data/*.json; loadData(config)Loads JSON data files under their filename keys into global Liquid template scope (e.g. navigation, site).Implemented
10Custom Liquid filtersregisterTemplateFilters(engine)Registers filters for markdown, currency, json, and asset_url before rendering.Implemented
11In-memory SSG host runnerfossil.ssg.renderPage(layout, body, json, url)Renders complete page strings in-memory without writing to disk; powers live draft preview.Implemented
12Renderer fallback chainfossil.ssg.markdownToHtml → fossil.markdownKeeps SSG build operational using in-repository Liquid runner if native C helpers are missing.Implemented
13Byte-preserving asset copyingbuild.copy; readBytes() / writeBytes()Copies configured static files and binary assets into public/ unchanged without mutation.Implemented
14Automated sitemap & robotsbuild.sitemap; buildSitemap()Scans generated public pages, applies exclusions, and outputs sitemap.xml and robots.txt.Implemented
Family 2

Site Routing and Build Configuration (Entries 15–26)

Hostname/path mount resolution, longest-prefix matching, branch pipelines, commit hooks, CORS headers, and two-file hermetic runtime. See in action: Story 1 — Instant Ops →

IDCapabilityExact Method / Runtime ContractProcess & Operational BehaviorStatus
15Host and path mountsapp.json.mounts[] (id, host, path, branch, mode)Binds incoming HTTP host/path prefixes to repository branches and serving modes (static, api, admin).Implemented
16Longest-prefix precedenceLongest path, then longest hostResolves site mounts deterministically; preserves more-specific API and Admin routes over catch-alls.Implemented
17Default serving branch fallbackapp.json.serving.branchSelects default branch and mount when no explicit mount rule matches the incoming request.Implemented
18Live-tag revision resolutionFossil setting live-tagServes the published revision tagged live with fallback to trunk/tip for zero-downtime releases.Implemented
19Source-to-target branch pipelinespipelines[].on / targetMatches check-ins on source branches (e.g. site/*) and commits build artifacts to target branches.Implemented
20Lifecycle commit hookshooks.before-commit, hooks.after-commitRuns validation before commits (can abort), runs SSG build after commits, processes synced changes.Implemented
21Branch role separationapp.json.branches.harness / adminIsolates agent configurations (studio/harness) and Admin UI (studio/admin) from public sites.Implemented
22Per-mount revision pinningPOST /api/admin/publication (pin/latest)Pins a mount to an immutable check-in UUID or returns it to latest branch tip.Implemented
23Path-matched HTTP headers & CORSapp.json.headers[]; automatic OPTIONSMatches response headers by pattern; automatically responds to API CORS preflights with 204.Implemented
24Runtime and build quotassettings.{apiTimeoutMs, apiMemoryMb, ...}Enforces strict execution timeouts and memory limits on SQLite, QuickJS, and build processes.Implemented
25Hermetic two-file deploymentExecutable + SQLite .fossil repositoryServes 100% from repository blobs; zero external dependencies, no host filesystem fallback.Implemented
26Authenticated batch commitPOST /_fossil/commitAccepts multi-file payloads, validates credentials, and commits atomically to named branches.Implemented
Family 3

API and Data Runtime (Entries 27–35)

Embedded QuickJS serverless API routes, request/response lifecycle, parameterized SQLite reads/writes, transactional migrations, and table shielding. See in action: Story 1 — Instant Ops →

IDCapabilityExact Method / Runtime ContractProcess & Operational BehaviorStatus
27Dynamic serverless API routingapi/.js; req.paramsResolves scripts on-the-fly; passes trailing path tokens as parameters; zero server restarts.Implemented
28Complete request contextreq.method, path, query, headers, json, userPopulates request context in C before QuickJS execution; includes caller capabilities and client IP.Implemented
29Response formatting helpersres.status(), res.setHeader(), res.json(), res.send()Sets HTTP status and headers; serializes JSON or raw strings through native output stream.Implemented
30Parameterized SQLite accessfossil.db.query(sql, params); fossil.db.execute()Binds parameters to prevent SQL injection; returns JS objects or change/insert ID counts.Implemented
31Transactional DDL/DML & migrationsBEGIN IMMEDIATE, COMMIT / ROLLBACKDiscovers ordered migration scripts, checks hashes, executes transactionally, records in ledger.Implemented
32Native table authorizer & shieldingC SQLite authorizer callbackIntercepts all API queries; blocks direct access to protected Fossil repository tables.Implemented
33Native ingress rate limitingC ingress rate limiterEnforces request budget per client before QuickJS executes; drops abusive calls at ingress.Implemented
34Prewarmed script cache & WALBytecode cache & SQLite WAL modePre-compiles QuickJS bytecode for active branches; executes queries concurrently via WAL mode.Implemented
35Ahead-of-time bytecode compilationfossil.compileJs(); build.compileCompiles api/**/*.js to .qs bytecode at commit; runtime executes bytecode directly.Implemented
Family 4

Identity and Security (Entries 36–38)

Native Fossil authentication, capability-based authorization, session status, and OpenSSL cryptographic primitives. See in action: Story 5 — Privacy & Speed →

IDCapabilityExact Method / Runtime ContractProcess & Operational BehaviorStatus
36Fossil Admin session managementGET/POST/DELETE /api/admin/session; fossil.auth.*Validates credentials, manages HTTP-only session cookies, checks HTTPS policy, logs out.Implemented
37Capability-based authorizationreq.user.{isAdmin, canWrite, canRead, ...}Inspects caller permissions on every protected endpoint; enforces least-privilege access.Implemented
38Native OpenSSL cryptographyfossil.crypto.{bcrypt, sha256, p256, aes128Gcm}OpenBSD Bcrypt hashing, random UUIDs, SHA256 digests, P-256 ECDH key exchange, and AES-GCM.Implemented
Family 5

Integrations and Repository Storage (Entries 39–48)

curl-impersonate outbound HTTP, browser TLS profiles, concurrent fetchMany, unversioned storage (fossil.uv), VCS operations, and HTML-to-Markdown. See in action: Story 4 — Site Migration →

IDCapabilityExact Method / Runtime ContractProcess & Operational BehaviorStatus
39Native outbound HTTP fetchfetch(url, opt) / fossil.http.fetch()Executes outbound HTTP requests synchronously with headers, timeout, and response helpers.Implemented
40Concurrent batch fetchfossil.http.fetchMany(requests, options)Executes up to 64 concurrent requests via libcurl multi; returns array of responses in input order.Implemented
41Browser TLS impersonationOption impersonate: 'chrome120' | 'firefox120'Matches authentic browser TLS handshakes and HTTP/2 settings using embedded curl-impersonate.Implemented
42Unversioned key-value storagefossil.uv.readText/Bytes/writeText/BytesStores text and binary assets in repository unversioned storage without creating commit history.Implemented
43Unversioned catalog & hashingfossil.uv.list(glob), hashBytes(), delete()Enumerates unversioned entries, calculates SHA-256 digests, and deletes orphaned assets.Implemented
44Versioned VCS operationsfossil.vcs.{read, list, commit, sync}Reads file blobs from any branch, lists trees, commits versioned files, and synchronizes remotes.Implemented
45Isolated branch workflowsfossil.repo.commitBranch(), diff(), resetDraft()Creates isolated work branches, computes structured diffs, and resets drafts safely.Implemented
46Native Base64 conversionfossil.base64.encode() / decode()Encodes and decodes binary buffers to Base64 for transport and embedding.Implemented
47Native Markdown & path helpersfossil.markdown(), fossil.ssg.publicUrl()Converts Markdown and maps public URLs to internal repository artifact storage paths.Implemented
48Native HTML-to-Markdown converterfossil.htmlToMarkdown(); SQL html_to_md()Converts scraped HTML into clean CommonMark/GFM in pure C in both QuickJS and SQLite queries.Implemented
Family 6

Notifications and Background Work (Entries 49–51)

Transactional email delivery, SQLite-backed outbox retry processing, and lease-coordinated backoffice workers. See in action: Story 1 — Instant Ops →

IDCapabilityExact Method / Runtime ContractProcess & Operational BehaviorStatus
49Transactional email deliveryfossil.email.send({to, subject, text, html})Sends transactional emails directly or queues to outbox; reports configured delivery status.Implemented
50Durable email outboxSQLite outbox tables & retry queuesStores outbound messages transactionally in SQLite; guarantees delivery across restarts.Implemented
51Lease-coordinated background workfossil.backoffice.run(); lease locksCoordinates background workers using SQLite leases; executes deferred tasks without overlapping.Implemented
Family 7

Live Operations and WebSockets (Entries 52–58)

Native RFC 6455 WebSocket gateway, Linux/Windows transport, channel publish/subscribe policy, SQLite change detection, ws_broadcast, and event replay. See in action: Story 1 — Instant Ops →

IDCapabilityExact Method / Runtime ContractProcess & Operational BehaviorStatus
52Native RFC 6455 WebSocket gatewayEmbedded HTTP-to-WS upgrade on /wsHandles handshake, framing, heartbeat ping/pong, and subprotocols inside the C engine.Implemented
53Cross-platform socket transportLinux epoll / Windows I/O transportProvides reliable asynchronous socket transport across Linux and Windows with TLS proxy support.Implemented
54Channel authorization policiesapp.json.websockets.channelsEnforces granular publish/subscribe policies per channel (public, authenticated, admin).Implemented
55Task & agent event integrationtype: "chat_send"; task message eventsStreams agent execution progress and chat messages in real time to connected clients.Implemented
56SQLite change data capture (CDC)SQLite table triggers & commit hooksDetects row mutations in application tables and automatically prepares live update events.Implemented
57Live event broadcastingfossil.ws.broadcast(channel, event, payload)Publishes events from QuickJS APIs or SQL triggers; returns integer event ID and delivers frames.Implemented
58Event replay via after_event cursorGateway param /ws?after_event=Replays missed events from retained buffer on reconnect; prevents dropped messages during disconnects.Implemented
Family 8

CRM, Orders, and Bookings (Entries 59–73)

Lead capture, pipeline stages, order intake, fulfillment lifecycle, reservation booking, seating management, and business schemas. See in action: Story 6 — Modular Business Apps →

IDCapabilityExact Method / Runtime ContractProcess & Operational BehaviorStatus
59Public CRM lead intakePOST /api/public/crmValidates contact name, email, company, and captures incoming business leads into SQLite.Implemented
60Lead attribution & value capturestudio_crm_leads schemaRecords lead source, estimated deal value, priority rating, and notes in dedicated table.Implemented
61Pipeline stage progressionStages: lead, qualified, proposed, won, lostTracks business lead progression through defined lifecycle stages with audit timestamps.Implemented
62Staff lead management & paginationGET/POST /api/admin/modules/crmProvides paginated lead listings, search filtering, and stage advancement in Admin.Implemented
63CRM metrics & pipeline summariesSELECT count(*), sum(value) FROM studio_crm_leadsCalculates total active leads and gross pipeline deal volume for executive dashboards.Implemented
64Public order intakePOST /api/public/ordersValidates customer details, auto-generates order numbers, and records order lines.Implemented
65Order itemization & channel capturestudio_orders schemaStores customer contact, item summary, order total, and acquisition channel.Implemented
66Fulfillment lifecycle & trackingStatuses: pending, confirmed, shipped, deliveredUpdates order fulfillment state and records third-party carrier tracking codes.Implemented
67Staff order queue & operationsGET/POST /api/admin/modules/ordersEnables staff to view, filter, paginate, and advance order fulfillment states in Admin.Implemented
68Order volume & revenue metricsSELECT count(*), sum(total) FROM studio_ordersAggregates completed orders count and gross merchandise volume across fulfillment channels.Implemented
69Public booking & reservation intakePOST /api/public/bookingsValidates guest contact, requested date/time slot, and guest party size.Implemented
70Guest details & table assignmentstudio_bookings schemaStores guest dietary preferences, special requests, and assigned table identifier.Implemented
71Reservation lifecycle managementStatuses: requested, confirmed, seated, completedAdvances reservations from initial request to seated guests and completed dining.Implemented
72Staff seating & reservation deskGET/POST /api/admin/modules/bookingsLists upcoming reservations, manages table allocations, and handles cancellations.Implemented
73Cover counts & booking summariesSELECT count(*), sum(party_size) FROM studio_bookingsCalculates total reservation counts and anticipated guest covers for service planning.Implemented
Family 9

Admin Website Operations (Entries 74–83)

Admin application shell, draft page editor, published-vs-draft preview mode, media upload management, API editor, test runner, and changeset review. See in action: Story 2 — Safe Publishing →

IDCapabilityExact Method / Runtime ContractProcess & Operational BehaviorStatus
74Admin application shell_layouts/admin.html; /admin mountProvides authenticated control panel with responsive navigation, module drawers, and session guard.Implemented
75Website page editor & draftsapi/admin/pages.jsEnables visual and Markdown editing of site pages with draft saving and change isolation.Implemented
76Draft rendering & preview modeassets/fossil-preview-mode.jsRenders live previews of proposed page drafts side-by-side with current published content.Implemented
77Media & asset managerapi/admin/assets.jsHandles image and asset uploads, organizes media files, and generates responsive URLs.Implemented
78Site metadata & navigation editorapi/admin/settings.jsModifies global site configuration, menu items, header/footer text, and SEO defaults.Implemented
79API endpoint inventory & editorapi/admin/apis.jsLists all live serverless API routes, displays execution metrics, and allows code inspection.Implemented
80Admin API test runner interfacetests/admin-*.test.jsonExecutes declarative test suites directly from Admin UI with pass/fail assertion output.Implemented
81Overview operations dashboardAdmin home view & module summariesSummarizes site traffic, active leads, pending orders, and system health in unified dashboard.Implemented
82Changeset review & publish controlsfossil.publish.selectVersion()Displays line-by-line diffs of proposed changes and publishes them atomically to the live site.Implemented
83Purposeful user-facing UIMinimalist design systemSuppresses internal commit messages and developer chatter; presents clean, functional management views.Implemented
Family 10

Agent Workbench (Entries 84–99)

Embedded Wuwe agent runtime, persona synchronization, declarative skills, custom QuickJS tools, ticket DAG scheduling, isolated branches, and guarded publication. See in action: Story 3 — Guarded AI Workflow →

IDCapabilityExact Method / Runtime ContractProcess & Operational BehaviorStatus
84Embedded Wuwe agent runtimeNative agent runtime engine in CHosts internal AI personas with isolated sandboxes, tool dispatching, and turn-based reasoning.Implemented
85Persona synchronization & models.fossil/team.json; .fossil/agents/*Loads agent definitions, role prompts, model bindings, and temperature settings from studio/harness.Implemented
86Declarative agent skills.fossil/skills/*/SKILL.mdSupplies modular instructions and domain guidelines with checksum integrity validation.Implemented
87User-defined QuickJS agent tools.fossil/tools/*.jsDefines executable custom tools in JavaScript that agents can invoke securely inside the sandbox.Implemented
88Per-agent tool allowliststools: [...] in agent persona manifestRestricts available tools per persona (e.g. coder has repo tools, architect has ticket DAG tools).Implemented
89Native agent tool catalog39 native dispatch tools in CProvides surgical tools: repo_outline, repo_grep, repo_patch, ticket_create, chat_send.Implemented
90Ticket-first branch isolationFeature branches agent/tkt-Agents commit exclusively to isolated ticket branches; direct trunk commits are strictly denied.Implemented
91Ticket dependency DAG schedulingTicket parent/child links & DAG engineCoordinates complex epics by ordering subtasks according to dependency graph requirements.Implemented
92QA bounce circuit breakerBounce counter & threshold logicDetects repeated QA rejections; halts automated rework and escalates to CTO after 3 failures.Implemented
93CTO triage and escalation@agent-architect escalation routeRe-routes blocked or unassigned requests to CTO persona for structural architecture decisions.Implemented
94Parallel autonomous dispatchAsynchronous worker queueDispatches multiple tickets in parallel across independent branches without resource collisions.Implemented
95Internal SSE status streamingServer-sent events endpointStreams agent token generation, tool call execution, and step progress live to the browser.Implemented
96Chat team selection & context@team and persona mentions in /chatPreserves multi-turn conversation context; routes requests to specialized personas automatically.Implemented
97Guarded branch merge & publishAdmin approval gateEnforces mandatory human supervisor approval before any agent branch can be merged to trunk.Implemented
98Provider credential configurationAdmin AI Team credentials paneConfigures API keys, base URLs, and model aliases securely in repository storage.Implemented
99Surgical repository patchingrepo_patch with exact search/replacePerforms targeted multi-file code modifications without wiping or overwriting entire source files.Implemented
Family 11

Quality and Developer Tools (Entries 100–104)

Declarative autotest runner, in-memory SQLite shadow clones, syntax validators, code formatters, and fossil agent CLI. See in action: Story 3 — Guarded AI Workflow →

IDCapabilityExact Method / Runtime ContractProcess & Operational BehaviorStatus
100Declarative autotest runnerfossil autotest tests/*.test.jsonExecutes multi-step test suites with fixture injection, session preservation, and response assertions.Implemented
101In-memory SQLite shadow clonesZero-lock in-memory database cloningSpawns isolated in-memory SQLite databases for test execution; runs without locking repository files.Implemented
102In-engine API test executionfsl_test_run_suite()Runs integration test suites hermetically from CLI or internal agent tools without network dependencies.Implemented
103JavaScript & HTML syntax validatorsformat_js, format_htmlValidates code syntax and standardizes formatting before committing changes to branches.Implemented
104fossil agent CLI workflowsCLI command fossil agent Controls agent dispatching, persona listing, skill verification, and test execution from terminal.Implemented
Family 12

Module Catalog and Release Management (Entries 105–112)

module.json manifests, migration ledgers, runtime module discovery, Fossil bundle packing, atomic installation, non-destructive revocation, and rollback. See in action: Story 6 — Modular Business Apps →

IDCapabilityExact Method / Runtime ContractProcess & Operational BehaviorStatus
105Declarative module manifestsmodules//module.jsonDeclares module identity, version, capabilities, public endpoints, Admin drawers, and table ownership.Implemented
106Module migration ledgerstudio_module_migrations tableRecords every applied migration ID with timestamp; ensures idempotent execution across releases.Implemented
107Runtime module discoveryGET /api/admin/modulesDiscovers installed modules dynamically from branch artifacts; summarizes record counts.Implemented
108Per-client module licensingEntitlement manifestsEnables selective module packaging and licensing tailored to individual client requirements.Implemented
109Native Fossil bundle packingfossil.release.packBundle()Packages module artifacts, migrations, and assets into hermetic binary bundles for atomic distribution.Implemented
110Integrity verification & atomic installPer-file SHA-256 validationValidates checksum of every incoming artifact before applying migrations; rolls back on failure.Implemented
111Non-destructive module revocationManifest unlinking with table retentionDisabling a module removes public routes (returning 404) while preserving 100% of stored SQLite data.Implemented
112Release history & cumulative rollbackstudio_releases; rollback engineMaintains audit trail of all installed releases; allows instant cumulative rollback to prior version.Implemented