@picoai/tickets 0.2.0 → 0.4.0

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.
@@ -0,0 +1,31 @@
1
+ workflow:
2
+ mode: auto
3
+ defaults:
4
+ planning:
5
+ node_type: work
6
+ lane: null
7
+ horizon: null
8
+ claims:
9
+ ttl_minutes: 60
10
+ semantics:
11
+ terms:
12
+ feature:
13
+ field: planning.node_type
14
+ value: group
15
+ description: A feature is modeled as a group node containing related work.
16
+ phase:
17
+ field: planning.lane
18
+ description: A phase is modeled as a lane value that orders work at a coarse level.
19
+ milestone:
20
+ field: planning.node_type
21
+ value: checkpoint
22
+ description: A milestone is modeled as a checkpoint node with derived completion.
23
+ roadmap:
24
+ field: planning.horizon
25
+ description: A roadmap is modeled as a horizon value across groups and checkpoints.
26
+ views:
27
+ plan:
28
+ sort_by:
29
+ - planning.lane
30
+ - planning.rank
31
+ - priority
@@ -0,0 +1,106 @@
1
+ # Ticket Format Spec (Version 3)
2
+
3
+ - Version: 3
4
+ - Version URL: `version/20260317-2-tickets-spec.md`
5
+ - Released: 2026-03-17
6
+ - Status: current
7
+
8
+ ## Definition (format and derived tooling contract)
9
+ This version defines the ticket, repo config, log, and derived planning-index contracts used by this repo. Workflow policy and narrative guidance live in `TICKETS.md`.
10
+
11
+ ### Ticket front matter (required)
12
+ - `id`: lowercase UUIDv7 string
13
+ - `version`: format version (integer)
14
+ - `version_url`: path to this definition (repo-local, relative to `.tickets/spec/`)
15
+ - `title`: string
16
+ - `status`: `todo|doing|blocked|done|canceled`
17
+ - `created_at`: ISO 8601 UTC timestamp
18
+
19
+ ### Ticket front matter (optional)
20
+ - `priority`: `low|medium|high|critical`
21
+ - `labels`: list of strings
22
+ - `assignment`: mapping
23
+ - `dependencies`: list of ticket IDs
24
+ - `blocks`: list of ticket IDs
25
+ - `related`: list of ticket IDs
26
+ - `planning`: mapping
27
+ - `node_type`: `work|group|checkpoint`
28
+ - `group_ids`: list of ticket IDs
29
+ - `lane`: string or null
30
+ - `rank`: positive integer or null
31
+ - `horizon`: string or null
32
+ - `precedes`: list of ticket IDs
33
+ - `resolution`: `completed|merged|dropped|null`
34
+ - `agent_limits`: mapping
35
+ - `verification`: mapping
36
+ - `custom`: mapping
37
+
38
+ Rules:
39
+ - `resolution` is only valid when `status` is terminal (`done` or `canceled`)
40
+ - grouping is persisted only through `planning.group_ids`
41
+ - sequencing is persisted only through `planning.precedes`
42
+ - `planning.group_ids` may only reference `group` or `checkpoint` tickets
43
+ - `planning.precedes` must not contain cycles
44
+ - group/checkpoint containment must not contain cycles
45
+ - duplicate `rank` values are invalid within the same peer set (`node_type`, sorted `group_ids`, `lane`, `horizon`)
46
+
47
+ ### Repo config (`.tickets/config.yml`)
48
+ - `workflow.mode`: `auto|doc_first|skill_first`
49
+ - `defaults.planning.node_type`: `work|group|checkpoint`
50
+ - `defaults.planning.lane`: string or null
51
+ - `defaults.planning.horizon`: string or null
52
+ - `defaults.claims.ttl_minutes`: positive integer
53
+ - `semantics.terms`: mapping from human-facing terms to generic planning primitives
54
+ - `views`: repo-local reporting preferences
55
+
56
+ Repo config may override defaults and human semantic mappings, but may not redefine CLI invariants, status values, or log schema.
57
+
58
+ ### Log entry (required)
59
+ - `version`: format version (integer)
60
+ - `version_url`: path to this definition (repo-local, relative to `.tickets/spec/`)
61
+ - `ts`: ISO 8601 UTC timestamp
62
+ - `run_started`: ISO 8601 UTC timestamp
63
+ - `actor_type`: `human|agent`
64
+ - `actor_id`: string
65
+ - `summary`: short string
66
+ - `event_type`: `status|work|claim`
67
+
68
+ ### Log entry (conditional)
69
+ - `context`: non-empty list of strings when `event_type: work` and the entry is machine-written
70
+ - `claim`: required mapping when `event_type: claim`
71
+ - `action`: `acquire|renew|release|override`
72
+ - `claim_id`: UUIDv7 string
73
+ - `holder_id`: string
74
+ - `holder_type`: `human|agent`
75
+ - `ttl_minutes`: positive integer for non-release events
76
+ - `expires_at`: ISO 8601 UTC timestamp for non-release events
77
+ - `reason`: optional string
78
+ - `supersedes_claim_id`: optional UUIDv7 string or null
79
+
80
+ ### Derived planning index (`/.tickets/derived/planning-index.json`)
81
+ - The index is derived cache state, not source of truth.
82
+ - The file is disposable and may be rebuilt at any time by the CLI.
83
+ - Required metadata:
84
+ - `index_format_id`: fixed UUIDv7 identifying the derived index format
85
+ - `index_format_label`: readable label for the index format revision
86
+ - `tool.format_version`
87
+ - `tool.format_version_url`
88
+ - `source_state`
89
+ - The CLI must rebuild the index when source files or embedded format/tool metadata no longer match.
90
+
91
+ ### Reporting semantics
92
+ - `list` is the broad queue/report view.
93
+ - `plan` is the operational state view for ready, active, blocked, and group rollups.
94
+ - `graph` is the structural relationship view.
95
+ - Repo-specific planning language remains authoritative only in `.tickets/config.yml`.
96
+
97
+ ### Extensions
98
+ - Extensions are repo-local and must live under the `custom` key.
99
+ - Tools should ignore unknown keys under `custom`.
100
+
101
+ ## Diff from previous version
102
+ - Added planning-default overrides for `lane` and `horizon` in `.tickets/config.yml`.
103
+ - Added global planning validation for missing references, invalid group targets, cycles, and rank conflicts.
104
+ - Defined the derived planning index and its invalidation requirements.
105
+ - Clarified the operational split between `list`, `plan`, and `graph`.
106
+ - Clarified that repo-specific semantic mappings remain authoritative only in `.tickets/config.yml`.
@@ -0,0 +1,82 @@
1
+ # Ticket Format Spec (Version 3)
2
+
3
+ - Version: 3
4
+ - Version URL: `version/20260317-tickets-spec.md`
5
+ - Released: 2026-03-17
6
+ - Status: current
7
+
8
+ ## Definition (format only)
9
+ This version defines the ticket, repo config, and log formats used by this repo. Workflow policy and narrative guidance live in `TICKETS.md`.
10
+
11
+ ### Ticket front matter (required)
12
+ - `id`: lowercase UUIDv7 string
13
+ - `version`: format version (integer)
14
+ - `version_url`: path to this definition (repo-local, relative to `.tickets/spec/`)
15
+ - `title`: string
16
+ - `status`: `todo|doing|blocked|done|canceled`
17
+ - `created_at`: ISO 8601 UTC timestamp
18
+
19
+ ### Ticket front matter (optional)
20
+ - `priority`: `low|medium|high|critical`
21
+ - `labels`: list of strings
22
+ - `assignment`: mapping
23
+ - `dependencies`: list of ticket IDs
24
+ - `blocks`: list of ticket IDs
25
+ - `related`: list of ticket IDs
26
+ - `planning`: mapping
27
+ - `node_type`: `work|group|checkpoint`
28
+ - `group_ids`: list of ticket IDs
29
+ - `lane`: string or null
30
+ - `rank`: positive integer or null
31
+ - `horizon`: string or null
32
+ - `precedes`: list of ticket IDs
33
+ - `resolution`: `completed|merged|dropped|null`
34
+ - `agent_limits`: mapping
35
+ - `verification`: mapping
36
+ - `custom`: mapping
37
+
38
+ Rules:
39
+ - `resolution` is only valid when `status` is terminal (`done` or `canceled`)
40
+ - grouping is persisted only through `planning.group_ids`
41
+ - sequencing is persisted only through `planning.precedes`
42
+
43
+ ### Repo config (`.tickets/config.yml`)
44
+ - `workflow.mode`: `auto|doc_first|skill_first`
45
+ - `defaults`: repo-local defaults
46
+ - `semantics.terms`: mapping from human-facing terms to generic planning primitives
47
+ - `views`: repo-local reporting preferences
48
+
49
+ Repo config may override defaults and human semantic mappings, but may not redefine CLI invariants, status values, or log schema.
50
+
51
+ ### Log entry (required)
52
+ - `version`: format version (integer)
53
+ - `version_url`: path to this definition (repo-local, relative to `.tickets/spec/`)
54
+ - `ts`: ISO 8601 UTC timestamp
55
+ - `run_started`: ISO 8601 UTC timestamp
56
+ - `actor_type`: `human|agent`
57
+ - `actor_id`: string
58
+ - `summary`: short string
59
+ - `event_type`: `status|work|claim`
60
+
61
+ ### Log entry (conditional)
62
+ - `context`: non-empty list of strings when `event_type: work` and the entry is machine-written
63
+ - `claim`: required mapping when `event_type: claim`
64
+ - `action`: `acquire|renew|release|override`
65
+ - `claim_id`: UUIDv7 string
66
+ - `holder_id`: string
67
+ - `holder_type`: `human|agent`
68
+ - `ttl_minutes`: positive integer for non-release events
69
+ - `expires_at`: ISO 8601 UTC timestamp for non-release events
70
+ - `reason`: optional string
71
+ - `supersedes_claim_id`: optional UUIDv7 string or null
72
+
73
+ ### Extensions
74
+ - Extensions are repo-local and must live under the `custom` key.
75
+ - Tools should ignore unknown keys under `custom`.
76
+
77
+ ## Diff from previous version
78
+ - Added the generic planning model under `planning`.
79
+ - Added `resolution` to represent terminal work outcomes.
80
+ - Added `.tickets/config.yml` as the authoritative repo-local override surface.
81
+ - Added `claim` log events and claim payload schema.
82
+ - Clarified that the repo skill and `TICKETS.md` are equivalent workflow projections over the same base model.
package/README.md CHANGED
@@ -1,78 +1,31 @@
1
1
  # @picoai/tickets
