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
The factory has one home repository, the project's. Its Loops can also reach
additional repositories. Environments carry that access: an environment lists
the repositories its runs can reach. The project's default environment also
decides which additional repositories' GitHub events reach the project.
Nothing about it goes in tessl.json, and no commit or pull request is needed.
This is part of the existing setup conversation, not a separate flow.
multiRepo as What the plan
says does, and say what the organization can do.
enabled and canGrant belong to the organization, so before a new
project exists read them from the plan of a project the organization
already has. When no plan can be read, say the choice is unknown until the
project exists; do not offer it before then.multiRepo.enabled is false and nobody asked.Offer this only when the person wants more than one repository, the project is
new, and multiRepo.enabled is true (and canGrant, when the person is not an
org admin: otherwise say an org admin must set it up). When enabled is false,
say multi-repository setup is not available for the organization and do not
offer a dedicated home.
gh repo create. Add no Tessl API for it.<product>-factory; the person can change either.gh repo view <owner>/<name> --json visibility). When that fails, say what
failed and stop; never go on with an unverified home.Read data.attributes.multiRepo from the plan.
The API enforces every rule; use the plan to decide what to say.
enabled false: the organization does not have the feature, so the
factory works on its home repository only. When the
person explicitly wants additional repositories, say setup of that kind is
not available for the organization and stop; do not set up a single-repository
factory instead unless they then ask for that. state and conflict mean
nothing then: fresh does not show the project has no shared configuration.enabled true and canGrant false: choosing additional repositories needs
environment.write on the organization. Tell the person an org admin has to
do it, or has to be the one to set it up.enabled true and state is shared or conflict: the project already
has a shared default or environments of its own. Tell the person what
environmentName, repositories and conflict report, and that setup will
not replace or widen them. Then judge whether it fits, as When the project
default does not fit says.Judge the default against the repositories the person chose for the first Loops, from what the records show; do not guess.
state shared, repositories lists what the default reaches; a
chosen repository missing from it is a gap. The plan shows no access level:
read the default's githubAccess and linearAccess with
tessl environment view <environmentName> --json, and name a permission
gap only when that read or a setup refusal shows one. When the read fails,
say its access is unknown, not that it fits.state conflict, repositories is always empty and says nothing;
the conflict message is the gap. Setup refuses any additional repository
while it stands.Then:
state is conflict. Never send the setup call with the gap in it;
choosing fewer repositories clears only a repository gap.
state shared and
the default's access fitting, offer an environment for that Loop alone
and leave the default and every other Loop as they are. Setup cannot
choose a Loop's environment: run setup with only the repositories the
default already lists, say which chosen ones wait until then, and after
setup give that Loop its environment through
change-factory.boundProjects), and what
changes in Works on and Listens to, or in its GitHub or Linear
access. Change nothing without a yes that names those Loops and
projects. On a yes, make the edit first through change-factory: its
repository change for a missing repository, its access change for
differing access. Then read the plan and the environment again, and run
setup with the full choice only once the plan is shared, lists every
chosen repository, and the access matches.state conflict, no edit of an environment's repositories or
access clears it: it comes from what the project is already configured
with, such as a default that is not the factory's or Loops that run
without one. Say plainly that setup cannot include the other chosen
repositories while it stands, and name the conflict message as what
blocks them. Offer to run setup with only the project's repository, and
do not promise that a later change will add the others: with conflict
there may be no default for change-factory to edit.environment.write
on the organization, a refusal): change nothing. Say why, and give the safe
next step: an org admin edits the environment in the web app (Settings,
Environments), or the person continues with the default as it is.This is only the setup conversation. Make no environment write from this section; an edit goes through change-factory. Do not grant repositories in bulk or expand access without a yes.
Keep every call in the region Regional setup selected. When the
plan has no multiRepo object there and the person chose additional
repositories, report that the feature is not available in that region instead
of trying the POST. Home-only setup goes ahead as usual.
Add "additionalRepositories": ["<owner>/<name>", ...] to the POST body only
when the person chose additional repositories, listing only those; the home
is always included. Omit the field otherwise, even as [], because the API
refuses it when the feature is off. Everything else in the body stays as
Ticket to PR says. The repositories must be
private or internal, in the home's GitHub account, and reachable by the Tessl
App.
Tell the person what you observe in the answer and the Loops list, such as which Loops were created, and nothing more. Do not say a cross-repo ticket works, and do not say Code Review covers an added repository until Code Review has shown it on.
Refusals, in plain words: