Changelog
This page is built from CHANGELOG.md when the site is built. Zentri is pre-alpha and has no release yet, so every change is under Unreleased.
All notable changes to this project are documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Unreleased
Changed
- The
zentri.devhome page tells one team’s story instead of the mechanics: the shared goal, the collisions today, everyone around one record, what Zentri is built to give, and one feature’s day across Slack and the terminal, drawn in inline SVG and CSS. A unit test holds every line Zentri says in that story to the CLI, hook, coordinator, and Slack bot sources. - The Go floor is 1.27 (
go 1.27.0ingo.mod,golang:1.27in the server image). go1.26.4 and earlier carry standard-library vulnerabilities. Updated: the MCP Go SDK to 1.9.0, goose to 3.30.2, pflag to 1.1.0, ollama to 0.40.19, andactions/download-artifactto v8, which fails on a digest mismatch. - Dedup quality (M8 slice A, ADR-0006). The Compose
ollamaservice runs Ollama on 4 threads per model,OLLAMA_THREADSindeploy/.envpassed asLLAMA_ARG_THREADS, and keeps both models loaded withOLLAMA_KEEP_ALIVE=-1. On a laptop CPU, judge calls that failed at the 5 s timeout fell from 17% to 38% of calls to 3%. A third frozen held-out set of 176 pairs is inexamples/intents/heldout-v3/. Scored once,embeddinggemma:300mwith theqwen3:4b-instructjudge reachedactive_duplicateprecision 0.905 and recall 0.633 on it, and 0.896 and 0.827 on held-out v2, against 0.879 and 0.558 before. That still misses the 0.95 and 0.80 target. A check took 5.4 s at the median and 10.8 s at p95. The thresholds, the judge prompt, and the offlinehashdefault are unchanged. - The claim rate limit is counted in Postgres (M8 slice C, ADR-0005 as amended 2026-12-01). Migration
00014_claim_rate_buckets.sqladds one token bucket per session, charged in the claim’s own transaction, so every coordinator on one database shares the 60 requests a minute and a restart no longer resets the count. A claim request that fails is no longer charged. A refused request still gets 429claim_rate_limitedwith the same message. The sweep deletes buckets idle for an hour throughprune_claim_rate_buckets(), aSECURITY DEFINERfunction owned byzentri_retention, and logs how many it pruned. The migration needs a migration role that is a superuser or a member ofzentri_retention, as 00012 does. The other rate limits stay in memory.
Security
- form-data 4.0.6 (GHSA-hmw2-7cc7-3qxx), minimatch 11 (GHSA-g3hv-75wg-m249), and glob 14.0.6 (GHSA-qxr8-q827-836c) in the website and docs builds, through pnpm overrides.
Added
-
The CLI keeps the user token in the OS keychain (M8 slice B, ADR-0016): the macOS Keychain, the Windows Credential Manager, or the Secret Service on Linux, through go-keyring v0.2.8 with no cgo. Where no keychain answers, as over SSH, in a container or in CI, the token goes to the
0600config file as before.ZENTRI_TOKEN_STOREisauto(the default),fileorkeychain. A token already in the config file moves to the keychain the first time a command loads it, and leaves the file only after the keychain gives it back intact.zt login,zt statusandzt doctorsay which store holds the token. The newzt logoutremoves it from both stores and keeps the other settings. Going back to an olderztafter the move needs a new login. -
Doc comments as a second signal for near-duplicate symbols (M8 slice D, ADR-0017). Two symbols of one kind whose names differ, such as
parseCSVandreadCommaSeparated, raisesymbol_near_duplicatewhen their doc comments are close enough. With the offlinehashdefault, and with any embedder that has no measured threshold, OpenAI included, the coordinator scores shared words itself at 0.47, and no doc text leaves it.ollama/embeddinggemma:300m(0.73) andollama/nomic-embed-text:v1.5(0.89) read the docs when configured. Migration00015_symbol_doc_embeddings.sqladdssymbol_doc_embeddings, one vector per project, model, and doc-text hash, with no text, andsession_symbols.doc_key. A snapshot scores at most 200 docs, sends at most 32 to a model, and waits at most 2 s. A doc is cut to 300 bytes, and a failed embed logs a count and a reason, never the text. The notice line ends with(similar doc comments),SymbolOverlapand the notice payload gain the optionaldoc_similarity, and the pre-commit hook prints the doc score. On 120 frozen held-out pairs, names alone reached precision 0.375 and recall 0.100, and names or docs with the lexical scorer 0.508 and 0.517.scripts/calibrate-symbol-docs.shandzentri-server overlap calibrate-docsrerun the calibration onexamples/symbols/docs/. -
A Helm chart for the coordinator in
deploy/helm/zentri(M8 slice E, ADR-0018), for Kubernetes 1.35 to 1.37 with Helm 3 or 4. As in Compose, amigrateinit container runsmigrate upas the database owner, then the coordinator serves with--no-migrateaszentri_coordinator, probed on/healthzand/readyz. Postgres is your own by default, from a Secret with two URLs.postgresql.enabled=trueruns a single pgvector Postgres for evaluation only, andollama.enabled=trueruns Ollama. The chart has no default for any secret: each is a key in a Secret you made or a value you pass, and the token and keys are mounted as read-only files. Every pod runs non-root with a read-only root file system, every capability dropped, seccompRuntimeDefaultand no service-account token, andnetworkPolicy.enabled=trueadds a NetworkPolicy per pod.make lint-helm(inmake lint) runshelm lintand kubeconform for each supported Kubernetes version,make test-helm(inmake test) checks refused values and the security settings, andmake e2e-helminstalls it on a throwaway kind cluster with an image built from the checkout and logs in withzt. helm, kubeconform and kind are built withgo installat pinned versions. The chart is not published. The docs gain a Kubernetes page. -
Security: a
securityCI job andmake security-scan(gitleaks over the full history, govulncheck, pnpm audit), a lint check that every test the threat model names exists, Dependabot for the Slack bot and the accounts Worker, anddocs/plan/SECURITY_REVIEW.md. THREAT_MODEL rows T6 and T12 now match the code. -
Release candidates (M7 slice B, ADR-0015). A tag with a suffix, such as
v0.1.0-rc.1, publishes as a GitHub prerelease. It does not update the Homebrew tap, does not move the image’slatesttag, and is not served byreleases/latest, so the installers fetch it only withZENTRI_VERSION=v0.1.0-rc.1. Thev0.1.0-rc.1notes and the owner’s launch checklist are written. Nothing is tagged. -
Apple notarization of the darwin
zentriandzentri-serverbinaries in GoReleaser, off by default.release.ymlturns it on only when the repository variableZENTRI_NOTARIZE_ENABLEDistrueand the fiveMACOS_*secrets are in thereleaseenvironment.make release-dry-runskips it. DEPLOY.md step 12 lists what the owner sets up. -
make demo-recordrecordsmake demowith asciinema in headless mode, under its own Compose project and ports, and rendersweb/docs/public/demo/collision.gifwith agg. The README and the two-engineers guide show the GIF, andcollision.castholds the same run as text. The recording is offline, with a fakeclaude,tmux, and GitHub API. -
A “Try it” section in the README. On 2026-11-30, the quickstart’s commands from
git cloneto the caught duplicate ran in 30 seconds on a MacBook with the Docker base images already pulled. -
The privacy page describes what
accounts.zentri.devcollects, what it does not keep, its cookies, how long each record lives, export and delete, and who processes the data. It is a draft pending legal review. -
A draft blog post is served with
X-Robots-Tag: noindexthrough the_headersfile that the site build writes for Cloudflare Pages. -
Compose and
deploy/.env.examplepassZENTRI_BOOTSTRAP_ADMIN_TOKEN_FILE, which the coordinator already read. -
The accounts Worker (M6 slice B, ADR-0013) in
web/accounts, with Hono, Zod, and D1. Sign-up asks for a name, email, company, role, team size, country, coding agents, and where the person heard of Zentri. It records the accepted terms and privacy versions, and the marketing opt-in is a separate box that starts unticked. A magic link verifies the email. It lasts 15 minutes, works once, and only a POST spends it. GitHub sign-in with PKCE is optional. Turnstile guards sign-up and sign-in, and D1 counts rate limits per IP and per email under an HMAC. Sessions use a__Host-cookie, every POST but the webhook must carry the Worker’sOrigin, and forms behind a session carry a CSRF token. -
The accounts dashboard: the profile, the org’s waitlist or early-access status, the install commands, and license keys. An approved org has at most 5 active licenses, generates at most 10 a day, and can revoke any of them.
GET /account/exportdownloads everything stored about the user, andPOST /account/deleteremoves it. A daily cron deletes rows past the retention table inweb/accounts/README.md. -
The accounts admin view, for the one verified user whose email is the
ADMIN_EMAILsecret. It lists sign-ups, approves an org with a tier and seats, and downloads a CSV that defuses spreadsheet formulas. Everyone else gets 404. -
Email through a sender interface, with a console adapter in development and a Resend adapter, sent after the response. Accounts logs hold record IDs and outcomes, never an email, name, IP, token, or license.
-
A merchant-of-record interface with a Paddle Billing stub.
POST /webhooks/paddlechecks the HMAC signature and its time and records each event once. It takes no action yet. -
Offline license keys. The accounts Worker signs Ed25519 JSON with the
LICENSE_SIGNING_KEYsecret, and the coordinator verifies it with the public keys inpkg/license/keys.go. That table is empty until the owner’s key ceremony.zt admin license install FILEandzt admin license showcallPUTandGET /v1/admin/licenseas an admin. A license is active, then expiring in its last 30 days, then in grace for 30 days after expiry, then lapsed, whenee/features stop. Core features never read it, and seats over the license only warn. The coordinator reloads it hourly and logs a warning at most once a day. Migration00013_license.sqladds the table, and each install is audited aslicense.installed. -
make build test lintand the CIaccountsjob run the Worker’s ESLint, tsc, Prettier, generated-types check, 98 Vitest tests (unit, and Workers-runtime against a local D1), the bundle, and a Playwright test that signs up, gets approved, and downloads a license that verifies.make test-integrationinstalls a license that the Worker’s own signing code made. Nothing is deployed, no email is sent, and no signing key exists. -
The
zentri.devmarketing site (M6 slice A, ADR-0012) inweb/site, with Astro and Tailwind: home, pricing, open source, security, an MDX blog with the launch post as a draft, a changelog page read from this file, drafts of the Terms, Privacy, and Acceptable Use pages marked for legal review,/.well-known/security.txt, thego-importpage forzentri.dev/zentri, a sitemap,robots.txt, RSS, and an Open Graph image for each page. It has dark and light mode and a text wordmark, and makes no third-party request. Analytics stay off unless a build setsPUBLIC_ANALYTICS. Every placeholder lives inweb/site/src/site.config.ts. -
The
docs.zentri.devdocumentation inweb/docs, with Astro Starlight and Pagefind search: getting started, concepts, guides, agents, integrations, self-hosting, compliance, contributing, and reference. Tests namedTestReferenceDocs*generate the CLI, server CLI, MCP tools, configuration, environment, and metrics references from the code.make docs-genrewrites them, andgo testfails while one is stale or the code gains something its page would miss. The HTTP API reference renders fromopenapi.yaml. -
Web checks in
make build test lintand the CIwebjob: ESLint,astro check, Prettier, Vitest, a link check on every build, Playwright with axe for WCAG 2.2 AA in light and dark mode, and Lighthouse CI at 95 or more in every category. Nothing is deployed. -
Installers (M6 slice C, ADR-0014).
deploy/install/install.sh, POSIX sh, andinstall.ps1, for Windows PowerShell 5.1 and PowerShell 7, pick the archive for the OS and CPU, download it from GitHub Releases, checkchecksums.txt.sigwithssh-keygen -Y verifyagainst the release key they embed and the archive’s SHA-256 against that list, and installzentriandzt. Each check fails closed.make test-installruns 21 cases forinstall.sh, and 10 more forinstall.ps1whenpwshis on PATH, against signed fake releases on127.0.0.1. The release key is a placeholder until the owner’s key ceremony, so every install stops at the signature check until then. -
A release pipeline that has never published.
.goreleaser.yamlbuilds ten version-less archives, an SPDX SBOM for each,checksums.txtand its SSH signature, a multi-archzentri-serverimage for GHCR, and a Homebrew cask forzentri-repo/homebrew-tap.make release-dry-runruns it as a snapshot signed with a throwaway key, checks every archive, checksum, SBOM, the signature, the cask, and both images, and installs from the snapshot throughinstall.sh.release.ymlpublishes a draft release only for av*tag, withZENTRI_RELEASE_ENABLEDset and an approval of thereleaseenvironment, and signs the images with keyless cosign. -
Deploys as code for
zentri.dev,docs.,get., andaccounts., never run.deploy/cloudflareholds awrangler.jsoncper Pages project, andgetserves the installers astext/plain, with/returninginstall.sh.deploy-web.ymlruns only by hand onmain, withZENTRI_DEPLOY_ENABLEDset and an approval of its environment. DEPLOY.md is the owner’s runbook, with the DNS records, the key ceremony, and the first release. -
make lintruns actionlint on the workflows. -
The coordinator deletes
slack_deliveriesrows more than 30 days old on each sweep throughprune_slack_deliveries(), a function owned by the new NOLOGIN rolezentri_retention, and counts them inzentri_slack_deliveries_pruned_total. The app role still cannot delete from the table. Migration00012must run as a superuser or a member ofzentri_retention. -
Watcher, escalation, and unblocked notices reach a linked user in Slack through the outbox, written with the notice in
notices.InsertUser. -
Each Slack user the bot acts for has a rate limit of their own, 1 a second with bursts of 10, inside the bot token’s. A refusal is 429 with
Retry-After, counted aszentri_rate_limited_total{limiter="slack_user"}, and the bot tells the person how long to wait. -
scripts/e2e-m5b.shshows a watcher notice reach Slack and the first sweep prune a 31-day-old delivery. -
The Slack bot (M5 slice B), as ADR-0010 designs it, in
integrations/slack-botwith Slack Bolt, TypeScript, and Node 22.19 or later./zentri link,request,unlink, andhelp, an Answer form for questions, and Approve and Reject for decisions. Each call goes to the coordinator as the verified Slack user inZentri-Slack-User, soauthorize()decides it, and a refusal comes back as a private message. A request shows the duplicate check and a button for each choice the coordinator allows. The outbox loop leases deliveries, posts them as direct messages, and acknowledges each as delivered, retry (with Slack’sRetry-After), or failed. HTTP mode verifies Slack’s signature, a 5 minute window, replays, and the team. Logs carry no message text and no token. Its Vitest suite runs it against a fake Slack and a fake coordinator, andscripts/e2e-m5b.shruns it between a fake Slack and the real coordinator. No real Slack workspace has run it.make build,make test, andmake lintinclude it, and CI runs it in theslack-botjob. -
The coordinator side of the Slack bot (M5 slice B), designed in ADR-0010:
- Identity links.
zt slack linkprints a single-use code once, valid for 10 minutes, and the person types/zentri link <code>in Slack. An admin mints one for another user with--user <handle>. Linking again replaces the old link.zt slack unlink [--user <handle>]andzt slack status. Every link, replacement, and unlink is in the audit chain. - Acting as a linked user. The bot’s integration token, with the new scope
slack:act-as-verified-user, sendsZentri-Slack-User: <team_id>:<user_id>and acts as the linked user with their role now, through eleven actions only:me.read,projects.list,projects.read,intents.check,intents.create,intents.read,questions.read,questions.answer,decisions.read,decisions.review, andslack.unlink. An unlinked Slack user gets403 slack_user_not_linked. Work asked for from Slack is alwaysqueued, and a lead, or its owner when an engineer, starts it withzt start --queued. - A delivery outbox. Each user notice for a linked user writes a
slack_deliveriesrow in the notice’s own transaction. The bot leases due rows and acknowledges each with its lease ID. Retries back off fromZENTRI_SLACK_RETRY_BASE(default 10 s) to 15 minutes, and a row is dead after 8 attempts. Ending a link ends its pending rows. The metric iszentri_slack_deliveries_total{outcome}. - The routes are
POST /v1/me/slack-link-code,POST /v1/users/{user_id}/slack-link-code,GET /v1/me/slack-link,DELETE /v1/me/slack-link,DELETE /v1/users/{user_id}/slack-link,POST /v1/integrations/slack/links,POST /v1/integrations/slack/deliveries/lease, andPOST /v1/integrations/slack/deliveries/{delivery_id}/ack. Migration00010_slack.sqladds the three tables.
- Identity links.
-
scripts/e2e-m5b.sh, run bymake e2e, runs the real bot in HTTP mode between a fake Slack and the coordinator. Three people link their accounts. A forged and a stale signature get 401, and a replayed click gets 401 before it reaches the coordinator. A requester asks for work that is in progress, sees the duplicate warning, and watches it, and her new request is queued and started by a lead. An engineer answers his agent’s question in the Slack form. An unlinked user, an engineer, and a requester cannot approve a high-risk decision, and a lead can. The fake Slack fails the post of the decision with a 503, and the outbox delivers it on the second attempt. The router gives a typo fix the cheap model, a redesign the frontier model, and a subscription session none. No token, signing secret, or link code reaches a log. Compose passesZENTRI_SLACK_RETRY_BASE, so the test waits 1 s for a retry, not 10 s. -
The model router (M5 slice B), designed and recorded in ADR-0011. It is off by default and never proxies model traffic:
GETandPUT /v1/projects/{project_id}/routerread and replace a project’s router: acheapand afrontiermodel for each ofclaude,codex, andopencode, extra frontier and cheap terms, and thellmswitch. Viewers read it and leads change it, throughrouter.readandrouter.update.zt router show [--json]andzt router set --file FILE(-for stdin) drive them, and a file with an unknown field is refused.- Five ordered rules pick the tier from the prompt: a frontier term, more than 60 words or more than 3 file paths, a cheap term, 12 words or fewer, and else frontier. With
llm: trueand an LLM configured, a prompt only the last rule decides asks the LLM for the tier under a 3 s timeout, and any failure keeps frontier. zt start --credential api-key|subscription, orZENTRI_CREDENTIAL, declares the session’s credential kind,subscriptionby default. Zentri reads no credential.POST /v1/projects/{project_id}/intentsandPOST /v1/intents/{intent_id}/starttake an optionalroutewithagentandauth, and return the tier, the model, the rule, the classifier, or why the route was skipped (disabled,subscription,no_model, orno_prompt). Only anapi_keysession gets a model.zt startpasses the model as--modelto Claude Code and Codex and asmodelin OpenCode’s config document, on the host and in a sandbox, and prints amodelline with the tier and the rule or why none applied. An agent command that already names a model asks for no route.- Migration
00008_model_router.sql:project_routersand the insert-onlysession_routes.zentri_appgets noDELETE. zt statsand project stats addrouting: the cheap, frontier, and skipped routes in the window.
-
Humans in the loop (M5 slice A), designed and recorded in ADR-0009. The Slack bot and the model router, above, are slice B:
- Questions.
zentri_askasks a person a structured question,productortechnical, with at most 6 options, blocking or not. It returns a pending handle at once, and the agent checks it again with onlyquestion_id, so nothing waits on an open request. A product question goes to the intent’s requester and a technical one to the session’s owner. The sweep reminds the recipient, escalates to the org’s leads (or admins), and expires the question: after 15 minutes, 1 hour, and 24 hours when blocking, and 4 hours, 24 hours, and 7 days otherwise. A session holds at most 10 open questions. - Phrasing by reading level.
users.skill_levelisplainortechnical, set when an admin creates the user, and unset means the role decides. A template phrases each question for its reader. The optionalphrasestep inZENTRI_LLM_STEPSrewords it for a plain reader, and any rewrite that fails a check (its schema, its size, a credential, or a link the agent did not write) falls back to the template. zt users set-skill HANDLE LEVELsets a reading level later, throughPUT /v1/users/{user_id}/skill-level. An admin sets anyone’s, and a user sets their own with a user token.defaultsends null, which clears the level so the role decides. Each change writes the audit entryuser.skill_level.set. Migration00009_user_skill_level.sqlgrantszentri_appUPDATEonusers.skill_levelonly.- Answer reuse. A question close to one a person already answered, in the same project and kind and with vectors of the same model, gets that answer at once at the project’s duplicate threshold. The reply says it was reused, and
fresh: trueasks a person anyway. - Decisions.
zentri_propose_decisionrecords an ADR-shaped decision. The coordinator never lowers its stated risk, and raises a low one that names a risky area (security, authentication, permissions, secrets, credentials, encryption, a schema migration, deleting data, payments, or a public API) or supersedes a high one. A low decision is accepted at once. A high one waits for one review by a lead or admin other than its proposer, and a session token can never review.zentri_search_decisionsfinds decisions by meaning and words. A decision can supersede an earlier one, a rejected one included, which stays on record. - The merge check gains the
decisionrule. A session branch fails while its session has a high-risk decision that is proposed, or rejected with no accepted successor from the same session. The summary names the decision by ID only. - PRDs.
zentri_update_prdwrites an intent’s PRD as numbered revisions, and a stale base gets409 stale_revision. - REST parity:
POST /v1/sessions/{session_id}/questions,GET /v1/questions/{question_id},POST /v1/questions/{question_id}/answer,GET /v1/projects/{project_id}/questions,POST /v1/sessions/{session_id}/decisions,GET /v1/projects/{project_id}/decisions,GET /v1/decisions/{decision_id},POST /v1/decisions/{decision_id}/review,POST /v1/sessions/{session_id}/prd,GET /v1/intents/{intent_id}/prd, andGET /v1/projects/{project_id}/stats. Each MCP tool runs the sameauthorize()action as its route./mcpnow serves 13 tools, and thetools/listresult grew from 4,900 bytes to 7,774 bytes. - Six notice kinds in the registry:
question_asked,question_escalated, anddecision_pendingfor people, andquestion_answered,question_expired, anddecision_decidedfor sessions.server/internal/notifywrites them in the transaction that caused them and then fans them out to registeredChannels, the interface the Slack bot will implement. Slice A registers none. zt questions [--all] [--mine] [--status ...] [--json], withshow IDandanswer ID --option N | --text TEXT.zt decisions [--status ...] [--q QUERY] [--limit N] [--json], withshow,approve, andreject ID [--comment TEXT] [--yes]. Each prompts only on a TTY. Without one,answerneeds--optionor--text, andapproveandrejectneed--yes, or they exit 2.zt stats [--days N] [--json]: duplicates prevented, conflicts avoided, answers reused, time to answer, and questions and decisions by state, over the last 30 days by default. docs/architecture/schema.md defines each.zt donerefuses while the session’s worktree or sandbox holds modified, staged, or untracked files. It lists them, changes nothing, and exits 3.zentri sandbox runleaves the list in the sandbox when the agent exits, sozt donecan read it then.zt done --discarddrops the uncommitted work of a sandbox whose agent has exited, then brings the branch’s commits home and ends the session. It lists the files and asks on a TTY.--yesskips the question, and without a TTY or--yesit exits 2. It never drops work in a local worktree or in a sandbox whose agent still runs.zt done --pushpushes the session branch toorigin, or--remote NAME, with your own git, and never forces.zt done --pralso opens a GitHub pull request with yourghlogin, orGH_TOKENorGITHUB_TOKENon your machine. The coordinator never sees a forge token. A failed push or pull request says how to rerun.zt done --prsupportsgithub.comonly, and its help and the README say so. GitHub Enterprise Server waits for a user to ask for it.- The
zentri-prdandzentri-adrtemplate skills in every agent kit, byte for byte the same, in each agent’s native skill form where it has one, and listed inadapters/generic-mcp/README.md. - The MCP instructions tell an agent that has the
zentri-prdandzentri-adrskills to follow them. They stay under the 512 characters Codex keeps. - Migration
00006_questions_decisions.sql:questions,answers,decisions,decision_reviews, andprd_revisions, andusers.skill_level.zentri_appgetsSELECTandINSERT, neverDELETE, andUPDATEonly on the state columns ofquestionsanddecisions.decision_reviewsrefuses a review by the proposer in the table itself. scripts/e2e-m5.sh, run bymake e2e: an agent asks over MCP, a person answers with the CLI, and a second agent’s similar question is answered from reuse; a high-risk decision blocks its branch until another lead approves it, and its proposer cannot; andzt donerefuses uncommitted work.
- Questions.
-
Sandboxing and enforcement (M4), designed and recorded in ADR-0008:
- The merge check.
POST /v1/projects/{project_id}/merge-checktakes a PR’s branch, head SHA, and at most 3000 changed paths, and computes the verdict from the coordinator’s own claims, sessions, and intents in one read-only snapshot. It fails onunclaimed(a file the PR’s session never claimed),held(a file another live session holds),duplicate(the session ran anyway over an intent that is still active), andsession(azentri/branch that names no session, or two). A branch that is not a session branch is checked forheldonly. Any user of the org and any integration token withchecks:readmay call it, and session tokens get 403. It writes nothing. integrations/github-check/action.yml, a composite Action that runs the merge check withGITHUB_TOKENand an integration token, onpull_request_target, without checking out the PR. It pages through the PR’s files, fails closed on a fork branch namedzentri/..., on more than 3000 files, or on a short listing, writes the summary to the job summary, and exits 1 on a failure.- The GitHub App adapter in
integrations/github-check/appand the commandzentri-github-check. It verifiesX-Hub-Signature-256before it parses a delivery, createszentri/merge-checkcheck runs, and fails closed. It is tested only against fakes, since no App exists, and it is not built bymake buildor released yet. zt doctor [--json]checks the config, token file modes, the coordinator, the user token, the coordinator’s version and embedder, git, tmux, the agent CLIs against the versions their kits target, docker, and openshell. It exits 1 on a failure and prints no token.GET /v1/serverreports the coordinator’s version and embedder to a user or admin token.scripts/e2e-m4.sh, run bymake e2eandmake demo: the collision scenario of two engineers on one file, with the hooks, the merge check, and the Action’s script against a fake GitHub API, on thelocal-devlauncher with a stub agent.- The
openshelllauncher, chosen withzt start --launcher openshell,ZENTRI_LAUNCHER, orlauncherin the config file. It drives the OpenShell v0.1.10 CLI (ZENTRI_OPENSHELLnames another binary) against a gateway you run, and refuses older releases. It uploads a git bundle of the session branch, the prompt, and the session token as a0600file at/var/lib/zentri/session.token, never through--env. It passes--no-auto-providersand only the providers inZENTRI_OPENSHELL_PROVIDERS.zt attachopens the agent’s tmux session in the sandbox.zt donebundles the branch in the sandbox, fetches it home withfsckObjects, fast-forwards the host branch, and deletes the sandbox.local-devstays the default. - Per-kit OpenShell policies in
sandbox/openshell/policies/, deny-by-default, forclaude-code,codex,opencode, andstub. They allow the coordinator forzentrionly, the vendor’s core hosts for the agent binary only, and origin’s host forgitonly.scripts/check-openshell-policies.shruns inmake lintand addsopenshell policy lintwhen the CLI is present (OPENSHELL_BIN). zentri sandbox run, the sandbox’s main process. It waits for the launcher’s uploads, clones the bundle, runs the heartbeat in-process, and runs the agent in tmux.zentri sandbox image KITprints the image name for this build.zentri kit render --target sandboxwrites a kit as managed config under/etc(/etc/claude-code,/etc/codex,/etc/opencode) and the marker/etc/zentri/sandbox. With the marker present, the hooks readedits_fail_openonly fromZENTRI_EDITS_FAIL_OPEN.sandbox/openshell/images/andmake sandbox-image AGENT=claude-code|codex|opencode|stub. Images are built locally on the pinnednvcr.io/nvidia/base/ubuntu:24.04with git, tmux, and a Linuxzentri. Each vendor binary is checked against a pinned sha256. Nothing is published.zt uploadinto anopenshellsession goes throughopenshell sandbox uploadto<clone>/.zentri/uploads/<name>, with the same checks and limits.make e2e-openshell(scripts/e2e-openshell.sh) runs a stub agent in a real OpenShell sandbox with a private gateway and coordinator, and checks the token file, read-only/etc, denied egress, the heartbeat, the hook, an upload, andzt done. It passed on macOS with Docker Desktop. It is not part ofmake e2e. The workflow.github/workflows/openshell.ymlruns it onubuntu-latest, where it passed. On a native Linux engine the gateway’s supervisor runs on the host network, and on Docker Desktop on the bridge. The gateway and the coordinator listen on 127.0.0.1 only.
- The merge check.
-
Plans, overlap, and the symbol index (M3 slice 2), recorded in ADR-0007 under “Slice 2 as built”:
zentri_submit_planandzentri_get_session_diff, so/mcpserves all nine tools. REST gainsPOST /v1/sessions/{session_id}/plans,POST /v1/sessions/{session_id}/snapshots, andGET /v1/sessions/{session_id}/diff. Only a session’s own token posts its plans and snapshots, each 30 a minute. A diff comes back as numstat, symbols, and patch slices of at most 24 KiB, and only to the same project.- Migration
00005_plans_snapshots.sql: insert-onlyplans,session_snapshots, andsession_symbols,pg_trgmwith a trigram index on symbol names, and the notice kindsoverlap_symbol,overlap_plan,symbol_near_duplicate, andintent_unblocked.zentri_appgets onlySELECTandINSERTon the new tables. - The pre-commit hook sends a cumulative snapshot: numstat, the public symbols the session added or changed, and the patch against the base commit, in at most 1 MiB with the patch at most 512 KiB. It still fails open after 5 s.
- A public symbol index in the CLI. TS, TSX, JS, and Python use gotreesitter v0.58.0 with four grammars, Go uses
go/parser, and SQL uses regexes. Tests, migrations, and Next.js route handlers are read by their paths. Other files give no symbols. A file past 1 MiB, one the parser rejects, or one whose parse runs past 1.25 s falls back to regexes.pkg/symbolsholds the record both sides share, and the coordinator checks every symbol as untrusted input and computes its normalized name itself. scripts/check-cgo.sh, run bymake build, fails when a binary needs cgo, when the build tags drift between the Makefile,.golangci.yml, and.goreleaser.yaml, or whenzentri-serverlinks the parser.- Overlap notices. The same symbol in two active sessions raises
overlap_symbolfor both, and apg_trgmsimilarity of at least 0.63 within one kind raisessymbol_near_duplicate. A plan’s result lists the sessions whose claims, plan files, symbols, or plan summary overlap it, and each of them getsoverlap_plan. zentri-server overlap calibrateandscripts/calibrate-symbols.sh, with 240 labeled name pairs inexamples/symbols/and 200 frozen held-out pairs inexamples/symbols/heldout/. At 0.63 the held-out set scored precision 0.710 [0.611, 0.792] and recall 0.660 [0.563, 0.745].- The secret scanner also redacts plan summaries and steps, and snapshot patches, signatures, and docs, and audits
plan.redactedandsnapshot.redacted. - Queued intents. When an intent ends, each owner of a queued intent waiting on it gets
intent_unblocked.zt lslists the queued work you can start, andzt start --queued <intent>starts it throughPOST /v1/intents/{intent_id}/start. Nothing starts by itself. zt upload <file> [--session ID]copies a file of at most 50 MiB into<worktree>/.zentri/uploads/and prints the path to paste. It refuses symlinks and writes only inside the worktree.integrations/terminal/:zt-pastefor macOS and Linux,zt-paste.ps1,tmux.conf, andwezterm.lua. One key saves the clipboard image, uploads it, and types the path into the pane. It is opt-in.zentri_contextreturns the session’s plan, and a note also reaches sessions whose plan files or snapshot paths cover its paths. The Claude Code skill asks for a plan before the first edit.scripts/e2e-m3.shadds overlapping plans and symbols, a diff read, an upload, and a queued intent that unblocks and starts.
-
MCP and agent adapters (M3 slice 1), designed in ADR-0007:
POST /mcpon go-sdk v1.8.0, stateless with JSON responses. It takes only a session token as a bearer and refuses cross-site browser requests. Seven tools,zentri_claim_file,zentri_release_file,zentri_heartbeat,zentri_check_inbox,zentri_list_active_sessions,zentri_post_note, andzentri_context, each through the sameauthorize()actions and services as REST.- A notice digest on every MCP result and every claim, heartbeat, and note response. Repeats fold into one notice with a count. A priority registry picks at most 3 lines of at most 160 characters, and
zentri_check_inboxacks them. - Migration
00004_mcp_notices.sql: noticededup_key,count, anddelivered_at, the kindsunclaimed_editandnote, sessionactivity, and the per-projectedits_fail_openswitch (PATCH /v1/projects/{id}, lead or admin). POST /v1/sessions/{id}/notes, 10 a minute and 1 KiB each. A secret scanner redacts credentials before a note is stored and audits the kinds it found.- Claim requests take
already_edited. A renewal of paths the session already holds no longer counts toward the claim rate, and the sweeper counts silence from the later of the last heartbeat and the coordinator’s start (ADR-0005, as amended). zentri mcp, a stdio MCP server that forwards to/mcpwith the session token read fromZENTRI_SESSION_TOKEN_FILE.zentri hook <agent> <event>for Claude Code, Codex, and OpenCode.pre-editclaims each file before the agent edits it, denies a file another session holds and names the holder, retries for up to 8 s, fails closed when the coordinator is unreachable unless the project fails open, and always answers within 10 s.post-shellclaims what a shell command changed and tells the agent to revert a held file.session-startandprompthand the agent its digest.- Kits in
adapters/claude-code,adapters/codex,adapters/opencode, andadapters/generic-mcp, embedded in the CLI.zt startwrites them into<worktree>/.zentri/, which ignores itself, and wires them into each agent’s argv and environment. Claude Code before 2.1.295 is refused. - Session git hooks through
GIT_CONFIG_COUNTandcore.hooksPath. Each runs the repo’s own hook first.pre-committhen claims the staged paths, warns about held ones, never blocks, and gives up after 5 s. scripts/e2e-m3.sh, run bymake e2e: two sessions, one file, through the real shim, the hooks from the written kit, and/mcp.
-
Dedup quality (M2.5), recorded in ADR-0006:
- An optional LLM judge. When
ZENTRI_LLM_BASE_URLis set, the judge reads the incoming prompt next to each of the 3 closest candidates whose cosine is in [judge_cosine,duplicate_cosine) and answerssame,overlap, ordifferentthrough a strict one-key JSON schema. Asameis asked again with the texts swapped, and the second answer stands, which removed 4 of a small model’s 10 false duplicates on the training set. A sharedticket_refand a near copy decide without it. The judge reads raw prompts, so it runs only whenZENTRI_DATA_KEY_FILEis set, and only on tasks stored with that key. The coordinator warns at start-up when the judge step is set without the key. Both texts are marked untrusted, look-alike tags are neutralized, and a text over 4 KiB is not judged. A failed call keeps the threshold verdict and stops the judge for that check. With no LLM configured nothing changes. - Ticket roles. A ticket decides a match only when it is the task’s subject. An ID named in passing, with a cue such as “see”, “blocked by”, or “same release as” before it or “already” or “is rewriting” after it, is mentioned and never decides. The
ticket_refis the first ticket that is not mentioned. Mentioned tickets are not stored, and intents registered earlier keep their ticket. - The LLM extractor’s schema gains
mentioned_tickets. The model may only demote the heuristic’s ticket, never promote one, so a prompt cannot argue a passing ticket into a duplicate.TestPassingTicketDoesNotMakeADuplicatecovers that. - A check model budget. Extraction, embedding, and every judge call of one check share 25 s, so a check stays inside the 30 s write timeout at any
ZENTRI_MODEL_TIMEOUT. Database queries keep the request’s deadline. - A duplicate found only by the judge offers
run_anywayand has no default choice, sozt start --yesnever joins on a misread. - Migration
00003_judge_cosine.sql: a per-projectjudge_cosinethreshold. ZENTRI_LLM_STEPS(judge,extract, or both) andZENTRI_LLM_REASONING_EFFORT.- Ollama embedders take any model with a 768-dimension output or Matryoshka truncation.
deploy/.env.exampledocumentsembeddinggemma:300mwith theqwen3:4b-instructjudge. zentri-server intents calibrategains--heldout, which can be repeated to score several sets,--judge,--judge-floor,--judge-ceiling,--judge-top,--judge-existing,--text,--embed-prefix, and--cache. It reports latency p50 and p95, judge calls, how often a duplicate’s own task ranks among the 1, 3, and 5 closest, and a 95% Wilson interval on each class’s precision and recall.- A training set of 349 labeled pairs and two frozen held-out sets in
examples/intents/: 164 pairs inheldout/and 174 pairs inheldout-v2/, written by a fresh writer before the ticket-role code. - Measured on both held-out sets, on a laptop without a GPU:
embeddinggemma:300mwith theqwen3:4b-instructjudge at the default 5 s timeout reachedactive_duplicateprecision 0.879 and recall 0.558 on the fresh set, and 0.929 and 0.260 on the first one, against 0.857 and 0.231, and 0.500 and 0.020, without the judge. At a 25 s timeout it reached 0.911 and 0.788 on the fresh set. Both miss the M2.5 target of 0.95 and 0.80. A check took 5.7 s at the median and 11.8 s at p95 on the fresh set. A sweep of judge timeouts from 5 s to 25 s kept the 5 s default, the only one that held both precision floors on the training set. ADR-0006 has the tables.
- An optional LLM judge. When
-
Intent dedup (M2), designed in ADR-0006:
- Migration
00002_intents.sql:intentswith a 768-dimension pgvector column and HNSW index, the embedding model name, forks, ticket, touched areas, and an encrypted raw prompt. Per-projectintent_thresholds, and notices addressed to a user. - A heuristic extractor that always runs, plus an optional LLM extractor on any OpenAI-compatible endpoint with a strict JSON schema. The LLM may add only a summary and touched areas, and its output is checked against the prompt.
- Embedders:
hash(offline, the default),ollama(nomic-embed-text), andopenai(any OpenAI-compatible/v1). The coordinator checks the vector size at start-up and warns thathashcatches near-identical wording only. - Matching against active, queued, and finished work, with ranked candidates and reasons. Vectors are compared only within one embedding model. When a model is down, registration still matches on tickets and areas, records the degraded step, and a background job re-embeds later.
zentri-server intents reembeddoes it by hand. - Classes
new,active_duplicate,already_done, andpartial_overlap. Resolutionsmerge,queue,run_anyway,fork,join_as_watcher, andescalate. Watcher and escalation notices reach users throughGET /v1/me/notices. - Atomic registration under a per-project advisory lock and a 5 s dedup window. Twenty parallel identical starts register exactly one intent.
- Raw prompts sealed with AES-256-GCM, bound to their project and intent, when
ZENTRI_DATA_KEY_FILEis set. - API:
POST /v1/projects/{project_id}/intents/check,POSTandGET /v1/projects/{project_id}/intents,GET /v1/intents/{intent_id},POST /v1/intents/{intent_id}/status, andGETandPUT /v1/projects/{project_id}/intent-thresholds. - A labeled dataset of 97 pairs in
examples/intents/andscripts/calibrate-intents.sh, which reports precision and recall per class. The calibrated defaults are in ADR-0006. pkg/launcherwith thelocal-devlauncher: a git worktree and a detached tmux session, marked insecure because the agent is not sandboxed.- Metrics
zentri_intents_registered_totalandzentri_intent_degraded_total.
- Migration
-
The
ztCLI (M2):zt login,zt start,zt ls,zt attach,zt status, andzt done.zt loginredeems an invite, read from stdin with--invite -or fromZENTRI_INVITE, and saves the user token in a0600config file. It refuses plain http to a host that is not loopback and never follows a redirect. No command prints a token.zt startshows a match with its candidates and choices. On a terminal it asks. Elsewhere it exits 2 so a script can rerun it with--resolutionor--yes. New work launches the agent throughlocal-devwith the session token in a0600file and a heartbeat beside it.--forkstarts a competing attempt.zt lsandzt statustake--json.zt doneends the session, stops the agent, deletes the token file, and keeps the branch for you to push. M5 slice A added the opt-in--pushand--pr.
-
End-to-end test
scripts/e2e-m2.sh, run bymake e2e: two engineers start one ticket, the second joins as watcher, a same-user duplicate offers four choices, and everything runs offline. -
Coordinator core (M1), designed in ADR-0005:
- Embedded goose migrations for orgs, projects, users, user profiles, invites, tokens, sessions, file claims, notices, and the audit log. Schema and ERD in
docs/architecture/schema.md. zentri-server serve,migrate up,audit verify, andversion.-versionstill works.- Token auth per ADR-0003: user, session, admin, and integration tokens stored as SHA-256 hashes, a bootstrap admin token printed once, one-time invites, token refresh and revoke, and a single
authorize()table for every route. Tokens are redacted in logs. - Per-token and per-IP rate limits, and a 1 MiB request body limit.
- Sessions with a state machine, heartbeats, and a sweeper that abandons silent sessions. Terminal states release claims and revoke the session token.
- File claims with partial grant, a 30-minute TTL renewed by heartbeat, holder details on denial,
claim_conflictnotices to both sessions, and a per-session quota and rate limit. pkg/paths, the path normalization shared by the CLI and the server.- A hash-chained, append-only audit log written in the same transaction as each change.
- OpenAPI 3.1 spec at
server/internal/api/openapi.yaml, with a test that keeps it in step with the router. - Prometheus metrics at
/metrics, and OpenTelemetry traces whenOTEL_EXPORTER_OTLP_ENDPOINTis set.
- Embedded goose migrations for orgs, projects, users, user profiles, invites, tokens, sessions, file claims, notices, and the audit log. Schema and ERD in
-
Integration tests against real Postgres.
make test-integrationstarts a throwaway container whenZENTRI_TEST_DATABASE_URLis unset. -
End-to-end test
scripts/e2e-m1.sh, run bymake e2e. -
ADR-0005: coordinator persistence, file claims, and the audit chain, with pinned dependency versions.
Changed
-
The
zentri.devhome page opens with a hero that says what Zentri is for, and its sections follow what a team lead wants: no task done twice, no colliding edits, people make the calls, and agents and keys that stay yours. Its drawings are inline SVG and CSS, with no third-party images. Pricing, open source, security, the blog, the changelog, the legal pages, and the 404 page share its type scale, page heads, and fields of colour in place of thin rules. -
ADR-0003, 0004, 0006, 0007, 0009, 0010, and 0011 have a dated amendment where the built code differs from the decision, and ROADMAP marks M0 to M6 done with CI green on
main. M2.5 is marked built with its target not reached. “Known limitations and stubs” lists what has never run against the real service. -
The
zentri-serverDockerfile no longer says Compose probes/readyz. Compose has no health check on the server. -
The Slack bot runs in HTTP mode by default. Socket Mode is opt-in with
SLACK_MODE=socket, andmanifest.yamlis the HTTP manifest. -
--sweep-intervalalso paces the prune of Slack deliveries. -
/metricsneeds a bearer token when the coordinator listens beyond loopback, which includes Compose, where it listens on:8080in its container. An admin token passes, and so does an integration token with the new scopemetrics:read(POST /v1/integration-tokens). On127.0.0.1,::1, orlocalhostit stays public (ADR-0008). -
zt doneno longer says that M4 automates the push and the pull request. Zentri does not push or open one. -
zt donerefuses a session with uncommitted work, where M4 deleted a sandbox’s uncommitted work. Without--pushit says that it pushed nothing and how to push. -
--sweep-intervalalso paces the question and decision sweeps. -
make test-integrationandscripts/calibrate-symbols.shremove their Postgres container’s anonymous data volume. Each run used to leave one behind. -
A session’s
edits_fail_openmoved from.zentri/session.json, which the agent can write, into the launcher’s0600state file next to the session token. While the coordinator is unreachable, the edit hook denies the edit when that file is missing, open to the group or others, or names another session. -
A ticket named in passing no longer makes two tasks the same work. Only a ticket that is each task’s subject decides, as M2’s rule let “see LED-88” match a task for LED-88. Intents registered before this change keep the ticket they were stored with.
-
With an LLM configured, only the judge runs by default. The LLM extractor no longer runs unless
ZENTRI_LLM_STEPSincludesextract, so setZENTRI_LLM_STEPS=extract,judgeto keep the M2 behavior. On the 63 training pairs that name a ticket, it tooksame_ticketfrom 27 of 27 right to 17, because a ticket the model leaves out is demoted, and 48 of its 126 calls timed out at 25 s. It also adds a model call before the judge. -
Go 1.26 or later is required.
-
Compose passes the intent model settings to the coordinator (
ZENTRI_EMBEDDERand friends, seedeploy/.env.example). The defaults run offline. -
Compose runs a one-shot
migrateservice as the database owner, then serves aszentri_coordinator, a role withoutDELETEorUPDATEon the audit log. SetZENTRI_APP_DB_PASSWORDindeploy/.env. A data volume created before this change needsdocker compose -f deploy/docker-compose.yml down -vonce. -
The coordinator image runs
serveby default. -
zentriCLI, also installed aszt, with--versionandversion. -
zentri-servercoordinator with-version,/healthz, and/readyz./readyzreports ready only when Postgres answers. -
deploy/docker-compose.ymlwith Postgres 16 and pgvector, the coordinator, and an optional Ollama profile. -
Distroless, non-root container image for the coordinator (
server/Dockerfile). -
Makefiletargets for build, test, integration tests, lint, local dev, end-to-end test, and release dry run. -
End-to-end test
scripts/e2e-m0.sh. -
CI workflows: lint, unit and integration tests, build, shellcheck, license headers, DCO, CodeQL, end-to-end, and a release dry run. Publishing stays off until the owner approves it.
-
GoReleaser configuration for Linux, macOS, and Windows archives, checksums, SBOMs, and container images.
-
Apache-2.0
LICENSEandNOTICE, and a draftee/LICENSEthat is not in force. -
CONTRIBUTING.md,CODE_OF_CONDUCT.md(Contributor Covenant 2.1),SECURITY.md, andGOVERNANCE.md. -
ADR-0001 to ADR-0004: languages and monorepo layout, open-core boundary, auth model and tokens, and sandbox strategy.
Fixed
scripts/e2e-m5b.shno longer fails when a pending-request key starts with a dash.