2
2
 
3
- ## About TICKETS.md
3
+ `@picoai/tickets` is a repo-native ticketing CLI.
4
4
 
5
- This repository specifies a repo-native ticketing workflow designed for **parallel, long-running agentic work** and normal human collaboration, without relying on external services or internet access.
5
+ It gives a repository:
6
+ - a documented workflow in `TICKETS.md`
7
+ - a machine-readable override layer in `.tickets/config.yml`
8
+ - append-only ticket logs for history
9
+ - planning views built from simple shared primitives
10
+ - optional claims to reduce duplicate work across agents
6
11
 
7
- **TICKETS.md** explains the workflow, file formats, and required tool usage for both humans and agents. If there is ever a conflict between this file and other docs, follow this file.
12
+ The system is designed for teams that want ticket state to live in the repo, stay inspectable, and work the same way for humans and agents.
8
13
 
9
- ## What this system is
14
+ ## Mental model
10
15
 
11
- - A lightweight, Markdown-first ticket format stored under `/.tickets/` in consumer repos.
12
- - A merge-friendly history model: **append-only JSONL run logs**, one file per run, per ticket.
13
- - A repo-local CLI (`npx @picoai/tickets`) that is the **single integration surface** for humans, agents, and IDE/agentic tooling.
16
+ - `TICKETS.md` explains the workflow at the repo level
17
+ - `.tickets/config.yml` holds repo-local defaults and semantic overrides
18
+ - `.tickets/skills/tickets/SKILL.md` carries the same workflow for skill-capable environments
19
+ - `ticket.md` holds the stable definition of a piece of work
20
+ - JSONL logs hold append-only history
21
+ - planning is expressed with a small generic model instead of hardcoded product vocabulary
22
+ - claims are optional and advisory, not locks
14
23
 
