Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
117 changes: 117 additions & 0 deletions .agent/scripts/commands/list-todo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
---
description: List tasks from TODO.md with sorting and filtering options
agent: Plan+
mode: subagent
---

Display tasks from TODO.md and optionally PLANS.md with fast script-based output.

Arguments: $ARGUMENTS

## Quick Output (Default)

Run the helper script for instant output:

```bash
~/.aidevops/agents/scripts/list-todo-helper.sh $ARGUMENTS
```

Display the output directly to the user. The script handles all formatting.

## Fallback (Script Unavailable)

If the script fails or is unavailable, read and parse the files manually:

1. Read `TODO.md` and `todo/PLANS.md`
2. Parse tasks by status (In Progress, Backlog, Done)
3. Apply any filters from arguments
4. Format as Markdown tables

## Arguments

**Sorting options:**
- `--priority` or `-p` - Sort by priority (security/bugfix first)
- `--estimate` or `-e` - Sort by time estimate (shortest first)
- `--date` or `-d` - Sort by logged date (newest first)
- `--alpha` or `-a` - Sort alphabetically

**Filtering options:**
- `--tag <tag>` or `-t <tag>` - Filter by tag (seo, security, etc.)
- `--owner <name>` or `-o <name>` - Filter by assignee (marcus, etc.)
- `--status <status>` - Filter by status (pending, in-progress, done)
- `--estimate-filter <range>` - Filter by estimate (<2h, >1d, 1h-4h)

**Display options:**
- `--plans` - Include plan details from PLANS.md
- `--done` - Include completed tasks
- `--all` - Show everything (pending + done + plans)
- `--compact` - One-line per task (no tables)
- `--limit <n>` - Limit results
- `--json` - Output as JSON

## Examples

```bash
/list-todo # All pending, grouped by status
/list-todo --priority # Sorted by priority
/list-todo -t seo # Only #seo tasks
/list-todo -o marcus -e # Marcus's tasks, shortest first
/list-todo --estimate-filter "<2h" # Quick wins under 2 hours
/list-todo --plans # Include plan details
/list-todo --all --compact # Everything, one line each
```

## Output Format

The script outputs Markdown tables:

```markdown
## Tasks Overview

### In Progress (N)

| # | ID | Task | Est | Tags | Owner |
|---|-----|------|-----|------|-------|
| 1 | t001 | Task description | ~2h | #tag | @owner |

---

### Backlog (N pending)

| # | ID | Task | Est | Tags | Owner | Logged |
|---|-----|------|-----|------|-------|--------|
| 1 | t002 | Another task | ~4h | #feature | - | 2025-01-15 |

**Blocked tasks** (N):
- t003 blocked-by:t001

---

**Summary:** N pending | N in progress | N done | N active plans

---

**Options:**
1. Work on a specific task (enter task ID like `t014` or row number from `#` column)
2. Filter/sort differently (e.g., `--priority`, `-t seo`)
3. Done browsing
```

## After Display

Wait for user input:

1. **Task ID or row number** - Start working on that task (e.g., `t014` or `5`)
2. **Filter command** - Re-run with new filters (e.g., `-t seo`)
3. **"3" or "done"** - End browsing

When user selects a task:
- Check if it's a plan reference (`#plan` tag or `→ PLANS.md`)
- If plan: suggest `/show-plan <name>`
- If task: offer to start work (check branch, create if needed)

## Related Commands

- `/show-plan <name>` - Show detailed plan information
- `/ready` - Show only tasks with no blockers
- `/save-todo` - Save current discussion as task
143 changes: 143 additions & 0 deletions .agent/scripts/commands/show-plan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
---
description: Show detailed information about a specific plan from PLANS.md
agent: Plan+
mode: subagent
---

Display detailed plan information including purpose, progress, decisions, and related tasks.

Arguments: $ARGUMENTS

## Quick Output (Default)

Run the helper script for instant output:

```bash
~/.aidevops/agents/scripts/show-plan-helper.sh $ARGUMENTS
```

Display the output directly to the user. The script handles all formatting.

## Fallback (Script Unavailable)

If the script fails or is unavailable:

1. Read `todo/PLANS.md`
2. Find the matching plan section by fuzzy title match or plan ID
3. Extract and format all sections (Purpose, Progress, Decisions, etc.)
4. Find related tasks in `TODO.md`

## Arguments

**Plan identifier (required unless --list or --current):**
- Plan name (fuzzy match): `opencode`, `destructive`, `beads`
- Plan ID: `p001`, `p002`, etc.

**Options:**
- `--current` - Show plan related to current git branch
- `--list` - List all active plans briefly
- `--json` - Output as JSON

## Examples

```bash
/show-plan opencode # Show aidevops-opencode Plugin plan
/show-plan p001 # Show plan by ID
/show-plan --current # Show plan for current branch
/show-plan --list # List all plans
/show-plan "destructive" # Fuzzy match "Destructive Command Hooks"
/show-plan beads # Show Beads Integration plan
```

## Output Format

The script outputs formatted Markdown:

```markdown
# Plan Title

**Status:** Planning (Phase 0/4)
**Estimate:** ~2d (ai:1d test:0.5d read:0.5d)
**Progress:** Phase 0 of 4

## Purpose

Brief description of why this work matters and what problem it solves.

## Progress

- [ ] Phase 1: Description ~Xh
- [ ] Phase 2: Description ~Xh
- [x] Phase 3: Description ~Xh (completed)

## Context

Key decisions, research findings, constraints from conversation.

## Decisions

- **Decision:** What was decided
**Rationale:** Why this choice was made
**Date:** YYYY-MM-DD

## Discoveries

- **Observation:** What was unexpected
**Evidence:** How we know this
**Impact:** How it affects the plan

## Related Tasks

- t008: aidevops-opencode Plugin
- t009: Claude Code Destructive Command Hooks

---

**Options:**
1. Start working on this plan
2. View another plan
3. Back to task list (`/list-todo`)
```

## After Display

Wait for user input:

1. **"1"** - Begin working on the plan
- Run pre-edit check
- Create/switch to appropriate branch
- Mark first pending phase as in-progress

2. **"2"** - View another plan
- Prompt for plan name, then run `/show-plan <name>`

3. **"3"** - Return to task list
- Run `/list-todo`

Comment on lines +115 to +116

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The option "back" is mentioned as a valid input, but it's not explicitly presented as one of the numbered options in the "Output Format" section. For consistency and clarity, ensure all valid inputs are clearly documented.

Suggested change
- Run `/list-todo`
3. **"3"** - Return to task list

## Starting Work on a Plan

When user chooses to start:

1. **Check branch status:**

```bash
~/.aidevops/agents/scripts/pre-edit-check.sh
```

2. **Create branch if needed:**
- Derive branch name from plan title
- Use worktree: `wt switch -c feature/<plan-slug>`

3. **Update plan status:**
- Change `**Status:** Planning` to `**Status:** In Progress (Phase 1/N)`
- Add `started:` timestamp to first phase

4. **Show next steps:**
- Display first phase description
- List any blockers or dependencies

## Related Commands

- `/list-todo` - List all tasks and plans
- `/save-todo` - Save current discussion as task/plan
- `/ready` - Show tasks with no blockers
Loading