hyper-pm 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/README.md +16 -15
  2. package/dist/index.cjs +493 -182
  3. package/dist/main.cjs +493 -182
  4. package/package.json +3 -3
package/README.md CHANGED
@@ -66,14 +66,15 @@ Uses global options only (no subcommand-specific flags).
66
66
 
67
67
  ### `ticket`
68
68
 
69
- | Subcommand | Description | Options |
70
- | ---------- | ----------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
71
- | `create` | Create a ticket | **Required:** `--title <t>`. **Optional:** `--story <id>` (omit to create an unlinked ticket; story must exist), `--body <b>` (default `""`), `--id <id>`, `--status <s>` (default `todo`), `--assignee <login>` (GitHub login, normalized), `--branch <name>` (repeatable; link git branches), `--label <name>` (repeatable), `--priority <p>` (low, medium, high, urgent), `--size <s>` (xs, s, m, l, xl), `--estimate <n>` (non-negative number), `--start-at` / `--target-finish-at` (ISO-8601), `--ai-draft` (draft body via AI; needs `HYPER_PM_AI_API_KEY`) |
72
- | `read` | One ticket or list all | `--id <id>` (JSON includes `storyId` — `null` when unlinked — plus `assignee`, `linkedBranches`, `comments` (from `ticket comment`), `prActivityRecent`, and planning fields `labels`, `priority`, `size`, `estimate`, `startWorkAt`, `targetFinishAt` when set / list rows omit empty planning fields). **When listing (omit `--id`):** `--story <id>` _or_ `--epic <id>` _or_ `--without-story` (each mutually exclusive); `--status <s>` repeatable (OR of `backlog`, `todo`, `in_progress`, `done`, `cancelled`); `--priority <p>` / `--size <s>` repeatable (OR); `--label <name>` repeatable (ticket must have **every** listed label); `--estimate-min` / `--estimate-max`; `--start-after` / `--start-before`, `--target-finish-after` / `--target-finish-before` (ISO-8601, inclusive, on `startWorkAt` / `targetFinishAt`); date bounds `--created-after` / `--created-before`, `--updated-after` / `--updated-before`, `--status-changed-after` / `--status-changed-before` (ISO-8601, inclusive); `--created-by` / `--updated-by` / `--status-changed-by` (substring, case-sensitive); `--title-contains` (case-insensitive); `--github-linked` (only tickets with `githubIssueNumber`); `--branch <name>` (normalized exact match on a linked branch); **`--sort-by`** (`id`, `title`, `status`, `storyId`, `createdAt`, `updatedAt`, `statusChangedAt`, `assignee`, `githubIssueNumber`, `lastPrActivityAt`, `priority`, `size`, `estimate`, `startWorkAt`, `targetFinishAt`; default `id`); **`--sort-dir`** `asc`\|`desc` (default `asc`; ties break on `id` ascending) |
73
- | `update` | Patch a ticket | **Required:** `--id <id>`. **Optional:** `--title <t>`, `--body <b>`, `--status <s>` (same status values), `--story <id>` (attach to story; mutually exclusive with `--unlink-story`), `--unlink-story` (clear story), `--assignee <login>`, `--unassign` (mutually exclusive with `--assignee`), `--add-branch <name>` / `--remove-branch <name>` (repeatable; mutually exclusive with `--clear-branches`), `--clear-branches` (clear all linked branches), `--add-label <name>` / `--remove-label <name>` (repeatable; mutually exclusive with `--clear-labels`), `--clear-labels`, `--priority <p>` (mutually exclusive with `--clear-priority`), `--clear-priority`, `--size <s>` (mutually exclusive with `--clear-size`), `--clear-size`, `--estimate <n>` (mutually exclusive with `--clear-estimate`), `--clear-estimate`, `--start-at` / `--clear-start-at`, `--target-finish-at` / `--clear-target-finish-at`, `--ai-improve` (rewrite `--body` with AI; **requires** `--body` and `HYPER_PM_AI_API_KEY`) |
74
- | `work` | Start work in the primary clone | **Required:** `--id <id>`. **Optional:** `--branch <name>` (default `hyper-pm/<id>`; if that local branch already exists, appends `-2`, `-3`, … to the **whole** preferred name, e.g. `hyper-pm/ticket-1` → `hyper-pm/ticket-1-2`), `--from <ref>` (fork point; default: `refs/remotes/<remote>/HEAD` when present, else `main`, `master`, or `HEAD`). Creates and checks out the new branch, sets the ticket to `in_progress`, and appends the branch to linked branches. Rejects tickets in `done` or `cancelled`. Success JSON includes `branch` and, when a suffix was applied, `branchPreferred`. |
75
- | `comment` | Append a ticket comment (local event log) | **Required:** `--id <id>`, `--body <text>` (non-empty after trim). Appends `TicketCommentAdded`; `ticket read --id` includes a `comments` array. |
76
- | `delete` | Soft-delete a ticket | **Required:** `--id <id>` |
69
+ | Subcommand | Description | Options |
70
+ | --------------- | ----------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
71
+ | `create` | Create a ticket | **Required:** `--title <t>`. **Optional:** `--story <id>` (omit to create an unlinked ticket; story must exist), `--body <b>` (default `""`), `--id <id>`, `--status <s>` (default `todo`), `--assignee <login>` (GitHub login, normalized), `--branch <name>` (repeatable; link git branches), `--label <name>` (repeatable), `--priority <p>` (low, medium, high, urgent), `--size <s>` (xs, s, m, l, xl), `--estimate <n>` (non-negative number), `--start-at` / `--target-finish-at` (ISO-8601), `--ai-draft` (draft body via AI; needs `HYPER_PM_AI_API_KEY`) |
72
+ | `read` | One ticket or list all | `--id <id>` (JSON includes `storyId` — `null` when unlinked — plus `assignee`, `linkedBranches`, `comments` (from `ticket comment`), `prActivityRecent`, and planning fields `labels`, `priority`, `size`, `estimate`, `startWorkAt`, `targetFinishAt` when set / list rows omit empty planning fields). **When listing (omit `--id`):** `--story <id>` _or_ `--epic <id>` _or_ `--without-story` (each mutually exclusive); `--status <s>` repeatable (OR of `backlog`, `todo`, `in_progress`, `done`, `cancelled`); `--priority <p>` / `--size <s>` repeatable (OR); `--label <name>` repeatable (ticket must have **every** listed label); `--estimate-min` / `--estimate-max`; `--start-after` / `--start-before`, `--target-finish-after` / `--target-finish-before` (ISO-8601, inclusive, on `startWorkAt` / `targetFinishAt`); date bounds `--created-after` / `--created-before`, `--updated-after` / `--updated-before`, `--status-changed-after` / `--status-changed-before` (ISO-8601, inclusive); `--created-by` / `--updated-by` / `--status-changed-by` (substring, case-sensitive); `--title-contains` (case-insensitive); `--github-linked` (only tickets with `githubIssueNumber`); `--branch <name>` (normalized exact match on a linked branch); **`--sort-by`** (`id`, `title`, `status`, `storyId`, `createdAt`, `updatedAt`, `statusChangedAt`, `assignee`, `githubIssueNumber`, `lastPrActivityAt`, `priority`, `size`, `estimate`, `startWorkAt`, `targetFinishAt`; default `id`); **`--sort-dir`** `asc`\|`desc` (default `asc`; ties break on `id` ascending) |
73
+ | `update` | Patch a ticket | **Required:** `--id <id>`. **Optional:** `--title <t>`, `--body <b>`, `--status <s>` (same status values), `--story <id>` (attach to story; mutually exclusive with `--unlink-story`), `--unlink-story` (clear story), `--assignee <login>`, `--unassign` (mutually exclusive with `--assignee`), `--add-branch <name>` / `--remove-branch <name>` (repeatable; mutually exclusive with `--clear-branches`), `--clear-branches` (clear all linked branches), `--add-label <name>` / `--remove-label <name>` (repeatable; mutually exclusive with `--clear-labels`), `--clear-labels`, `--priority <p>` (mutually exclusive with `--clear-priority`), `--clear-priority`, `--size <s>` (mutually exclusive with `--clear-size`), `--clear-size`, `--estimate <n>` (mutually exclusive with `--clear-estimate`), `--clear-estimate`, `--start-at` / `--clear-start-at`, `--target-finish-at` / `--clear-target-finish-at`, `--ai-improve` (rewrite `--body` with AI; **requires** `--body` and `HYPER_PM_AI_API_KEY`) |
74
+ | `work` | Start work in the primary clone | **Required:** `--id <id>`. **Optional:** `--branch <name>` (default `hyper-pm/<id>`; if that local branch already exists, appends `-2`, `-3`, … to the **whole** preferred name, e.g. `hyper-pm/ticket-1` → `hyper-pm/ticket-1-2`), `--from <ref>` (fork point; default: `refs/remotes/<remote>/HEAD` when present, else `main`, `master`, or `HEAD`). Creates and checks out the new branch, sets the ticket to `in_progress`, and appends the branch to linked branches. Rejects tickets in `done` or `cancelled`. Success JSON includes `branch` and, when a suffix was applied, `branchPreferred`. |
75
+ | `comment` | Append a ticket comment (local event log) | **Required:** `--id <id>`, `--body <text>` (non-empty after trim). Appends `TicketCommentAdded`; `ticket read --id` includes a `comments` array. |
76
+ | `delete` | Soft-delete a ticket | **Required:** `--id <id>` |
77
+ | `import-github` | Import GitHub issues as local tickets | **Optional:** `--dry-run` (list candidates and skips, no JSONL writes), `--story <id>` (attach every imported ticket to this story; must exist), `--state <s>` (`open`, `closed`, or `all`; default `all` — passed to GitHub’s issues list), `--issue <n>` (repeatable or comma-separated; only consider those numbers). Requires `issueMapping: "ticket"` in config. Skips pull requests, issues already linked to a ticket, and issues whose body contains a non-empty `hyper_pm_id` in the JSON fence (live ticket, deleted ticket, or broken reference). Maps title (strips `[hyper-pm]` prefix), description before the first fenced block, closed state → `done`, first assignee, non-reserved labels, and known planning fields from the fence. After a real import, run `sync` once so outbound sync rewrites each GitHub body with the hyper-pm fence. |
77
78
 
