CtrlK
BlogDocsLog inGet started
Tessl Logo
PluginPublic

tessl/factory-setup

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.

Quality

90%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Medium

Suggest reviewing before use

Overview
Quality
Evals
Security
Files

context-driven-actors.mdskills/write-factory-skill/references/

Context-driven actors

The principle behind a factory and the skills it runs. Read this before you design an automation, plan or review one, or write or edit a skill a factory runs.

State of the world defines behavior. An event is a reason for an actor to look, not an instruction to replay a transition someone decided in advance. The actor reads the world as it is now (the ticket, the branch, the pull request, the checks, what people said last), decides what advances the outcome, does that, and stops.

Why

The situations real software work produces cannot be listed in full. A ticket is rescoped while its pull request is open; a person pushes to the branch between two runs; a reviewer approves and then asks for one more change; a check fails for a reason unrelated to the change. A system built as a list of transitions (in state A, on event E, do X) handles the pairs its authors foresaw and does the wrong thing, or nothing, on every other one. Each pair found later becomes another special case, and the list never closes.

An agent given the outcome to reach, the invariants that must hold on the way, and concrete cases that show how to read ambiguous evidence can act sensibly in a state nobody listed, the way an engineer who owns a ticket does. Factory skill shape gives the form a skill takes to say this: what done looks like, invariants, environment facts and judgment.

Judgment and guarantees

The principle decides what the model judges. It does not replace what must hold. Where a guarantee is needed, something other than the agent's judgment holds it, and the skill relies on that rather than restating it as advice. Limits on runs and reliable code paths live in different places.

Limits on runs are held outside the agent's sandbox:

  • Permissions. What a run can read and write is decided by the access its environment grants, not by a sentence asking the agent not to read or write somewhere.
  • Concurrency. Whether two runs on the same subject can overlap is decided by a concurrency key on the action or trigger, not by the agent checking for another run.
  • Destructive operations. Branch protection or a ruleset that the run's identity cannot bypass blocks a force-push to or deletion of a protected branch, whatever the agent concluded.

A limit cannot be held inside the sandbox. The agent holds the run's credentials and can do whatever they allow, with or without the skill's scripts. A check in a script the skill ships, or a hook in the agent's own tooling, catches a mistake. Neither stops an agent that has decided otherwise, including one acting on instructions it read in an issue, a review comment or a chat message. A limit that must hold is held by what the credential given to the run can reach, by a proxy outside the sandbox that holds the real credential, which the run never receives, and checks each request, or by a protection on the system the run writes to.

Reliable code paths stay a script or a library call: reading a record to the last page (a collector, as State in factory skills describes), computing a diff, validating a schema. Moving such work into a prompt makes it less reliable, not more adaptable. A script here makes the agent's work dependable; it does not limit what the agent can do.

The agent decides what to do within those limits; the limits are not its call. Where a guarantee is needed and nothing holds it yet, an instruction the agent can follow is the start, as State in factory skills says. For a limit, a script that checks it inside the sandbox is no more of a limit than that instruction. Keep such a check for the mistakes it catches, and record what would hold the limit as a gap in your notes or issue tracker, as Taking over from what runs today says.

Cases

  • The world changes while a run waits. A run is queued behind another, and by the time it starts the pull request has merged or the ticket has been taken back. The event that queued it may no longer describe the world. The actor acts on what it finds when it looks, and adapts or does nothing. The current state is the input.
  • One subject, one lane. The first implement run on a ticket and the run that wakes it after a person answers its question share one concurrency key, taken from the ticket's identifier, which exists from the first event. The platform keeps them from overlapping, so the skill does not check for the other run.
  • A limit is held outside the sandbox. A skill that may push to a branch runs in an environment whose access cannot write workflow files, on a repository whose default branch requires pull requests and allows no bypass for the run's identity. The skill tells the agent when a push is the right move; the access blocks writing workflow files, and the protection blocks pushing to or deleting the default branch, whatever the agent concluded.
  • An allow-list in a script is not a limit. A skill's posting script refuses any channel missing from an allow-list it reads from an environment variable. The agent holds the token the script posts with, so it can skip the script and post anywhere that token reaches. The list stops a post to the wrong channel made by mistake. Where the limit must hold, it is held by what that token can reach, or by a proxy in front of the real token that refuses the channel.
  • An ordered procedure keeps its order. Rotating a key (create the new one, store it, verify it works, revoke the old one) has one correct order. A key rotation skill is that ordered list of steps, in the skill text. What the agent reads from the world before step one is where the last attempt stopped: a new key that was stored but never verified, or an old key still live.

README.md

tile.json