15
- ## What this is trying to do
24
+ ## Spec version
16
25
 
17
- Parallel, long-running agentic work fails in predictable ways:
18
- - Agents lose context across runs/sandboxes.
19
- - Ticket state can drift across branches before merge (eventual consistency).
20
- - Shared mutable log files are merge-conflict hotspots.
21
- - Agents can loop without clear done criteria or verification steps.
22
-
23
- This system addresses those problems with stable `ticket.md` files, merge-friendly per-run logs, and explicit acceptance + verification + bounded iteration guidance.
24
-
25
- ## Spec Version
26
-
27
- - `version`: 2
28
- - `version_url`: `version/20260311-tickets-spec.md`
29
- - Local file in package assets: `.tickets/spec/version/20260311-tickets-spec.md`
30
-
31
- Version definitions live under `.tickets/spec/version/`. Each spec file is self-contained and ends with a diff from the previous version.
32
-
33
- ## Quickstart: Initialize a Repo
34
-
35
- Assuming `@picoai/tickets` is already installed in your target repo:
36
-
37
- ```bash
38
- npx @picoai/tickets init
39
- ```
40
-
41
- This bootstraps ticketing assets in the target repository by creating:
42
- - root `TICKETS.md`
43
- - root `AGENTS_EXAMPLE.md`
44
- - root `/.tickets/spec/version/` with version definition files
45
-
46
- Optional apply mode:
47
-
48
- ```bash
49
- npx @picoai/tickets init --apply
50
- ```
51
-
52
- `--apply` updates managed sections while preserving user-owned content:
53
- - updates the managed block in root `TICKETS.md`
54
- - creates or updates the `## Ticketing Workflow` block in root `AGENTS.md`
55
- - does not create `AGENTS_EXAMPLE.md` when applying directly to `AGENTS.md`
56
-
57
- ## Package Overview
58
-
59
- Repo-native ticketing CLI for Markdown-first, append-only ticket workflows.
60
-
61
- ## Release Provenance
62
-
63
- - Latest npm release: `@picoai/tickets`
64
- - Published from commit: `74b0378`
65
- - Append-only release ledger: `packages/tickets/release-history.json`
66
-
67
- Check current release posture locally:
68
-
69
- ```bash
70
- npm run release:status --workspace @picoai/tickets
71
- ```
72
-
73
- Recommended process:
74
- - after an npm publish succeeds, append a new entry to `packages/tickets/release-history.json`
75
- - use `npm run release:status --workspace @picoai/tickets` to see whether HEAD is ahead of the last recorded npm release and whether the package version still needs a bump
26
+ - `version`: 3
27
+ - `version_url`: `version/20260317-2-tickets-spec.md`
28
+ - Local file in package assets: `.tickets/spec/version/20260317-2-tickets-spec.md`
76
29
 
