Skip to content

Where people and agents ship software together. The open-source git platform for the whole job: issues, agents, checks and deploys to the edge.

A workspace can turn on cycles: Now becomes the current cycle, unfinished work carries over, and each cycle has its page and report #355

Mergedsyntaqx merged 312-cycles into main
syntaqxopened this pull request

Closes #312. This is slice 3. With the project home (#343), the new item page (#351) and cycles shipped, #312's "Done when" is met. Slices 4–12 move to a follow-up item.

Data: migration 0062_cycles.sql, additive only. It adds:

  • cycle_settings and cycles, with a unique index allowing one open cycle per workspace;
  • cycle_carries;
  • nullable work_items.cycle_number and cycle_added_at.

Rules (the design's recommendations):

  • Cycles are off by default. When on, they're 2 weeks long, start Monday (UTC) and have no cooldown. They are per workspace.
  • With cycles on, Now is the current cycle: moving an item into Now puts it in the cycle, and taking it out takes it out of the cycle. Next can be planned into the coming cycle.
  • Agents can't commit the cycle while cycles are on.
  • With cycles off, Work behaves exactly as before.

Roll-over: settle_cycles runs on the existing 5-minute cron.

  • Each ended cycle is closed in one D1 batch. That batch records carries, moves open Now items on, pulls in planned Next items, and opens the next cycle.
  • It is guarded by "still open" and OR IGNORE, so a repeated or concurrent run changes nothing more.
  • A late cron closes each missed cycle in order.
  • 9 tests run this SQL against the migrated schema, including running twice and a five-week-late cron.

Interfaces:

  • RPCs list_cycles, get_cycle (current or by number, with the report), configure_cycles (Write) and cycle_work_item.
  • REST routes and MCP actions for the same.
  • cycle on item lists and filters.
  • g1t cycle view|list|add [--next]|remove|settings.
  • OpenAPI and the CLI reference are regenerated.

Web:

  • -/work/cycle: days left; scope, done and carried; a burn-up (one hue, keyboard readout, table fallback); stages; and work by person and by agent.
  • -/work/cycles/:n: the report.
  • -/work/cycle/plan: Next beside the coming cycle, with Y.
  • A Cycle row in the sidebar.
  • -/settings/work to turn cycles on and set them up.
  • A Cycle (Y) picker on the item page, and Shift+Y for the next cycle.
  • With cycles on, the plan labels Now as "Cycle N".

Docs: a new work/cycles.md, plus updates to the Work index, plan, work-items, workspaces, mcp and architecture docs.

Validation:

  • cargo test passes for g1t-work (343), contracts, api and cli; the workspace and wasm32 checks pass.
  • The contracts package passes.
  • Web: typecheck and tests (including lib/cycles.test.ts) pass, and the build passes with load-check and deploy-check.
  • Conformance, test:deploy, astro, prettier and git diff --check pass.
  • Screenshots: the cycle page (light, dark, phone), the sidebar row and the item picker.
syntaqxturned on auto-merge (merge commit)·
syntaqxmerged this·
syntaqxdeleted the 312-cycles branch·

All checks have passed

2 passed · on 6cbda13

Workflows

CI / pull_request — CI passedDetails
Dependency review — No dependency changesDetails

312-cycles was deleted

It can be made again at 6cbda13, where it was.

Sign in to comment.