CtrlK
BlogDocsLog inGet started
Tessl Logo
PluginPublic

tessleng/schedule-management

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.

1.03x
Quality

98%

Does it follow best practices?

Impact

99%

1.03x

2 of 3 eval scenarios. Add 1 more for a full score.

SecuritybySnyk

Low

Low-risk findings worth noting

Overview
Quality
Evals
Security
Files

find-loops.mdskills/schedule-migrate/references/

Finding the Loop to move

tessl loop list --all --json reads every page of /experimental/loops, newest id first, and prints them as one data[]. It exits non-zero when any page fails or a page's next link is bad or repeats; then there is no listing to choose from, so report the error and stop.

Scope

  • --project-id wins over TESSL_PROJECT_ID. A non-blank TESSL_PROJECT_ID narrows the listing to that project; say so when you show the candidates. A blank one is ignored.
  • --workspace wins over TESSL_WORKSPACE.
  • A TESSL_PROJECT_ID outside the selected workspace is an error, whether --workspace or TESSL_WORKSPACE selects it. Report it as printed and do not drop either value to get past it.
  • The project tessl.json links to does not narrow the listing.
  • A project or workspace the caller cannot view exits non-zero. Never drop the scope to search wider.
  • An empty data for a scope the caller can view is an answer: there is nothing to move there.

Candidates

A Loop can move when, under attributes:

  • source.kind is app (repo is already in a tessl.json);
  • archivedAt is null;
  • project.id is the project, when the user named one;
  • project.repoUrl names this repository: compare host, owner and name, ignoring case, a trailing .git and the URL scheme;
  • moveBlockedBySetting is false and there is no managed field. A Loop a Tessl setting or a managed preset holds, such as Conformance, cannot move: list it apart and say why.

Showing them

For each candidate give its public id, label and key, and status. For each trigger in triggers:

  • kind cron: its name, cron, timezone, and the entry of actions whose name is the trigger's action. The skill is the trigger's overrides.skill when set, else that action's skill. When no entry of actions has that name, say the trigger's action is unresolved and show no skill for it.
  • kind event: say it runs on an event, not a cron.

A Loop with only event triggers stays in the list; say when a Loop has no cron. When two candidates share a label, or the repository belongs to more than one project, ask for the public id.

Ticket to PR and Learn from past work

These Loops move with the rest of their project (SKILL.md section 4). Recognise them from the row, then confirm with the user:

  • Learn from past work: an entry of attributes.actions whose tags holds Learn from past work. The tags are on the action; the Loop has no top-level tags.
  • Ticket to PR: an entry of attributes.actions whose tags holds Ticket to PR, or an untagged older Loop whose attributes.readyMadeLoop names a starter Ticket to PR action: implement, shepherd, follow-ticket-changes or merge-conflict-sweep. Any other readyMadeLoop, such as conformance, is not Ticket to PR.

Link the project's Loops as <web origin>/go/projects/<project id>/loops, with the project's id, not its name. The web origin is the scheme and host of a listed row's webUrl, which the CLI builds on the instance it talked to. Do not derive it from environment variables: the CLI also picks its instance from --region, TESSL_REGION, a tessl.json region and the login. When no row was listed, give the project id without a link.

README.md

tile.json