77
30
  ## Install
78
31
 
@@ -89,180 +42,183 @@ npx @picoai/tickets --help
89
42
  ## Quickstart
90
43
 
91
44
  ```bash
92
- npm install @picoai/tickets
93
45
  npx @picoai/tickets init
94
- npx @picoai/tickets init --apply
95
- npx @picoai/tickets new --title "Short title"
46
+ npx @picoai/tickets new --title "Feature Alpha" --node-type group --lane build --horizon current
96
47
  npx @picoai/tickets validate
48
+ npx @picoai/tickets plan --format json
97
49
  ```
98
50
 
99
- ## Command Reference
51
+ `init` creates, if missing:
52
+ - `TICKETS.md`
53
+ - an `AGENTS.md` workflow block when used with `--apply`
54
+ - `.tickets/config.yml`
55
+ - `.tickets/skills/tickets/SKILL.md`
56
+ - `.tickets/spec/version/`
57
+
58
+ ## Planning model
59
+
60
+ The planning model is intentionally small. The CLI works from these fields:
61
+
62
+ ```yaml
63
+ planning:
64
+ node_type: work | group | checkpoint
65
+ group_ids: []
66
+ lane: null
67
+ rank: null
68
+ horizon: null
69
+ precedes: []
70
+ resolution: null # completed | merged | dropped
71
+ ```
100
72
 
