Create and migrate repo-defined Tessl schedules in a project's tessl.json. Turns a plain-language task and cadence into a validated schedules entry, optionally authors its repo-local skill, and moves an existing schedule made in Tessl into version control, keeping its Loop id and history. Needs a Tessl CLI whose tessl loop commands read the Loop API.
98%
Does it follow best practices?
Impact
99%
1.03x2 of 3 eval scenarios. Add 1 more for a full score.
Low
Low-risk findings worth noting
Turn a plain-language request ("run the nightly report at 2am") into a valid
schedules entry in the project's tessl.json, optionally author the
repo-local skill it runs, validate the entry, and tell the user what happens
next.
A repo-defined schedule is a recurring launch run declared in tessl.json so it
is reviewed and version-controlled next to the code it runs against. On push to
the default branch, Tessl reads the file and creates the schedule.
Read the schedules block reference for the full field list and the cadence reference before writing a schedule.
tessl.json lives.tessl.json, the project is not a
Tessl project yet; tell the user to run tessl init first and stop.tessl.json. Note whether a schedules block already
exists and what entry names it holds, so a new entry does not collide with
an existing name.tessl loop list and tessl loop view
read the Loop API; ask the user to upgrade the Tessl CLI to the latest
release if they have not recently. When a command this skill uses is
missing or rejects its flags, tell them to upgrade and stop. Check flags
with tessl loop --help rather than assuming them.Collect these one at a time. The file requires the skill and the cadence; collect the environment too, since a run without one gets a read-only GitHub token.
skill field inside the entry's action, in one of two forms:
workspace/plugin[@version][#skill] (e.g.
tessleng/dark-factory-report, or acme/reports#weekly to pick one skill
from a multi-skill plugin).file:path/to/plugin (e.g.
file:tiles/dark-factory-report), relative to the repo root.file: ref in the
schedule entry.schedule key for shorthand strings. For patterns that shorthand
cannot express, use a structured schedule object or fall back to a raw
five-field cron. Default the timezone to UTC. If the user gives a local time,
ask which timezone (or use a timezone they have already stated) and set
timezone to an IANA name (e.g. America/New_York).tessl env list --workspace <workspace> and let
them pick.Optional fields, only if the user raises them (see
the schedules block reference for all of them):
inside action, agent, model, effort, git, workdir, inputs, and
instructions; beside action, description.
Skip this section when the schedule uses an existing skill. Do not edit or add files to that skill.
When the user asks for a new skill:
Scaffold the requested skill as a repo-local plugin with tessl skill new,
using the selected workspace and a path that follows the repository's
existing plugin conventions. If none exist, use tiles/<skill-name>. Write
the requested workflow in the generated SKILL.md, then use the plugin
path as the schedule entry's file: ref.
Identify which of Linear, Slack, and Notion the requested skill calls. For
each provider it uses, create the new skill's scripts/ directory and copy
that provider's .sh file verbatim and unmodified from this skill's
scripts/ directory. If it uses none of the three providers, create no
scripts/ directory and skip the remaining pre-flight steps.
Inspect the selected environment's variable names with
tessl env view --json --workspace <workspace> <environment>. Values are
sealed; only the names for the providers the skill uses are needed.
Make credential pre-flight the generated skill's first step, before any other work. Add one invocation for each copied script:
bash "$(git rev-parse --show-toplevel)/<skill-path>/scripts/linear.sh" "LINEAR_TOKEN"
bash "$(git rev-parse --show-toplevel)/<skill-path>/scripts/slack.sh" "SLACK_BOT_TOKEN"
bash "$(git rev-parse --show-toplevel)/<skill-path>/scripts/notion.sh" "NOTION_TOKEN"Replace <skill-path> with the repo-relative path of the skill directory
that holds the copied scripts (<plugin-path>/skills/<skill-name>), not the
plugin path from step 1. Do not use a bare scripts/... path. Include only
the lines for providers the skill uses. Pass the same variable name that the
generated skill uses for that provider's API calls. Prefer the canonical
name. If it is absent, use a name ending _LINEAR_TOKEN,
_SLACK_BOT_TOKEN, or _NOTION_TOKEN on the matching line. If more than one
accepted name is available, ask which one the skill should use. Match an
exact canonical name or the underscore-prefixed suffix only; a bare
substring is not a match.
State in the generated skill that a non-zero result from any invocation means stop before doing anything else.
This pre-flight covers only the pinned providers the authored skill uses: Linear, Slack, and Notion. A skill that uses another service or none of these three gets no check; do not guess or create checks for other services. It covers only skills created through this branch; existing skills are untouched. Checking every scheduled skill would require a platform launch-preflight hook and is outside this workflow.
The entry's name is the schedule's stable identity in the schedules map: a
lowercase kebab-case slug (a-z, 0-9, single dashes), not a display label.
Derive it from the job (e.g. nightly-sales-report). Renaming an entry later
is a delete-plus-create, so pick a durable name. It must not collide with an
existing name in the block.
Add the entry under a top-level schedules object in tessl.json. Create the
schedules object if it does not exist; otherwise add the entry alongside the
existing ones. Preserve the rest of the file. Do not reorder or drop other
keys.
The entry's action holds what runs (the skill, the environment, and any other
action fields). Beside action, the entry holds only its timing and label. A
minimal entry:
{
"schedules": {
"nightly-sales-report": {
"action": {
"skill": "file:tiles/dark-factory-report",
"environment": "dark-factory-report"
},
"schedule": "daily at 02:00",
"description": "Nightly sales report"
}
}
}Rules that the validator enforces. Get them right the first time:
action with its skill, and one of schedule or cron, are required.
Name the environment inside action whenever the skill writes anywhere. Use schedule for shorthand strings and structured
objects by default.action. A skill, environment, inputs, or
other action field beside action is refused.actions block already declares the action this schedule
should run, set action to its name (or to { "use": "<name>", ... } with
overrides) instead of writing it inline.schedule and cron are aliases; never include both in one entry. Use
cron with a raw expression only when the shorthand and structured forms do
not express the requested cadence.Run the check from the repo root:
tessl loop validateIt reads tessl.json as it is on disk and reports every problem against the
entry it belongs to. It exits non-zero when any block is invalid. Fix anything
it reports and run it again until it passes. Report its three kinds of result
separately:
tessl.json names a project, Tessl checks the schedules block against
that project without saving anything. A refusal there fails validate:
a full workspace, a registry skill not found, a named environment missing
or without a GitHub token, or an agent and model the organization cannot
run. Could not run repository schedule sync checks.
fails it too, and can mean the request never arrived: report it as a failed
check, not as a refusal. A warning that the checks were skipped means they
did not run.validate on their own; a missing environment is also
refused by the sync checks when they run. An environment it cannot find makes
sync skip the schedule: ask the user to fix the name or create the
environment before pushing.A clean validate does not guarantee the schedule fires. The environment,
skill, agent and model are checked again when the file is applied.
Once validate passes, tell the user in plain language:
tessl.json change and push or merge it to the repo's
default branch (usually main) the way they normally do. Repo-defined
schedules are synced only from the default branch.tessl.json and creates the Loop. This needs the
Tessl GitHub App on the repo.Do not push, merge, start a sync or run the job for them.
After the user's push syncs, read checking a synced schedule and report:
Do not report that the schedule fired without a scheduled launch from that trigger, as the reference describes.