This document explains why Telesma works the way it does. CLAUDE.md says what is where and
which invariants must hold; this file keeps the reasoning and the lessons behind each mechanism,
with the numbers that decided them. Before 1.0, Telesma was developed privately (internal versions
1–17); most of the lessons below come from that period and from a few long-running
projects built with it. “The reference project” means the largest of them — a production
application developed with Telesma for more than a year, with close to two thousand tasks in its
plan. Where history mentions old names, the current English names are used.
The recurring theme: whatever the model does not do consistently, a script enforces. Several mechanisms started as instructions, were measured, found to be followed unevenly, and moved into the launcher, a hook or a check.
Classic Claude automation restarts the CLI for each task and feeds it a fresh prompt. Telesma does
the opposite: one session, in which the model runs the loop itself — pick a task, load what it
needs, implement, test, commit, report, pick the next one — and calls /compact when context
grows (per config: every N tasks or after a phase).
The price of a continuous session is that the context will be compacted, and anything held only
in the conversation is lost. Hence the state files: telesma/state/PLAN.md (what to do), REPORT.md
(what happened), PROJECT_CONTEXT.md (architecture, decisions, pitfalls), SPEC_INDEX.md (where
things are in the spec), config.md. The model is told to update them before compacting. They
are also what a new session starts from, so a session resume is detected from REPORT.md history,
not from memory.
The launcher (telesma.sh) does everything deterministic before the model starts — migration,
rotation, validation, prompt assembly — because work done by a script costs zero tokens and does
not depend on the model remembering it.
Modes after clarification: autonomous (the loop), bugfix (chat: report → diagnosis →
proposal → acceptance → fix → test → commit → BUGFIXES.md entry), review (chat: choose a
scope, load telesma/spec/guidelines/context as criteria, findings with severity, low-severity fixes batched
automatically, the rest gated, REVIEWS.md entry) and artifacts (autonomous, idempotent
backfill of screenshots and recordings). Modes 2 and 3 force interactive mode because the chat is
their point.
A spec is never complete, and a model that guesses silently builds the wrong thing confidently. Clarification (section -1) therefore runs before any code:
telesma/spec/ and writes telesma/state/SPEC_INDEX.md: a two-level index with line ranges,
per-section anchors, keywords — and a quality assessment (completeness, unambiguity,
consistency, topic gaps, recommendation). The assessment drives the number of questions.telesma/state/QUESTIONS.md has three sections, in the order the user resolves them:
### S…) — two sources that disagree, with a proposed resolution.
They must be settled first; answering questions on top of a contradiction wastes the answers.### A…) — decisions taken without asking (industry standards, stack
conventions), listed for a spot-check. This is what keeps the question count down.### Q…) — only what cannot reasonably be assumed. The count is adaptive:
3–7 for a small project with a good spec, 15–30+ for a large one with a poor spec. Every
question cites its Source in the spec.claude --continue on the indexing
session, which already has the whole spec in context (cheaper and better informed), and falls
back to a fresh run if no plan materialises.- AC: acceptance criteria on
non-trivial tasks and a ## Spec coverage section mapping every index section to tasks or to a
justified “out of scope”, and passes a self-review checklist.Then Clarified: yes is set and telesma/spec/ is frozen.
The launcher validates the plan mechanically before every start: dependency graph (existence,
cycles, duplicate ids), (tech:) tags against telesma/guidelines/, (spec:) / (ui-*:) /
(flow:) tags against files. Errors gate the start. It also computes a next-task hint and
collapses completed phases in the prompt copy.
Telesma never loads a whole spec document. A task carries (spec: file.md); the index gives the
section and its line range; the model reads only that fragment with offset/limit. Grep over
telesma/spec/ is the fallback.
Line ranges go stale when someone edits a file. So each index entry also carries an anchor — the exact heading text — and the model verifies that the fragment it read starts with it. On a mismatch it greps the heading, reads from the right offset and fixes the index entry itself. The launcher additionally stamps spec checksums into the index and warns on drift.
UX/UI material in telesma/spec/ux_ui/ (tokens, primitives, screens as CSS/JSX/HTML) is indexed per
element. Tags (ui-tokens:), (ui-component: file#A,B) and (ui-screen: file#Screen) load one
element at a time. Prototype components are rewritten into the production stack, never copied
(prototypes are typically in-browser Babel with globals); a screen task reads the production
component API, not the prototype again. Mockups that live outside the repo are entries in
telesma/spec/ux_ui/LINKS.md, resolved through the index to a web fetch. That file is exempt from the
spec freeze; the launcher detects unindexed entries deterministically and asks for a re-index.
Conventions per language/framework live in telesma/guidelines/ (copied from
templates/guidelines/). The prompt carries only an index (tag + keywords). Per task the model
reads general.md plus one file per (tech:) tag. A missing tag file is TELESMA BLOCKED — asking
is cheaper than a project written in invented conventions.
Users edit these files freely. Updates go through .telesma-manifest, which stores the hash of the
template version last delivered: an unedited file (equal to any historical template version) is
replaced; an edited one gets a one-time warning with a diff command and is never overwritten.
The same mechanism delivers the judge hook, the checks and the test-scenario skeleton.
After clarification telesma/spec/ is frozen; changes come through telesma/changes/, one Markdown file per
change, optional frontmatter (date, priority, affects, kind). Before picking the next task
the model processes pending changes (section 0.3): modifies pending tasks in place with
(change: <file>), creates a rework phase (Phase N.Z1) for completed tasks that need
rework — completed boxes are never unchecked — writes a ## Change history entry and moves the
file to telesma/changes/processed/. A task carrying (change:) re-reads that file when executed.
Designed for spec corrections, telesma/changes/ turned out to be the main channel through which
projects grow — hundreds of changes in a few months on the reference project, and many projects
start from a deliberately thin spec. So neither the number of changes nor the share ending in
rework says anything about quality. What carries signal is a change that exists because something
already built does not work — hence the Kind field (bug | correction | feature), see §11.
After TELESMA COMPLETE or TELESMA BLOCKED the session stays open and the human takes over. Every
exchange is appended to telesma/state/DECISIONS.md (question/context paraphrased, the outcome in 2–4
sentences, optional impact). The file is write-only — never loaded into a prompt — so
decisions with architectural impact are dual-written to the ## Key decisions table in
PROJECT_CONTEXT.md; otherwise the next autonomous session would never see them. Topics for later
go to telesma/state/BACKLOG.md, which, unlike the logs, is read-write.
Write-only turned out to mean forgotten (format 19). “Never loaded into a prompt” was read by
the model as “never read”, and the instructions said so outright. A review of every place where
the model answers, proposes, plans or asks found no step that looked back: section 10 answered a
design question from scratch and logged the result — a second decision next to the first when the
topic came back months later; change processing (0.3) analysed impact against the plan alone, so
a change could silently reverse a 📌 decision or a clarification answer; QUESTIONS.md — the
answers the user gave in person — was a source for plan generation and never again; bugfix mode
did not touch PROJECT_CONTEXT.md, so a production bug fixed there never became a pitfall; a
reversed decision became two contradictory rows, and a 📌 row never rotates; and nothing pointed
back into CONTEXT_ARCHIVE.md once a row had rotated out.
The fix keeps the prompt diet intact and adds a way back on demand, modelled on the spec index:
a recall step (0.6) — one Grep of the topic’s words across the logs and archives before any answer,
proposal, change plan or question, a hit opening the reply (“on 2026-04-23 we agreed X because
Y — does that still hold?”); a pointer from a Key decisions / Known problems row to its
full entry (→ DECISIONS.md 2026-04-23 16:42, → QUESTIONS.md A7, → BUGFIXES.md …), so the row
stays a one-line conclusion and the rejected alternatives are one Read away; clarification answers
written into Key decisions with that pointer; a conflict with a decision step in 0.3 that
blocks instead of planning; bugfix mode feeding Known problems; and supersession — an
overturned decision is edited in place (~~old~~ → new, superseded: …), never added beside the
old row. No structural token changed, so no parser and no migration; the format number moved so
that telemetry can tell before from after.
The first live test (two projects, one question each, 2026-11-03) showed where the step is
fragile. The Grep and the Read happened both times; the failure was in the retelling. Asked
“shall we switch to OpenAI for images?”, the model found the entry that said Google directly,
OpenAI only through the proxy and opened with “we agreed the private build may use OpenAI
directly” — a paraphrase written while already weighing the proposal, bent towards what the
proposal needed, which the user who did not remember the entry could not catch. It then
recommended the switch; one “yes” away from the contradictory second decision the step exists to
prevent. Two rules followed: the hit is quoted verbatim (date and Outcome sentence in
quotation marks) before it is interpreted, and a proposal that contradicts the hit gets change
the decision, or the proposal? as the whole reply — the 0.3 rule for change files, now also for
the chat. A launcher-side “related decisions” list would not have helped: the model reached the
right entry and misread it.
The second run of the same question found a third failure, this one in the log itself. The
first run had logged its unanswered recommendation (“new OpenAI generator… awaiting the owner’s
confirmation and key”) as a Kind: question entry; the second run’s Grep hit that entry first,
read the repeated question as the awaited confirmation and started writing code — a shared
helper, a new generator, an edit to the existing one — before saying a word. Two more rules:
an outcome that decides nothing starts with No decision — awaits: …, and recall treats such
an entry, or any unanswered recommendation, as the question coming back, never as consent; and
until the user answers change the decision, or the proposal? no tool that writes may run — the
answer is the gate, not the model’s confidence that it knows what it will be.
vX.Y.Z marks what shipped; it is deliberately separate from the internal telesma/phase-<ID>
progress tags. Telesma proposes a release and waits — no answer, no tag. The proposal is a fixed,
visibly separate block (📦 RELEASE PROPOSAL: previous version and date, commits since, what landed
in product language, the suggested number with the reason, what “yes” will do), because a sentence
folded into a phase report was easy to miss. Moments: green full suite at phase end,
TELESMA COMPLETE, entering interactive mode with unreleased green commits, and a one-line patch
proposal after a bugfix commit. The launcher computes the data (VERSIONS: directive) so the
proposal does not depend on the model remembering git describe --tags --abbrev=0 --match 'v*'
(the --match matters, or describe returns a phase tag). In user-facing text Telesma says “release
version vX.Y.Z”, never bare “tag” — to an owner the bare word means nothing specific.
Before tagging, Telesma writes docs/test-scenarios/vX.Y.Z.md and commits it, so the file is part
of the tagged state and the tree is clean. It contains only what automated tests could not
check — look and feel, real data, external services, production-only paths — sourced from
git log <prev>..HEAD and notes on tasks closed in that range. Every scenario has a failure
signal; a release that adds a limit, validation or permission also gets a barriers section of
things that must be rejected. telesma/spec/APP_FLOW.md contributes by exclusion: a step covered by a
green e2e test is exactly what must not be copied here.
Blockers: red suite, dirty tree (a tag on a dirty tree points at a state nobody can reproduce), an
existing tag of that name (-f is forbidden, unlike phase tags). Never: push (the user gets the
command and the note that tags do not travel with a plain push), merge to main, deploy, or edits
of version fields in manifests — the version is derived from git.
PLAN.md, REPORT.md and PROJECT_CONTEXT.md go into every startup prompt in full and grow
linearly. On the reference project, after a year, that was ~400k tokens before a single task
started, 77% of it REPORT.md. The launcher rotates them at startup — deterministic, zero tokens —
into *_ARCHIVE.md files that are never loaded.
Two kinds of sections. Current state (## Summary, the metrics table in ## Test status)
is overwritten by the model; growth there means a session note was appended where it should not
be, and only the three newest dated bullets survive. Chronicle sections (Test status run
paragraphs, Task history, Problem log, Change history, ad-hoc sections) are append-only and
keep the newest N (3 runs, 10 entries, 10 log entries, 10 change entries, 3 ad-hoc sections).
Ad-hoc sections are recognised by a title not in the template’s set — a name pattern missed
everything the model invented, and one such section sat in every prompt for three weeks.
An entry is a block, never a line. An early rotation archived single lines — a table row, a
[date] opener — while the model writes multi-line entries (symptom + fix + lesson; a phase
history subsection with its own table). Rotation cut entries in half: the archive held bare
openers, the report kept headers with no rows and paragraphs starting mid-sentence. This was the
one framework bug that destroyed content, which is why repair exists (§10).
Ordering is date-driven, not positional. The model appends to the bottom in some sessions and prepends in others; “keep the last N” silently archived the newest entries. The N newest by date survive wherever they sit. An undated block cannot be judged, so it stays but consumes a slot — an earlier rule required every block to carry a date, so one undated entry flipped the whole section back to positional mode.
## Test status was first classified as current state — a mistake: every run is compared with the
previous one, so the model appends paragraphs. On the reference project the section reached 128 KB
(~25k tokens per start, 90 runs back). Run blocks are now paragraphs opened by bold text with a
date; a dateless paragraph continues the block above (wrapped lines also start with **, and
treating them as blocks broke the date sort). 128 KB → 2.4 KB.
PROJECT_CONTEXT.md keeps the last 40 Key decisions rows and the last 30 Known problems and
solutions rows, date-sorted; a row marked 📌 never rotates. The template once offered two
sections for the same job (a problems table and a pitfalls list); the model filled the one the
instructions did not describe, so the list was removed and folded into the table. Its size limit
is in KB, not lines: “~150 lines” is no limit when a line runs to 2300 characters (162 lines,
82 KB on the reference project).
PLAN.md archives 100%-complete phases beyond the last N, only above 100 KB (small projects get
no churn). A stub plus <!-- telesma-archived: 12.1 12.2 … --> stays, so the validator still
resolves (requires: 12.3). Archiving is prompt-neutral (collapsing already protected the prompt);
it buys file size, Edit/Grep cost and readable diffs — 1672 KB → 142 KB on the reference project.
Ad-hoc ## Requests from <date> — … sections were not prompt-neutral: their prose intros
(91 KB of commentary on long-shipped changes) escaped both collapsing and archiving, which only see
### Phase. Rotation archives only the intro, never the section — live phases hang under those
headers, and a section with any open - [ ] is skipped entirely.
What counts as a task. The task regex once allowed only ✅ before the keyword, so a task
marked ⛔ (waiting for a human) was invisible — and not counted toward phase completion, so a
phase whose only remaining work was a ⛔ task read as complete and was archived with unfinished
work inside. Any leading marker is now tolerated; ⛔ counts toward completeness, and the
next-task hint skips it unless nothing else is left. Task lines are capped at 400 characters;
long rationale belongs in the files that rotate.
Rotation dirties the tree at startup, which would block release tagging, so the instructions tell
the model to include telesma/state/*_ARCHIVE.md in the session’s first commit.
The first measurement across dimensions (§11) found the reference project’s startup prompt at 425k
characters (~105k tokens) before Telesma did anything — carried again on every turn. 60% of it did
not serve picking and doing the next task: 410 one-line stubs of archived phases, dozens of empty
ad-hoc headers, PROJECT_CONTEXT.md table rows with a median of 967 characters (the instructions
say “a couple of sentences”), ad-hoc change-history sections whose text already lives in
telesma/changes/processed/, and 13 KB of template comments in config.md.
All of it is trimmed in the prompt copy only; files on disk are untouched. Finished phases become one line of ids (enough for dependencies — the title is one grep away), exhausted ad-hoc sections are dropped, config comments stripped, table rows cut at 400 characters with a pointer to the file. The diagnosis flags oversized rows so the model shortens them at the source. Result: 425k → 286k characters (−33%). The side effect to watch is retries — the model occasionally needs a grep for something the prompt no longer shows.
The guidelines index got the same treatment later: fifty tag — keywords lines are 8 KB in every
session of a project that uses two or three tags. In the implementation modes the full line stays
for the tags the project uses — every (tech:) in the plan, the plan’s Stack line, the detected
manifests — and for general.md; the other tags are named in one line. The files themselves are
all delivered to telesma/guidelines/ as before: copying only the “used” ones was tried earlier
and abandoned, because a growing project keeps adding technologies and every new tag became a
sync problem and a blocked task. Trimming the prompt instead of the directory has no state to keep
in sync — the launcher recomputes the set from the plan at every start — and the clarification,
which assigns the tags, still sees the whole index.
Nothing used to measure the state files themselves; the reference project grew to 550 KB of prompt
before anyone looked. tools/telesma-repair.py does two jobs:
damage (repairable) or notice.--repair), a deliberate act rather than a startup step: it reads the entire git
history of REPORT.md and rewrites files.Git is the source of truth, with a rule per section: a log entry is restored from the commit
that first introduced it (written once; later versions carry glued-on orphans of entries rotated
away below it), a history subsection from its longest version ever (rows accumulate legitimately).
Orphans are deleted only after their text is verified present in the archive. Two further repairs
are mechanical: a phase archived with unfinished work goes back (the archive block and the stub are
verbatim what rotation moved, so swapping them reverses a wrong move), and a checked item without a
task keyword — a note wearing a checkbox — moves under its phase in Task history, dated by
git log -S. An unchecked non-task item stays with the human: forgotten task or backlog entry,
only a person can say.
Repair opens exactly four files (REPORT.md, REPORT_ARCHIVE.md, PLAN.md, PLAN_ARCHIVE.md), so
decisions, backlog and conversation records are out of reach by construction. It never deletes
what git does not know about — a first version rebuilt history subsections from git and therefore
reverted, on a second run, the notes the first run had moved in. tools/test-repair.py pins the
properties: every word of four or more characters occurs at least as often after repair (word level,
because the tool reformats), files outside scope are byte-identical, and a second run changes
nothing.
Every framework bug above was found the same way: a human opened a project and read its state
files. tools/telesma-telemetry.py makes that systematic. It is optional and off by default; when
enabled it sends events to the user’s own server (a separate, self-hosted project), in the
background at startup — the start never waits for it. Payload schema version 2.
It reads what Telesma leaves behind anyway — problem log, tries per task, bugfix/review/decision
logs, change history, pitfalls, scenario results, judge decision counters — plus git history and
local Claude Code transcripts. Pure reads, zero tokens, never modifies the project. What never
leaves the machine: telesma/spec/, source code, telesma/changes/ (written by a human about the product) and
commands from the judge log (reduced to per-day counters). Text is scrubbed of secret patterns and
the home path; tools/test-telemetry.py pins all of it with canaries. Sending uses plain HTTP, not
MCP: a send that depends on the model remembering to call a tool would repeat the Test status
lesson. What was sent is remembered in ~/.cache/telesma/, not in the project (a file there would
dirty the tree and block release tagging); a failed send marks nothing and is retried next start.
A server older than the client returns rejected ids, and those are resent until it catches up.
Design points that came from analysing real data:
.telesma-version; an event older than that file gets null, not the first known version —
otherwise four months of history lands in one bucket and every comparison lies.Task history, and an apparent jump in retried tasks across versions was a change
in how the column was filled, not in quality. So tries per task come from git too: a commit
subject carrying a known task id yields date, files, lines, follow-up fix commits and minutes
since the previous commit (task coverage 676 → 1074; where both exist they agree). Sessions
come from transcripts: mode, model, tokens, tool calls by name and how many errored,
compactions, duration — counters only. The model field matters: three different models worked
on the reference project within a month, and without it a framework change cannot be told apart
from a model change. Transcripts expire after about 30 days, so this data exists only if sent.Kind (bug | correction | feature, plus question | operations in decisions) makes
changes and decisions readable as signal; the test is “had it worked, would this exchange have
happened?”. Entries without it stay null — the collector never guesses. A bugfix-mode entry is
not a bug by virtue of its file: about a quarter of them were small features.Bug source: task X.Y
(found with git log -S / git blame); the collector stamps the source task’s version, date and
technology on the bug.test | scenario | review | telesma | owner | production | guard) — the same
number of bugs means something else when tests catch them than when the customer does. On the
reference project roughly half of the historical bugs were found by the owner or in production —
all under green test suites.Test status paragraph becomes a test_run
event, including runs that were red on the way to green. Blockers come from the git history of
BLOCKED.md (the file is deleted once resolved). Entries without a task id get a technology
inferred from text, only among tags the plan uses, and marked as inferred.A sender signature (hash of the git email, readable git name) gives attribution, not authentication. Event ids deliberately exclude the sender, so two people on one project produce one event per entry.
The first analysis of the reference project’s events produced three rules, each now in the
instructions and in general.md:
- AC: lines across ~1900 tasks, because projects grow
through telesma/changes/ and acceptance criteria existed only in plan generation. Now every new
mechanism gets - AC: entry — …, a test goes through that entry, and a 30-second check asks
“disable the call — does anything go red?”.→ guard: <name>; 📌 is reserved
for what cannot be checked mechanically.git checkout and once left a MUTANT disabling
production validation past the end of a session. general.md now states a four-step procedure,
and the commit step greps for MUTANT.TELESMA_FORMAT was bumped with no migration for this, deliberately: telemetry tells “before” from
“after” by the version, and a change without a new number would be invisible to the measurement it
was made for.
Telesma has no integration by default: it commits to the current branch, never pushes, knows no
tracker. Integration instructions are separate files appended only when ## Integrations names
them, so a non-integrated project behaves exactly as before and pays no tokens. User doc:
docs/INTEGRATIONS.md.
The origin: a test project finished its whole plan and left 77 open PRs. The loop treated a task as done when its PR was opened, knew nothing about required checks or merge, chained every PR on the previous unmerged one — and the PR convention lived only in the session’s memory while the config said “no branches, no push”.
(pr: #n) with the checkbox open until the merge.
The checkbox is what phase completeness, collapsing and archiving already read, so phase tags,
the full suite and release proposals fall in the right place with no new rule. The next-task hint
skips (pr:) tasks, counts them against Open PR limit (PR LIMIT REACHED → TELESMA WAITING, a
terminal state meaning “nothing is broken, the loop needs a merge”), and offers a task whose only
unmet dependencies are open PRs last, marked chain. Every iteration starts with one
gh pr list reconciliation.auto (gh pr merge --auto, needs repository features a free private repo
lacks), manual (waits for a human) and agent (default: Telesma waits on gh pr checks --watch
and merges itself). In agent mode the rule “merge only on green required checks” is enforced
by the permission judge, not an instruction: it runs its own gh pr checks before letting
gh pr merge through, and every required check must be present and green — a missing check is
not a green one. Push is allowed only to the task branch prefix.--delete-branch closed the successor instead. The order is now
bottom-up: retarget the successor to main first, merge the predecessor without deleting its
branch, then rebase the successor --onto origin/main and force-with-lease push. The same episode
showed a phase regression recorded from a branch while main had a red test — so a full run on a
branch is a Preliminary run, and Regression after Phase N is recorded only from main.telesma/changes/ files. For the Specky
requirement tracker, what_changed + get_work_queue become telesma/changes/<date>-specky-<id>.md
with kind in the frontmatter and then ride the existing section 0.3. The cursor moves only after
the files are written. Plan anchors - Specky: (req: <id> v<n> @<hash7>) are checked before each
task; tests carry specky: crit <id>; the proof is the JUnit report from CI, not Telesma’s word.
Telesma proposes; decisions in Specky stay with the human.tools/telesma-specky-snapshots.py backfills older tags.--integrations (and the first config creation) asks which integrations
to enable, checks gh, login, remote and what the repository allows, recommends a merge mode and
writes only config.md. Config fields are validated like the test commands.An opt-in hook (## Auto-approval) that answers permission prompts on the user’s behalf. Purely a
harness feature; the instructions never mention it. Governing rule: the judge only removes
prompts, never adds blocks. Anything dangerous still prompts, so the human remains the backstop
exactly as before. Layers that recognise danger therefore ask rather than deny — rm -rf
node_modules and git push are often legitimate, and denying would remove the user’s ability to
approve them.
One exception, learned from the first live trial of the public version (2026-10-22): the whole
project ran in Claude Code’s auto permission mode, where the built-in classifier answers prompts
and the PermissionRequest hook is never called. 438 decisions by the classifier, 0 by the judge; a
PR merged on a red required check, a release tag pushed. “Ask” is only a backstop when someone is
asked. So two agent-side rules of the contract — merge only on green required checks, no push of a
release tag — moved to the PreToolUse hook as a deny with a reason, because that hook runs in
every mode. The layer is kept tiny on purpose (it mirrors what the instructions already forbid), a
gh failure never denies, and the human can always do the operation by hand. The same hook leaves
a note in the log when it sees auto, the launcher warns at the next start, and it starts Claude
with an explicit --permission-mode so a session never begins in auto by accident.
Layers, model last and narrowest:
rm -rf, sudo, curl | sh, git push, SSH keys, cloud CLIs, package
publish, writes to .claude/ or telesma/config.md) → ask. The model never sees them.Always ask user regexes, obfuscation at the conservative level, and writes disguised as
reads → ask.ALLOW skips the prompt; anything else is “no decision”.Lessons that shaped it:
PermissionRequest fires only when a decision is
needed) and passes what prefix-matched deny rules miss (rm -fr slips past rm -rf). Hence the
opt-in Force ask despite allowlist, a PreToolUse guard that runs the regex layers before the
permission rules — the one switch that adds prompts. It separates shell text from interpreter
payloads (heredocs, -c): matching shell patterns against a Python heredoc produced only false
positives. Payloads are checked for process spawning, sockets, deletion and eval, with string
literals stripped first.cd X && git …; each has a
trivial equivalent (git -C X …), so the guard blocks with a rewrite instruction and the model
resends — the user is never asked. Only certain equivalents are gated.grep,
ps, cat, ls glued with pipes. The read layer removed 26% of asks with no model. It needed
its own quote-aware parser (grep -E "a|b" is one member) and follows symlinks with realpath;
it found its first real hole within a minute (git show HEAD:.env).tools/judge-eval/dataset.jsonl (labels dangerous / safe /
disputed) runs through the same pipeline as the hook. The gate is zero false allows on
dangerous, because ALLOW is the only decision with an effect. On the first measurement no
model passed — false allows were mostly writes that look like reads (echo x > src/main.py,
sed -i, sort -o, find -delete) and git operations that discard work. The prompt forbade
exactly these and models allowed them anyway, so recognition moved into rules (redirects into the
repo, in-place edits, rm/mv of project files, git discarding work or rewriting history, secret
files, symlinks leaving the project, programs shadowing system tools, hijacking environment
prefixes, file writes inside interpreter payloads). After that the large model reached zero false
allows while allowing nearly all safe cases; small local models still do not pass.allow mode is for after a candidate passes the gate. A
failed primary is skipped for two minutes, or a dead server adds a timeout to every command.executed when an asked command actually ran,
so the log finally says what the human decided. An ask without a pair is a refusal or an
interrupted session, and the label extractor keeps them apart. Training an own model is
deliberately not done yet: distilling from the current log would reproduce an over-cautious
teacher.config.md (it is committed): env:NAME, file:<path>
outside the repo, cmd:<command>; a literal value is warned about at every start.Variants: command (own script + any OpenAI-compatible endpoint), rules (same script, no model),
none, and prompt / agent (Claude Code’s built-in judge hooks, where a guard cannot stop
another hook’s allow, so there the guard denies instead of asking).
Every quality mechanism used to depend on the model remembering it: review mode had zero recorded uses across projects, and “watch for OWASP” works on errors of ignorance, not on reflexes. Meanwhile a medical project invented red-team tasks on its own — and a red team with mutation, not the implementation’s own tests, found a real authorization hole. It also showed the case nothing guarded: a debugging aid “to be removed before deployment”.
PreToolUse hook recognises git commit
(point commit), git tag telesma/phase-* (phase) and a version tag (release) inside any Bash
command; CI runs the same runner with --point ci. A blocking finding denies the operation with
the list; warnings come back as context. Separate from the judge on purpose: the judge only
removes prompts, checks deliberately add blocks — so they have their own switch, off by default.git add a b && git commit has not staged anything yet, so the
commit plan is the index plus the paths of git add members of the same command. Without that the
check would scan an empty index and pass every commit.printf 'KEY=…' >> config.py && git add config.py &&
git commit — the check read the file before printf ran (Telesma found and reported the hole
itself). Before a commit or tag the same command may now contain only git add/rm/mv/status/diff,
cd and read-only commands without redirection; anything else is denied with an instruction to
split the command. Shell wrappers and script aliases are refused; plain aliases are expanded.CHECK.md frontmatter (kind command | rule | agent, run/check
commands, default points, scope, severity) + run.py reading paths on stdin and printing findings
as JSON lines. One handling rule for all of them in section 19, so a new check adds no
instructions. Config can soften a module’s severity, never harden it.telesma/state/CHECK_EXCEPTIONS.md, and every write there, to telesma/checks/ or to ## Checks asks the
user — the author of the code cannot close the findings that block it.telesma: weakening <id> — <reason> marks a deliberate hole; the marker is the
register. An incomplete marker or MUTANT blocks a commit; an open weakening warns at phase end
and blocks the release tag; typical unmarked patterns (TLS off, debug, CSRF exemption) warn.dependencies checks only packages new against HEAD: missing from the
registry, under 7 days old, or a near-typo of a popular package → block; install scripts, git/URL
dependencies, extra indexes → warn. dependency-audit reads every lockfile against OSV at
phase/release/CI (a vulnerability appears without any change in the project) and blocks only what
a version bump fixes: critical/high, a fixed version newer than the installed one, production
dependency. Findings are merged per package (81 lines → 20 on one project). An unreachable
registry is a warning, never a block.git commit the runner files the result under the new SHA; after a push to
a task branch it posts one commit status (Telesma: checks (local)) on the branch tip — red
when any commit lacks evidence or a check errored, because absence is not green. Rebase and squash
change SHAs, so evidence is also matched by git patch-id. Honest limit, written into the name:
this is an attestation from the developer’s machine, not verification. The verifiable variant is
the same runner in CI.tests (a green suite with tests quietly switched off
is worse than a red one; a test modified together with the code it checks warns — that was
53 of 134 problem-log entries on the reference project), hygiene (build dirs, big files, a
manifest changed without its lockfile), dead-entry (the mechanical guard for AC: entry; warns
only, and its first measurement changed the rule — counting only references from other files gave
146 findings, all false; counting any other line of the own file left one, true), sast
(semgrep or built-in patterns; an aggregated finding’s fingerprint covers all hit lines, so a
waiver on line 12 does not silence a new injection on line 80) and lint-types (project linter at
commit, typechecker at phase, never writing; plus the typographic-quote rule from §12).telesma/state/SECURITY_MAP.md declares intent: roles with the guard text in code, ownership
boundaries, every route with its roles and ownership, outbound hosts, secrets. The checks never
learn the auth framework: _routes.py extracts each route with its window (decorators,
signature, router dependencies, call arguments, mount-site middleware) and the check is a
substring test of the map’s guard tokens in that window. intent blocks a new route without a map
row and a route whose window lacks the guard of its declared role. red-team requires a
telesma: red-team <METHOD> <path> — <cases> test marker for protected routes changed in the phase,
with cases derived from the map (no-session, foreign-role, foreign-owner, csrf). The
finding text is the task, so “blocked → fix” makes Telesma create the red-team task the medical
project invented on its own. Telesma writes the map without asking (asking on every route would
stall the loop); the human reviews it in the release proposal, which lists attack-surface changes.
Pilots shaped the extractor: on one application half the route decorators had the path on the next
line, so decorators are joined first; on the medical project sub-apps are mounted elsewhere, so
mounts are followed up to three levels — without that 83 of 235 routes looked unguarded. History
replay found exactly the change the map exists for: one commit widened a module’s access to health
data from one role to three.Telemetry from real projects cannot isolate a framework change: projects keep growing and the
models change. benchmark/bench.py holds everything still except the Telesma version: a small spec
(a lending-library REST service on the Python standard library, with system time stored in the
database — no dependencies, no clock), a ready plan and index (clarification depends on a human’s
answers, so it is skipped), and four change requests built around the defect classes of §12: a
mechanism triggered by the day change, a new item type that must work in seven places, a rework with
a boundary, and a queue that shows its bugs only with two or more entries. Any edit to those files
changes the benchmark fingerprint and makes results incomparable.
The judge is a hidden HTTP-only test suite Telesma never sees, so it measures what a user would see —
including code that was built, tested and wired to nothing. The judge earns trust first: the
reference implementation must pass everything, and each of five planted faults must be caught.
Reported alongside: Telesma’s own test count (the gap between “green at my end” and the outside view
is what is being measured), minutes, tokens, models and how many AC: entry lines appeared.
Lessons: one run is an anecdote (compare series of at least three, same model); a run is a real session on the user’s subscription, and the first full run exhausted the session limit halfway, so the harness recognises that and the default run starts from a frozen post-stage-A state. The first series scored 100% on every run for both versions — the benchmark is too easy to separate quality. It did show that the new rules are executed (entry criteria 0 vs 6–11 lines) and cost about four minutes per stage. A benchmark that measures quality needs requests that state the outcome rather than the trigger, and calibration to a 60–90% judge score.
The launcher once validated the plan but never read config.md as data, so a test command left as
the template placeholder ([e.g. pytest -v, npm test]) survived 100 days on the reference project —
the model invents a command when the field is a placeholder, and “green suite” then means whatever
it guessed. Now every - **Field**: value is parsed per section: missing or placeholder test
commands are errors that gate an autonomous start; any other placeholder is a warning; no smoke
suite on a large plan is a warning (regressions then surface only at phase end, with no task to
attribute them to). Integration fields, the judge endpoint and key forms are validated the same way.
## Working directories declares directories outside the repo that Claude may touch without
prompting (scratchpad, build caches, asset directories). The launcher syncs them into
permissions.additionalDirectories — settings entries grant file access only, whereas --add-dir
would also load CLAUDE.md, hooks and skills from that directory. Roots that would disable
protection rather than configure it (/, ~, /Users, /etc, /tmp, …) are rejected. The judge
reads the same section, so rm -r passes only inside working directories, never inside the repo.
It also trusts the session scratchpad without configuration: it is the agent’s own workspace, and
the “outside the project” rule exists to protect the user’s documents, sibling repositories and
system paths — without it the common backup → mutate → restore pattern prompted on every step.
The pre-release version spread itself over the project root: state and config, guidelines, checks,
spec/, changes/, artifacts/ — six top-level entries, three of them with generic names that collide with the project’s own (spec/ is also where RSpec
and many JS projects keep tests, changes/ and artifacts/ are common build outputs). A reader of
the repository could not tell what belonged to the product and what to the tool, and removing the
tool meant hunting for its pieces.
Since 1.0 everything Telesma reads or writes lives in telesma/: config.md and the human’s input
(spec/, changes/) at the top, what the model writes in state/, what the clone delivers in
guidelines/ and checks/, screenshots and recordings in artifacts/. The directory is visible,
not hidden — the human edits the spec and the config in it. Two things stay outside on purpose:
.claude/ (Claude Code reads its settings and hooks only from there) and docs/RUNBOOK.md +
docs/test-scenarios/, which document the product — they stay useful if the project stops using
Telesma.
Consequences that keep it cheap: the spec checksum stamp records paths from the project root
(telesma/spec/…), so it does not change with the working directory; the check modules find the
project root four levels up from their own file; the checks still skip only telesma/checks/
(the state files and the spec are scanned for secrets, as before). The launcher refuses to start on
a project still in the pre-release layout, so no project ever ends up with a mixed one.
The pre-release template shipped with everything optional turned off and, once turned on, turned
on all at once. Both halves hurt. A newcomer who followed the README got the bare loop: every Bash
command prompted, no checks — and the first thing they did about it, Auto-approve: yes, ran into
a judge configured for a local model nobody had (Judge: command, Ollama on port 11434), so the
start reported a broken judge instead of fewer prompts. Flipping Checks → Enabled: yes fired all
eleven modules, including two that need an attack-surface map and three that need network or
tools, and the first commit died under findings the user could not place. The config’s comments
explained every key; nobody reads 490 lines of comments before the first run.
Since 1.0 the launcher asks instead of assuming, once, in the order a human can follow:
recommended is the ENTER answer: judge in
rules mode (no model, so nothing can be misconfigured; provable reads stop prompting,
everything else still asks) and the basic check tier (secrets, weakenings, weakened tests,
hygiene — no network, no tools, no map, so no finding the user cannot act on). minimal is the
pre-release default; full adds the standard tier and the questions about integrations, visual
artifacts and telemetry.pyproject.toml,
package.json, Cargo.toml, go.mod, …, one level down in a monorepo) and turns into the test,
lint and typecheck commands the launcher’s validator insists on; git init is offered when the
directory is not a repository; the optional tools (gitleaks, semgrep) are mentioned once, in
the wizard, instead of as a warning on every start.### <check> blocks present under ## Checks;
the engine keeps the user’s edits inside a block it keeps and takes missing blocks from the
template; the config merge at startup already respected removed blocks. No new state, no new
parser, reversible from the --setup menu.templates/setup/configure.py does every edit
deterministically and prints one line per change; wizard.sh only asks. That is what makes the
wizard testable without a terminal (tools/test-setup.py drives it through a pty) and lets a
CI run apply the recommended profile silently.APP_FLOW.md and ux_ui/LINKS.md are inputs
of the visual-artifacts module and appear when that module is turned on; before, every project
started with three “unfilled template” markers, two of them irrelevant to most projects.Telesma starts from a specification and an empty directory. A project that already exists — built
by hand, or with an assistant used the ordinary way — has neither telesma/spec/ nor a plan, and
the obvious worry is that Telesma would plan the next feature without knowing the stages the code
went through or the decisions taken along the way. The question was what to reconstruct, and from
where: the commit and pull-request history, or the code.
What decided it is what the loop actually reads (§1, §8, §9). After a few phases a project built by
Telesma looks to the model exactly like one built by someone else: the code, git, and a
distillate — PROJECT_CONTEXT.md plus the spec behind its index. Completed phases collapse to
their ids, the task history rotates to an archive nothing loads, DECISIONS.md is grepped, never
read. A task history rebuilt from commits would therefore be read by nothing, verified by nothing
(no acceptance criteria, no test that belongs to the task) and, in telemetry, would pass for
Telesma’s own work. What an adopted project lacks is the distillate and a baseline. Code is the
truth about what; git is the only source of why, and a cheap one.
telesma.sh --adopt builds exactly that, in two starts:
.gitignore first), a clean tree, so the baseline is a commit (Adopted at in
config.md); then the setup wizard with its stack detection, as on any first start. On the next
start: the full suite once, written into REPORT.md → Test status as a dated run paragraph
(Baseline at adoption … GREEN|RED) — the loop later compares against this state, not against
zero, and a test red at adoption is an inherited failure, not a regression (section 2 of the
instructions); one dry run of the quality checks over the whole repository when they are on,
summarised in the Problem log — hygiene and secrets light up on an old repository, and the owner,
not the first task, decides what is a false alarm; a git digest (tools/telesma-survey.py:
tag scheme, reverts, churn, fix density per file, dependency changes, documentation and CI
present, test ratio, TODO count — counts and paths only, never an author or a commit subject)
as a SURVEY: block in the prompt, like VERSIONS:; and ### Phase 0: Existing system in
PLAN.md with one task per part of the code, from the same tool.SURVEY.md, section -3): a task reads
one part — tests first, because test names are behaviours, then the public surface, then a
sample — and appends a ## <Module> section to telesma/spec/AS_BUILT.md: When …, then …
lines, each pointing at path:lines and tagged [verified by test: …] or [inferred]; rows
to PROJECT_CONTEXT.md; open questions at the end of the file; tick; commit. The loop form
gives resumption and /compact for free and lets the owner strike a part they do not care
about. The session runs with permission mode default and an Edit(telesma/**) allow rule (Edit rules cover every file-writing tool)
only: in pipe mode a write anywhere else is a question nobody answers, i.e. refused — the one
restriction that makes “the survey changes no code” a property of the run, not a hope. The
project’s own CLAUDE.md loads as always; the survey records its conventions in
TECHNICAL_GUIDELINES.md, which win over the defaults.AS_BUILT.md where the survey guessed, put into
telesma/spec/ what should happen next, and a plain start runs the clarification unchanged
over all of it. Its one branch for Adopted: yes: AS_BUILT.md is indexed like any file and
its open questions become assumptions or questions; Phase 0 stays as it is and the plan starts
at Phase 1; there is no “architecture skeleton” task; a red or absent baseline proposes a
characterisation-test safety net first; ## Spec coverage says exists — 0.N for what nothing
changes. Modes 2 and 3 work right after the survey, before any plan exists — the first tangible
value of an adoption.Deliberate limits of the first version: the survey samples (the confidence tag per line is what
makes that honest); AS_BUILT.md is frozen with the rest of the spec and describes the system at
Adopted at — later changes live in the plan and telesma/changes/, as in any project; a tag
scheme other than v* is named in the digest, but the launcher still counts only v* tags as
releases; the beginner path (--new) has no adoption variant. No structural token was added
beyond the two Adopted fields in config.md and the new spec file, so no parser changed; the
telemetry state event carries an adopted flag so that adopted and greenfield projects are
never compared as one population.
The first outside-in audit (2026-11-10) read the three mechanisms that supervise the agent — the permission judge, the quality checks, the protection of their own configuration — as an attacker would, and as a careless model would. The evaluation gate was green the whole time: 0 false allows on 220 dangerous cases. Twenty-nine commands outside that set were allowed by the rules alone.
What was wrong was not a rule but the reading. Each mechanism parsed shell text on its own,
with regular expressions, and each differently. A << inside quotes was taken for a heredoc and
the following lines — rm -rf src, sudo … — dropped as data. A heredoc body with $(…) was
dropped too, though the shell runs it. A blocklist of options missed their abbreviations
(sort --outp=). The checks computed “what this commit contains” from the literal arguments of
git add, so git add -u, a glob, or a message with one odd quote left the scan with nothing to
scan — the last one by accident, in the commit form Claude Code uses every day. The rule that
followed: what the parser cannot read is a question (judge) or a refusal of the shape (checks),
never a pass — and allowlists of exact options replace blocklists wherever a command is called
a read.
A gate measures its own set. Rules were tuned on the same 324 cases that gated them, so “zero
false allows” was in-sample. There is now a held-out file that no rule is tuned against (it found
28 allows in the old judge on its first run and none in the new one), and a mutation test that
respells every dangerous case — quotes inside the command word, git -C ., an assignment prefix,
a wrapper, an abbreviated option — and requires that no respelling is allowed. It found one more
miss on its first run.
The committed config was executable. telesma/config.md travels with the repository, and it
held commands the launcher ran at start (cmd: keys, the adoption baseline), the permission mode
and the endpoints. Cloning a project was enough to run its author’s command. The fix is the
direnv allow idea: a per-machine record of the hashes of the executable sections; the launcher
shows what is new and asks once, and it is the only writer. The hook, the telemetry tool and the
lint-types check only read the record, each with its own copy of a ten-line hash — the hook is
copied into projects and cannot import anything. The per-machine telemetry opt-in had covered the
shared hub only; a custom endpoint now needs the same confirmation.
The supervised could edit the supervision. Exceptions, check modules and the config were
protected by matching file paths in tool calls; an interpreter one-liner or a path in another
letter case went around it, and approved commands were generalised into wildcards
(Bash(python3:*), Bash(find:*)) that were then committed for the whole team. Path comparison
is now by real path and case-folded, the generalised families no longer include anything that
runs code or deletes, and the launcher compares the installed hook and checks with what it
delivered and says so at every start when they differ.
Documentation is part of the contract. Four guarantees in SECURITY.md and CLAUDE.md did
not hold as written (own-server telemetry without a per-machine step, checks printing the first
characters of a password, exceptions writable without a question, repair deleting additions).
Each was either made true or rewritten to say what the code does, and SECURITY.md gained a
section on what Telesma does not protect against: there is no sandbox, and instructions to the
model about untrusted text (section 0.7) are a mitigation, not a boundary.
Deliberately left for later, because each changes how the loop behaves or what it costs: a
sandboxed run, a session budget, an independent verifier before a task is ticked, parallel tasks
in worktrees, a git-native pre-commit hook (it collides with a project’s own hooks), and
splitting the launcher’s Python heredocs into tested modules. (1.4.0 took up the sandbox and the
session budget: §23 and §24.)
next and doneThe audit of §22 had one root: the model ran git add / git commit itself, so the checks had to
guess from the text of a command what would be committed, and every bypass found was a new shape of
that text. The task history row, the number of tries and the test result were written by the one
being measured. Since format 21 the model decides when a task is finished, and a script decides
what happens then (tools/telesma-task.py):
next chooses the task with the code the launcher’s hint uses (tools/telesma_state.py), prints
it with its - AC: lines, the spec fragment of its (spec:) tag after checking every range
against its anchor (a shifted range is found again and the index corrected — procedure 0.1 step 4
was the step most often skipped), the guidelines in full the first time and on a change of tags,
the UI fragments and the change request. The terminal states — complete, blocked by dependencies
or an inactive phase, a missing guideline, only ⛔ left, change requests pending — are its
answers, not the model’s judgement. It reserves the task in .git/telesma-task/session.json.done takes the files from git status (minus Ignore on commit and this machine’s files),
runs lint / tests / smoke only from a ## Tests section confirmed on this machine (a run with
0 tests is a failure), writes the tick and the row, runs the commit-point checks on exactly
those files (telesma-checks.py --files-commit), commits and records the evidence
(--record-commit), so the PostToolUse hook has nothing left to verify after the fact. A refusal
restores PLAN.md and REPORT.md and counts a try.commit --kind changes|regression|survey|bugfix|review is the same without a tick.Why an explicit command and not a hook: the Stop hook does not fire per task in a continuous
session; a hook on the tick in PLAN.md would run minutes of tests inside a hook timeout, with the
result poorly visible to the model; a claude process per task gives the cleanest trigger but gives
up the continuous session (kept for later). The script runs from the Telesma clone, never copied
into the project, and its allow rule is given per session with --allowedTools: written into
settings.local.json it would sync into the committed config with a path of one machine.
suite is the full suite when one is due — after the last task of a phase, after a processed
change request. It writes the dated Test status paragraph and the metrics, commits them, runs the
phase checks and places the telesma/phase-<id> tag on green; on red it records a regression,
and next issues that regression instead of a task until the suite is green again. An adopted
project whose baseline was red is held to the baseline’s number of failures, not to zero. The full
suite is a separate command, not part of done, because the Bash tool stops a command after ten
minutes: tests of the task plus a full suite in one call would not fit on a larger project.changes issues the next change request (critical first) with the spec lines its affects: names
and the lines of the decision sources that share its words, verbatim with file and line — the
paraphrase from memory of §6 is not possible when the quote is on the screen. changes-done
refuses a plan edit that flips a checkbox, leaves a new or changed task without (change: <file>)
or names a dependency that does not exist; otherwise it writes the Change history entry with the
task lists read from the plan, moves the file and commits.
The “code only” guard (tools/telesma-guard.py) closes the other way round: a PreToolUse hook,
registered on every start independently of the judge and the checks, refuses git add / commit
/ tag (other than a release version after the person’s yes) / push / pull / merge / rebase / reset
of a ref / revert and the rest of the history writers, gh writes, a tick or untick in PLAN.md and
edits of Task history, Test status and Change history. Every refusal names the command that
does it. It reuses the checks runner’s command parsing, refuses what it cannot read when a git
write is mentioned, and lets the call through on an internal error — it keeps a careless model on
the scripted path, it does not make a determined one harmless (a script it writes and runs is out
of its sight; the evidence and CI are the verifying layers).
The session budget (## Telesma loop) is counted by the same script: refused done per task,
handouts of the same task by next, finished tasks and hours per session. The launcher takes the
limits once (session-start), so an edit during the session changes nothing until the person
starts the next one. Past a limit the script writes BLOCKED.md and marks the session, the guard
lets through only reads and BLOCKED.md, and the next start asks the person whether to go on. A
tool-call counter (PostToolUse) only warns at 150 calls on one task: a hard threshold waits for
the distribution from real sessions. A cost limit in money waits for a live check of
--max-budget-usd in an interactive session.
release vX.Y.Z creates the release version: it refuses a dirty tree, a missing scenarios file,
an existing tag, a blocking release check, and code changed since the last green full suite on
record (state notes and the scenarios file may land in between). The guard answers the command
with ask whatever the allow rules and the mode — the one place where Telesma adds a question on
purpose — and with a refusal in bypassPermissions / dontAsk, where the question would reach
nobody. Before, the invariant was an instruction plus a parser of git push; in auto nobody was
asked at all.
Repository: github the same commands do section 17 (tools/telesma_github.py): next
reconciles with gh pr list, merges by squash when the required checks are green (a missing one
is pending, never green), re-points a chained successor before the merge and rebases it after,
hands out a red PR as a fix on its own branch with a counter, and says WAITING at the PR limit;
done pushes the task branch and opens the PR. Task PRs carry the task’s work only. The first
version put the tick and (pr: #n) into each task PR, and the test with a fake gh showed what
that does: two parallel PRs touching neighbouring plan lines conflict at the second merge. Now
what GitHub says is derived on main (ticks, (pr: #n) by the PR title, history rows, the phase
run) and committed by one state PR after the phase regression, when nothing parallel is left to
collide with. Every other commit goes through its own PR; next waits for a changes or
regression PR, because main does not hold it until it is merged. What stays the model’s is a
rebase conflict (it edits the files, next continues the rebase) and the fix itself.What it does not do yet: the default allow rules for git add / git commit and the task-branch
push rules of the GitHub integration are still written into new configs; the guard refuses those
commands anyway, so they are dead weight to remove with a migration.
Everything before this section guards by reading: the judge reads a command’s text, the checks read
a diff, the guard reads the shape of a git command. A wrong reading runs with every right the
person has. Claude Code’s built-in sandbox (Seatbelt on macOS, bubblewrap on Linux and WSL2) does not
read anything — Bash and what it starts write only inside the project, the extra directories and
$TMPDIR, and reach the network only through a proxy with a host list. Format 22 writes it from
## Sandbox (templates/setup/sandbox.py) into settings.local.json on every start, after the
mode is final.
The fixed values come from a live probe (2026-11-12, Claude Code 2.1.322) on a project the loop had just built:
allowUnsandboxedCommands: false. A write to ~ was refused by the sandbox, and the model
immediately retried the same command outside it. In a chat that reached a question; for the task
tool, whose session allow rule matched, the retry ran without one. Without this switch the
sandbox is one extra question, not a boundary.autoAllowBashIfSandboxed: false. The questions and the judge stay; the sandbox is under them.
Reading the rest of the machine plus one allowed host is still a way out, so removing questions
waits for measurements.strictAllowlist in the autonomous modes. An unknown host (files.pythonhosted.org during
uv run) opens a question; in mode 1 nobody answers it. The hosts therefore come from what
Telesma knows: the stacks (manifests, or the plan’s (tech:) tags before the first manifest),
the checks (registries, OSV) and the GitHub integration; Allowed hosts adds the rest.uv refused to start because ~/.cache/uv is outside the
project; the model worked around it with a cold cache in $TMPDIR. Each stack’s cache
directories are allowed; CORE.md §5 forbids moving a cache to get around the boundary.denyRead on ~/.config/telesma; the task tool runs through
Bash, inside the sandbox, and reads the trust record from there. With the GitHub integration
~/.config/gh stays readable for the same reason. The person’s keys (~/.ssh, ~/.aws,
~/.gnupg, ~/.netrc, cloud configs) are not.~/.zshenv incident) dropped HTTPS_PROXY and failed on DNS; general.md keeps the proxy
variables on the list.Measured cost: 1.58 s against 1.44 s for the same 94 tests with a warm cache — the sandbox is not a
reason to keep it off. Existing projects get Enabled: no through the merge and a one-line tip;
a config the launcher creates starts with yes where the sandbox can run. Native Windows has no
sandbox: yes warns, required stops the start. Enabled: no removes the key only while it is
still exactly what Telesma wrote, and on every update the hosts and paths the person allowed in
Claude Code stay (.git/telesma-task/sandbox.json remembers which values were Telesma’s own).
Telemetry from four projects (195 tasks, format 23): no session used a subagent, so the model
that wrote a task also wrote its tests and judged both; on the reference project about half of the
historical bugs were found by the owner or in production, all under green suites. ## Review
(tools/telesma_review.py, off by default) puts a reader with no stake between “tests pass” and
the commit. The idea of a reviewer without the conversation’s history, and three of its rules, come
from Google’s elephant-goldfish model (which reviews design documents, not diffs):
not run, in the commit message and the log —
never counted as “no findings”, and never a refusal (the rule of the checks for the network).What is Telesma’s own:
done sends the package and reads the
answer, so the author’s only ways through are a fix or a recorded answer.Reviewer: api is any OpenAI-format endpoint, so the reviewer can come
from another provider and err in other places; Reviewer: claude is a separate headless session
without tools, started outside the project so that its hooks and CLAUDE.md are not part of it.major, not blocker. Whether the diff alone is enough is the first thing to measure.
Measured by replaying one project’s history (106 task commits, the diff of each as done would
have sent it): a budget model (Gemini flash-lite) refused 5, of which one was a real omission
(a file the task named and the commit lacked), one a deliberate departure from the plan’s wording
and three wrong — all three about code that existed outside the diff. None of the eleven tasks
that later needed a bug fix was refused for that bug: those bugs lived in hardware, in a missing
package or in test timing, not in the diff. A stronger model (Claude Haiku, 17 of the tasks)
found real defects the budget one missed (a password sent over plain http, tests that pass
without the code they name) and wrote 13 blockers and 94 majors where the budget one wrote 5 and 3.
So: the diff-only review catches “the task said X and the diff has no X”, not behaviour, and the
choice of model moves the line between silence and noise more than anything in the prompt.Max diff; never a file
git does not hold, so a task that names .env sends no keys), what the tests said when the script
ran them, and the other half of a Task / Test: pair from the plan. A weak test is major unless
the item under review is itself a Test: item. Replayed on the same 17 tasks: Haiku went from 13
blockers and 94 majors to 6 and 64, and the six are about the code (a password over plain http,
two missing .env.example entries, a parameter never passed); the budget model went from 5
blockers to 1 and lost the one real omission it had found — given five times the text it reads
less of it. One wrong blocker survived in both (“no test for X in the files shown”). A review
costs about 0.06 USD with Haiku at the default Max diff, four times the diff-only one.Max diff, so every frontend task would have been not run.Max refusals per task, so a dispute ends in BLOCKED, not in a loop.Not measured yet: how many real defects a reviewer finds on diffs alone, and how many blockers are
false. The log (.git/telesma-review/reviews.jsonl) holds outcome, findings, time and tokens for that.