home / skills / shotaiuchi / dotclaude / wf0-schedule

wf0-schedule skill

/dotclaude/skills/wf0-schedule

This skill helps you create and manage batch workflow schedules with dependency awareness and priority based processing.

npx playbooks add skill shotaiuchi/dotclaude --skill wf0-schedule

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
2.5 KB
---
name: wf0-schedule
description: Schedule management for batch workflow execution
argument-hint: "<create | show | edit | validate | clear> [args...]"
---

**Always respond in Japanese.**

# /wf0-schedule

Create and manage workflow schedules with dependency analysis.

## Usage

```
/wf0-schedule <subcommand> [arguments...]
```

## Subcommands

| Subcommand | Description |
|------------|-------------|
| `create [sources...]` | Create schedule from specified sources |
| `show` | Display current schedule |
| `edit [work-id]` | Edit priority or dependencies |
| `validate` | Validate schedule (circular dependency check) |
| `clear` | Delete current schedule |

## Source Specification

```bash
# GitHub Issues (by label or milestone)
/wf0-schedule create github="label:scheduled"
/wf0-schedule create github="milestone:v1.0"

# Jira (by JQL)
/wf0-schedule create jira="project=PROJ AND sprint=current"

# Local works (comma-separated)
/wf0-schedule create local=FEAT-001,FIX-002

# Combined / All from config
/wf0-schedule create github="label:scheduled" jira="sprint=current"
/wf0-schedule create --all
```

## Processing

### create

1. Fetch issues from specified sources
2. Generate work-ids for each
3. Detect dependencies from issue body text (patterns: `depends on #N`, `blocked by #N`, `requires PROJ-N`, `after: WORK-ID`)
4. Check for circular dependencies
5. Assign priorities (configurable via `config.json` `batch.dependency_patterns`)
6. Save to `.wf/schedule.json`

### show

Display: status, created date, progress (completed/in_progress/pending), works sorted by priority with deps.

### edit

Edit priority (`priority=<1-10>`) or dependencies (`depends=<ids>`, `remove-dep=<id>`) for a work.

### validate

Check: circular dependencies, unresolved dependency references, priority conflicts.

### clear

Delete `.wf/schedule.json` with confirmation.

## Schedule JSON Schema

```json
{
  "version": "1.0",
  "created_at": "<timestamp>",
  "status": "pending|running|paused|completed",
  "sources": [{"type": "github", "query": "label:scheduled"}],
  "works": {
    "<work-id>": {
      "source": {"type": "github", "id": "123", "title": "..."},
      "priority": 1,
      "dependencies": ["<other-work-id>"],
      "status": "pending|running|completed|failed",
      "started_at": null,
      "completed_at": null
    }
  },
  "progress": { "total": 5, "completed": 0, "in_progress": 0, "pending": 5 }
}
```

## Notes

- Requires `gh` for GitHub, `jq` for JSON
- Schedule stored in `.wf/schedule.json`
- Works processed in priority order respecting dependencies

Overview

This skill provides schedule management for batch workflow execution with built-in dependency analysis and validation. It creates schedules from multiple sources (GitHub, Jira, local lists), stores a canonical schedule file, and enforces execution order based on priorities and dependencies. The tool helps teams run batch workflows reliably by detecting cycles and unresolved references before execution.

How this skill works

The skill fetches work items from configured sources and normalizes them into work-ids. It parses common dependency patterns in issue bodies to build a dependency graph, assigns priorities, validates the graph for cycles and missing references, and saves the schedule to .wf/schedule.json. Commands are available to show, edit, validate, and clear the schedule.

When to use it

  • Prepare a batch run from multiple issue trackers or local task lists
  • Detect and resolve dependency cycles before executing workflows
  • Generate a prioritized execution plan that respects inter-work dependencies
  • Audit current schedule status and progress across all works
  • Quickly adjust priority or dependencies for a specific work

Best practices

  • Use consistent dependency phrases in issue bodies (e.g., "depends on #N", "requires PROJ-N") for reliable detection
  • Keep priorities numeric (1 highest to 10 lowest) and document team conventions in config.json
  • Run validate after create or edit to catch cycles and unresolved references early
  • Store schedule in version control or backup .wf/schedule.json for auditability
  • Provide minimal, clear dependency lists to avoid unnecessary coupling between works

Example use cases

  • Create a schedule from GitHub issues labeled scheduled and validate before a nightly batch run
  • Combine Jira sprint items with local fixes to form a single execution plan
  • Edit a work to raise its priority when a hotfix needs earlier processing
  • Detect circular dependencies introduced by cross-references and resolve them before execution
  • Clear the schedule to start a new batch planning cycle

FAQ

Which sources are supported when creating a schedule?

GitHub issues via gh queries, Jira via JQL, and local comma-separated work-ids; you can combine sources or use --all.

How does dependency detection work?

It scans issue text for patterns like "depends on #N", "blocked by #N", "requires PROJ-N", or "after: WORK-ID" and maps those to work-ids.

What validation checks are performed?

The tool checks for circular dependencies, unresolved dependency references, and priority conflicts.