101
- Use `npx @picoai/tickets <command> --help` for full command help.
73
+ How to think about them:
74
+ - `node_type`: what kind of thing this ticket is
75
+ - `group_ids`: which larger buckets this ticket belongs to
76
+ - `lane`: a broad ordered track such as a phase or stream
77
+ - `rank`: order within a lane or peer set
78
+ - `horizon`: a planning bucket such as current, next, or later
79
+ - `precedes`: sequence edges without turning everything into a hard dependency
80
+ - `resolution`: terminal outcome when work was completed, merged away, or dropped
102
81
 
103
- ### `init`
82
+ Default semantic mapping:
83
+ - `feature` -> `planning.node_type=group`
84
+ - `phase` -> `planning.lane`
85
+ - `milestone` -> `planning.node_type=checkpoint`
86
+ - `roadmap` -> `planning.horizon`
87
+
88
+ Repos can override those terms in `.tickets/config.yml` without changing core execution semantics.
89
+ Treat the list above as defaults. Agents should consult `.tickets/config.yml` before interpreting repo-specific planning vocabulary.
90
+
91
+ ## Claims
104
92
 
105
- Initialize ticketing structure and templates.
93
+ Claims are optional advisory leases recorded in ticket logs.
106
94
 
107
95
  ```bash
108
- npx @picoai/tickets init [--examples] [--apply]
96
+ npx @picoai/tickets claim --ticket <id>
97
+ npx @picoai/tickets claim --ticket <id> --release
98
+ npx @picoai/tickets claim --ticket <id> --force --reason "Taking ownership after timeout"
109
99
  ```
110
100
 
111
- - `--examples`: generate example tickets and logs that validate under the current spec.
112
- - `--apply`: update managed `TICKETS.md` + `AGENTS.md` sections and skip `AGENTS_EXAMPLE.md` output.
101
+ Claims do not change ticket `status`.
102
+ They exist to help multiple agents avoid overlapping work, not to act as hard locks.
113
103
 
114
- ### `new`
104
+ ## Commands
115
105
 
116
- Create a new ticket.
106
+ ### `init`
117
107
 
118
108
  ```bash
119
- npx @picoai/tickets new --title "<title>" [options]
109
+ npx @picoai/tickets init [--examples] [--apply]
120
110
  ```
121
111
 
122
- Options:
123
- - `--status <status>` (`todo|doing|blocked|done|canceled`, default `todo`)
124
- - `--priority <priority>` (`low|medium|high|critical`)
125
- - `--label <label>` (repeatable)
126
- - `--assignment-mode <mode>` (`human_only|agent_only|mixed`)
127
- - `--assignment-owner <owner>`
128
- - `--dependency <ticketId>` (repeatable)
129
- - `--block <ticketId>` (repeatable)
130
- - `--related <ticketId>` (repeatable)
131
- - `--iteration-timebox-minutes <minutes>`
132
- - `--max-iterations <count>`
133
- - `--max-tool-calls <count>`
134
- - `--checkpoint-every-minutes <minutes>`
135
- - `--verification-command <command>` (repeatable)
136
- - `--created-at <timestamp>`
137
-
138
- ### `validate`
112
+ - `--examples`: generate example tickets and logs that validate under the current spec
113
+ - `--apply`: refresh managed `TICKETS.md`, the managed `AGENTS.md` workflow block, and repo skill content
139
114
 
140
- Validate ticket files and logs.
115
+ ### `new`
141
116
 
142
117
  ```bash
143
- npx @picoai/tickets validate [options]
118
+ npx @picoai/tickets new --title "<title>" [options]
144
119
  ```
145
120
 
146
- Options:
147
- - `--ticket <ticket>`
148
- - `--issues` (machine-readable issues/repairs output)
149
- - `--output <file>` (write issues report to file)
150
- - `--all-fields` (include optional front-matter validation)
151
-
152
- ### `repair`
121
+ Planning options:
122
+ - `--node-type <work|group|checkpoint>`
123
+ - `--group-id <ticketId>` repeatable
124
+ - `--lane <lane>`
125
+ - `--rank <rank>`
126
+ - `--horizon <horizon>`
127
+ - `--precedes <ticketId>` repeatable
128
+ - `--resolution <completed|merged|dropped>`
129
+
130
+ Behavior:
131
+ - `--group-id` must reference an existing `group` or `checkpoint`
132
+ - missing `lane` and `horizon` can be inherited from referenced parent groups when unambiguous
133
+ - missing `rank` is assigned automatically when the lane is known
134
+ - repo defaults for planning fields come from `.tickets/config.yml`
153
135
 
