diff --git a/README.md b/README.md index 630f2cf..1a532d1 100644 --- a/README.md +++ b/README.md @@ -118,8 +118,11 @@ isq issue list --tree # Tree view with indentation isq issue list --flat # Flat list including all sub-issues isq issue list --children-of 42 # Children of issue #42 -# Create, comment, close +# Create, edit, comment, close isq issue create --title "Fix login bug" +isq issue edit 423 --title "Fix login bug (network timeout)" +isq issue edit 423 --body - < findings.md # Read body from stdin +isq issue update 423 --title "..." # Alias for edit isq issue comment 423 "Fixed in abc123" isq issue close 423 @@ -180,6 +183,7 @@ Cleared issue #891 association | `isq issue list` | List issues (`--label`, `--state`, `--mine`, `--tree`, `--flat`, `--children-of`) | | `isq issue show ` | Show issue details | | `isq issue create --title "..."` | Create new issue | +| `isq issue edit [--title] [--body] [--priority]` | Edit mutable fields (`update` alias) | | `isq issue comment "..."` | Add comment | | `isq issue close ` | Close issue | | `isq issue reopen ` | Reopen issue | @@ -199,6 +203,11 @@ Cleared issue #891 association Add `--json` to any command for machine-readable output. +`isq issue edit` notes: +- `--body -` reads from stdin (same pattern as create/comment piping) +- `--priority` uses `0=urgent, 1=high, 2=medium, 3=low, 4=none` +- Priority updates are supported on Linear; JIRA supports `0..3`; GitHub priority should be managed via labels + ## Views (Saved Filters) Create named filter combinations to avoid typing the same flags repeatedly: diff --git a/V1_TEST_PLAN.md b/V1_TEST_PLAN.md deleted file mode 100644 index 9f1f1bf..0000000 --- a/V1_TEST_PLAN.md +++ /dev/null @@ -1,586 +0,0 @@ -# isq V1 Test Plan - -**Target Release**: ~Feb 1 -**Goal**: Production-ready CLI for daily use without bugs - ---- - -## Pre-Test Setup - -```bash -# Build release binary -cargo build --release - -# Run lint checks -scripts/lint.sh --ci - -# Run all unit tests -cargo test -``` - ---- - -## 1. Installation & Updates - -### 1.1 Fresh Install - -| # | Test | Command / Steps | Expected | -|---|------|-----------------|----------| -| 1.1.1 | macOS/Linux install | `curl -LsSf https://cameronwestland.com/isq/install.sh \| sh` | Binary installed, PATH configured | -| 1.1.2 | Version check | `isq --version` | Version number displayed | -| 1.1.3 | Help available | `isq --help` | All commands listed | - -### 1.2 Update Flow - -| # | Test | Command / Steps | Expected | -|---|------|-----------------|----------| -| 1.2.1 | Check for updates | `isq update check` | Shows current vs latest version | -| 1.2.2 | Check JSON output | `isq update check --json` | Valid JSON with version info | -| 1.2.3 | Install update | `isq update install` | Downloads and installs new version | - -### 1.3 Uninstall - -| # | Test | Command / Steps | Expected | -|---|------|-----------------|----------| -| 1.3.1 | Dry run | `isq uninstall --dry-run` | Shows what would be removed | -| 1.3.2 | Keep config | `isq uninstall --keep-config` | Removes binary/cache, keeps config | -| 1.3.3 | Full uninstall | `isq uninstall -y` | Removes all isq files | - ---- - -## 2. Authentication - -### 2.1 GitHub - -| # | Test | Command / Steps | Expected | -|---|------|-----------------|----------| -| 2.1.1 | OAuth login | `isq link github` (new user) | Opens browser, completes OAuth | -| 2.1.2 | PAT fallback | `isq link github` (no browser) | Prompts for PAT | -| 2.1.3 | gh CLI token reuse | Have `gh` auth'd, run `isq link github` | Detects and offers to use gh token | -| 2.1.4 | Logout | `isq logout github` | Removes stored credentials | -| 2.1.5 | Re-auth | `isq link github` after logout | Can re-authenticate | - -### 2.2 Linear - -| # | Test | Command / Steps | Expected | -|---|------|-----------------|----------| -| 2.2.1 | OAuth PKCE | `isq link linear` | Opens browser, completes OAuth | -| 2.2.2 | API key auth | `isq link linear` (select API key) | Prompts for API key | -| 2.2.3 | Logout | `isq logout linear` | Removes stored credentials | - -### 2.3 JIRA Cloud - -| # | Test | Command / Steps | Expected | -|---|------|-----------------|----------| -| 2.3.1 | OAuth PKCE | `isq link jira` | Opens browser, completes OAuth | -| 2.3.2 | API token auth | `isq link jira` (select API token) | Prompts for email + token | -| 2.3.3 | List projects | `isq link jira -o list-projects` | Shows available projects | -| 2.3.4 | Link project | `isq link jira -o project=MYPROJ` | Links to specific project | -| 2.3.5 | Logout | `isq logout jira` | Removes stored credentials | - ---- - -## 3. Repo Linking - -| # | Test | Command / Steps | Expected | -|---|------|-----------------|----------| -| 3.1 | Link repo | `isq link github` (in git repo) | Repo linked, commit hook installed | -| 3.2 | Status check | `isq status` | Shows linked forge, auth status, sync health | -| 3.3 | Unlink | `isq unlink` | Removes link and commit hook | -| 3.4 | Link non-repo | `isq link github` (not in git repo) | Clear error message | -| 3.5 | Multiple forges | Link GitHub in repo1, Linear in repo2, verify independent | Each repo maintains separate link | - ---- - -## 4. Issue Operations - -### 4.1 Listing Issues - -| # | Test | Command / Steps | Expected | -|---|------|-----------------|----------| -| 4.1.1 | Basic list | `isq issue list` | Shows issues (instant from cache) | -| 4.1.2 | Filter by state | `isq issue list --state=open` | Only open issues | -| 4.1.3 | Filter by state closed | `isq issue list --state=closed` | Only closed issues | -| 4.1.4 | Filter by label | `isq issue list --label=bug` | Only issues with "bug" label | -| 4.1.5 | Multiple labels | `isq issue list --label=bug --label=p0` | Issues with both labels | -| 4.1.6 | My issues | `isq issue list --mine` | Only issues assigned to me | -| 4.1.7 | Specific IDs | `isq issue list --id 7,12,45` | Only issues #7, #12, #45 | -| 4.1.8 | Sort by priority | `isq issue list --sort priority` | Priority-ordered (default) | -| 4.1.9 | Sort by newest | `isq issue list --sort newest` | Newest first | -| 4.1.10 | Sort by oldest | `isq issue list --sort oldest` | Oldest first | -| 4.1.11 | Sort by updated | `isq issue list --sort updated` | Most recently updated first | -| 4.1.12 | JSON output | `isq issue list --json` | Valid parseable JSON | - -### 4.2 Issue Hierarchy - -| # | Test | Command / Steps | Expected | -|---|------|-----------------|----------| -| 4.2.1 | Default (root only) | `isq issue list` (when sub-issues exist) | Shows only root issues | -| 4.2.2 | Tree view | `isq issue list --tree` | Shows hierarchy with indentation | -| 4.2.3 | Flat view | `isq issue list --flat` | Shows all issues including sub-issues | -| 4.2.4 | Children of | `isq issue list --children-of 42` | Shows children of issue #42 | - -### 4.3 Show Issue - -| # | Test | Command / Steps | Expected | -|---|------|-----------------|----------| -| 4.3.1 | Show issue | `isq issue show 123` | Displays issue details | -| 4.3.2 | Show JSON | `isq issue show 123 --json` | Valid JSON output | -| 4.3.3 | Non-existent issue | `isq issue show 999999` | Clear error message | - -### 4.4 Create Issue - -| # | Test | Command / Steps | Expected | -|---|------|-----------------|----------| -| 4.4.1 | Basic create | `isq issue create --title "Test issue"` | Issue created, ID returned | -| 4.4.2 | With body | `isq issue create --title "Test" --body "Description"` | Issue with body created | -| 4.4.3 | With label | `isq issue create --title "Bug" --label bug` | Issue with label created | -| 4.4.4 | With parent | `isq issue create --title "Subtask" --parent 42` | Sub-issue created | -| 4.4.5 | Pipe content | `echo "Body text" \| isq issue create --title "Test"` | Body from stdin | -| 4.4.6 | JSON output | `isq issue create --title "Test" --json` | Returns JSON with issue data | - -### 4.5 Comment - -| # | Test | Command / Steps | Expected | -|---|------|-----------------|----------| -| 4.5.1 | Add comment | `isq issue comment 123 "Test comment"` | Comment added | -| 4.5.2 | Pipe comment | `echo "Comment text" \| isq issue comment 123` | Comment from stdin | -| 4.5.3 | JSON output | `isq issue comment 123 "Test" --json` | Returns JSON with comment data | - -### 4.6 State Changes - -| # | Test | Command / Steps | Expected | -|---|------|-----------------|----------| -| 4.6.1 | Close issue | `isq issue close 123` | Issue closed | -| 4.6.2 | Reopen issue | `isq issue reopen 123` | Issue reopened | -| 4.6.3 | Close JSON | `isq issue close 123 --json` | Returns JSON | - -### 4.7 Labels - -| # | Test | Command / Steps | Expected | -|---|------|-----------------|----------| -| 4.7.1 | Add label | `isq issue label 123 add bug` | Label added | -| 4.7.2 | Remove label | `isq issue label 123 remove bug` | Label removed | -| 4.7.3 | Non-existent label | `isq issue label 123 add nonexistent` | Clear error message | - -### 4.8 Assignment - -| # | Test | Command / Steps | Expected | -|---|------|-----------------|----------| -| 4.8.1 | Assign user | `isq issue assign 123 username` | Issue assigned | -| 4.8.2 | Unassign | `isq issue assign 123 ""` | Issue unassigned | - ---- - -## 5. Labels - -| # | Test | Command / Steps | Expected | -|---|------|-----------------|----------| -| 5.1 | List labels | `isq label list` | Shows all repo labels | -| 5.2 | List JSON | `isq label list --json` | Valid JSON output | -| 5.3 | Create label | `isq label create test-label --color ff0000` | Label created | -| 5.4 | Create with desc | `isq label create test-label --description "Test"` | Label with description | - ---- - -## 6. Goals (Milestones/Projects) - -| # | Test | Command / Steps | Expected | -|---|------|-----------------|----------| -| 6.1 | List goals | `isq goal list` | Shows milestones/projects | -| 6.2 | List open | `isq goal list --state=open` | Only open goals | -| 6.3 | Show goal | `isq goal show "Q1 Release"` | Goal details | -| 6.4 | Create goal | `isq goal create "Q2 Release" --target "2024-06-30"` | Goal created | -| 6.5 | Assign issue | `isq goal assign 123 "Q2 Release"` | Issue assigned to goal | -| 6.6 | Close goal | `isq goal close "Q1 Release"` | Goal closed | -| 6.7 | JSON output | `isq goal list --json` | Valid JSON | - ---- - -## 7. Views (Saved Filters) - -| # | Test | Command / Steps | Expected | -|---|------|-----------------|----------| -| 7.1 | Create view | `isq view create my-bugs --label=bug --state=open --mine` | View saved | -| 7.2 | List views | `isq view list` | Shows all saved views | -| 7.3 | Use view | `isq issue list @my-bugs` | Applies saved filters | -| 7.4 | View + override | `isq issue list @my-bugs --state=closed` | Override view settings | -| 7.5 | Create hierarchy view | `isq view create epics --root-only` | View saved | -| 7.6 | Create tree view | `isq view create hierarchy --tree` | View saved | -| 7.7 | Delete view | `isq view delete my-bugs` | View removed | -| 7.8 | View JSON | `isq view list --json` | Valid JSON | - ---- - -## 8. Development Workflow (Worktrees) - -### 8.1 Start Flow - -| # | Test | Command / Steps | Expected | -|---|------|-----------------|----------| -| 8.1.1 | Start issue | `isq start 123` | Worktree created, branch created | -| 8.1.2 | Branch naming | Check branch name after start | Format: `123-slugified-title` | -| 8.1.3 | Setup script | `.config/isq.toml` with setup command | Setup script executes | -| 8.1.4 | on_start labels | Config with `add_labels = ["in progress"]` | Label added on start | -| 8.1.5 | on_start assign | Config with `assign_self = true` | Assigned to current user | - -### 8.2 Current Issue - -| # | Test | Command / Steps | Expected | -|---|------|-----------------|----------| -| 8.2.1 | Show current | `isq` (in worktree) | Shows current issue + context | -| 8.2.2 | Current ID | `isq current` | Prints just the issue ID | -| 8.2.3 | Current quiet | `isq current --quiet` | Prints ID, no error if none | -| 8.2.4 | No current | `isq current` (not in worktree) | Clear error message | - -### 8.3 Cleanup Flow - -| # | Test | Command / Steps | Expected | -|---|------|-----------------|----------| -| 8.3.1 | Cleanup | `isq cleanup` | Worktree removed, association cleared | -| 8.3.2 | Cleanup keep | `isq cleanup --keep` | Preserves worktree directory | -| 8.3.3 | on_cleanup labels | Config with `remove_labels = ["in progress"]` | Label removed | -| 8.3.4 | on_cleanup transition | Linear/JIRA config with `transition = "backlog"` | Issue transitioned | - ---- - -## 9. Sync & Daemon - -### 9.1 Manual Sync - -| # | Test | Command / Steps | Expected | -|---|------|-----------------|----------| -| 9.1.1 | Manual sync | `isq sync` | Issues synced from forge | -| 9.1.2 | Sync quiet | `isq sync --quiet` | No output on success | -| 9.1.3 | Sync progress | `isq sync` | Shows sync progress | - -### 9.2 Daemon Control - -| # | Test | Command / Steps | Expected | -|---|------|-----------------|----------| -| 9.2.1 | Daemon status | `isq daemon status` | Shows running state, watched repos | -| 9.2.2 | Daemon start | `isq daemon start` | Daemon starts | -| 9.2.3 | Daemon stop | `isq daemon stop` | Daemon stops gracefully | -| 9.2.4 | Daemon logs | `isq daemon logs -n 50` | Shows recent logs | -| 9.2.5 | Daemon logs follow | `isq daemon logs -f` | Tails logs | -| 9.2.6 | Watch repo | `isq daemon watch` | Repo added to watch list | -| 9.2.7 | Unwatch repo | `isq daemon unwatch` | Repo removed from watch list | -| 9.2.8 | Single instance | Start daemon twice | Second attempt recognizes existing | - ---- - -## 10. Diagnostics - -| # | Test | Command / Steps | Expected | -|---|------|-----------------|----------| -| 10.1 | Status overview | `isq status` | Shows auth, daemon, sync health | -| 10.2 | Doctor all | `isq doctor` | Runs all diagnostic checks | -| 10.3 | Doctor auth | `isq doctor --check=auth` | Checks authentication | -| 10.4 | Doctor repo | `isq doctor --check=repo` | Checks repo link | -| 10.5 | Doctor sync | `isq doctor --check=sync` | Checks sync state | -| 10.6 | Doctor database | `isq doctor --check=database` | Checks SQLite integrity | -| 10.7 | Doctor network | `isq doctor --check=network` | Checks API connectivity | -| 10.8 | Doctor service | `isq doctor --check=service` | Checks daemon status | -| 10.9 | Doctor install | `isq doctor --check=install` | Checks installation | - ---- - -## 11. Offline Behavior - -| # | Test | Command / Steps | Expected | -|---|------|-----------------|----------| -| 11.1 | Read offline | Disconnect network, `isq issue list` | Works from cache | -| 11.2 | Write offline | Disconnect, `isq issue comment 123 "Test"` | Queued locally | -| 11.3 | Sync on reconnect | Reconnect, `isq sync` | Pending ops applied | -| 11.4 | Offline status | `isq status` (offline) | Shows offline state | - ---- - -## 12. Cross-Forge Consistency - -Run these tests on each forge (GitHub, Linear, JIRA): - -| # | Test | Command | GitHub | Linear | JIRA | -|---|------|---------|--------|--------|------| -| 12.1 | Link | `isq link ` | [ ] | [ ] | [ ] | -| 12.2 | List issues | `isq issue list` | [ ] | [ ] | [ ] | -| 12.3 | Create issue | `isq issue create --title "Test"` | [ ] | [ ] | [ ] | -| 12.4 | Add comment | `isq issue comment "Test"` | [ ] | [ ] | [ ] | -| 12.5 | Close issue | `isq issue close ` | [ ] | [ ] | [ ] | -| 12.6 | Reopen issue | `isq issue reopen ` | [ ] | [ ] | [ ] | -| 12.7 | Add label | `isq issue label add