From 325e4dae3fa2db8df2ba097bc5fbe52fb5efa93f Mon Sep 17 00:00:00 2001 From: kenny-io Date: Tue, 25 Aug 2026 00:17:11 +0400 Subject: [PATCH] docs: align platform guides with current architecture --- README.md | 39 +- src/content/architecture.mdx | 799 +++++++------------ src/content/es/guides/getting-started.mdx | 13 +- src/content/es/guides/mcp-server.mdx | 3 +- src/content/es/introduction.mdx | 12 +- src/content/guides/admin-dashboard.mdx | 16 +- src/content/guides/deploying.mdx | 7 +- src/content/guides/environment-variables.mdx | 35 +- src/content/guides/mcp-server.mdx | 18 +- src/content/guides/thally-track.mdx | 313 ++++---- src/content/product-change-pipeline.mdx | 17 +- src/content/quickstart.mdx | 44 +- 12 files changed, 580 insertions(+), 736 deletions(-) diff --git a/README.md b/README.md index 2806106..6ca76c9 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ to agents as structured JSON, JSON-LD, and Markdown from the same URL. - **Auto-generated API reference** — drop in an OpenAPI spec and get interactive docs with a "Try It" console - **Sidebar & tabs** — configured from a single `docs.json` file - **Hybrid search** — instant client-side command palette plus a server-side full-text + vector `/api/search` -- **Retrieval-grounded AI chat** — Claude-powered Q&A with RAG retrieval and inline citations; works out of the box on a rate-limited trial key, then on your own `ANTHROPIC_API_KEY` +- **Retrieval-grounded AI chat** — cited Q&A through a verified Thally Cloud entitlement; local authoring and migration tools can use an owner-supplied model key when explicitly configured - **Agent endpoints** — `/llms.txt`, `/ai.txt`, `/api/docs-index`, `/api/docs/{slug}`, and an **Agent Readiness Score** at `/api/agent-readiness` - **Remote MCP server** — every deployed site is an MCP endpoint at `/api/mcp`; attach with `claude mcp add --transport http /api/mcp` - **Docs agent** — `thally agent "…"` (or `@thally` on a product PR) drafts docs as a **reviewed pull request**, self-checked with `thally check`; it never merges @@ -37,27 +37,21 @@ cd my-docs npm run dev ``` -Or use the repo directly: - -```bash -npx degit thallylabs/thally my-docs -cd my-docs -npm install -npm run dev -``` - Open [http://localhost:3040](http://localhost:3040). If port 3040 is already taken, the dev server falls back to the next free port and prints the URL it started on. -## Canonical site source +## How the public sources fit together + +This repository contains the live Thally documentation content. The public +runtime and toolchain are authored in `thallylabs/thally`, while the complete +customer-ready project is generated in `thallylabs/starter` from one exact +runtime revision. `create-thally-docs`, MCP, migration, and Thally Cloud all +consume the same immutable starter release instead of copying this docs site or +cloning the runtime repository directly. -This repository is both the live Thally documentation site and the canonical -standalone source used by `create-thally-docs` and Thally Cloud. New projects -inherit the application/runtime from `main`; the creation flow removes this -repository's documentation, screenshots, and issue templates before writing -the new site's placeholder or migrated content. There is no separate template -implementation to keep in sync. +Use `create-thally-docs` to create a project. Do not clone or `degit` the +runtime repository as a template. ## Project Structure @@ -178,13 +172,10 @@ cp .env.example .env.local | `THALLY_CLOUD_URL` | Optional Thally Cloud control-plane base URL. Defaults to `https://app.thally.io`; set this only for staging or a public development tunnel | | `THALLY_CLOUD_SITE_CONFIG` | Managed-hosting release snapshot injected by Thally Cloud. Self-hosted sites should leave this unset and use `THALLY_CLOUD_SITE_TOKEN` | | `THALLY_CONTENT_SOURCE` | Optional — where doc content is read from: `filesystem` (default; build-embedded, SSG) or `assets` (managed hosting; content served from the deployment's static assets and rendered per request). Self-hosted sites should leave this unset | -| `ANTHROPIC_API_KEY` | Owner key for AI chat — lifts trial limits entirely | -| `THALLY_TRIAL_ANTHROPIC_KEY` | Optional shared key powering the out-of-the-box trial chat (strict per-IP limits + a global daily cap) | -| `THALLY_TRIAL_RATE_PER_MIN` / `THALLY_TRIAL_RATE_PER_DAY` / `THALLY_TRIAL_DAILY_LIMIT` / `THALLY_CHAT_RATE_PER_MIN` | Optional chat rate-limit overrides | -| `THALLY_REPO_URL` | Optional — the docs repo Thally Track dispatches to. Defaults to `siteConfig.repoUrl`; set it when `site.ts` keeps the template default (`repoUrl: ''`) but Track should still target your repo | -| `THALLY_TRACK_WEBHOOK_SECRET` | Optional — enables the manual Thally Track webhook (`/api/track/webhook`); merged/preview PRs in tracked repos become docs-agent PRs. Not needed when you Connect a GitHub App | -| `THALLY_GITHUB_TOKEN` | Optional — fine-grained PAT that reads tracked product-repo PRs, relays Track dispatches, and authenticates the admin Docs-tasks queue | -| `THALLY_GITHUB_APP_ID` / `THALLY_GITHUB_APP_INSTALLATION_ID` / `THALLY_GITHUB_APP_PRIVATE_KEY` | Optional — wire a GitHub App by hand instead of the admin "Connect GitHub" button (which stores these encrypted). Grants org-wide access to selected repos | +| `ANTHROPIC_API_KEY` | Optional key for local CLI, docs-agent, migration, and translation operations; it does not enable chat in a deployed runtime | +| `THALLY_REPO_URL` | Optional docs-repository identity for local docs-agent compatibility tools | +| `THALLY_GITHUB_TOKEN` | Optional fine-grained token for a local compatibility command that reads a product pull request or dispatches a docs task; never inject it into a managed site | +| `THALLY_AGENT_TOKEN` / `THALLY_DISPATCH_TOKEN` | Optional GitHub Actions secrets for the self-managed docs-agent workflow; unrelated to Cloud Track | Legacy `DOX_*` names are still read as a fallback for every `THALLY_*` variable, so existing deployments keep working without renaming anything. diff --git a/src/content/architecture.mdx b/src/content/architecture.mdx index 2d03b1c..08a5697 100644 --- a/src/content/architecture.mdx +++ b/src/content/architecture.mdx @@ -1,601 +1,376 @@ --- title: Thally architecture -description: A plain-language guide to how Thally creates sites, learns from product repositories, finds affected docs, prepares updates, and publishes them safely. +description: How Thally keeps customer-owned documentation, product knowledge, reviewed updates, managed releases, and rollback connected without creating a second source of truth. keywords: - Thally architecture - site creation - product knowledge graph - - impact analysis + - knowledge surfaces - Track - managed deployments --- -This guide explains Thally as one connected system. It starts when someone -creates a documentation site and ends when an approved change is live. It also -shows how product repositories become a searchable map, how Thally finds docs -that may be out of date, and how Track prepares a reviewable update. +Thally is one system with a deliberately simple ownership rule: -The most important rule is: +> Your repositories own your product and documentation. Thally reads exact +> revisions, prepares reviewable changes, and publishes immutable releases; +> it does not turn its database into a second copy of your docs. -> GitHub owns the product code and documentation. Thally reads exact commits, -> keeps an evidence-backed map of what they mean, and proposes changes through -> normal pull requests. +This guide describes the architecture users interact with: how a site is +created, how product changes become evidence-backed documentation pull +requests, and how an approved revision becomes a safe managed release. -Thally never turns its database into a second copy of the docs. A team can -leave Thally and still has its repositories, content, and history. - -## The whole system at a glance +## The system at a glance {` flowchart LR - Person["Team member"] --> App["Thally Cloud app"] - App --> GitHub["GitHub repositories"] + Team["Your team"] --> DocsRepo["Customer-owned docs repository"] + Team --> ProductRepos["Product repositories"] + + ProductRepos --> Intake["Verified GitHub intake"] + Intake --> Knowledge["Product Knowledge Graph"] + Knowledge --> Impact["Affected-docs analysis"] + Impact --> Track["Track"] + Track --> Review["Review-gated pull requests"] + Review --> DocsRepo + + DocsRepo --> Publish["Managed release pipeline"] + Publish --> Validate["Validation and smoke checks"] + Validate --> Route["Atomic live-release pointer"] + Route --> Readers["People and agents"] +`} - GitHub --> Events["Verified GitHub events"] - Events --> SiteJobs["Site publish jobs"] - Events --> GraphJobs["Product reading jobs"] +The system has four layers: - GraphJobs --> Reader["Product reader"] - Reader --> Evidence["Evidence files"] - Reader --> Graph["Product facts and links"] +| Layer | Responsibility | +| --- | --- | +| Customer repositories | Product source, documentation MDX, configuration, branches, pull requests, and history | +| Open-source runtime and toolchain | Rendering, content projections, validation, CLI, MCP, migration, and the customer-ready starter | +| Thally Cloud control plane | Workspaces, billing, GitHub connections, site settings, product knowledge, Track, deployments, and release state | +| Managed execution and delivery | Isolated builds and agents, immutable assets, routing, previews, and the live site | - Graph --> Impact["Affected-docs check"] - Impact --> Track["Track update job"] - Track --> DocsPR["Documentation pull request"] - DocsPR --> GitHub +## One product, three repositories - GitHub --> SiteJobs - SiteJobs --> Release["Checked, fixed release"] - Release --> Live["Live documentation site"] -`} +Thally separates authored runtime code, the customer-ready scaffold, and paid +services so each has one clear owner. -There are two main parts: +| Repository | What it owns | +| --- | --- | +| `thallylabs/thally` | The public runtime, content engine, CLI, MCP server, migration tools, and shared packages | +| `thallylabs/starter` | The complete customer-ready project generated from one exact public runtime revision, plus starter-owned content and defaults | +| `thallylabs/thally-cloud` | The private control plane, paid services, managed workers, billing, and hosting orchestration | -| Part | What it does | Where it runs | -| --- | --- | --- | -| Thally Cloud | Accounts, workspaces, sites, repository connections, product knowledge, impact checks, Track, and publish history | The Thally app and its private workers | -| Thally site | Renders the documentation and serves HTML, Markdown, machine-readable data, search, and agent context | Thally-managed Cloudflare hosting or the team's own host | +`starter` is not another hand-maintained runtime. Release automation copies +runtime-owned files from an exact `thally` commit, records the source commit +and tree, and proves byte-for-byte parity. Cloud, the CLI, MCP, and migration +therefore create the same project from one immutable scaffold release. -The open-source Thally engine renders the site. Paid services attach to it; -they do not take ownership of it. +### What you own in a site repository -## What lives where +Most day-to-day work stays in these authored surfaces: -| Place | What it stores or runs | +| Path | What you control | | --- | --- | -| GitHub | Product code, documentation MDX, configuration, branches, pull requests, and commit history | -| Neon Postgres | Workspaces, sites, jobs, facts, links, graph versions, impact results, Track runs, and deployment records | -| Cloudflare R2 | Size-limited evidence bundles and unchangeable release files | -| Cloudflare Vectorize | Search vectors used to find possible matching docs; a vector alone can never prove impact | -| Cloudflare Queues | Small job messages for product reading, Track, and managed publishing | -| Cloudflare Workers and Sandboxes | Isolated product reading, Track runs, site builds, routing, and delivery | -| The live site | The last release that passed validation and smoke checks | - -Passwords, reusable GitHub tokens, and customer source code are not placed in -queue messages. Workers claim short-lived access only when a job starts. - -### Managed and self-hosted sites - -Thally-managed sites run on Cloudflare and use the publish flow in this guide. -A team can instead run the open-source engine on its own host and link it to -Thally Cloud with a site token. Product knowledge, impact analysis, and Track -still run as Thally services; only the final site host changes. The site token -can be rotated or revoked and is not placed inside customer site code during a -managed build. - -## 1. Creating a site - -The site wizard keeps the choices in a short, visible sequence. - -```text -┌──────────────────────────────────────────────────────────────────────┐ -│ Create a documentation site │ -│ │ -│ 1 Site details ── 2 Docs source ── 3 Product sources ── 4 Review │ -│ │ -│ Name Dundee │ -│ Description Optional │ -│ Thally address dundee.thally.app │ -│ │ -│ [Continue] │ -└──────────────────────────────────────────────────────────────────────┘ -``` +| `src/content/**` | Documentation pages and frontmatter | +| `docs.json` | Navigation and portable feature configuration | +| `src/data/site.ts` | Product identity, links, and versioned brand defaults | +| `src/mdx/custom-components.tsx` | Project-specific MDX components | +| `snippets/**` | Reusable content | +| OpenAPI files | API definitions used by the reference renderer | + +Framework files are versioned in the repository so a site remains portable, +but they come from the verified starter. Thally upgrades them with a three-way +comparison: unchanged framework files update automatically, your authored +content and settings stay untouched, and locally edited framework files stop +for review instead of being overwritten. + +## One content graph, many readers + +The runtime parses authored content once into a structured graph. Every public +projection comes from that same representation: + +- pre-rendered HTML for people; +- page JSON and JSON-LD; +- Markdown mirrors; +- `/llms.txt`, `/llms-full.txt`, `/ai.txt`, and `/AGENTS.md`; +- `/api/docs-index` and `/api/search`; +- the read-only `/api/mcp` server; +- embeddings and Agent Readiness checks. + +Self-hosted projects normally read content from the filesystem. Managed +releases use an asset-backed snapshot, so Thally can publish content-only +changes without rebuilding or executing customer code. Both modes use the +same content contract and produce the same public formats. + +## Managed and self-hosted sites + +Thally Cloud's control plane runs separately from the public documentation +runtime. It manages accounts, workspaces, subscriptions, GitHub access, site +configuration, jobs, and releases. Managed sites are delivered through +Cloudflare Workers for Platforms, immutable R2 assets, and a hostname router. + +A self-hosted site can link to Thally Cloud with a one-time opaque site token. +Only a hash is stored; the runtime exchanges the token for a short-lived +entitlement and configuration grant. Managed releases never receive that +reusable token. They use a release-scoped credential that stops authorizing +paid runtime features when the release is no longer active. + +GitHub remains authoritative for docs and versioned configuration. For a +managed site, portable settings changed in Thally Cloud are authoritative in +the hosted release snapshot. Writing those settings back to the repository is +an explicit synchronization action, not an automatic second source of truth. + +## 1. Creating and upgrading a site + +Every creation path—Cloud, CLI, MCP, or migration—starts from the same stable +scaffold record. That record pins the starter commit and tree, public runtime +commit and tree, manifest checksum, content-source version, and site-identity +contract version. - - The user chooses a name, an optional description, and a Thally address. - The address is reserved before slow GitHub or hosting work starts. + + Create a customer-owned repository from the current starter, or connect a + compatible existing Thally project and branch. - - Thally can create a customer-owned repository from the maintained template - or connect a compatible existing repository. + + Optionally select repositories whose product changes the Product Knowledge + Graph and Track should observe. The docs repository cannot select itself. - - The user can connect up to five repositories that contain the product's - API definitions, guides, and TypeScript code. This step can be skipped. + + Optionally select other Markdown or MDX repositories where Track may open + scoped draft pull requests. These destinations are separate from Product + sources and from the primary docs repository. - Thally shows the final choices, creates the durable site record, connects - the repositories, and starts the first release. + Thally saves the site and provisioning job before slow provider work, + verifies GitHub access, and enqueues the first immutable release. -### Why the site is saved first - -The browser creates one stable creation key. Thally writes a pending site row -and a durable provisioning job before asking GitHub to create a repository or -before starting a release. The request may try the job immediately, but a -recovery worker can reclaim it if the web process stops. Retrying setup resumes -that row instead of creating another site. - -```text -pending → repository ready → deploying → ready - │ │ │ - └───────────────┴─────────────────┴──→ failed, with a safe retry -``` - -Only workspace owners and editors can create a site. Every repository is -checked again at the time it is connected, including its owner, default -branch, and the GitHub App's access. - -If setup fails, Home shows the safe failure reason and the action that matches -the saved phase: retry setup, publish the repository that is already ready, or -reconnect GitHub. The browser draft is removed only after the site is ready. - -### New repository or existing repository +A client-generated creation key makes retries idempotent. If a request or +worker stops, recovery resumes the saved site instead of creating another one. -For a new repository, Thally: +For a known compatible starter, the first release may reuse a verified +baseline and replace only site identity, configuration, and content. If any +compatibility check is missing or uncertain, Thally falls back to the normal +isolated build. The shortcut changes latency, not the validation contract. -1. Creates it from the public `thallylabs/docs` template. -2. Waits until GitHub makes the first commit readable. -3. Writes fresh site details, navigation, starter pages, and maintainer notes. -4. Records the exact commit used for the first release. +When a newer stable starter is available, **Update site** applies a safe +three-way framework update. Conflicts are reported with the files that need +review; Thally does not silently overwrite local framework changes. -An occupied repository name is never enough proof that Thally owns an earlier -attempt. Thally resumes only when the saved site, template history, or managed -site marker proves that it is the same repository. +## 2. Durable GitHub intake -For an existing repository, Thally checks the docs configuration, package -files, lockfile, production branch, and Cloudflare build settings before it -starts an asynchronous release. This makes an incompatible repository fail at -the connection screen, where the user can act on it. +One environment-specific Thally GitHub App handles repository access, managed +deployments, previews, Track, checks, and review pull requests. Installation +access is revalidated with short-lived tokens. -The docs repository cannot also be connected as its own product source. That -would make a docs update look like a new product change and could create a -loop. +For every supported GitHub event, Thally first verifies the signature over a +bounded raw body and stores the exact delivery. It then claims the delivery +idempotently and fans it out to the relevant managed deployment, preview, +knowledge, and Track handlers. -### The first release +This durable inbox matters when a provider or worker is briefly unavailable: +Thally can replay the already verified delivery without inventing an unsigned +event or starting duplicate work. -Fresh sites use a safe shortcut. The starter commit came from Thally and does -not contain customer code, so the publisher can reuse a checked baseline site -and replace its content and identity. +## 3. Product Knowledge Graph -{` -flowchart TD - Start["First site release"] --> Known{"Known Thally starter commit?"} - Known -- Yes --> Identity["Check site name, repository, and optional description"] - Identity --> Baseline{"Safe baseline available?"} - Baseline -- Yes --> Fork["Reuse checked site code and replace content"] - Known -- No --> Full["Run a full isolated build"] - Baseline -- No --> Full - Fork --> Smoke["Smoke-check the new release"] - Full --> Smoke - Smoke -- Pass --> Promote["Make the release live"] - Smoke -- Fail --> Keep["Keep the previous live release"] -`} +Product repositories are read at exact revisions. A short-lived knowledge job +downloads a bounded archive, runs deterministic OpenAPI, MDX, and TypeScript +extractors, and never installs dependencies or executes customer code. -The description is optional all the way through this boundary. A missing -description becomes an empty string before the baseline is reused. A missing -or unsafe site name or repository still stops the release. +The graph keeps: -If the shortcut cannot prove that it is safe, Thally automatically runs the -full isolated build. The shortcut changes speed, not correctness. Recent -fresh-site tests completed the first content release in about 20 seconds, but -build time varies. +- sources and bindings for each connected repository; +- immutable snapshots and source events; +- evidence spans tied to exact files and revisions; +- stable product identities and versions; +- assertions, semantic changes, and graph revisions; and +- a current graph head selected only after a complete revision is ready. -## 2. Turning repositories into product knowledge +Unchanged extraction bundles can be reused. Missing or invalid evidence causes +a full deterministic extraction, not a partial graph. Contradictions remain +visible for review rather than being resolved by whichever statement arrived +last. -After a product repository is connected, Thally listens for verified GitHub -events. Each job is tied to one repository, one branch or pull request, and one -exact commit. A later commit cannot silently replace the source while the job -is running. +Impact analysis compares semantic changes with the current graph and records +the candidate documentation pages, evidence, ranking features, and policy +version. The result is a bounded explanation that Track and people can inspect. -Thally's product knowledge graph is a map made from five simple building -blocks: +## 4. Track and Knowledge surfaces -| Building block | Plain meaning | Example | -| --- | --- | --- | -| Source | A connected product repository | `payments-api` | -| Evidence | The exact file and lines that support a fact | `openapi.yaml` at commit `a84…` | -| Fact | One thing Thally learned from the evidence | `POST /refunds` accepts `reason` | -| Link | A supported relationship between two facts | The refund endpoint returns a `Refund` object | -| Graph version | The complete map after one source update | Product map after commit `a84…` | +Track turns a product change into a reviewable documentation update. It has two +explicit trigger modes: -Calling this a graph only means that facts can link to other facts. Every fact -must still point back to evidence that a person can inspect. +- a merged product pull request for production documentation work; or +- an explicitly labelled preview pull request for documentation review before + the product change merges. -### How a product commit is read +Preview runs target the primary documentation workflow only. Connected +Knowledge surfaces fan out from merged product changes, never an unmerged +preview. {` sequenceDiagram - participant GH as GitHub - participant App as Thally Cloud - participant Q as Product queue - participant Reader as Isolated reader - participant Store as Evidence and graph store - - GH->>App: Signed push or pull-request event - App->>App: Save the verified delivery before replying - App->>App: Save repository, branch, and exact commit - App->>Q: Queue a short-lived job claim - Q->>Reader: Start one size-limited reading job - Reader->>GH: Fetch the exact commit archive - Reader->>Reader: Read supported files without running code - Reader->>Store: Save evidence, facts, and links - Store->>Store: Build the next graph version out of view - Store->>Store: Make the full version current in one step + participant Product as Product repository + participant Cloud as Thally Cloud + participant Graph as Product Knowledge Graph + participant Agent as Isolated Track runner + participant Docs as Documentation repository + participant Human as Reviewer + + Product->>Cloud: Verified merged or labelled-preview PR + Cloud->>Graph: Ingest exact source revision + Graph->>Cloud: Evidence-backed impact bundle + alt No documented impact + Cloud-->>Product: Complete without model work + else Documentation needs work + Cloud->>Agent: Bounded job and short-lived capabilities + Agent->>Docs: Open review-gated pull request + Human->>Docs: Review, edit, merge, or reject + Docs->>Cloud: Verified merge event + Cloud->>Cloud: Publish exact docs revision + end `} -The reader supports: +The Track worker claims an encrypted, bounded job and runs the docs agent in a +disposable Sandbox. Provider model credentials and GitHub App credentials stay +in trusted control-plane services. The agent receives only the repository +context and destination access needed for that run. -- OpenAPI in JSON or YAML, including files whose names contain `openapi` or - `swagger`. -- MDX documentation. -- TypeScript source files. +Track never auto-merges its pull request. -It does not install dependencies, run project scripts, execute plugins, or run -customer code. It skips dependency folders, build output, test fixtures, -environment files, keys, and common secret paths. It also caps archive entries, -selected files, and total bytes. Oversized work is rejected instead of being -partly trusted. +### Connected Knowledge surfaces -Unchanged files reuse their earlier evidence. Changed files create new -evidence tied to the new commit. +The primary documentation repository remains special: it uses ranked product +impact and can trigger a managed deployment after a person merges the update. -The verified delivery inbox is also the recovery boundary. If the first save -fails, GitHub receives a retryable response. If later processing stops, a -short-lived claim lets another worker safely resume the saved delivery. +Owners and editors can also connect scoped Markdown or MDX destinations such +as an SDK guide or release-notes repository. One merged product change can +create independently metered child runs for up to five connected surfaces. +Each destination records an exact repository, branch, root, allowed paths, +validation policy, and administrator instructions. -### Current branch and pull-request views +Connected runs use a constrained search-and-edit controller. They cannot run +repository dependencies, scripts, generators, or workflows. They may open a +draft `thally/agent-*` pull request inside the configured scope, but Thally +never deploys that connected repository. -The production branch and a pull request never share one mutable graph. +## 5. Managed delivery -{` -flowchart LR - Main["Current production graph"] --> MainA["Source A at commit 120"] - Main --> MainB["Source B at commit 88"] +Postgres is authoritative for deployment triggers, build jobs, releases, and +their state. A managed release is immutable and records its site, target, +commit, scaffold identity, runtime identity, content identity, and provider +coordinates before it can become reachable. - PR["Pull-request view"] --> PRA["Source A at proposed commit 121"] - PR --> PRB["Source B at commit 88"] +### Full builds - PRA -. "temporary replacement for Source A" .-> MainA -`} +For an executable or uncertain change, a trusted Worker claims the exact job +and runs the repository in a disposable, credential-free Cloudflare Sandbox. +The build: -A pull-request view replaces only the changed source. It cannot change the -production view, and it expires when it is no longer needed. The previous -production version remains available for comparison and repair. +1. fetches the exact GitHub revision with a short-lived read-only token; +2. applies the verified runtime overlay and compatible caches; +3. runs the locked install, `thally check`, Cloudflare build, and dry-run; +4. uploads versioned runtime and content artifacts through trusted code; +5. smoke-checks `/`, `/llms.txt`, `/api/docs-index`, and `/AGENTS.md`; and +6. reports the exact manifest before the control plane can promote it. -When two sources disagree, Thally keeps both statements and opens a review -item. It does not silently choose the statement that sounds more likely, and -an AI model cannot mark evidence as verified. +### Content-only releases -## 3. Finding documentation affected by a change +A strict descendant commit can take the faster content path only when every +change is a bounded edit to `docs.json`, `src/content/**`, or `snippets/**`. +Thally reuses the lineage root's checked runtime, applies content changes, and +runs the same smoke and promotion contract without executing customer code. -Once a graph version becomes current, Thally compares it with the previous -version. It records meaningful changes rather than treating every line edit as -product impact. +Force pushes, incomplete comparisons, public assets, executable files, +unsupported paths, old lineage, or any uncertainty fall back to a full build. +The fast path is an optimization, never a weaker correctness path. -Examples include: +### Pull-request previews -- an endpoint was added or removed; -- a request field became required; -- an allowed value changed; -- a public TypeScript shape changed; or -- an explanation in a product guide changed. +Managed documentation pull requests receive a stable site-specific preview +address and an immutable release for each head revision. Preview routing, +access policy, cache, checks, and deployment state are isolated from production. -For each change, Thally finds possible docs pages from explicit OpenAPI links, -short graph paths, exact terms, text search, and vector search. A search match -can suggest a page, but it cannot prove that the page is affected. A retained -result needs both a supported graph path and evidence. +A preview cannot announce itself ready until its validated release is selected, +and it can never move the production pointer. Closing an unmerged pull request +retires its route. A successfully routed merged preview remains available for a +short review window before cleanup. -{` -flowchart LR - Change["Meaningful product change"] --> Direct["Direct docs link"] - Change --> Paths["Short fact-and-link paths"] - Change --> Search["Exact, text, and vector search"] +### Promotion and routing - Direct --> Check["Require path and evidence"] - Paths --> Check - Search --> Check +Uploading an artifact does not make it live. The final report must match the +claimed site, release, commit, manifest, script, artifact prefix, and smoke +results. Only then does the control plane move the site's active-release +pointer under its lease and monotonic route-sequence checks. - Check --> Rank["Rank likely pages"] - Rank --> Explain["Save why each page was selected"] - Explain --> Bundle["Bounded impact result"] -`} +The hostname router requires an exact active tenant route before dispatching +the corresponding Workers for Platforms script. Unknown, inactive, malformed, +pending, or reserved hosts fail closed. Custom domains use the same release +pointer and routing path after ownership and certificate checks. -The rank considers: - -- how directly the product fact links to the page; -- how serious the change is; -- how trusted and recent the evidence is; -- whether the product and page versions match; -- how closely the page text matches the change; -- page ownership and review rules; and -- earlier reviewer feedback when enough examples exist. - -Contradictory or stale evidence lowers confidence. Sparse feedback is never -allowed to overrule current evidence. - -The work is deliberately limited: one run accepts at most 500 possible pages, -keeps graph paths no deeper than five links, and saves at most 50 affected -pages. A typical run asks for only the top ten. These limits keep one noisy -repository from creating unlimited work. - -Impact work uses a renewable, time-limited claim and three attempts. A stopped -worker cannot leave a run permanently stuck as `running`. Results are filtered -through the destination site's documentation-source connection before the UI, -MCP endpoint, or Track can read them. - -### What the Product knowledge screen communicates - -```text -┌────────────────────────────────────────────────────────────────────────────┐ -│ Product knowledge 3 sources current │ -├────────────────────────────────────────────────────────────────────────────┤ -│ Sources 3 Current entities 248 Recent changes 7 │ -│ Pages to review 1 │ -├────────────────────────────────────────────────────────────────────────────┤ -│ Source freshness │ Change → impact → update │ -│ payments-api current a84c21 │ field became required │ -│ web-app current 91d3aa │ 4 affected pages │ -│ sdk reading b601ff │ Track pull request ready │ -├────────────────────────────────────────────────────────────────────────────┤ -│ Review queue │ -│ 1 Refund API /api/refunds strong match │ -│ 2 Refund guide /guides/refunds likely match │ -└────────────────────────────────────────────────────────────────────────────┘ -``` - -Opening a result shows the product value before and after the change, the -strongest supported relationship path, expandable file-and-commit evidence, -and a plain-language score explanation. Owners and editors can save or change -an Affected, Not affected, False positive, or Review later decision. The saved -choice is visible and completed reviews leave the pending count. Viewers can -inspect the explanation without changing it. - -Agents can inspect the same knowledge through a site-scoped, read-only token. -The token is shown once, can be revoked, and offers four size-limited operations: -search facts, get one fact, get nearby facts, and explain one impact result. -It does not accept database queries or an arbitrary workspace ID. - -## 4. Turning impact into a documentation update - -Track begins only after the impact result for the exact merged product commit -is ready. This prevents an earlier or later graph version from being used by -mistake. +## 6. Rollback and recovery -{` -sequenceDiagram - participant Product as Product repository - participant Graph as Product knowledge - participant Impact as Affected-docs check - participant Track as Track runner - participant Docs as Docs repository - participant Person as Reviewer - participant Publish as Managed publisher - - Product->>Graph: Product pull request merges - Graph->>Graph: Read the exact merged commit - Graph->>Impact: Save supported product changes - Impact->>Impact: Find and rank affected pages - alt No affected docs - Impact-->>Product: Complete without AI work or a pull request - else Docs need work - Impact->>Track: Send a limited set of pages, paths, and evidence - Track->>Docs: Check out docs in a disposable sandbox - Track->>Track: Edit MDX and run validation - Track->>Docs: Open a Track pull request - Person->>Docs: Review and merge - Docs->>Publish: Verified merge event - Publish->>Publish: Build and smoke-check a fixed release - Publish-->>Person: Updated docs are live - end -`} +Rollback selects an earlier validated immutable release and moves the same +route pointer. It does not rebuild, rewrite Git history, or mutate the retained +artifact. -The input to Track contains the exact source commit, ranked target pages, -supporting paths, evidence IDs, and the site's review rules. It is size-limited -and versioned so a retry receives the same task. +After a rollback, automatic production publishing pauses. Pushes received +while paused are durably marked superseded so a later queued deployment cannot +silently undo the rollback. An explicit operator publish resumes automation. -Track runs in a disposable, network-restricted sandbox. It checks out the docs -repository, edits MDX, and runs the project's validation. Before Thally accepts -the result, a separate check proves that every important factual statement: +Provider and process failures leave the last known-good release live. Expired +job claims are reclaimed, verified GitHub deliveries replay from the durable +inbox, interrupted provider work reconciles, and exhausted queue messages stay +available for diagnosis. -1. appears as exact text in a changed MDX file; and -2. cites an evidence ID included in the signed job input. +## 7. Security boundaries -If that check fails, no pull request is opened. The private evidence checklist -is removed before commit, while its result and evidence references stay in the -Thally activity record. +The architecture is designed so one compromised or malformed input cannot +silently cross tenant or provider boundaries: -Track never merges its own pull request by default. Reviewers can change or -reject the draft. Their decisions improve later ranking only after enough -examples exist. +- every control-plane read and mutation is scoped to the active workspace; +- webhook signatures are verified before JSON parsing; +- creation keys, delivery IDs, job claims, and release triggers are idempotent; +- reusable site tokens are hashed and short-lived capabilities are scoped; +- customer code runs only in disposable Sandboxes without provider credentials; +- trusted workers validate repository, revision, artifact, route, and report + coordinates against the original claim; +- AI and analytics derive their workspace and site from a verified credential, + never request JSON; and +- failed builds, previews, Track runs, or knowledge jobs cannot replace the + current production release. -If a GitHub delivery is missed, a recovery check finds completed Track -pull requests and reconnects the merge to its deployment. Replaying an event -is safe because jobs and releases have stable keys. - -## 5. Publishing the approved docs - -A merged documentation pull request reaches the same managed publisher used -by manual changes. The publisher first asks whether the commit changed only -safe content or also changed executable site code. - -{` -flowchart TD - Push["Verified push at an exact commit"] --> Diff{"What changed?"} - Diff -- "Docs pages, snippets, or docs.json only" --> Content["Fast content release"] - Diff -- "Site code, packages, or build settings" --> Build["Full isolated build"] - Diff -- "Cannot prove the difference" --> Build - - Content --> Assemble["Create a fixed release"] - Build --> Assemble - Assemble --> Check["Check pages, agent files, index, and a static asset"] - Check -- Pass --> Route["Point the site's address to the new release"] - Check -- Fail --> Old["Leave the current release live"] -`} +## 8. How Thally itself reaches production -### Fast content release +Thally uses the same reviewed-candidate principle for its own platform: + +1. a feature or fix pull request targets `main`; +2. impact-aware CI and an immutable deploy preview verify the candidate; +3. the exact reviewed commit merges once to `main`; +4. Netlify and only the affected Cloudflare Workers deploy production; and +5. release capture writes an immutable cross-provider manifest for rollback. -For a content-only change, Thally reuses the checked site code from the active -build and replaces the content assets. It still creates a new fixed release, -uploads it under a new identity, and smoke-checks it before promotion. Existing -pages can be edited, added, deleted, or renamed. Deleting or renaming -`docs.json`, changing a public asset, or changing executable code safely falls -back to a full build. +There is no long-lived staging branch or second promotion build for ordinary +platform releases. The reviewed pull-request preview is the staging boundary. -### Full build - -For code or build-setting changes, an isolated builder fetches the exact commit -and runs four platform-owned stages: - -| Stage | What happens | -| --- | --- | -| Install | Install the locked package versions | -| Validate | Run `thally check` | -| Build | Build the Next.js site for Cloudflare | -| Package | Prepare the Worker and static files for upload | - -The sandbox receives no reusable GitHub, Cloudflare, R2, or site credential. -The trusted worker performs source fetching, uploads, smoke checks, and final -promotion. - -### Releases and rollback - -Every release is fixed to one Git commit and cannot be rewritten. The live -address is only a pointer to the last release that passed its checks. A failed -release never replaces it. - -```text -┌──────────────────────────────────────────────────────────────────────┐ -│ Deployments [Publish again] │ -├──────────────────────────────────────────────────────────────────────┤ -│ Production · LIVE NOW dundee.thally.app │ -│ │ -│ ✓ docs: update refund guide main · 84ac91 Live │ -│ ✓ docs: initialize site main · a097c5 Previous [Roll back] │ -│ ✕ docs: broken example main · f66311 Failed │ -│ Validation stopped this release. The live site was not changed. │ -└──────────────────────────────────────────────────────────────────────┘ -``` - -Rollback changes the pointer to an earlier checked release. It does not -rebuild the site, change DNS, or rewrite the repository. Both rollback entry -points ask for confirmation. The history row names the release, commit, and -domain; the live summary names the previous commit and production domain. - -### How a live request reaches the right site - -{` -flowchart LR - Visitor["Reader or agent"] --> Host["Thally address or verified custom domain"] - Host --> Router["Thally site router"] - Router --> Exact{"Exact site match?"} - Exact -- No --> Stop["Safe not-found response"] - Exact -- Yes --> Pointer["Current checked release"] - Pointer --> Worker["That site's Worker and static files"] - Worker --> Response["Docs response"] -`} - -The router has no default customer. An unknown address cannot fall through to -another workspace's site. Creating a `*.thally.app` site needs no DNS or -certificate job; custom domains are routed only after ownership checks pass. - -The approved structured content powers every output: the web page, Markdown, -JSON, JSON-LD, search, embeddings, `llms.txt`, and agent context. Thally does -not parse separate copies for different readers. - -## 6. Security and workspace separation - -These rules hold across the full flow: - -- Every site, source, graph query, impact result, and job is checked against - the active workspace and an active site on the server. -- GitHub webhooks are signature-checked and durably saved before work is - accepted. -- Repository access uses short-lived GitHub App tokens tied to an installation. -- Queue messages carry claims for one job, not reusable credentials or source - archives. -- Product reading never runs customer code. -- Full site builds run in disposable sandboxes with restricted network access. -- Customer build logs stay outside application logs; only fixed failure codes - cross the boundary. -- Preview graphs cannot change the production graph. -- Preview releases cannot promote themselves to production. -- A failed build, smoke test, or evidence check leaves the current live site - unchanged. -- Deleting a site immediately revokes its site and Product Knowledge tokens and - prevents queued or running Track capabilities from obtaining repository - access. -- Deleting knowledge first marks the source as unavailable, stops and waits for - active readers, then removes evidence files, search vectors, cached results, - model output, and relational records. Completion is recorded only after the - external stores have been checked. - -## 7. Failure and recovery - -| Failure | What Thally does | -| --- | --- | -| The create-site request is retried | Resumes the row with the same creation key | -| The site-creation web process stops | Another worker resumes the saved provisioning job after its time-limited claim expires | -| A verified GitHub delivery fails after capture | The inbox retries it after the earlier worker's claim expires | -| GitHub takes time to expose a generated repo | Polls for a limited time before declaring it incompatible | -| The fresh-site shortcut is unavailable or unsafe | Runs a full build | -| A product archive is too large or contains unsupported paths | Rejects the reading job rather than trusting partial output | -| Product reading fails | Keeps the earlier current graph and retries the job | -| Two product sources disagree | Keeps both statements and opens a review item | -| No docs are affected | Completes without AI use or a pull request | -| An impact worker stops | A later worker resumes the job; three failed attempts become a visible failure | -| Track cannot support a statement with allowed evidence | Opens no pull request | -| A Track merge webhook is missed | Reconciliation reconnects the merged pull request and deployment | -| A release fails validation or smoke checks | Keeps the previous release live | -| A user rolls back | Points the site to an earlier checked release without rebuilding | - -## 8. One change from start to finish - -Imagine that `payments-api` changes the `reason` field on -`POST /refunds` from optional to required. - -1. The product pull request merges at commit `a84c21`. -2. The verified GitHub event creates a reading job for exactly `a84c21`. -3. The isolated reader finds the OpenAPI change and saves both the old and new - evidence. -4. A complete new graph version becomes current in one step. -5. The affected-docs check finds `/api/refunds` through its direct OpenAPI link - and `/guides/refunds` through a short supported path and matching example. -6. The impact screen shows both pages, their paths, and evidence. -7. Track receives only those pages and the limited evidence needed to update - them. -8. Track edits the MDX, runs validation, proves its factual statements, and - opens a documentation pull request. -9. A person reviews and merges the pull request. -10. The publisher sees a content-only diff, creates a fast fixed release, - smoke-checks it, and points the site to it. -11. The same approved source now powers the human page, machine-readable - formats, search, and agent context. - -That is the complete loop: product change, supported understanding, explained -impact, reviewable update, and safe publication. +Public runtime releases follow a separate provenance chain: author the runtime +in `thally`, generate and verify the `starter` snapshot, promote their exact +paired identities, and move Cloud's stable scaffold channel only after its +verification gates pass. Existing sites update through the safe three-way site +upgrade flow rather than silently changing underneath their owners. ## Related guides -- [The product-change pipeline](/product-change-pipeline) explains the product - promise and review contract. -- [Set up Thally Track](/guides/thally-track) covers repository setup and - day-to-day use. -- [Deploy your documentation](/guides/deploying) covers self-hosted deployment - choices. -- [Use the MCP server](/guides/mcp-server) connects coding agents to the docs - engine. -- [`thally check`](/guides/cli-reference) validates content and configuration - before a release. +- [The product-change pipeline](/product-change-pipeline) explains the review + and evidence contract. +- [Thally Cloud quickstart](/quickstart) creates a managed site. +- [Set up Thally Track](/guides/thally-track) connects Product sources and + Knowledge surfaces. +- [Deploy your documentation](/guides/deploying) covers self-hosted targets. +- [Use the MCP server](/guides/mcp-server) gives coding agents structured + authoring and read access. +- [`thally check`](/guides/cli-reference) validates authored content and + configuration before release. diff --git a/src/content/es/guides/getting-started.mdx b/src/content/es/guides/getting-started.mdx index f666477..10fc348 100644 --- a/src/content/es/guides/getting-started.mdx +++ b/src/content/es/guides/getting-started.mdx @@ -5,7 +5,7 @@ description: Configura Thally y crea tu primera página de documentación en men ## Requisitos previos -- **Node.js 18+** y npm (o pnpm/yarn) +- **Node.js 22+** y npm (o pnpm/yarn) - Una terminal y un editor de código - Una especificación OpenAPI (opcional — se incluye un ejemplo de JSONPlaceholder) @@ -39,14 +39,9 @@ También puedes omitir las preguntas y aceptar todos los valores predeterminados npx create-thally-docs my-docs --yes ``` -O clonar manualmente: - -```bash -git clone https://github.com/thallylabs/thally.git my-docs -cd my-docs -rm -rf .git -npm install -``` +La CLI descarga la versión inicial inmutable que también utiliza Thally Cloud. +No clones `thallylabs/thally` como plantilla: ese repositorio contiene el +runtime público, no el proyecto completo destinado al cliente. diff --git a/src/content/es/guides/mcp-server.mdx b/src/content/es/guides/mcp-server.mdx index 7095194..9f5ba6c 100644 --- a/src/content/es/guides/mcp-server.mdx +++ b/src/content/es/guides/mcp-server.mdx @@ -65,7 +65,8 @@ Una vez conectado, puedes hablarle a tu documentación como a un colaborador: *" #### `create_project` -Genera un nuevo proyecto Thally a partir de la plantilla de GitHub. +Genera un nuevo proyecto Thally a partir de la versión inicial inmutable +actual, fijada a una revisión exacta del runtime público. ``` Create a new Thally project at ~/dev/my-docs with the name "Acme Docs" diff --git a/src/content/es/introduction.mdx b/src/content/es/introduction.mdx index 23151fd..55edd41 100644 --- a/src/content/es/introduction.mdx +++ b/src/content/es/introduction.mdx @@ -61,14 +61,10 @@ npx create-thally-docs my-docs La CLI te solicita un nombre de proyecto, descripción, preajuste de marca y URL opcional del repositorio de GitHub — luego crea un sitio de documentación listo para ejecutar con contenido inicial, navegación y dependencias instaladas. -Alternativamente, clona la plantilla manualmente: - -```bash -git clone https://github.com/thallylabs/thally.git my-docs -cd my-docs -npm install -npm run dev -``` +La CLI descarga la versión inicial inmutable que también utiliza Thally Cloud. +No clones `thallylabs/thally` como plantilla: ese repositorio contiene el +runtime público del que se genera la versión inicial, no el proyecto completo +destinado al cliente. ## Cómo funciona diff --git a/src/content/guides/admin-dashboard.mdx b/src/content/guides/admin-dashboard.mdx index 9f2377f..8bf82c3 100644 --- a/src/content/guides/admin-dashboard.mdx +++ b/src/content/guides/admin-dashboard.mdx @@ -155,10 +155,14 @@ Under **Settings → Site experience** you can rename the AI assistant and set i Both are stored at runtime and apply without a redeploy. The chat widget still requires access to the Thally Cloud AI service before readers can use it. -## Connect GitHub (Thally Track) +## Connect GitHub for Thally Track -When the Track service is available, an Owner can use **Settings → Integrations** -to connect its GitHub App. The app can watch selected repositories and prepare -documentation pull requests. Set `THALLY_AUTH_SECRET` before connecting it so -Thally can encrypt the stored private key. **Disconnect** clears the stored -credentials. +For a Cloud-connected site, Product sources and Knowledge surfaces use +Thally's environment-specific GitHub App. Configure them in Thally Cloud under +the site's settings. The control plane revalidates the selected repository and +branch with short-lived installation tokens; the documentation runtime never +stores the App private key or a reusable product-repository token. + +Self-hosted dashboard integrations are local authoring conveniences, not the +canonical Cloud Track pipeline. See [Thally Track](/guides/thally-track) for +the current managed flow. diff --git a/src/content/guides/deploying.mdx b/src/content/guides/deploying.mdx index 2e0de71..c45c430 100644 --- a/src/content/guides/deploying.mdx +++ b/src/content/guides/deploying.mdx @@ -53,12 +53,17 @@ Use a server-capable deployment for: - AI chat and remote MCP routes; - the admin dashboard and analytics ingestion; - password-protected documentation; -- Thally Track webhooks and other server APIs. +- feedback, search, and other runtime server APIs. A fully static export is suitable only when you need rendered documentation pages and static assets. The features above depend on server routes and will not work in an `output: 'export'` build. +The canonical Thally Track webhook is part of the Thally Cloud control plane, +not a route that managed sites must host themselves. Self-hosting the public +documentation runtime does not move Cloud's GitHub intake or Track workers +into your site process. + ## Add production configuration Only `THALLY_SITE_URL` is required for a basic public site. Add credentials and diff --git a/src/content/guides/environment-variables.mdx b/src/content/guides/environment-variables.mdx index af3eb6a..d3ee6b1 100644 --- a/src/content/guides/environment-variables.mdx +++ b/src/content/guides/environment-variables.mdx @@ -47,30 +47,35 @@ still accepted where a corresponding `THALLY_*` variable replaced them. | `THALLY_STORAGE` | No | Set to `memory` to opt out of persistent general storage. | | `THALLY_ANALYTICS_SECRET` | No | Separate internal analytics-ingest secret. | -## AI and agent limits +## Local AI authoring + +These variables apply to local CLI, docs-agent, migration, or translation +operations. They do not enable chat in a deployed documentation runtime. +Thally Cloud's managed AI endpoints use a verified site entitlement and keep +provider credentials in the control plane. | Variable | Required | Purpose | | --- | --- | --- | -| `ANTHROPIC_API_KEY` | Owner-powered AI | Production key for chat and documentation-agent operations. | -| `THALLY_TRIAL_ANTHROPIC_KEY` | No | Shared trial key used under strict limits when no owner key is present. | -| `THALLY_CHAT_RATE_PER_MIN` | No | Owner-tier chat requests per minute. | -| `THALLY_CHAT_RATE_PER_DAY` | No | Owner-tier daily limit; `0` means unlimited. | -| `THALLY_TRIAL_RATE_PER_MIN` | No | Trial requests per minute. | -| `THALLY_TRIAL_RATE_PER_DAY` | No | Trial requests per day per visitor. | -| `THALLY_TRIAL_DAILY_LIMIT` | No | Global trial requests per day. | +| `ANTHROPIC_API_KEY` | Local AI operations | Model key for docs-agent, migration, and translation commands. Keep it in the local environment or the specific authoring workflow. | | `THALLY_MCP_RATE_PER_MIN` | No | Remote MCP request-rate override. | | `THALLY_AGENT_MODEL` | No | Model override for documentation-agent runs. | -## Thally Track and GitHub +## Local docs-agent automation + +The canonical Thally Cloud Track pipeline uses the platform GitHub App and the +shared, durable control-plane webhook. You configure its Product sources and +Knowledge surfaces in Thally Cloud and do not set the variables below on a +managed site. + +These variables are limited to local compatibility commands and the +self-managed GitHub Actions docs-agent workflow. Do not deploy a GitHub App +private key, Track webhook secret, or reusable product-repository credential in +the documentation runtime. | Variable | Required | Purpose | | --- | --- | --- | -| `THALLY_REPO_URL` | Sometimes | Docs repository Track dispatches to when `site.ts` has no repository URL. | -| `THALLY_TRACK_WEBHOOK_SECRET` | Manual webhook mode | HMAC secret shared with product-repository webhooks. | -| `THALLY_GITHUB_TOKEN` | Manual token mode | Fine-grained token for reading tracked pull requests and dispatching work. | -| `THALLY_GITHUB_APP_ID` | Manual App setup | GitHub App identifier. | -| `THALLY_GITHUB_APP_INSTALLATION_ID` | Manual App setup | Installation used to mint access tokens. | -| `THALLY_GITHUB_APP_PRIVATE_KEY` | Manual App setup | PEM private key. Preserve line breaks in the host's secret field. | +| `THALLY_REPO_URL` | Local compatibility | Docs repository used when a local authoring tool needs an explicit destination. | +| `THALLY_GITHUB_TOKEN` | Local compatibility | Fine-grained token for a local command that reads a product pull request or dispatches a docs task. | | `THALLY_AGENT_TOKEN` | Agent workflow | Token that can write to the docs repository and read configured product repositories. | | `THALLY_DISPATCH_TOKEN` | Product repository workflow | Secret used to dispatch an update to the docs repository. | diff --git a/src/content/guides/mcp-server.mdx b/src/content/guides/mcp-server.mdx index 5fb82ca..848cddb 100644 --- a/src/content/guides/mcp-server.mdx +++ b/src/content/guides/mcp-server.mdx @@ -74,7 +74,9 @@ Once connected, you can talk to your docs like a collaborator: *"Add a page abou #### `create_project` -Scaffolds a new Thally project from the GitHub template. +Scaffolds a new Thally project from the current immutable starter release. The +release pins one exact public runtime revision and is shared by the CLI, MCP, +migration, and Thally Cloud creation flows. ``` Create a new Thally project at ~/dev/my-docs with the name "Acme Docs" @@ -321,13 +323,19 @@ See [Multi-Language Support](/guides/multi-language) for full setup instructions --- -### Product changes +### Product changes (local compatibility) #### `sync_from_repo` -Analyzes a merged pull request in a tracked product repository. It previews the -documentation task by default, or dispatches the task to the docs repository so -the review-gated docs agent can draft a pull request. +Analyzes a merged pull request using a local project's legacy `docs.json` +tracking configuration. It previews the documentation task by default, or +dispatches the task to the docs repository so the review-gated docs agent can +draft a pull request. + +For Cloud-managed Track, connect Product sources and Knowledge surfaces in +Thally Cloud instead. The managed pipeline uses verified durable webhook +intake, Product Knowledge Graph impact, scoped capabilities, and exact +repository identities; it does not depend on this MCP dispatch tool. ``` Preview the docs task for pull request 482 in acme/widget diff --git a/src/content/guides/thally-track.mdx b/src/content/guides/thally-track.mdx index 22933e6..0fdb191 100644 --- a/src/content/guides/thally-track.mdx +++ b/src/content/guides/thally-track.mdx @@ -1,149 +1,194 @@ --- title: Turn product changes into docs pull requests navTitle: Thally Track -description: Trace merged product work to affected customer-facing knowledge and prepare evidence-backed updates for human review. +description: Connect Product sources and Knowledge surfaces, then let Thally prepare evidence-backed documentation pull requests for human review. keywords: - thally track - - pr-triggered docs + - product sources + - knowledge surfaces - docs automation - - sync from repo + - product knowledge graph - keep docs in sync with code - - agent-native --- -**Every product change creates communication work. Thally Track finds the part -that belongs in your documentation.** You register your product's source -repositories, and when a **pull request merges**, Track carries the reviewed -product evidence into a task for the [docs agent](/guides/docs-agent). The -agent updates the affected pages in a documentation pull request—reviewed by -you, never merged on its own. - -Track acts on **merged PRs, not raw commits**, because evidence comes before -confidence. A merged PR is completed, reviewed work with a durable explanation; -a commit can be undone by the next one. Triggering per commit would ask the -agent to interpret churning, incomplete work. - -``` -product-repo PR merged ──▶ trigger (webhook or Action) ──▶ repository_dispatch - │ - your review ◀── documentation PR ◀── docs agent ◀─────┘ -``` - -Everything runs on your infrastructure with your keys. Nothing is hosted by Thally. - - -Track starts with GitHub product changes and documentation pull requests. SDK -references, release notes, tutorials, and AI context are part of Thally's -long-term product-knowledge graph, not a claim that every surface is automated -today. - - -## Register a repo - -Track is **opt-in**. A freshly scaffolded Thally site (`npx create-thally-docs`) tracks **nothing** — there's no `tracking` block in `docs.json` until you add one. You opt in from your project root: +Every product change creates communication work. Thally Track finds the part +that belongs in customer-facing documentation and prepares a pull request for +your team to review. -```bash -thally track add acme/api-server --paths "src/**,openapi.yaml" --tab "API Reference" -``` +Track is a Thally Cloud service. It connects verified GitHub changes to the +Product Knowledge Graph, uses evidence-backed impact analysis to select the +documentation that may need work, and runs the docs agent inside an isolated +environment. It never auto-merges its pull requests. -This writes a version-controlled `tracking` block to `docs.json`, so adding a -repository becomes a reviewable configuration change: +## Product sources and Knowledge surfaces -```json -"tracking": { - "repos": [ - { - "owner": "acme", - "repo": "api-server", - "branch": "main", - "paths": ["src/**", "openapi.yaml"], - "outputTab": "API Reference" - } - ] -} -``` +These connections have different jobs: -| Field | Default | Purpose | +| Connection | What it contributes | What Thally may do | | --- | --- | --- | -| `owner` / `repo` | — | The GitHub repository to watch | -| `branch` | `main` | The **base branch** a PR must merge into to trigger | -| `paths` | all files | Glob filters — only PRs touching these fire (`**` crosses directories, `*` stays within one) | -| `outputTab` / `outputGroup` | — | Where generated pages land in your navigation | - -## Try it before wiring anything - -`thally track test` fetches the latest PR merged into the tracked base branch, applies your path filters, and shows the docs task it would produce: - -```bash -thally track test acme/api-server # latest merged PR -thally track test acme/api-server --pr 128 # a specific PR -``` - -Without an `ANTHROPIC_API_KEY` it prints the distilled instruction and diff context. With one, it runs the docs agent in **dry-run** — you see the exact documentation edits it would draft, and nothing is written. - -## Give Track access - -Run `thally track setup` for tailored instructions. There are three interchangeable access modes — all end in a `repository_dispatch` to your docs repo, whose agent workflow (from [`thally agent init`](/guides/docs-agent)) drafts the PR. Pick one: - -### Mode A — Connect GitHub app (recommended for orgs & private repos) - -The self-managed path: from the admin dashboard, create + install **your own** Thally GitHub App in a couple of clicks, then choose which repos Track may watch — org-wide access to the repos you pick, with **no token to paste**. - -Because Thally is self-hosted, there's no central Thally server holding a key — instead the **"Connect GitHub"** button uses GitHub's [App Manifest flow](https://docs.github.com/apps/sharing-github-apps/registering-a-github-app-from-a-manifest) to stand up an app that belongs entirely to you: - -1. Set `THALLY_AUTH_SECRET` on the deployed site (it encrypts the app's private key at rest) and `THALLY_SITE_URL` (so GitHub redirects back correctly). -2. In the admin dashboard, go to **Settings → Integrations → Connect GitHub**. Enter your org name to install it org-wide (or leave it blank for a personal-account app). -3. GitHub walks you through creating the app (permissions and the org webhook are pre-filled), then choosing repos. Thally captures the credentials automatically — the app carries its own webhook, so you don't set `THALLY_TRACK_WEBHOOK_SECRET`. - -The app requests least privilege: read pull requests, write contents + pull requests (to open docs PRs), read metadata. You can revoke or reconfigure repos any time from the app's GitHub page, or **Disconnect** from the dashboard. - -### Mode B — fine-grained PAT + webhook (simplest for a single repo) - -Point a GitHub webhook at your deployed docs site. The site verifies the signature, checks the PR against your tracking config, and relays the dispatch. The heavy lifting happens in GitHub Actions — the site only relays, so it works on serverless hosts. - -1. Generate a secret: `openssl rand -hex 32` -2. On the deployed site, set `THALLY_TRACK_WEBHOOK_SECRET=` and `THALLY_GITHUB_TOKEN` (a fine-grained PAT that reads tracked PRs, dispatches to the docs repo) -3. In the tracked repo → **Settings → Webhooks → Add webhook**: payload URL `https:///api/track/webhook`, content type `application/json`, the same secret, and under "Let me select individual events" check **Pull requests** - -Deliveries are deduplicated (a redelivered merge is a no-op), unmerged closes are ignored, and PRs touching none of your `paths` are ignored. - -### Mode C — sender workflow (no server in the loop) - -`thally track setup` prints a ready `.github/workflows/thally-track.yml` for each tracked repo (with your base branch and path filters baked in). Commit it to the product repo and add a `THALLY_DISPATCH_TOKEN` secret there with dispatch access to the docs repo. - -## Preview docs before a feature ships - -Sometimes you want the docs ready for review *before* the feature merges. Add the **`docs-preview`** label to an open PR (any access mode above) and Track drafts the documentation it will need as a separate PR — so reviewers see the docs alongside the code. The preview re-drafts on each push to the labelled PR, and the instruction tells the agent the PR is still in review and may change. (Commenting `@thally` on a PR does the same thing on demand.) - -## Tracking your own docs repo - -If you point Track at the repository that also holds your docs (e.g. Thally tracking Thally), the agent's own merged docs PRs would otherwise re-trigger it. Track guards against this automatically: it ignores any PR whose head branch starts with `thally/agent-` (the prefix the agent stamps on its branches). To keep it tidy, also exclude your docs from `paths` (e.g. don't list `src/content/**`) so doc-only PRs don't fan out. - -## What the agent produces - -The agent makes a **judgment call**: it reads the merged PR, decides what user-facing behavior changed (API surface, config, CLI flags, defaults), then finds the documentation pages that describe that behavior and updates them in place — adding new pages only where genuinely warranted. If the PR has no user-facing impact, it does nothing. It is not maintaining a source-file-to-page map; it's keeping the docs true to the product. - -Track-originated PRs are labeled with `origin: track` and appear in the admin **Docs tasks** queue alongside a **Tracked repos** panel showing each repo, its filters, and the last synced PR. - -## From AI tools (MCP) - -The `sync_from_repo` tool exposes the same pipeline to Claude, Cursor, or any MCP client: - -- `dryRun: true` (default) — preview the docs task for a tracked repo's latest merged PR (or a specific `pr` number) -- `dryRun: false` + `docsRepo` — dispatch the task so the docs-agent workflow drafts the PR - -Its token resolution is the same as the webhook's: an explicit token, else a connected GitHub App, else the `THALLY_GITHUB_TOKEN` PAT chain. - -## Environment variables +| **Product source** | Product code and specifications that Track observes | Read an exact revision, extract evidence, and calculate documentation impact | +| **Primary docs repository** | The documentation site connected to the Thally site | Open a review-gated docs pull request; publish the exact merged revision when managed hosting is enabled | +| **Knowledge surface** | Another explicitly connected Markdown or MDX repository | Open a scoped draft pull request; never deploy the repository | + +The primary docs repository cannot also be one of its own Product sources. That +hard boundary prevents a documentation update from looking like a new product +change and creating a loop. + +## Connect Product sources + +You can connect Product sources while creating a site or later from the site's +settings. + + + + In Thally Cloud, open the site and select **Track**. Owners and editors can + manage the connected repositories from that page. + + + Install or update the Thally GitHub App for the account that owns the + product repository. Thally revalidates access with a short-lived + installation token whenever it needs the repository. + + + Select the repository and base branch. Add path filters when only part of a + monorepo represents the product surface Track should observe. You can also + choose the destination tab and group where new primary-documentation pages + from this source should appear. + + + Future matching GitHub deliveries can now create immutable product + snapshots and impact runs for this site. + + + +Each Product source keeps its own repository, branch, optional path filters, +destination tab and group placement, and enabled state. A site can connect +multiple sources so an API, SDK, and web application can contribute to the +same product model without sharing mutable repository state. + +## Connect Knowledge surfaces + +Use Knowledge surfaces when a product change may also require an update in a +separate Markdown or MDX repository—for example SDK guides, tutorials, or +release notes. + +When Knowledge surfaces are available for the workspace, open **Site settings +→ Knowledge surfaces**, choose a repository that the Thally GitHub App can +access, and confirm: + +- the base branch; +- the repository root Track may inspect; +- the exact Markdown or MDX paths Track may change; +- the validation policy; and +- any administrator instructions for that destination. + +Thally records those boundaries with each run. Pausing or removing a surface +affects future product changes without invalidating a run that has already +been claimed or orphaning an open pull request. + + +Thally may open a scoped draft pull request in the connected repository, but +it never runs that repository's dependencies, scripts, generators, or +workflows and never deploys it. The repository's own team reviews and ships the +change through its normal process. + -| Variable | Where | Purpose | -| --- | --- | --- | -| `THALLY_AUTH_SECRET` | deployed docs site | Encrypts the connected GitHub App's private key at rest (Mode A) | -| `THALLY_SITE_URL` | deployed docs site | Canonical site URL — GitHub redirects back here during Connect (Mode A) | -| `THALLY_REPO_URL` | deployed docs site | The docs repo Track dispatches to; defaults to `siteConfig.repoUrl`. Set it when `site.ts` keeps the template default | -| `THALLY_TRACK_WEBHOOK_SECRET` | deployed docs site | Enables `/api/track/webhook` for a manual webhook (Mode B); not needed when a GitHub App is connected | -| `THALLY_GITHUB_TOKEN` | deployed docs site | Fine-grained PAT that reads tracked PRs + relays the dispatch (Mode B; also used by the Docs tasks queue) | -| `THALLY_DISPATCH_TOKEN` | each tracked repo (Mode C) | Dispatch access to the docs repo | -| `ANTHROPIC_API_KEY` | docs repo secrets | Runs the agent inside the docs-repo workflow | - -Mode A stores the app's credentials (id, installation id, private key, webhook secret) encrypted in admin settings — you don't set `THALLY_GITHUB_APP_*` env vars unless you prefer to wire the app manually. The token resolver honors them if present: `THALLY_GITHUB_APP_ID`, `THALLY_GITHUB_APP_INSTALLATION_ID`, `THALLY_GITHUB_APP_PRIVATE_KEY`. +## What triggers Track + +Track supports two explicit modes: + +### Merged product changes + +When a pull request merges into a connected Product source's configured base +branch, the shared Thally GitHub webhook verifies and durably records the +delivery. Track reserves the run idempotently and ties every later step to the +exact merged revision. + +### Preview product changes + +An explicitly labelled preview pull request can ask Track to prepare docs +before the product change merges. Preview runs remain separate from merged +production runs, so an unmerged revision cannot silently become production +product knowledge. Preview runs do not fan out to connected Knowledge +surfaces; those destinations are updated only from merged product changes. + +## How a Track run works + +{` +sequenceDiagram + participant GH as Product repository + participant Cloud as Thally Cloud + participant Graph as Product Knowledge Graph + participant Worker as Track Worker + participant Docs as Documentation repository + participant Person as Reviewer + + GH->>Cloud: Signed merged or labelled-preview PR event + Cloud->>Cloud: Store and claim the verified delivery + Cloud->>Graph: Ingest the exact source revision + Graph->>Cloud: Return an evidence-backed impact bundle + alt No tracked impact + Cloud-->>GH: Complete without model work or a pull request + else Documentation may need work + Cloud->>Worker: Send a bounded, encrypted job claim + Worker->>Worker: Edit and validate in a disposable Sandbox + Worker->>Docs: Open a review-gated pull request + Person->>Docs: Review, edit, merge, or reject + Docs->>Cloud: Verified merge event + Cloud->>Cloud: Publish the exact docs commit when managed + end +`} + +The impact bundle contains the product revision, semantic changes, ranked +target pages, evidence, and policy version. A vector or text match may suggest +a page, but evidence and a supported product-to-documentation path are what +make it eligible for the run. + +The Track Worker receives an opaque queue capability rather than a reusable +credential. The job is encrypted at rest. Provider model keys and the GitHub +App private key remain in trusted control-plane services; the disposable +Sandbox gets only the bounded context and destination-scoped access it needs. + +## Review and publication + +Track's output is a normal GitHub pull request. Reviewers can change, accept, +or reject it. The activity record keeps the source revision and evidence that +led to the proposal, while private job instructions and credentials never +enter the repository. + +For the primary docs repository, merging the pull request creates a verified +GitHub event for the exact docs commit. A managed site then uses the normal +content-only or full-build pipeline, smoke-checks the immutable candidate, and +moves the live release pointer only after validation succeeds. + +Connected Knowledge surfaces stop at the merged draft pull request. Thally +does not publish or otherwise operate the connected repository. + +## Safety and failure behavior + +- GitHub signatures are verified before a delivery is accepted. +- Delivery IDs and Track run reservations make retries idempotent. +- Archives, selected files, prompt context, output, and run attempts are + bounded. +- Product extraction never installs dependencies or executes customer code. +- The runner may edit only allowed documentation paths. +- A no-impact result completes without model use or a pull request. +- A failed Track run cannot change the live documentation release. +- The agent never auto-merges. + +## Self-hosted authoring tools + +The public `thally` CLI, docs agent, and MCP server can still help a developer +prepare documentation locally. Those authoring tools are separate from the +canonical Cloud Track pipeline described here. You do not need to expose a +Track webhook from the documentation runtime or store a product-repository PAT +inside a managed site. + +## Next steps + +- [Read the architecture guide](/architecture) for the complete site, + knowledge, and managed-delivery flow. +- [Understand the product-change pipeline](/product-change-pipeline). +- [Use the docs agent locally](/guides/docs-agent). +- [Connect an MCP client](/guides/mcp-server). +- [Review provenance and freshness](/guides/provenance). diff --git a/src/content/product-change-pipeline.mdx b/src/content/product-change-pipeline.mdx index 1a8a18d..e1478cb 100644 --- a/src/content/product-change-pipeline.mdx +++ b/src/content/product-change-pipeline.mdx @@ -37,10 +37,12 @@ affected, and prepares a pull request for a person to review. version. Impact analysis keeps a docs page only when a supported graph path and evidence explain why it may need work. - - Track receives a limited list of pages and evidence, updates the relevant - MDX in a disposable sandbox, and validates the result with `thally check`. - If no docs are affected, the loop stops without AI work or a pull request. + + Track receives a bounded impact bundle and prepares a pull request for the + primary documentation repository. When Knowledge surfaces are connected, + scoped child runs may also prepare draft pull requests in those Markdown + or MDX repositories. If nothing is affected, the loop stops without model + work or a pull request. The result is a normal pull request. Reviewers can accept, correct, or @@ -79,7 +81,7 @@ affected, and prepares a pull request for a person to review. | --- | --- | --- | | Product source | Connected GitHub repositories with OpenAPI, MDX, and TypeScript evidence | More source types and integrations | | Product understanding | Versioned product facts and links tied to exact commits and inspectable evidence | Broader fact coverage across product tools | -| Knowledge surface | Documentation pages and API-reference content in a Thally project | SDK references, tutorials, release notes, examples, and other customer-facing surfaces | +| Knowledge surface | The primary Thally docs repository plus explicitly connected, path-scoped Markdown or MDX repositories | More destination types and integrations | | Output | Explained impact results and evidence-checked documentation pull requests | Coordinated updates across every affected surface | | Approval | Existing GitHub review and deployment workflow | Human control over every important communication | | Learning | Reviewer corrections improve later ranking after enough examples exist | More useful team-specific ranking without weakening evidence rules | @@ -90,6 +92,11 @@ be another wiki, CMS, or knowledge base. Those tools store knowledge. Thally's job is to keep it synchronized as the product changes. +Connected Knowledge surfaces remain review-only destinations. Thally opens a +scoped draft pull request and never deploys the connected repository. The +primary docs repository is the only destination whose merged Track update can +enter the managed publishing pipeline. + ## Put the pipeline to work - [Read the full architecture guide](/architecture) to follow site creation, diff --git a/src/content/quickstart.mdx b/src/content/quickstart.mdx index acf0c22..1c080df 100644 --- a/src/content/quickstart.mdx +++ b/src/content/quickstart.mdx @@ -27,17 +27,18 @@ Use Thally Cloud at https://app.thally.io/ to create and publish the site. Do no 3. Needs me: ask me to sign in or create an account if the browser is not already authenticated. Never request my password, verification code, session cookie, or recovery code in chat. 4. Select Create a site. Ask me for any missing site name, short description, and preferred thally.app address. Never invent brand or company details. 5. At Docs source, recommend Create a new docs repository. Use an existing repository only when it is already a current Thally project that I explicitly selected. Needs me: have me install or approve the Thally GitHub App for the intended GitHub organization and repository access. Do not select or modify an unrelated repository. -6. At Product sources, ask whether I want Thally Track configured now. If yes, show me the available product repositories and confirm the exact selections before continuing. Select no more than five and never select the documentation repository itself. If I do not want Track yet, choose I'll do this later. -7. Review the site name, thally.app address, documentation repository, production branch, and Track selection with me. Select Publish site only after those values match what I approved. -8. Wait for Thally Cloud to create or connect the GitHub repository and finish the first production deployment. Do not retry blindly. If publishing fails, report the exact message and preserve the created repository and site state for a safe retry. -9. Confirm the workspace Home page shows the site as Live. Record the documentation repository and live https://SITE_SLUG.thally.app URL from the site summary. -10. If I provided existing documentation and the Cloud-created repository still contains starter content, clone the exact documentation repository. For a GitHub repository or public docs URL, import into the existing Thally project with npx create-thally-docs@latest migrate SOURCE --into REPOSITORY_DIRECTORY --yes. For local files, preserve the authored content and adapt it under src/content without deleting unrelated project files. If I connected an existing Thally repository, do not overwrite it. -11. Before editing, read AGENTS.md if present, docs.json, package.json, and src/data/site.ts. Keep framework internals unchanged. Organize pages around reader tasks, preserve useful redirects and assets, and update navigation only for pages that exist. -12. Run npx thally check and npm run build. Fix errors caused by the content changes. Start npm run dev when the environment can keep a local server running, inspect the homepage, navigation, representative pages, code blocks, images, and API reference, then stop the server. -13. Commit only the intended documentation changes with a plain, attribution-free message and push them to the production branch connected in Thally Cloud. The push should trigger a new managed deployment. Do not force-push, rewrite history, delete repositories, or merge unrelated work. -14. Wait for the managed deployment to finish. Fetch the live URL and confirm it returns a successful response and displays the expected site. If the live content is stale, inspect the deployment status and commit SHA before changing anything else. -15. Set up future agent work. Read LIVE_URL/AGENTS.md and LIVE_URL/skill.md. If the current client supports MCP, connect the local authoring server with npx -y @thallylabs/mcp and connect the site's read-only remote server at LIVE_URL/api/mcp using the correct client-specific configuration. Tell me if the client must restart before those tools appear. -16. If I ask for a custom domain, open the site's domain settings, show me the exact DNS records Thally provides, and make it clear that I must add them at my DNS provider. Confirm the custom domain loads before calling that optional work complete. +6. At Product sources, ask whether I want Thally Track configured now. If yes, show me the available product repositories and confirm the exact selections before continuing. Never select the documentation repository itself. If I do not want Track yet, choose I'll do this later. +7. If the Knowledge surfaces step is available for my workspace, ask whether Track should also prepare scoped draft pull requests in another Markdown or MDX repository. Treat these as destinations, not Product sources. Confirm the repository, branch, root, and allowed paths before adding one, or skip this optional step. +8. Review the site name, thally.app address, documentation repository, production branch, Product sources, and Knowledge surfaces with me. Select Publish site only after those values match what I approved. +9. Wait for Thally Cloud to create or connect the GitHub repository and finish the first production deployment. Do not retry blindly. If publishing fails, report the exact message and preserve the created repository and site state for a safe retry. +10. Confirm the workspace Home page shows the site as Live. Record the documentation repository and live https://SITE_SLUG.thally.app URL from the site summary. +11. If I provided existing documentation and the Cloud-created repository still contains starter content, clone the exact documentation repository. For a GitHub repository or public docs URL, import into the existing Thally project with npx create-thally-docs@latest migrate SOURCE --into REPOSITORY_DIRECTORY --yes. For local files, preserve the authored content and adapt it under src/content without deleting unrelated project files. If I connected an existing Thally repository, do not overwrite it. +12. Before editing, read AGENTS.md if present, docs.json, package.json, and src/data/site.ts. Keep framework internals unchanged. Organize pages around reader tasks, preserve useful redirects and assets, and update navigation only for pages that exist. +13. Run npx thally check and npm run build. Fix errors caused by the content changes. Start npm run dev when the environment can keep a local server running, inspect the homepage, navigation, representative pages, code blocks, images, and API reference, then stop the server. +14. Commit only the intended documentation changes with a plain, attribution-free message and push them to the production branch connected in Thally Cloud. The push should trigger a new managed deployment. Do not force-push, rewrite history, delete repositories, or merge unrelated work. +15. Wait for the managed deployment to finish. Fetch the live URL and confirm it returns a successful response and displays the expected site. If the live content is stale, inspect the deployment status and commit SHA before changing anything else. +16. Set up future agent work. Read LIVE_URL/AGENTS.md and LIVE_URL/skill.md. If the current client supports MCP, connect the local authoring server with npx -y @thallylabs/mcp and connect the site's read-only remote server at LIVE_URL/api/mcp using the correct client-specific configuration. Tell me if the client must restart before those tools appear. +17. If I ask for a custom domain, open the site's domain settings, show me the exact DNS records Thally provides, and make it clear that I must add them at my DNS provider. Confirm the custom domain loads before calling that optional work complete. If a command or platform action fails in a way not covered above, stop and give me the exact error, the step that failed, and the safest next action. Do not guess, silently switch products, or claim the site is live before you have verified the URL. @@ -75,8 +76,9 @@ and connect a custom domain later. Choose **Create a new docs repository** for the recommended path. Thally creates -a GitHub repository from the maintained template, gives you editable source -files, and manages the first deployment. +a GitHub repository from the current verified starter release, gives you +editable source files, and manages the first deployment. The starter is pinned +to one exact public Thally runtime revision. Choose **Use an existing repository** only when the repository is already a Thally project. Install or approve the Thally GitHub App when prompted, then @@ -92,11 +94,21 @@ excluded to prevent update loops. + + +When the feature is available for your workspace, optionally add another +Markdown or MDX repository where Track may prepare path-scoped draft pull +requests. This is a destination for reviewed updates, not a Product source and +not another managed site. You can also configure it later in **Site settings → +Knowledge surfaces**. + + + -Confirm the site address, repository, production branch, and optional Track -sources. Select **Publish site**. Creating the repository and publishing the -first version can take about a minute; keep the page open. +Confirm the site address, repository, production branch, optional Product +sources, and optional Knowledge surfaces. Select **Publish site** and keep the +page open while the first immutable release is prepared and validated.