Skip to content

The routine commands: four command skills, and a schedule line that says how often at most - #1785

Merged
suleimansh merged 1 commit into
mainfrom
routine-commands
Sep 16, 2026
Merged

suleimansh merged 1 commit into
mainfrom
routine-commands

Conversation

@suleimansh

Copy link
Copy Markdown
Contributor

👤

  • the four PM routines are back, as command skills the scheduler fires: update-tickets, plan-tickets, triage-quick, triage-consensual (Dashboard architecture: the plan and six questions #1774)
  • a schedule line can say every 6h: how often at most, from the command's last recorded start; a check beside it says whether there is anything to do
  • no idle runs: a routine that finds nothing waits its interval
  • npx tickets meta prints when the tickets last caught up with GitHub, for the schedule's check

🤖 automated · Fable 5.1, effort high

The schedule (packages/agent-scheduler). A line now carries clauses in any order, each at most once: every <N>m|h|d, when \`, cap ; at least one of everyandwhen. everyis the least time since the command's last start, read off the run records onagent-data(the newest card with the tool's mark for that command, whatever became of the run), so every machine agrees and nothing new is stored. The tick decides per command: folder exists → interval → check → cap → quota. Inside the interval the line isnot due (last start 2h ago, every 6h)and no check runs.every 0`, an unknown unit, a clause twice, or a word the parser does not know make the line unreadable, named as before.

gemstack's agent-schedule.md:

- work-queue: when `npx queue`, cap 1
- update-tickets: every 1h, when `gh issue list --limit 1 --json number --search "updated:>=$(npx tickets meta | jq -r .lastImportedAt)"`
- plan-tickets: every 6h, when `npx tickets list | jq '[.[] | select(.planned or .locked | not)]'`
- triage-quick: every 6h
- triage-consensual: every 7d

Both checks were run by hand against gemstack's data: GitHub reports an issue updated since the last import; five open tickets have no plan.

The four commands, one package each, SKILL.md only, the shape of skill-work-queue: @gemstack/skill-update-tickets, skill-plan-tickets, skill-triage-quick, skill-triage-consensual. Each prompt is its preset rewritten in capability words: no skill, command or package named; "nobody will answer you"; "only queue, never do" folded into the two triage jobs and plan-tickets; "say so and stop" when nothing qualifies; an error in capability words when the project has no ticketing system or no AI queue. The presets in prompts/presets/ are untouched: the launcher's buttons keep them. gemstack tracks the four under .agents/skills/<command>/SKILL.md with the .claude/skills/<command> link, the shape of #1781.

The tickets skill gains npx tickets meta: prints {"lastImportedAt": …} or {}. Both SKILL.md copies say so.

What is deliberately not here: the maintenance routine (its preset uses the framework's templating and its calendar has no caller since #1782; maintenance.ts is still imported by cli.ts and used nowhere), a rotation or a clock time (rejected in the DECISIONS bullet), and any change to the dashboard presets.

Tests: agent-scheduler 52 (was 48), tickets 48 (was 47), framework 1233 node tests and 824 vitest tests green after the worktree build (a fresh worktree without a built dist/ fails eight daemon tests with a 503, the known case), root pnpm test green for agent-data 57, branches 85, queue 16, logs 16, driver 81.

Cutover after merge: pull, install, build (pnpm build, pnpm -C packages/agent-scheduler build, pnpm -C packages/skill-tickets build), restart the daemon so the open hook restarts the scheduler on the new build. The new lines are live at the next tick. Within the hour update-tickets runs (GitHub has news); within six hours plan-tickets queues plans for the five unplanned tickets and work-queue writes them; triage follows.

…ays how often at most

A schedule line takes `every <N>m|h|d` beside or instead of its `when` check: the
command is due only once that long has passed since its last recorded start, read off
the run records on agent-data. Four command skills of work-queue's shape, one package
each: update-tickets, plan-tickets, triage-quick, triage-consensual. The tickets skill
gains `meta`, printing the last-import stamp, for the schedule's check. gemstack tracks
the four skills and schedules them. (#1774)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@suleimansh
suleimansh merged commit 9bb6232 into main Sep 16, 2026
2 checks passed
@suleimansh
suleimansh deleted the routine-commands branch September 16, 2026 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant