@picoai/tickets 0.4.0 → 0.5.5

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.
@@ -11,7 +11,13 @@ The purpose of this bootstrap is to ensure an agent loads the canonical ticketin
11
11
  - When the human uses feature/phase/milestone/roadmap or custom repo terms, keep using their vocabulary in the conversation and translate it into the generic CLI planning fields internally.
12
12
  - Use the repo-local CLI (`npx @picoai/tickets`) as the integration surface for tickets and logs.
13
13
  - Before performing work on a ticket, validate it: run `npx @picoai/tickets validate` (or `npx @picoai/tickets validate --issues` + `npx @picoai/tickets repair`).
14
+ - Before moving a ticket to `done`, confirm the ticket's `## Acceptance Criteria` are met and its `## Verification` checks passed.
15
+ - If those completion gates are not satisfied, ask the human whether to keep working or explicitly override the gates. Only move the ticket to `done` after that human decision.
16
+ - Record `completion` metadata every time a ticket is moved to `done`.
17
+ - When a human overrides incomplete completion gates, record that override in the ticket via `npx @picoai/tickets status --status done --acceptance-criteria ... --verification-state ... --override-by ... --override-reason ...`.
14
18
  - When logging via the CLI: use `npx @picoai/tickets log --machine` so logs are strictly structured.
19
+ - If the human asks to remove the tickets workflow from this repo, run `npx @picoai/tickets uninstall`.
20
+ - Use `npx @picoai/tickets uninstall --all` only when the human explicitly asks to delete ticket directories and logs too.
15
21
  - Respect `assignment.mode`, `agent_limits`, active advisory claims, and repo-local defaults in `.tickets/config.yml`.
16
22
 
17
23
  ### Bootstrapping TICKETS.md
@@ -40,8 +40,8 @@ This repository uses a repo-native ticketing system designed for **parallel, lon
40
40
 
41
41
  ## Spec version
42
42
  - `version`: 3
43
- - `version_url`: `version/20260317-2-tickets-spec.md`
44
- - Local file: `/.tickets/spec/version/20260317-2-tickets-spec.md`
43
+ - `version_url`: `version/20260317-4-tickets-spec.md`
44
+ - Local file: `/.tickets/spec/version/20260317-4-tickets-spec.md`
45
45
 
46
46
  Version definitions live under `/.tickets/spec/version/`. Each spec file is self-contained and ends with a diff from the previous version.
47
47
 
@@ -148,7 +148,7 @@ Treat the list above as defaults. Agents should consult `.tickets/config.yml` be
148
148
  ---
149
149
  id: 0191c2d3-4e5f-7a8b-9c0d-1e2f3a4b5c6d
150
150
  version: 3
151
- version_url: "version/20260317-2-tickets-spec.md"
151
+ version_url: "version/20260317-4-tickets-spec.md"
152
152
  title: "Feature Alpha"
153
153
  status: doing
154
154
  created_at: 2026-03-17T17:00:00Z
@@ -193,7 +193,7 @@ resolution: dropped
193
193
  Claim log example:
194
194
 
195
195
  ```json
196
- {"version":3,"version_url":"version/20260317-2-tickets-spec.md","ts":"2026-03-17T17:05:00Z","run_started":"20260317T170500.000Z","actor_type":"agent","actor_id":"agent:codex","summary":"Acquired claim 0191c2d3-...","event_type":"claim","written_by":"tickets","claim":{"action":"acquire","claim_id":"0191c2d3-4e5f-7a8b-9c0d-1e2f3a4b5d00","holder_id":"agent:codex","holder_type":"agent","ttl_minutes":60,"expires_at":"2026-03-17T18:05:00Z","reason":""}}
196
+ {"version":3,"version_url":"version/20260317-4-tickets-spec.md","ts":"2026-03-17T17:05:00Z","run_started":"20260317T170500.000Z","actor_type":"agent","actor_id":"agent:codex","summary":"Acquired claim 0191c2d3-...","event_type":"claim","written_by":"tickets","claim":{"action":"acquire","claim_id":"0191c2d3-4e5f-7a8b-9c0d-1e2f3a4b5d00","holder_id":"agent:codex","holder_type":"agent","ttl_minutes":60,"expires_at":"2026-03-17T18:05:00Z","reason":""}}
197
197
  ```
198
198
 
199
199
  ## Ticket definition (`ticket.md`)