78
79
  Tickets store at most one assignee (GitHub login). With GitHub sync, outbound updates set that user as the issue’s only assignee (extra assignees on the issue may be removed), and inbound reads the first assignee from the API when the issue has several. Outbound **creates** GitHub issues only for tickets that have a valid epic+story chain; unlinked tickets are skipped until you set `--story`. Tickets that **already** have a linked GitHub issue are still **updated** when unlinked (issue body drops parent ids until you link again).
79
80
 
@@ -127,13 +128,13 @@ No subcommand-specific options.
127
128
 
128
129
  See `apps/hyper-pm/env.example`. Commonly:
129
130
 
130
- | Variable | Used for |
131
- | --------------------- | ----------------------------------------------------------------------------- |
132
- | `GITHUB_REPO` | Default repo slug (`owner/repo`) |
133
- | `GITHUB_TOKEN` | `sync` and GitHub identity for outbound actor (optional if `gh` is logged in) |
134
- | `HYPER_PM_AI_API_KEY` | `ticket create --ai-draft`, `ticket update --ai-improve` |
135
- | `HYPER_PM_ACTOR` | Default audit label for mutations (override with `--actor`) |
136
- | `TMPDIR` | Default parent for disposable worktrees (override with `--temp-dir`) |
131
+ | Variable | Used for |
132
+ | --------------------- | ------------------------------------------------------------------------------------------------------ |
133
+ | `GITHUB_REPO` | Default repo slug (`owner/repo`) |
134
+ | `GITHUB_TOKEN` | `sync`, `ticket import-github`, and GitHub identity for outbound actor (optional if `gh` is logged in) |
135
+ | `HYPER_PM_AI_API_KEY` | `ticket create --ai-draft`, `ticket update --ai-improve` |
136
+ | `HYPER_PM_ACTOR` | Default audit label for mutations (override with `--actor`) |
137
+ | `TMPDIR` | Default parent for disposable worktrees (override with `--temp-dir`) |
137
138
 
138
139
  ## Publishing to npm
139
140