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.
90%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Medium
Suggest reviewing before use
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,
setting up automations in Tessl, and
what an automation can use:
events, conditions, concurrency, and action and environment settings beyond
the starters'. 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.
In the same way, on a public repository, or one whose visibility cannot be
read (read it as Public repositories
says), look for Tessl Reviewer in its triggers: a
shepherd-pr-review-by-reviewer trigger, or
{{ github.tesslReviewerApp.userId }} in the sender list of another
github:pull_request_review.submitted trigger, usually shepherd-pr-review
or that key with a number added, which a Loop moved from Tessl can carry.
Either lets a Code Review review start the shepherd, and anyone who can
comment can ask for one with @tessl-code-review. Say so and offer to remove
it: the whole shepherd-pr-review-by-reviewer trigger, or only the Reviewer
from the other trigger's list. Remove it only with a yes.
Apply Regional setup before reading integrations or adding automations. In the EU, offer GitHub issue sources and skip Linear.
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. Pass
--workspace <workspace> to tessl launch models, with the workspace this
project's environment belongs to; the repository root does not supply it.
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 first, as above, then add
their ID as below. For a
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 }}: on a private or
internal repository, leave it as it is; on a public one, offer to remove it,
as above. 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 --workspace <workspace> --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), --review-label tessl to review
only the factory's pull requests, those with the tessl label the factory
adds to every pull request it opens (fewer credits, because fewer pull
requests are reviewed), --no-review-label to review every pull request
again, or --no-review-enabled to turn it off. With the label, tell the
person that adding tessl to any pull request asks for a review, and that
mentioning @tessl-reviewer in a comment asks for one without it. 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. The repositories it can reach are a separate change, below. Then check the key name appears in environment view. To remove
one key, tessl environment update <environment> --remove-key <name>
keeps the others.tessl.json lives, and a different home is a new project, not
this change. Nothing goes in tessl.json and no pull request is needed. The
edit is to the project's default environment only: the settings and access
Loops use unless they have their own environment, and, for a multi-repo
factory, the one that decides which extra repositories can send GitHub events
to the factory, subject to each Loop's triggers. A Loop's own environment
replaces the default for that Loop's runs and does not change which
repositories the factory listens to. Use those words with the person. Do it in
this order, stopping where a step refuses:
multiRepo as
What the plan says
does, and tessl api /v1/projects/<project id>/repository-reach for the
defaultEnvironment, crossRepositoryRouting, and what worksOn and
listensTo hold now. When enabled is false, say the organization
cannot add repositories and offer no addition; removing a repository
that is already granted still works. Adding or removing needs
environment.write on the organization, so an org admin; otherwise name
who must do it.defaultEnvironment is null
there is nothing to edit: send the person to the default environment
section of the project's settings page in the web app to choose a suitable
bound environment, offer no other picker, and stop until they have.tessl environment view <default> --json
gives environment.id, environment.attributes.orgId, githubRepositories,
boundProjects and usage.loopCount. A repository to add must be private
or internal, in the home's GitHub account, and reachable by the Tessl App
(Which repositories); a
run that lists a repository the App cannot reach fails to start. When
boundProjects holds another project, or the environment is the default
of other factories, name them: the change gives all of them the same
access, so make it only on a yes that names them. Say which of the
repositories to add the environment already lists.tessl schedule view <loop id> --json, or the loop-environment entries
in worksOn). They do not gain the repository through the default. Name
them as the gap. Never change their environment, clear it, or add a
repository to it, even when asked to make them match; that is a separate
change the person starts for that Loop.crossRepositoryRouting is true, and still need a
matching trigger), then wait for a yes. A no, or no answer, changes
nothing. Removing the last entry sends an empty list, which clears them
all: say so.tessl api -X PATCH /v1/orgs/<org id>/environments/<environment id> --input <file>
whose body is only {"metadata": {"githubRepositories": [<the new list>]}}.
The list replaces the array and every other setting and key is kept. Never
use PUT or --env-file, never send setEntries, and never read or
print a key's value. On a 409 the environment changed meanwhile: do this
step again from the read. When the call is refused with a 4xx response,
report that nothing changed and why, and do not describe the new scope.
When it fails any other way or no response arrives, do not say whether
it changed: read the environment as in step 7 and report what it lists
now.tessl environment view: its
githubRepositories holds an added repository and no longer a removed
one. Then read repository-reach again and report what the factory
reaches now: which added repositories are under worksOn and which under
listensTo. worksOn is not the check that the edit landed, because other
environments can grant the same repository. Say what is still missing: an
added repository not in listensTo because crossRepositoryRouting is
false, and the Loops with their own environment that do not have it. The
home repository and the ticket intake are unchanged. Do not say every
automation now works across the new set, and do not say Code Review covers
an added repository until it is on, as
Code Review says. Undo reverses
just that edit against the environment's current list, as in step 6;
never write back the old list.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.