Set up, understand, and change a Tessl factory on a repository: pick automations that fit how you work, such as shipping tickets as pull requests, answering reviews and fixing checks on those pull requests, code review, and scheduled jobs; prepare the repository for agents; write issues for the factory to build; then see what the factory has done, find out why a run failed or never started, and change or extend it.
92%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Low
Low-risk findings worth noting
Make the change the person asks for to the factory on this repository, or
suggest what to add, and leave the factory working afterwards. Every change to
tessl.json goes through a branch and a pull request, and reaches the
automations only once it is on the default branch. Automations set up in Tessl
directly change at once, with commands.
tessl.json or the hook is on the default branch, or in an
open pull request they can merge, and you gave them its link. A setting
change, or a change to a Loop set up in Tessl, shows its new value in the
matching view command.tessl.json: you checked the
Loops, as below.tessl.json.tessl.json,
every other trigger, and every stored environment key as it is.tessl doctor --automations reports the configuration valid before you
push. When the setup hook changed, the cloud check, which runs on the
pushed branch, has passed before the change is merged.The factory-setup skill's references hold the starters, trigger entries, setup-hook guidance, cloud check, Loops check, and skill edits this skill uses: starters, triggers, setup hook, cloud check, confirm the Loops, editing a factory skill, and setting up automations in Tessl. A factory set up with an older version keeps the trigger filters it was written with: when one of its triggers lacks a filter that the triggers reference now has, such as the repository ID or an open-state check, say so and offer to add it.
Do what understand-factory step 1 does: the linked project
(tessl project repair --json), the automations in tessl.json, and their
Loops (tessl schedule list --project-id <project id> --all --json). The
project's organization is environment.attributes.orgId in
tessl environment view <environment> --json, for any environment an action
names; pass it as --org to every tessl code repo command. Run
tessl launch models --json from the repository root, so it reads this
repository's workspace.
A change to tessl.json or the setup hook goes on a branch. Check
git status first. When the uncommitted changes are the person's own work,
ask them to commit or set them aside. When they are factory configuration the
person wants kept, such as a plugin they just installed, ask whether to
include them in this change. Find the default branch with
gh repo view --json defaultBranchRef --jq .defaultBranchRef.name, fetch it,
and start a new branch from it named for the change, such as
tessl-allow-teammate. A change to a setting (Code Review, the cloud
environment) needs no branch.
A Loop whose attributes.definitionSource is app was set up in Tessl, not in
tessl.json: "ship tickets", "answer reviews and fix checks", "follow ticket
changes", "fix merge conflicts", and Learn from past work usually are. Pausing, resuming or deleting
it is a command, as Stop, pause, or change one later
says, and needs no branch. Any other change, its instructions included, needs
it moved into tessl.json first, as Move a Loop into tessl.json
says: every Loop set up in Tessl moves together, in one pull request. Once
it merges, change it like any other
tessl.json automation. Never edit a Loop set up in Tessl through the API.
Say what will change and what the person gains or loses, and ask. Then:
tessl.json automation, add their GitHub ID
(gh api users/<login> --jq .id) to event.sender.id in every GitHub
trigger that has one, as { "in": [<id>, <id>] }, so every trigger lists
the same people. shepherd-pr-review-by-reviewer names only the Tessl
Reviewer bot, as {{ github.tesslReviewerApp.userId }}: leave it as it is,
and never add the Reviewer to another trigger. The shepherd-checks-*
triggers have no sender list, because checks start them. The
github-issue-labelled trigger also has no sender list: any person, bot, or
app that can apply the tessl label to an open issue can start Implement.
Keep its label and open-issue conditions. Then check the person's access:
gh api repos/<owner>/<repo>/collaborators/<login>/permission --jq .role_name.
Adding a label needs triage or above, so with read they can comment on
Tessl's pull requests but cannot start an issue; tell the person. Runs from
Linear are started by anyone who can delegate to Tessl; nothing to change
there.tessl.json first, as above. Use only a pair that
tessl launch models --json lists; it spells claude as claude-code.
Change agent and model on the named action. Removing model runs the
listed default pair, which can be a different agent and a much smaller
model: say which before you offer it.tessl.json:
tessl code repo update <owner/repo> --org <org> with --review-trigger every-push|open-and-command (every push re-reviews the agent's fixes and
uses credits each time), --review-publication enforcing|advisory
(whether a review can approve or request changes), --review-auto-approve
(approve once its findings are resolved), or --no-review-enabled to turn
it off. Confirm with tessl code repo view <owner/repo> --org <org> --json.
Changing these needs an organization admin.tessl schedule pause <loop id>, undone with tessl schedule resume); it
needs no branch and resumes the Loop as it was. On a Loop set up in Tessl,
the other choice is to delete it (tessl schedule delete <loop id>). For a
tessl.json automation, the other choice is to remove its triggers, or its
action and everything that names it, from tessl.json, which stops new runs
once it is on the default branch. Ask which. Neither cancels a run in
progress. Before you ask, say what stops working, from that
automation's section in triggers.md or starters.md. For "follow ticket
changes": taking an issue back no longer cancels its run at once, closing an
issue no longer closes its pull request, and a reply to Tessl's question no
longer wakes the issue, so the person has to remove the label and add it
again..tessl/cloud-launch-setup.sh as setup-hook.md says, then run the
cloud check from cloud-check.md on the branch before the merge.tessl environment view <environment> --json to see its access and key
names. GitHub or Linear access:
tessl environment update <environment> --github-access <level> or
--linear-access <level>, which keeps every stored key. To add a key, send
the person to the environment's page in the web app, which adds it to the
others; never use --env-file, which replaces every stored key with the
file's. Then check the key name appears in environment view.customize.md: a small
change is an instructions string on the action, which keeps the published
skill and its fixes; a larger one is a copy of the skill in the repository,
which the person then owns. Say which, and that a copy stops getting fixes,
before you start. Write a copy's change, or a new skill for an automation,
with the write-factory-skill skill. On a Loop set up in Tessl, either one
needs it moved into tessl.json first, as above. Ask whether the change also applies to other actions
that do the same kind of work, such as the shepherd, which pushes fixes
too.starters.md and its
entries in triggers.md: create its environment when it needs its own, add
its entries to tessl.json, create its label if it uses one. To show it
working, wait until its Loop has appeared after the merge, then follow
testing the factory. Run a
scheduled one only with tessl schedule trigger <loop id>: a run started
with tessl launch skill belongs to no Loop, so Tessl refuses its findings
and the run's work is lost. When you are done with this change, give the
"Suggest what to add" list below a look for the person's next step.For a setting, or a Loop set up in Tessl, the command's own output and the
view or tessl schedule list after it are the check: skip to item 5. For a change on a branch:
tessl doctor --automations. Act on the Automation Configuration
section only, and fix what it reports.confirm-loops.md says: every
action in the new tessl.json has its Loop with every trigger. For a
removed action, check that its Loop is no longer listed; if it still is
after 10 minutes, tell the person, with the Loops link, and do not say it
is stopped.When the person asks what to add, or after you finish a change, show them
what else Tessl can do for this repository. Read the factory first, then the
last 7 days of runs from one tessl launch list pass, as understand-factory
step 2 does: enough to see patterns, without a lookup per run. Check each
feature in features, and offer only the ones that
are off and that something in this repository points to, each in one or two
sentences: what it does, what this repository would get from it, and what it
costs. Leave out a feature with nothing behind it; offering none is fine.
gh pr checks shows a canceled check as fail; read the conclusion from
gh api repos/<owner>/<repo>/commits/<head sha>/check-runs.CHANGELOG.md updated by hand, tests that keep
failing in CI. Offer it as a question, not a recommendation.advisory mode and
the default branch requires an approving review: in enforcing mode
Tessl can approve its own pull requests once their findings are
resolved. Check with
gh api repos/<owner>/<repo>/branches/<default branch>/protection (a
404 means the branch is not protected) and
gh api repos/<owner>/<repo>/rules/branches/<default branch>.Give the docs link from the features page where there is one. Ask which, if any, they want, and make it as in step 2.