@@ -246,6 +246,23 @@ Resolution:
246
246
  resolution: completed # completed | merged | dropped
247
247
  ```
248
248
 
249
+ Completion:
250
+ ```yaml
251
+ completion:
252
+ acceptance_criteria: met # met | not_met
253
+ verification: passed # passed | failed | not_run
254
+ ```
255
+
256
+ Human-approved completion override:
257
+ ```yaml
258
+ completion:
259
+ acceptance_criteria: not_met
260
+ verification: not_run
261
+ overridden_by: "@product-owner"
262
+ override_reason: "Human approved closing this ticket without meeting the usual done gates."
263
+ override_at: 2026-03-17T18:30:00Z
264
+ ```
265
+
249
266
  Limits:
250
267
  ```yaml
251
268
  agent_limits:
@@ -271,6 +288,9 @@ custom:
271
288
 
272
289
  Rules:
273
290
  - `resolution` is only valid on terminal tickets (`done` or `canceled`)
291
+ - `completion` is required on tickets with `status: done`
292
+ - if `completion.acceptance_criteria != met` or `completion.verification != passed`, `completion.overridden_by`, `completion.override_reason`, and `completion.override_at` are required
293
+ - override fields are only valid when the usual completion gates were not fully satisfied
274
294
  - `custom` is reserved for repo-local extensions not standardized by the spec
275
295
  - other relationship views are computed by tooling and must not be persisted in `ticket.md`
276
296
 
@@ -321,6 +341,7 @@ Conditional fields:
321
341
 
322
342
  Recommended fields:
323
343
  - `changes`
344
+ - `completion`
324
345
  - `verification`
325
346
  - `tickets_created`
326
347
  - `created_from`
@@ -376,9 +397,12 @@ Agents should:
376
397
  2. Open the assigned ticket
377
398
  3. Consult `.tickets/config.yml` for repo-local defaults and semantic overrides before interpreting planning terms or creating tickets
378
399
  4. Validate before implementation
379
- 5. Respect `assignment.mode`, `agent_limits`, planning constraints, and active claims
380
- 6. Use `status`, `log`, `claim`, `list`, `plan`, and `graph` through the CLI
381
- 7. If splitting work, create child tickets with copied minimum context and log `created_from`
400
+ 5. Before setting a ticket to `done`, confirm the ticket's `## Acceptance Criteria` are met and its `## Verification` checks passed
401
+ 6. If those completion gates are not satisfied, stop and ask a human whether to keep working or explicitly override the gates
402
+ 7. When a human overrides incomplete completion gates, record that override in `ticket.md` and the status log via `npx @picoai/tickets status --status done --acceptance-criteria ... --verification-state ... --override-by ... --override-reason ...`
403
+ 8. Respect `assignment.mode`, `agent_limits`, planning constraints, and active claims
404
+ 9. Use `status`, `log`, `claim`, `list`, `plan`, and `graph` through the CLI
405
+ 10. If splitting work, create child tickets with copied minimum context and log `created_from`
382
406
 
383
407
  ## Safety and hygiene
384
408
  - Do not write secrets into tickets or logs
@@ -3,7 +3,7 @@
3
3
  - Version: 1
4
4
  - Version URL: `version/20260205-tickets-spec.md`
5
5
  - Released: 2026-02-05
6
- - Status: current
6
+ - Status: superseded
7
7
 
8
8
  ## Definition (format only)
9
9
  This version defines the ticket and log formats used by this repo. It does not define workflow policy; see `TICKETS.md` for full workflow.
@@ -3,7 +3,7 @@
3
3
  - Version: 2
4
4
  - Version URL: `version/20260311-tickets-spec.md`
5
5
  - Released: 2026-03-11
6
- - Status: current
6
+ - Status: superseded
7
7
 
8
8
  ## Definition (format only)
9
9
  This version defines the ticket and log formats used by this repo. It does not define workflow policy; see `TICKETS.md` for full workflow.
@@ -3,7 +3,7 @@
3
3
  - Version: 3
4
4
  - Version URL: `version/20260317-2-tickets-spec.md`
5
5
  - Released: 2026-03-17
6
- - Status: current
6
+ - Status: superseded
7
7
 
8
8
  ## Definition (format and derived tooling contract)
