Skip to content

feat(backend): add Windshift adapter#5

Draft
stefan-ernst wants to merge 1 commit into
Soleone:mainfrom
Windshiftapp:feat/windshift-adapter
Draft

feat(backend): add Windshift adapter#5
stefan-ernst wants to merge 1 commit into
Soleone:mainfrom
Windshiftapp:feat/windshift-adapter

Conversation

@stefan-ernst

Copy link
Copy Markdown

What

Adds a windshift task backend that drives Windshift work items through the ws CLI, following the existing sq/tq shell-out pattern. No new dependencies.

Why

Windshift is a work-tracker with a first-class ws CLI (ws task ls/get/create/edit/move, all with -o json), which maps almost 1:1 onto the TaskAdapter contract — so teams using Windshift can drive their real tracker from the pi tasks UI instead of a parallel TODO.md/sq store.

How it works

  • Auto-detected in projects with a ws.toml (created by ws init). A ws.toml is an unambiguous Windshift-project marker, so the resolver prefers windshift over merely globally-installed backends — the same way tq is preferred when a .tq directory exists. Also selectable via PI_TASKS_BACKEND=windshift.
  • list / show / create / update map onto ws task ls/get/create/edit and ws task move (status changes go through real workflow transitions, which ws task move resolves by alias/name/id).
  • Item-type, status, and priority catalogs are resolved once at init from ws item-type ls / ws status ls / ws priority ls, used to translate the adapter's camelCase task model to/from Windshift's workspace-configured types, statuses, and priorities.
  • Each lookup degrades gracefully: a reduced-scope token or an older ws that lacks ws priority ls still loads — task types fall back to a default set, statuses to name-based classification, and priorities to Windshift's default catalog (display-only until ws priority ls is available).

Notes / limitations

  • Requires the ws CLI on PATH and a connected workspace (ws init), consistent with how the sq/tq backends require their CLIs.
  • Priority editing activates when the running ws provides ws priority ls; older builds show priority read-only. (Display of a task's current priority always works.)

Testing

Verified end-to-end against a live Windshift workspace: backend auto-selection, validateBackendConfiguration, list/show parsing, and the exact ws argv emitted by create/edit/move (including type- and priority-name → id resolution and the graceful fallbacks). The extension loads cleanly under pi.

Adds a CLI-backed task backend that drives Windshift work items through
the `ws` CLI, mirroring the sq/tq adapters. Auto-detected in projects
with a `ws.toml` (preferred over globally-installed backends, like tq is
for a .tq directory); also selectable via PI_TASKS_BACKEND=windshift.

- list/show/create/update map onto `ws task ls/get/create/edit` and
  `ws task move` (which resolves workflow transitions for us)
- item-type / status / priority catalogs are resolved once from
  `ws item-type ls` / `ws status ls` / `ws priority ls`, each with a
  graceful fallback so a reduced-scope token or older `ws` still works
- priority editing activates when `ws priority ls` is available; until
  then the per-item priority still displays (read-only)
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