154
- Repair tickets from current validation state or an issues file.
136
+ ### `validate`
155
137
 
156
138
  ```bash
157
- npx @picoai/tickets repair [options]
139
+ npx @picoai/tickets validate [--ticket <ticket>] [--issues] [--output <file>] [--all-fields]
158
140
  ```
159
141
 
160
- Options:
161
- - `--ticket <ticket>`
162
- - `--all`
163
- - `--issues-file <file>`
164
- - `--interactive`
165
- - `--non-interactive`
166
- - `--all-fields`
167
-
168
- Notes:
169
- - `repair` fixes ticket-file issues and basic log issues.
170
- - Basic log repairs cover missing/invalid `event_type` and invalid or missing `context` on machine-written work logs.
142
+ Validates:
143
+ - ticket front matter and required sections
144
+ - machine-written log entries
145
+ - claim event payloads
146
+ - repo-local `.tickets/config.yml`
147
+ - planning graph correctness such as missing references, cycles, and rank conflicts
171
148
 
172
149
  ### `status`
173
150
 
174
- Update ticket status.
175
-
176
151
  ```bash
177
152
  npx @picoai/tickets status --ticket <ticket> --status <status> [options]
178
153
  ```
179
154
 
180
- Options:
181
- - `--status <status>` (`todo|doing|blocked|done|canceled`)
182
- - `--actor-type <human|agent>`
183
- - `--actor-id <id>`
184
- - `--context <items...>`
185
- - `--run-id <runId>`
186
- - `--run-started <runStarted>`
187
-
188
- Notes:
189
- - `status` always appends a machine-written status-change log entry.
190
- - include `--context` when the status transition depends on new context you want preserved in the audit trail.
191
- - `actor_id` default order: `--actor-id`, `TICKETS_ACTOR_ID`, `@${USER|USERNAME}`, `"unknown"`.
192
- - `actor_type` default order: `--actor-type`, `TICKETS_ACTOR_TYPE`, inferred from `actor_id` prefix (`agent:` -> `agent`, `@` -> `human`), then `human`.
155
+ Always appends a machine-written status log entry.
193
156
 
194
157
  ### `log`
195
158
 
196
- Append a run log entry.
197
-
198
159
  ```bash
199
160
  npx @picoai/tickets log --ticket <ticket> --summary "<text>" [options]
200
161
  ```
201
162
 
202
- Options:
203
- - `--actor-type <human|agent>`
204
- - `--actor-id <id>`
205
- - `--context <items...>`
206
- - `--run-id <runId>`
207
- - `--run-started <runStarted>`
208
- - `--machine`
209
- - `--changes <files...>`
210
- - `--decisions <decisions...>`
211
- - `--next-steps <nextSteps...>`
212
- - `--blockers <blockers...>`
213
- - `--tickets-created <tickets...>`
214
- - `--created-from <ticketId>`
215
- - `--verification-commands <commands...>`
216
- - `--verification-results <results>`
217
-
218
- Notes:
219
- - `log` records run details without changing ticket lifecycle state.
220
- - machine-written work logs require at least one `--context` item.
221
- - for split child bootstrapping, use `--created-from <parent-ticket-id>` together with `--context ...`.
222
- - `actor_id` default order: `--actor-id`, `TICKETS_ACTOR_ID`, `@${USER|USERNAME}`, `"unknown"`.
223
- - `actor_type` default order: `--actor-type`, `TICKETS_ACTOR_TYPE`, inferred from `actor_id` prefix (`agent:` -> `agent`, `@` -> `human`), then `human`.
163
+ Machine-written work logs require at least one `--context` item.
224
164
 
225
- ### `list`
165
+ ### `claim`
166
+
167
+ ```bash
168
+ npx @picoai/tickets claim --ticket <ticket> [--ttl-minutes <minutes>] [--force] [--reason <reason>]
169
+ ```
226
170
 
227
- List tickets with optional filters.
171
+ ### `list`
228
172
 
229
173
  ```bash
230
174
  npx @picoai/tickets list [options]
231
175
  ```
232
176
 