9
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`.
@@ -0,0 +1,121 @@
1
+ # Ticket Format Spec (Version 3)
2
+
3
+ - Version: 3
4
+ - Version URL: `version/20260317-3-tickets-spec.md`
5
+ - Released: 2026-03-17
6
+ - Status: superseded
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
+ - `completion`: mapping
35
+ - `acceptance_criteria`: `met|not_met`
36
+ - `verification`: `passed|failed|not_run`
37
+ - `overridden_by`: string or null
38
+ - `override_reason`: string or null
39
+ - `override_at`: ISO 8601 UTC timestamp or null
40
+ - `agent_limits`: mapping
41
+ - `verification`: mapping
42
+ - `custom`: mapping
43
+
44
+ Rules:
45
+ - `resolution` is only valid when `status` is terminal (`done` or `canceled`)
46
+ - `completion` is only valid when `status` is `done`
47
+ - if `completion.acceptance_criteria != met` or `completion.verification != passed`, `completion.overridden_by`, `completion.override_reason`, and `completion.override_at` are required
48
+ - override fields are only valid when the usual completion gates were not fully satisfied
49
+ - grouping is persisted only through `planning.group_ids`
50
+ - sequencing is persisted only through `planning.precedes`
51
+ - `planning.group_ids` may only reference `group` or `checkpoint` tickets
52
+ - `planning.precedes` must not contain cycles
53
+ - group/checkpoint containment must not contain cycles
54
+ - duplicate `rank` values are invalid within the same peer set (`node_type`, sorted `group_ids`, `lane`, `horizon`)
55
+
56
+ ### Repo config (`.tickets/config.yml`)
57
+ - `workflow.mode`: `auto|doc_first|skill_first`
58
+ - `defaults.planning.node_type`: `work|group|checkpoint`
59
+ - `defaults.planning.lane`: string or null
60
+ - `defaults.planning.horizon`: string or null
61
+ - `defaults.claims.ttl_minutes`: positive integer
62
+ - `semantics.terms`: mapping from human-facing terms to generic planning primitives
63
+ - `views`: repo-local reporting preferences
64
+
65
+ Repo config may override defaults and human semantic mappings, but may not redefine CLI invariants, status values, or log schema.
66
+
67
+ ### Log entry (required)
68
+ - `version`: format version (integer)
69
+ - `version_url`: path to this definition (repo-local, relative to `.tickets/spec/`)
70
+ - `ts`: ISO 8601 UTC timestamp
71
+ - `run_started`: ISO 8601 UTC timestamp
72
+ - `actor_type`: `human|agent`
73
+ - `actor_id`: string
74
+ - `summary`: short string
75
+ - `event_type`: `status|work|claim`
76
+
77
+ ### Log entry (conditional)
78
+ - `context`: non-empty list of strings when `event_type: work` and the entry is machine-written
79
+ - `claim`: required mapping when `event_type: claim`
80
+ - `action`: `acquire|renew|release|override`
81
+ - `claim_id`: UUIDv7 string
82
+ - `holder_id`: string
83
+ - `holder_type`: `human|agent`
84
+ - `ttl_minutes`: positive integer for non-release events
85
+ - `expires_at`: ISO 8601 UTC timestamp for non-release events
86
+ - `reason`: optional string
87
+ - `supersedes_claim_id`: optional UUIDv7 string or null
88
+
89
+ ### Log entry (optional)
90
+ - `completion`: mapping on `status` events when a done decision was recorded
91
+ - `acceptance_criteria`: `met|not_met`
92
+ - `verification`: `passed|failed|not_run`
93
+ - `overridden_by`: string or null
94
+ - `override_reason`: string or null
95
+ - `override_at`: ISO 8601 UTC timestamp or null
96
+
97
+ ### Derived planning index (`/.tickets/derived/planning-index.json`)
98
+ - The index is derived cache state, not source of truth.
99
+ - The file is disposable and may be rebuilt at any time by the CLI.
100
+ - Required metadata:
101
+ - `index_format_id`: fixed UUIDv7 identifying the derived index format
102
+ - `index_format_label`: readable label for the index format revision
103
+ - `tool.format_version`
104
+ - `tool.format_version_url`
105
+ - `source_state`
106
+ - The CLI must rebuild the index when source files or embedded format/tool metadata no longer match.
107
+
108
+ ### Reporting semantics
109
+ - `list` is the broad queue/report view.
110
+ - `plan` is the operational state view for ready, active, blocked, and group rollups.
111
+ - `graph` is the structural relationship view.
112
+ - Repo-specific planning language remains authoritative only in `.tickets/config.yml`.
113
+
114
+ ### Extensions
115
+ - Extensions are repo-local and must live under the `custom` key.
116
+ - Tools should ignore unknown keys under `custom`.
117
+
118
+ ## Diff from previous version
119
+ - Added standardized `completion` metadata for recording whether acceptance criteria and verification passed before a ticket was moved to `done`.
120
+ - Added explicit human-override fields for done tickets that were closed without fully satisfying the usual completion gates.
121
+ - Allowed status log entries to mirror recorded `completion` decisions for auditability.
@@ -0,0 +1,120 @@
1
+ # Ticket Format Spec (Version 3)
2
+
3
+ - Version: 3
4
+ - Version URL: `version/20260317-4-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
+ - `completion`: mapping
35
+ - `acceptance_criteria`: `met|not_met`
36
+ - `verification`: `passed|failed|not_run`
37
+ - `overridden_by`: string or null
38
+ - `override_reason`: string or null
39
+ - `override_at`: ISO 8601 UTC timestamp or null
40
+ - `agent_limits`: mapping
41
+ - `verification`: mapping
42
+ - `custom`: mapping
43
+
44
+ Rules:
45
+ - `resolution` is only valid when `status` is terminal (`done` or `canceled`)
46
+ - `completion` is required when `status` is `done`
47
+ - if `completion.acceptance_criteria != met` or `completion.verification != passed`, `completion.overridden_by`, `completion.override_reason`, and `completion.override_at` are required
48
+ - override fields are only valid when the usual completion gates were not fully satisfied
49
+ - grouping is persisted only through `planning.group_ids`
50
+ - sequencing is persisted only through `planning.precedes`
51
+ - `planning.group_ids` may only reference `group` or `checkpoint` tickets
52
+ - `planning.precedes` must not contain cycles
53
+ - group/checkpoint containment must not contain cycles
54
+ - duplicate `rank` values are invalid within the same peer set (`node_type`, sorted `group_ids`, `lane`, `horizon`)
55
+
56
+ ### Repo config (`.tickets/config.yml`)
57
+ - `workflow.mode`: `auto|doc_first|skill_first`
58
+ - `defaults.planning.node_type`: `work|group|checkpoint`
59
+ - `defaults.planning.lane`: string or null
60
+ - `defaults.planning.horizon`: string or null
61
+ - `defaults.claims.ttl_minutes`: positive integer
62
+ - `semantics.terms`: mapping from human-facing terms to generic planning primitives
63
+ - `views`: repo-local reporting preferences
64
+
65
+ Repo config may override defaults and human semantic mappings, but may not redefine CLI invariants, status values, or log schema.
66
+
67
+ ### Log entry (required)
68
+ - `version`: format version (integer)
69
+ - `version_url`: path to this definition (repo-local, relative to `.tickets/spec/`)
70
+ - `ts`: ISO 8601 UTC timestamp
71
+ - `run_started`: ISO 8601 UTC timestamp
72
+ - `actor_type`: `human|agent`
73
+ - `actor_id`: string
74
+ - `summary`: short string
75
+ - `event_type`: `status|work|claim`
76
+
77
+ ### Log entry (conditional)
78
+ - `context`: non-empty list of strings when `event_type: work` and the entry is machine-written
79
+ - `claim`: required mapping when `event_type: claim`
80
+ - `action`: `acquire|renew|release|override`
81
+ - `claim_id`: UUIDv7 string
82
+ - `holder_id`: string
83
+ - `holder_type`: `human|agent`
84
+ - `ttl_minutes`: positive integer for non-release events
85
+ - `expires_at`: ISO 8601 UTC timestamp for non-release events
86
+ - `reason`: optional string
87
+ - `supersedes_claim_id`: optional UUIDv7 string or null
88
+
89
+ ### Log entry (optional)
90
+ - `completion`: mapping on `status` events when a done decision was recorded
91
+ - `acceptance_criteria`: `met|not_met`
92
+ - `verification`: `passed|failed|not_run`
93
+ - `overridden_by`: string or null
94
+ - `override_reason`: string or null
95
+ - `override_at`: ISO 8601 UTC timestamp or null
96
+
97
+ ### Derived planning index (`/.tickets/derived/planning-index.json`)
98
+ - The index is derived cache state, not source of truth.
99
+ - The file is disposable and may be rebuilt at any time by the CLI.
100
+ - Required metadata:
101
+ - `index_format_id`: fixed UUIDv7 identifying the derived index format
102
+ - `index_format_label`: readable label for the index format revision
103
+ - `tool.format_version`
104
+ - `tool.format_version_url`
105
+ - `source_state`
106
+ - The CLI must rebuild the index when source files or embedded format/tool metadata no longer match.
107
+
108
+ ### Reporting semantics
109
+ - `list` is the broad queue/report view.
110
+ - `plan` is the operational state view for ready, active, blocked, and group rollups.
111
+ - `graph` is the structural relationship view.
112
+ - Repo-specific planning language remains authoritative only in `.tickets/config.yml`.
113
+
114
+ ### Extensions
115
+ - Extensions are repo-local and must live under the `custom` key.
116
+ - Tools should ignore unknown keys under `custom`.
117
+
118
+ ## Diff from previous version
119
+ - Tightened the `completion` contract so every `done` ticket must persist completion metadata.
120
+ - Kept human-approved completion overrides as the supported path for closing tickets when usual done gates are not fully satisfied.
@@ -3,7 +3,7 @@
3
3
  - Version: 3
