simonvanlaak

kanban-workflow

0
0
# Install this skill:
npx skills add simonvanlaak/openclaw-skill-kanban-workflow

Or install specific skill: npx add-skill https://github.com/simonvanlaak/openclaw-skill-kanban-workflow

# Description

Plane-only workflow-loop automation for ticket execution using strict worker JSON outcomes and local CLI orchestration.

# SKILL.md


name: kanban-workflow
description: Plane-only workflow-loop automation for ticket execution using strict worker JSON outcomes and local CLI orchestration.

requirements:
binaries:
- node
- npm
- plane
node:
install: npm ci
env:
required: []
optional:
- PLANE_API_KEY
- PLANE_WORKSPACE
- PLANE_BASE_URL


Kanban Workflow

Goal

Run a Plane-only ticket workflow with:
- deterministic local loop orchestration (workflow-loop),
- one worker session per ticket,
- strict worker JSON decisions (blocked | completed | uncertain) with schema validation and deterministic fallback.

Canonical Stages

  • stage:todo
  • stage:blocked
  • stage:in-progress
  • stage:in-review

Done/closed remains platform-specific.

Architecture

  • Workflow-loop (local CLI/script): selection, dispatch, mutation application, session-map persistence.
  • Worker agent: executes ticket work and returns strict JSON output.
  • Validator/action mapper: validates worker JSON and applies comment + stage mutation.

Command Surface

  • setup
  • workflow-loop
  • show
  • create
  • help

Removed from user CLI:
- next
- start
- update
- ask
- complete

Setup Contract

setup requires:
- --adapter plane
- --plane-workspace-slug <slug>
- --plane-scope all-projects
- all four stage mapping flags

create requires:
- --project-id <uuid>

Workflow-loop Rules

  • Enforce whoami-aware assignee gating for actionable work.
  • Merge backlog across Plane projects; sort by priority, then title alphabetical on ties.
  • Poll-only behavior: if active ticket is unchanged, exit quietly.
  • Worker output must be JSON-only and pass strict schema validation.
  • Retry invalid worker JSON up to 2 times with all schema errors + schema contract in retry prompt.
  • If still invalid on the 3rd total attempt, fallback defaults to blocked.
  • Apply decision mutation and post a standardized structured comment.
  • Reconcile dispatcher-owned queue-position comments for all queued backlog tickets (create/update/delete).

Session Lifecycle

  • Worker: one session per ticket, reused across unblocks.
  • Blocked worker sessions archived after 7 days.

Validation

Before changes/PRs:

npx tsc --noEmit
npm test

# README.md

Kanban Workflow

Plane-only workflow automation with a local workflow-loop runner and LLM worker turns.

Scope

  • Adapter support: Plane only.
  • Orchestration: workflow-loop (poll/select/delegate/apply).
  • Legacy multi-adapter surface is removed.

Commands

  • kanban-workflow setup --adapter plane --plane-workspace-slug <slug> --plane-scope all-projects --map-backlog <name> --map-blocked <name> --map-in-progress <name> --map-in-review <name> [--force] [--autopilot-cron-expr "*/5 * * * *"] [--autopilot-cron-tz <tz>] [--autopilot-install-cron] [--autopilot-requeue-target-stage <stage>]
  • kanban-workflow workflow-loop [--dry-run]
  • kanban-workflow show --id <ticket-id>
  • kanban-workflow create --project-id <uuid> --title "..." [--body "..."]
  • kanban-workflow help

Behavior Summary

  • Setup requires Plane and enforces --plane-scope all-projects.
  • Backlog selection is global across configured Plane projects, ordered by priority and then title.
  • Only tickets assigned to whoami are eligible for active work.
  • workflow-loop is local CLI/script orchestration; it is not a continuously running agent.
  • If the currently active ticket is unchanged, workflow-loop exits quietly (poll-only behavior).

No-work DM alerts:
- The workflow can optionally send a one-time DM alert when it first detects there is no actionable ticket.
- This is disabled by default (to avoid spam).
- To enable: set KWF_NO_WORK_ALERT_ENABLED=1.

Worker + Decision Flow

Per workflow-loop work action:

  1. Worker agent runs in the ticket-bound session and produces a strict JSON result object.
  2. JSON is validated in strict mode (unknown fields rejected, required fields/types enforced, conditional rules per decision).
  3. If JSON is invalid, workflow-loop issues up to 2 retry prompts that include all schema errors plus the strict schema contract.
  4. If still invalid on the 3rd total attempt, workflow-loop forces blocked.
  5. Valid decisions are exactly: blocked | completed | uncertain.
  6. Dispatcher converts JSON into a standardized ticket comment and applies Plane mutation:
  7. blocked -> comment + move to stage:blocked
  8. uncertain -> comment (with clarification questions) + move to stage:blocked
  9. completed -> comment + move to stage:in-review
  10. Dispatcher reconciles queue-position comments on all queued stage:todo tickets:
  11. create if missing
  12. update same comment only when queue count changes
  13. delete when ticket leaves queue

Session behavior:
- One worker session per ticket, reused while ticket remains active/open.
- Blocked tickets keep session context for human unblock and resume.
- Blocked ticket sessions are archived after 7 days.

Development

Install and validate:

npm ci
npx tsc --noEmit
npm test

Run CLI:

npm run kanban-workflow -- <command>

# Supported AI Coding Agents

This skill is compatible with the SKILL.md standard and works with all major AI coding agents:

Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.