233
- Options:
234
- - `--status <status>`
235
- - `--priority <priority>`
236
- - `--mode <mode>`
237
- - `--owner <owner>`
238
- - `--label <label>`
239
- - `--text <text>`
177
+ Additional filters:
178
+ - `--node-type <nodeType>`
179
+ - `--group <ticketId>`
180
+ - `--lane <lane>`
181
+ - `--horizon <horizon>`
182
+ - `--claimed`
183
+ - `--claimed-by <actorId>`
184
+ - `--ready`
185
+ - `--sort <ready|priority|lane|rank|updated|title>`
186
+ - `--reverse`
240
187
  - `--json`
241
188
 
242
- Notes:
243
- - `--text` searches the ticket title and Markdown body content.
189
+ ### `plan`
244
190
 
245
- ### `graph`
191
+ ```bash
192
+ npx @picoai/tickets plan [--group <ticket>] [--horizon <horizon>] [--format table|json]
193
+ ```
246
194
 
247
- Generate dependency graph output.
195
+ Reports ready work and derived group/checkpoint rollups.
196
+
197
+ Use this when you want to answer:
198
+ - what is ready now
199
+ - what is already in progress
200
+ - what is blocked
201
+ - how a group or checkpoint is progressing
202
+
203
+ ### `graph`
248
204
 
249
205
  ```bash
250
- npx @picoai/tickets graph [options]
206
+ npx @picoai/tickets graph [--ticket <ticket>] [--view dependency|sequence|portfolio|all] [--format mermaid|dot|json]
251
207
  ```
252
208
 
253
- Options:
254
- - `--ticket <ticket>`
255
- - `--format <format>` (`mermaid|dot|json`, default `mermaid`)
256
- - `--output <file>`
257
- - `--related` / `--no-related`
209
+ `graph` is the structural view. It shows dependency, sequence, and containment relationships, with planning metadata attached to each node.
210
+
211
+ ## Derived index
212
+
213
+ `list`, `plan`, and `graph` maintain a derived planning index at `/.tickets/derived/planning-index.json`.
214
+
215
+ - it is cache state, not source of truth
216
+ - it is safe to delete
217
+ - the CLI rebuilds it automatically when tickets, logs, repo config, or tool metadata change
258
218
 
259
219
  ## Assets shipped with this package
260
220
 
261
- - `.tickets/spec/TICKETS.md` template source
221
+ - `.tickets/spec/TICKETS.md`
262
222
  - `.tickets/spec/AGENTS_EXAMPLE.md`
263
- - `.tickets/spec/version/*`
264
-
265
- These are used by `init` to bootstrap target repositories.
266
- `init` writes `AGENTS_EXAMPLE.md` at the target repo root from the bundled template.
267
- With `--apply`, `init` upserts/creates the managed `## Ticketing Workflow` block in `AGENTS.md` (header-targeted, marker-free) and does not create `AGENTS_EXAMPLE.md` in the target repo.
268
- With `--apply`, `TICKETS.md` updates only the managed section (plus tool/spec/timestamp metadata) and preserves user-owned sections.
223
+ - `.tickets/spec/profile/defaults.yml`
224
+ - `.tickets/spec/version/`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@picoai/tickets",
3
- "version": "0.2.0",
3
+ "version": "0.4.0",
4
4
  "description": "Repo-native ticketing CLI and assets for Markdown-first, append-only ticket workflows.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -12,6 +12,7 @@
12
12
  "src",
13
13
  "release-history.json",
14
14
  ".tickets/spec/AGENTS_EXAMPLE.md",
15
+ ".tickets/spec/profile",
15
16
  ".tickets/spec/version",
16
17
  ".tickets/spec/TICKETS.md",
17
18
  "README.md",
@@ -7,6 +7,20 @@
7
7
  "date": "2026-03-11",
8
8
  "channel": "latest",
9
9
  "notes": "Published to npm"
10
+ },
11
+ {
12
+ "version": "0.2.0",
13
+ "commit": "e1ed363",
14
+ "date": "2026-03-11",
15
+ "channel": "latest",
16
+ "notes": "Published to npm"
17
+ },
18
+ {
19
+ "version": "0.3.0",
20
+ "commit": "b6862fb",
21
+ "date": "2026-03-17",
22
+ "channel": "latest",
23
+ "notes": "Published to npm"
10
24
  }
11
25
  ]
12
26
  }