4
4
  - Version URL: `version/20260317-tickets-spec.md`
5
5
  - Released: 2026-03-17
6
- - Status: current
6
+ - Status: superseded
7
7
 
8
8
  ## Definition (format only)
9
9
  This version defines the ticket, repo config, and log formats used by this repo. Workflow policy and narrative guidance live in `TICKETS.md`.
package/README.md CHANGED
@@ -24,8 +24,8 @@ The system is designed for teams that want ticket state to live in the repo, sta
24
24
  ## Spec version
25
25
 
26
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`
27
+ - `version_url`: `version/20260317-4-tickets-spec.md`
28
+ - Local file in package assets: `.tickets/spec/version/20260317-4-tickets-spec.md`
29
29
 
30
30
  ## Install
31
31
 
@@ -79,6 +79,8 @@ How to think about them:
79
79
  - `precedes`: sequence edges without turning everything into a hard dependency
80
80
  - `resolution`: terminal outcome when work was completed, merged away, or dropped
81
81
 
82
+ Completion is tracked separately from terminal outcome, and it is required on every `done` ticket. A ticket should only be treated as done when its acceptance criteria are met and its verification checks pass. If a human explicitly wants to close a ticket without those gates passing, record that override in `completion` so the exception is visible in both `ticket.md` and the status log.
83
+
82
84
  Default semantic mapping:
83
85
  - `feature` -> `planning.node_type=group`
84
86
  - `phase` -> `planning.lane`
@@ -112,6 +114,17 @@ npx @picoai/tickets init [--examples] [--apply]
112
114
  - `--examples`: generate example tickets and logs that validate under the current spec
113
115
  - `--apply`: refresh managed `TICKETS.md`, the managed `AGENTS.md` workflow block, and repo skill content
114
116
 
117
+ ### `uninstall`
118
+
119
+ ```bash
120
+ npx @picoai/tickets uninstall [--all] [--yes]
121
+ ```
122
+
123
+ - default: remove tickets-managed workflow files while keeping ticket directories and logs under `/.tickets/<ticket-id>/`
124
+ - `--all`: also remove ticket directories and logs for a clean reset
125
+ - `--yes`: skip interactive confirmation prompts
126
+ - does not remove `@picoai/tickets` from `package.json` (run your package manager uninstall command separately)
127
+
115
128
  ### `new`
116
129
 
117
130
  ```bash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@picoai/tickets",
3
- "version": "0.4.0",
3
+ "version": "0.5.5",
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",
@@ -21,6 +21,20 @@
21
21
  "date": "2026-03-17",
22
22
  "channel": "latest",
23
23
  "notes": "Published to npm"
24
+ },
25
+ {
26
+ "version": "0.4.0",
27
+ "commit": "93272fc",
28
+ "date": "2026-03-17",
29
+ "channel": "latest",
30
+ "notes": "Published to npm"
31
+ },
32
+ {
33
+ "version": "0.5.0",
34
+ "commit": "66691ef",
35
+ "date": "2026-03-17",
36
+ "channel": "latest",
37
+ "notes": "Published to npm"
24
38
  }
25
39
  ]
26
40
  }