From smith
Manages deferred task queue in .smith/vault/queue: add, list, process, remove, batch-execute, schedule, prioritize, track dependencies, use git worktrees, browse history.
npx claudepluginhub attckdigital/smithThis skill uses the workspace's default tool permissions.
Manage deferred work through a persistent task queue in `.smith/vault/queue/`. Supports priority ordering, dependency tracking, scheduled execution, status lifecycle management, and batch processing with git worktree isolation.
Executes eligible tasks from session task list, syncs against codebase/PR state to surface stales, and generates handovers. Use /task-run [--all] [--sync [--dry-run]] [--handover [query]].
Displays overview of all Smith commands or detailed help for a specific one, including syntax, flags, examples, and workflow context. Useful for referencing the Smith workflow system.
Manages scheduled Claude Code tasks: add recurring/one-off skills/prompts/scripts, list/pause/resume/remove, view results/logs, test execution with safety controls and notifications. Cross-platform (macOS/Linux/Windows).
Share bugs, ideas, or general feedback.
Manage deferred work through a persistent task queue in .smith/vault/queue/. Supports priority ordering, dependency tracking, scheduled execution, status lifecycle management, and batch processing with git worktree isolation.
Arguments: $ARGUMENTS
Throughout this action, log significant events to the vault session log. Read the session log path from .smith/vault/.current-session. If the file is missing or the vault is not initialized, skip all logging silently.
Append entries using this format:
### [HH:MM:SS] /smith-queue <event>
**User Request:**
> <verbatim user message that triggered this action>
**Synthesized Input:** <brief summary>
**Outcome:** <what happened>
**Artifacts:** <files created/modified>
**Systems affected:** <system IDs>
Log at these points:
All queue entries are markdown files in .smith/vault/queue/ with this frontmatter:
---
task: "<task description>"
branch: "<feature branch name — the queue processor checks out this branch via worktree>"
spec_path: "<path to the feature spec folder on the feature branch>"
primary_system: "<system ID, e.g., system-13-trend-intelligence>"
created: "YYYY-MM-DDTHH:MM:SS"
project: "<project directory basename>"
complexity: autonomous|interactive|review
priority: critical|high|medium|low
status: pending|scheduled|in-progress|completed|failed|blocked
depends_on: []
scheduled_for: ""
---
## Context
<brief description of what this feature does and key decisions>
## Artifacts on branch
- spec.md — feature specification
- plan.md — implementation plan
- questions.md — clarification questions (all answered)
- <any other artifacts>
## Execution Instructions
Run `/smith-build` from the `<branch>` branch with feature dir `<spec_path>`.
Required fields: task, branch, spec_path, status, complexity, priority.
Backwards compatibility:
priority, depends_on, or scheduled_for → treated as priority: medium, depends_on: [], scheduled_for: ""description instead of task → read description as the task namestatus: queued → treated as status: pendingpending → scheduled → in-progress → completed
→ failed → pending (via requeue)
→ blocked (if dependency failed)
Every status change MUST append to the ## Status History section in the queue file body:
- `[YYYY-MM-DD HH:MM]` <Status> — <reason or details>
Parse the first word of $ARGUMENTS to determine the subcommand.
add "<description>" [--priority ] [--depends-on ]Creates a new task entry in .smith/vault/queue/.
Capture context:
add, excluding flags)$CLAUDE_PROJECT_DIR)git rev-parse --abbrev-ref HEAD.specify/systems/)Parse flags:
--priority <level> — set priority (critical/high/medium/low). Default: medium--depends-on <filename> — add dependency on another queue entry. Can be specified multiple times.Determine complexity flag from the description:
autonomous — task can run without user input (default for clear, specific instructions)interactive — task needs user decisions or clarificationreview — run autonomously but stage results for approvalGenerate queue file at .smith/vault/queue/YYYY-MM-DD_HHMMSS-<slug>.md:
---
task: "<task description>"
created: "YYYY-MM-DDTHH:MM:SS"
project: "<project name>"
branch: "<current branch>"
spec_path: "<spec path or empty>"
complexity: <flag>
priority: <level>
status: pending
depends_on: [<filenames>]
scheduled_for: ""
---
# Task: <description>
## Context
- **Project:** <project name>
- **Branch at creation:** <branch>
- **Active spec:** <spec path or "none">
- **Priority:** <level>
- **Dependencies:** <list or "none">
## Instructions
<full task description>
## Notes
<additional context from the conversation>
## Status History
- `[YYYY-MM-DD HH:MM]` Created — priority: <level>, complexity: <flag>
Confirm: "Queued: <filename> (priority: <level>, complexity: <flag>)"
listShow all pending/scheduled queue items sorted by priority then date.
Read all .md files in .smith/vault/queue/ (excluding history/ subdirectory and .batch-progress.md)
Parse frontmatter for task, created, complexity, priority, status, depends_on
Sort: critical → high → medium → low, then oldest first within each level
Display:
## Queue — N items
| # | Priority | Created | Complexity | Status | Description | File |
|---|----------|---------|------------|--------|-------------|------|
| 1 | 🔴 critical | 04-05 08:30 | autonomous | pending | Fix auth bypass | ... |
| 2 | 🟠 high | 04-05 09:00 | review | scheduled 04-06 02:00 | Add rate limiting | ... |
| 3 | 🟡 medium | 04-05 09:15 | interactive | pending | Redesign popup | ... |
| 4 | 🔵 low | 04-05 10:00 | autonomous | pending | Update docs | ... |
Total: 4 items (2 autonomous, 1 interactive, 1 review)
Dependencies: #4 depends on #1
Process a specific task with `/smith-queue process <filename>`, or run all with `/smith-queue process --all`.
If empty: "Queue is empty. Use /smith-queue add \"<description>\" to add a task."
statusDisplay all queue items grouped by status.
Read all files in .smith/vault/queue/ (including history/)
Group by status and display:
## Queue Status
### In Progress
- <task> (started <time>)
### Blocked
- <task> — blocked by: <dependency filename> (status: failed)
### Scheduled
- <task> — scheduled for <datetime>
### Pending (by priority)
- 🔴 <task>
- 🟡 <task>
### Recently Completed (last 5)
- <task> — completed <date>
### Recently Failed (last 5)
- <task> — failed <date>: <error summary>
process [] [--all] [--next] [--dry-run] [--limit N] [--priority ] [--project ] [--all-projects] [--model ] [--abort]The primary command for running queued tasks. Supports interactive selection, specific file processing, and batch execution.
process (no arguments) — Interactive Picker.smith/vault/queue/ for all processable tasks: complexity: autonomous, status: pending or status: queued## Pending Autonomous Tasks
| # | Priority | Task | Branch | File |
|---|----------|------|--------|------|
| 1 | 🟡 medium | Trends Article Explorer Tab | 057-trends-article-explorer | 057-trends-article-explorer.md |
Which task would you like to process? Enter a number, or "all" to process everything.
process --all.process <filename> — Specific TaskProcess a specific queue entry by filename. Accepts full filename or partial match.
process --next — Next Highest PriorityProcess only the single highest-priority autonomous pending task, then stop. No prompt — just picks the top item and runs it.
process --all — All Pending TasksProcess all autonomous + pending tasks sequentially in priority order. This is the batch execution mode.
Accepts all batch flags:
--dry-run — show what would be processed without executing--limit <N> — process only the first N items after ordering--priority <level> — process only items at or above the given priority (--priority high = critical + high only)--project <name> — process queue for a specific project (from ~/.smith/projects.json)--all-projects — process across all registered projects, most recently active first--model <model> — override model for processing. Default: sonnet. Options: haiku, sonnet, opus--abort — if processing is running, create .smith/vault/queue/.abort-batch flag. Current task finishes; remaining return to pending.These steps apply whether processing a single task or batch. The queue entry is only marked completed after the PR is merged. If any step fails, the entry is marked failed with error details and the branch is left intact for manual review.
completed, in-progress, or blocked. Treat status: queued as status: pending.depends_on has entries, verify all are completed. If any are not, show which are blocking and abort.status: in-progress- [YYYY-MM-DD HH:MM] In Progress — processing startedbranch field:
git worktree add /tmp/smith-queue-<slug> <branch>
Do NOT checkout the branch in the main working directory — the worktree is an isolated copy./smith-build within the worktree directory, using spec_path from the queue entry frontmatter to locate spec artifacts. This handles task generation, implementation, and initial testing.git diff main --name-only | grep '^services/' | cut -d'/' -f2 | sort -u
For each affected service: docker compose up -d --build <service-name>. Wait for healthy status. If Docker build fails: mark failed, STOP.cd services/command-center && pnpm testcd services/<service> && poetry run pytestfailed, STOP.git push -u origin <branch>gh pr create. If fails: mark failed, STOP.gh pr merge <number> --squash --delete-branch. If fails (conflicts, checks): mark failed, leave PR open, STOP.git checkout main && git pull origin mainprimary_system and also_affects from queue entry.specify/systems/<system>/spec.md with dated implementation historystatus: completed- [YYYY-MM-DD HH:MM] Completed — PR #<number> merged, specs updated## Result section with PR link, files changed, services rebuilt, test results.smith/vault/queue/history/git worktree remove /tmp/smith-queue-<slug>If ANY step 8-12 fails:
status: failed- [YYYY-MM-DD HH:MM] Failed — <step name>: <error summary>.smith/vault/queue/history/blockedDuring batch processing, write a live progress file at .smith/vault/queue/.batch-progress.md:
# Processing Progress — YYYY-MM-DD HH:MM
| # | Task | Priority | Status | Duration |
|---|------|----------|--------|----------|
| 1 | Fix auth | critical | completed | 4m 32s |
| 2 | Add filters | medium | in-progress | 2m 15s... |
| 3 | Update docs | low | pending | — |
**Started:** HH:MM:SS
**Completed:** 1 of 3
**Failed:** 0
After processing completes, move progress file to .smith/vault/queue/history/batch-YYYY-MM-DD_HHMMSS.md.
remove <filename>Remove a task from the queue.
.smith/vault/queue/in-progress items. Warn if removing a task that others depend on.<description>? [y/n]"prioritizeInteractive reordering of pending items.
<task>? (critical/high/medium/low)"priority field in frontmatter- [YYYY-MM-DD HH:MM] Edited — priority changed from <old> to <new>schedule <filename> --at "<datetime>"Schedule a task for future processing.
pending or scheduled status--at value:
2026-04-07T02:00:00tonight → next occurrence of 02:00 local timeoff-peak → same as tonighttomorrow → next day at 02:00 local timestatus: scheduled, scheduled_for: "<ISO datetime>"- [YYYY-MM-DD HH:MM] Scheduled — processing at <datetime>schedule-batch --at "<datetime>"Schedule all autonomous + pending tasks for batch processing.
complexity: autonomous and status: pending--at value (same rules as above)status: scheduled, scheduled_for: "<datetime>"unschedule <filename>Remove schedule from a task.
scheduled statusstatus: pending, scheduled_for: ""- [YYYY-MM-DD HH:MM] Unscheduled — returned to pendingedit <filename>Modify task properties.
in-progress or completed items- [YYYY-MM-DD HH:MM] Edited — <list of changes>scheduled item, preserve the schedule unless explicitly changedpromote <filename>Shorthand to change complexity from autonomous → interactive.
in-progress/completedcomplexity: interactive- [YYYY-MM-DD HH:MM] Promoted — complexity changed from autonomous to interactivedemote <filename>Shorthand to change complexity from interactive → autonomous.
in-progress/completedcomplexity: autonomous- [YYYY-MM-DD HH:MM] Demoted — complexity changed from interactive to autonomousrequeue <filename>Reset a failed task back to pending.
.smith/vault/queue/history/ (failed items are archived)failed statusstatus: pending- [YYYY-MM-DD HH:MM] Requeued — reset to pending for retryhistory/ to .smith/vault/queue/history [] [--status completed|failed] [--since ""]Browse completed and failed task archives.
No arguments — list all items in .smith/vault/queue/history/ sorted by completion date (most recent first):
## Queue History
| # | Task | Status | Priority | Completed | File |
|---|------|--------|----------|-----------|------|
| 1 | Add email filters | ✅ completed | medium | 04-05 14:30 | ... |
| 2 | Fix auth bypass | ❌ failed | critical | 04-05 12:00 | ... |
Total: 2 archived (1 completed, 1 failed)
With filename — show full contents of a specific history entry including all status history.
With --status — filter to completed or failed only.
With --since — filter to items completed/failed after a date. Supports:
2026-04-01last week, this month, yesterdayhistory clear --before "<date>"Remove history entries older than a date. Requires user confirmation:
batch [flags]Alias for /smith-queue process --all. All flags accepted (--dry-run, --limit, --priority, --project, --all-projects, --model, --abort). See process --all above for full documentation.
Each task runs through the Full Pipeline Steps defined above (steps 1-16: implementation → Docker rebuild → tests → PR → merge → spec updates → archive).
Between tasks, check for the .abort-batch flag — if present, stop and return remaining tasks to pending.
Update the batch progress file after each task completes or fails. 10. Update progress file
scheduler install|uninstall|status|logs|set-timeManage the macOS launchd scheduler for automatic daily queue processing.
The scheduler is optional. Users who prefer manual processing can use /smith-queue batch directly.
scheduler install — copies ~/.smith/scheduler/com.smith.scheduler.plist to ~/Library/LaunchAgents/ and loads it with launchctl load. Creates ~/.smith/scheduler/ and the plist if they don't exist. The scheduler runs daily at 2:00 AM local time, processing all autonomous pending tasks across all registered projects.
scheduler uninstall — runs launchctl unload and removes the plist from ~/Library/LaunchAgents/.
scheduler status — checks if the scheduler is loaded (launchctl list | grep com.smith.scheduler), shows the configured run time, and displays last 10 lines of ~/.smith/scheduler/scheduler.log.
scheduler logs — tails ~/.smith/scheduler/scheduler.log (last 50 lines).
scheduler set-time <HH:MM> — updates the daily run time. Parses the hour and minute from the argument, updates ~/.smith/scheduler/com.smith.scheduler.plist (replaces the StartCalendarInterval Hour and Minute values), then reloads the agent if installed:
<HH:MM> (e.g., 03:30, 23:00, 00:15)sed or python3 to replace the Hour integer and Minute integerlaunchctl list | grep com.smith.scheduler), run launchctl unload then launchctl load to pick up the new timeThe scheduler script (~/.smith/scheduler/smith-scheduler.sh) is a thin launcher that delegates to this skill. It:
~/.smith/projects.json to find all project vaults.smith/vault/queue/ for autonomous tasks with status: pending or status: scheduled (skips items scheduled for a future date beyond today)claude -p "/smith-queue process <filename>" and lets the skill own the pipeline (status updates, worktree, tests, PR, merge, spec updates, history archival)history/ (the skill is responsible for that move; the scheduler does NOT mutate queue files itself)~/.smith/scheduler/scheduler.logWhen the scheduler dispatches a queued task, the exact invocation is:
"$CLAUDE_BIN" --model "$CLAUDE_MODEL" --permission-mode bypassPermissions \
-p "/smith-queue process <filename>"
Run from the project root directory (so .smith/vault/queue/<filename> resolves). CLAUDE_BIN is resolved in the scheduler via (1) explicit CLAUDE_BIN env override, (2) PATH lookup, then (3) the Claude Code VM bundle under ~/Library/Application Support/Claude/claude-code-vm/<version>/claude (version read from .sdk-version).
Responsibilities are partitioned to avoid double-writes:
| Step | Owner |
|---|---|
Read ~/.smith/projects.json, iterate project vaults | scheduler |
Filter queue: complexity: autonomous, status pending/scheduled, deps met, scheduled_for ≤ today | scheduler |
| Priority-sort, dispatch order | scheduler |
Resolve claude binary, capture exit code | scheduler |
Update queue frontmatter status: in-progress and append history line | skill |
Create git worktree from the entry's branch field | skill |
Run /smith-build, Docker rebuild, tests, git push, gh pr create, gh pr merge | skill |
Update status: completed or status: failed and append history | skill |
| Update system specs, CHANGELOG.md, STATUS.md | skill |
Move queue entry to history/ | skill |
| Clean up the worktree | skill |
| Verify archival, tally dispatched/failed counters | scheduler |
Non-interactivity: when invoked as process <filename> for a task whose complexity is autonomous, the skill must not prompt for user input. Resolve any ambiguity by marking the task failed with a descriptive status-history entry rather than blocking on a question.
Never let the scheduler reimplement pipeline steps. The pipeline lives here in SKILL.md; if scheduler logic starts doing sed 's/status: pending/status: in-progress/' or mv ... history/, that's a regression — it's the exact class of bug that caused the 2026-04-23 silent-completion incident (scheduler pre-mutated state, then claude: command not found prevented any real work, but the script still moved entries to history/).
If invoked with no arguments, show usage:
Usage:
/smith-queue add "<desc>" [--priority P] [--depends-on F] — Add a task
/smith-queue list — Show pending tasks
/smith-queue status — Show all tasks by status
/smith-queue process — Interactive picker: choose a task to process
/smith-queue process <file> — Process a specific task
/smith-queue process --next — Process the next highest-priority task
/smith-queue process --all [--dry-run] [--limit N] [...] — Process all autonomous tasks sequentially
/smith-queue remove <file> — Remove a task
/smith-queue prioritize — Reorder task priorities
/smith-queue edit <file> — Modify task properties
/smith-queue promote <file> — Change autonomous → interactive
/smith-queue demote <file> — Change interactive → autonomous
/smith-queue requeue <file> — Reset failed → pending
/smith-queue schedule <file> --at "<time>" — Schedule for future
/smith-queue schedule-batch --at "<time>" — Schedule all autonomous tasks
/smith-queue unschedule <file> — Remove schedule
/smith-queue batch [flags] — Alias for process --all
/smith-queue history [--status S] [--since D] — Browse archived tasks
/smith-queue scheduler install|uninstall|status|logs — Manage daily 2am scheduler
/smith-queue scheduler set-time <HH:MM> — Change scheduled run time
Queue: .smith/vault/queue/ | History: .smith/vault/queue/history/