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.
91%
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
A factory is a set of automations on a repository. Each one is a rule: when something happens (a ticket is handed to Tessl, a pull request gets a review), a Tessl agent runs in the cloud and does one job.
Your job is to set up the same factory the Tessl web app sets up, without asking the person to make choices, then offer the extras only an agent that can read the repository can recommend.
Setup is done when the repository has a Tessl project; Ticket to PR is on; Code Review is on, or the person chose not to install its app; the person has had the "Your factory is live." message, the first-ticket offer and the suggested next steps; and every step they accepted is done.
Read where things stand, take the first situation that applies, do its next action, and look again.
tessl whoami
fails, ask the person to run tessl login and wait. A newer CLI build is
not a reason to stop: mention tessl cli update once in the live message.If what you find fits none of these, say what you found and ask.
ws-; with one
workspace, say "your Tessl workspace".webUrl (Browser links),
as a plain URL. Add onboarding=true to every link on the Tessl web app's
host: ?onboarding=true, or &onboarding=true when the link already has a
query. Links to other sites, such as GitHub, stay as they are.tessl init, no tessl.json, no commit. Afterwards, change it only for an
extra the person accepted, and ask before each push and merge.Keep setup in the person's Tessl region; follow Regional setup before login, project discovery, or integration checks. In the EU, use GitHub issues and skip every Linear check and offer.
--org <org id> to tessl code repo and --workspace <workspace> to
tessl integrations show and tessl launch models, so none falls back to a local or default
one.tessl code repo list, not tessl code repo view, until the repository
is listed), a file check before a command that needs the file
(tessl.json before tessl project repair), and what an earlier step
told you over asking again. The commands below are written in that form;
keep to them. When a command still exits with an error, handle it from
what it printed, take the situation that applies, and tell the person the
next step, not the error. Something they have to do themselves, such as
tessl login, is a next step, not an error.tessl.json, with any Learn from past work Loops, in one pull request, and
change there. Set up
automations in Tessl has the calls.tessl org list --json gives each
org's usage.credits.state (ok, over_budget, unlimited, or
unavailable) and, for ok and over_budget, usage.credits.remaining
and usage.credits.blocked, which is true when runs cannot start; usage
is null when it could not be read.tessl api <path> calls the Tessl API with the person's login; send a body
with --input <file>.gh repo view --json nameWithOwner,isFork,parent,visibility gives the
repository, once git remote -v shows a GitHub remote (situation 3
otherwise). A fork gets its own factory, not its parent's.AGENTS.md,
CLAUDE.md), and its review history. Use what you find when offering the
first ticket, and save the other recommendations for the suggested next steps.tessl org list --json: the only one; otherwise the one
that already has a project for this repository; otherwise the one whose
Tessl App can see the repository
(/v1/orgs/<org id>/integrations, then
/v1/orgs/<org id>/integrations/<integration id>/repositories?scope=account&q=<repo>);
otherwise ask which, by name. When its usage.credits.blocked is
true, say once that runs will not start until it has credits, and carry
on.tessl api '/v1/orgs/<org id>/projects?filter[q]=<owner>/<repo>' and take
the one whose sourceUri names <owner>/<repo> on github.com and whose
repoSubpath is empty. Projects store the same repository in several
spellings (github.com/<owner>/<repo>, https://github.com/<owner>/<repo>,
www., .git, any case), so compare case-insensitively after dropping a
leading https:// or http://, www. and a trailing .git. filter[q]
also matches names and other repositories, so match those two fields
yourself. When more than one project matches, take the one whose
sourceUri is exactly github.com/<owner>/<repo>; otherwise the one whose
loopCount is above 0; otherwise ask which, by name.tessl api /v1/orgs/<org id>/workspaces: the only one, or the one the
person names) with tessl api -X POST /v1/projects --input <file> and
{"workspaceId": "<workspace id>", "name": "<repo>", "sourceType": "git", "sourceUri": "github.com/<owner>/<repo>", "repoSubpath": ""}. When
the name is taken, add -2, -3 and so on./go/projects/<project id>, on the host the other commands' webUrl
values use (such as https://tessl.io), saying it is the repository's home
in Tessl, where its automations and runs will show. The create call
returns no link. A refusal
about permissions: check permissions and ask
for exactly what is missing.tessl api /experimental/projects/<project id>/factory/helper-access gives
data.attributes.status: accessible, missing, or unavailable (Tessl
could not check; try again shortly). When it is missing,
give one link from tessl integrations show github-app-agent --json, as
Browser links says, and say it asks for read and write
access so agents can comment, push branches and open pull requests. Wait until
the person says it is done, then go on to Ticket to PR: this check keeps
answering missing for up to five minutes after access is granted, and the
Ticket to PR call refuses with "Connect the Tessl App to this repository" while
access is really missing. When it refuses, say the access can take a few
minutes to show, and try again.
Check both before Ticket to PR is on, when starting and when resuming.
gh repo view --json isEmpty gives true when nothing has
been pushed to GitHub; commits only in the local checkout do not count.
Say "A factory needs existing code to work on. Push a first commit to
GitHub, then run setup again." and stop. Turn nothing on and do not push for them.meta.issuesEnabled from
tessl api /experimental/projects/<project id>/factory/implement/github-issues.
When it is false, say "The factory can't pick up GitHub issues here. Turn
Issues on, or use Linear for issues." and offer to turn Issues on for them.
Change nothing without their yes in this session. With a yes, run
gh api -X PATCH repos/<owner>/<repo> -F has_issues=true and check again.
When they say no, gh is not logged in, or the call is refused, give
https://github.com/<owner>/<repo>/settings and wait until they say it is
done, then check again.issuesEnabled is null, or the
command fails), say you could not check it and go on.Read visibility from gh repo view before the first call that sets up Ticket
to PR, when starting and when resuming. A private or internal repository skips
this section. For PUBLIC, or when the visibility cannot be read (say it is
unknown; never assume private), say before activating anything:
tessl.json.Then ask "Continue with these defaults?" and wait for an explicit yes. Without one, set nothing up and say how to resume.
Turn it on as Ticket to PR says. The
issue source in the EU is GitHub issues with the tessl label. In the US,
use Linear when its connection has a team routed to this project
(Linear prerequisites); otherwise use GitHub issues
with the tessl label. Do not ask. When the project already takes tickets,
setup refuses; say which Loop does and stop. Confirm the Loops setup reported
(four, or three on a public repository) are listed and active.
tessl code repo list --org <org id> --json lists the repositories the Tessl
Reviewer app can see; the repository is the entry in repositories whose
fullName is <owner/repo>, compared ignoring case. When two entries share
the name, use the one on the owner's account, and pass its id instead of
the name below. When its review.enabled is true, leave every setting as it
is. When there is no entry, the Tessl Reviewer app cannot see the repository:
give the webUrl from tessl integrations show github-app-code-review --json,
say it reviews every pull request, including Tessl's, and that the person can
say to skip it; wait until they say it is done or to skip, then list again. An
entry whose attentionReason is not null is one the app cannot write to:
give its installation.manageUrl to fix the access, and wait the same way.
Then turn it on to review every push:
tessl code repo update <owner/repo> --org <org id> --review-enabled --review-trigger every-push,
and confirm with tessl code repo view <owner/repo> --org <org id> --json. A
refusal, of the list or the update, needs an organization admin; say so and
carry on without it.
One message that starts "Your factory is live.":
/loops added), using the issue source the Ticket to PR plan
reported (issueSource): "Add the <label> label to an issue and Tessl opens a pull
request for it", or for Linear, "Delegate an issue to Tessl and move it to
an unstarted status, usually Todo. An issue in Backlog or Triage will
not trigger action by the factory until you move it to an unstarted
status". An unstarted status makes the issue eligible to start; an
unanswered Tessl question or an open blocker still holds it.usage.credits.remaining, when it has
that field.tessl.json in the repository with one pull request, and from then on they
change them there.Offer it as The first ticket says: a few of the open issues the web would offer, and a useful starter issue you propose from the checked-out repository. Giving Tessl a ticket starts a run that uses credits, so this is the one choice in setup; when the person declines, say how to give it one later and go on. When they pick one, follow its run as Testing the factory says, and send the suggested next steps while it runs. Report only what you saw: the run starting, its pull request, or what stopped it.
One message under the heading "Suggested next steps". Open with one line: the factory is doing its job, and these steps make it better at this repository. Then at most three steps as peers, each ending with what it gains the person, not with a caveat. Learn from past work always comes first; suggest the others only when the evidence from the repository supports them, and give that evidence:
.tessl/cloud-launch-setup.sh
would install, so the next run builds and tests like CI does. If accepted,
write it as the setup hook reference says, on a branch with a pull request,
check it on a cloud machine before the merge as Check the setup hook in the
cloud says, never by running it here, and ask
before pushing and merging.End with one question that assumes a start: which step to begin with, and which one you would begin with now. Do not call the steps optional, and do not offer "none"; a person who wants to stop says so, and then leave it. Add one line on what else they can ask for later, such as other automations from the starters.
Say the plain words. When a command, link or screen shows a Tessl term, say what it means in one line, once, at that point, and only when it bears on what the person does next. Plain words has each line.