@picoai/tickets 0.3.0 → 0.5.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.
- package/.tickets/spec/AGENTS_EXAMPLE.md +6 -0
- package/.tickets/spec/TICKETS.md +44 -11
- package/.tickets/spec/profile/defaults.yml +2 -0
- package/.tickets/spec/version/20260205-tickets-spec.md +1 -1
- package/.tickets/spec/version/20260311-tickets-spec.md +1 -1
- package/.tickets/spec/version/20260317-2-tickets-spec.md +106 -0
- package/.tickets/spec/version/20260317-3-tickets-spec.md +121 -0
- package/.tickets/spec/version/20260317-4-tickets-spec.md +120 -0
- package/.tickets/spec/version/20260317-tickets-spec.md +1 -1
- package/README.md +25 -2
- package/package.json +1 -1
- package/release-history.json +14 -0
- package/src/cli.js +388 -54
- package/src/lib/config.js +14 -0
- package/src/lib/constants.js +6 -1
- package/src/lib/index.js +241 -0
- package/src/lib/listing.js +6 -3
- package/src/lib/planning.js +249 -152
- package/src/lib/projections.js +13 -0
- package/src/lib/validation.js +454 -0
|
@@ -7,8 +7,14 @@ The purpose of this bootstrap is to ensure an agent loads the canonical ticketin
|
|
|
7
7
|
### Required Behavior
|
|
8
8
|
- First action: if your environment supports repo-local skills and `.tickets/skills/tickets/SKILL.md` exists, load that skill. Otherwise open and read `TICKETS.md`.
|
|
9
9
|
- First response: briefly confirm understanding of the ticketing system before starting any implementation work.
|
|
10
|
+
- Before interpreting planning language or creating tickets, consult `.tickets/config.yml` for repo-local defaults and semantic overrides.
|
|
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.
|
|
10
12
|
- Use the repo-local CLI (`npx @picoai/tickets`) as the integration surface for tickets and logs.
|
|
11
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 ...`.
|
|
12
18
|
- When logging via the CLI: use `npx @picoai/tickets log --machine` so logs are strictly structured.
|
|
13
19
|
- Respect `assignment.mode`, `agent_limits`, active advisory claims, and repo-local defaults in `.tickets/config.yml`.
|
|
14
20
|
|
package/.tickets/spec/TICKETS.md
CHANGED
|
@@ -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-tickets-spec.md`
|
|
44
|
-
- Local file: `/.tickets/spec/version/20260317-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
|
|
|
@@ -60,6 +60,7 @@ Repo artifacts:
|
|
|
60
60
|
- `.tickets/config.yml`: authoritative repo-local machine-readable overrides
|
|
61
61
|
- `.tickets/skills/tickets/SKILL.md`: repo skill projection with equivalent workflow semantics
|
|
62
62
|
- `TICKETS.override.md`: optional narrative companion for human-only local policy
|
|
63
|
+
- `/.tickets/derived/planning-index.json`: derived cache used by `list`, `plan`, and `graph`
|
|
63
64
|
|
|
64
65
|
## What this system is
|
|
65
66
|
- A lightweight, Markdown-first ticket format stored under `/.tickets/`
|
|
@@ -96,6 +97,7 @@ Default `init` creates, if missing:
|
|
|
96
97
|
- `npx @picoai/tickets status --ticket <id> --status doing`
|
|
97
98
|
- `npx @picoai/tickets log --ticket <id> --summary "..." --machine --context "..."`
|
|
98
99
|
- `npx @picoai/tickets claim --ticket <id>`
|
|
100
|
+
- `npx @picoai/tickets list --ready --sort lane`
|
|
99
101
|
- `npx @picoai/tickets plan --format json`
|
|
100
102
|
- `npx @picoai/tickets graph --view portfolio`
|
|
101
103
|
|
|
@@ -138,6 +140,7 @@ By default:
|
|
|
138
140
|
- `roadmap` -> `planning.horizon`
|
|
139
141
|
|
|
140
142
|
Repos may override these mappings in `.tickets/config.yml` without changing the core CLI or validation invariants.
|
|
143
|
+
Treat the list above as defaults. Agents should consult `.tickets/config.yml` before interpreting repo-specific planning language or creating tickets.
|
|
141
144
|
|
|
142
145
|
### Worked example
|
|
143
146
|
|
|
@@ -145,7 +148,7 @@ Repos may override these mappings in `.tickets/config.yml` without changing the
|
|
|
145
148
|
---
|
|
146
149
|
id: 0191c2d3-4e5f-7a8b-9c0d-1e2f3a4b5c6d
|
|
147
150
|
version: 3
|
|
148
|
-
version_url: "version/20260317-tickets-spec.md"
|
|
151
|
+
version_url: "version/20260317-4-tickets-spec.md"
|
|
149
152
|
title: "Feature Alpha"
|
|
150
153
|
status: doing
|
|
151
154
|
created_at: 2026-03-17T17:00:00Z
|
|
@@ -190,7 +193,7 @@ resolution: dropped
|
|
|
190
193
|
Claim log example:
|
|
191
194
|
|
|
192
195
|
```json
|
|
193
|
-
{"version":3,"version_url":"version/20260317-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":""}}
|
|
194
197
|
```
|
|
195
198
|
|
|
196
199
|
## Ticket definition (`ticket.md`)
|
|
@@ -243,6 +246,23 @@ Resolution:
|
|
|
243
246
|
resolution: completed # completed | merged | dropped
|
|
244
247
|
```
|
|
245
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
|
+
|
|
246
266
|
Limits:
|
|
247
267
|
```yaml
|
|
248
268
|
agent_limits:
|
|
@@ -268,6 +288,9 @@ custom:
|
|
|
268
288
|
|
|
269
289
|
Rules:
|
|
270
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
|
|
271
294
|
- `custom` is reserved for repo-local extensions not standardized by the spec
|
|
272
295
|
- other relationship views are computed by tooling and must not be persisted in `ticket.md`
|
|
273
296
|
|
|
@@ -318,6 +341,7 @@ Conditional fields:
|
|
|
318
341
|
|
|
319
342
|
Recommended fields:
|
|
320
343
|
- `changes`
|
|
344
|
+
- `completion`
|
|
321
345
|
- `verification`
|
|
322
346
|
- `tickets_created`
|
|
323
347
|
- `created_from`
|
|
@@ -357,19 +381,28 @@ Primary commands:
|
|
|
357
381
|
- `graph`
|
|
358
382
|
|
|
359
383
|
Listing and reporting:
|
|
360
|
-
- `list`
|
|
361
|
-
- `plan`
|
|
362
|
-
- `graph`
|
|
384
|
+
- `list` is the broad queue/report view. Use it to filter and sort work across the repo.
|
|
385
|
+
- `plan` is the operational board. Use it for ready work, in-progress work, blocked work, and group/checkpoint rollups.
|
|
386
|
+
- `graph` is the structural map. Use it to inspect dependency, sequence, and containment relationships.
|
|
387
|
+
|
|
388
|
+
Derived index:
|
|
389
|
+
- `list`, `plan`, and `graph` maintain a derived planning index at `/.tickets/derived/planning-index.json`
|
|
390
|
+
- the index is disposable cache state
|
|
391
|
+
- the CLI rebuilds it automatically when ticket, log, config, or tool metadata changes
|
|
363
392
|
|
|
364
393
|
## Agent protocol
|
|
365
394
|
|
|
366
395
|
Agents should:
|
|
367
396
|
1. Load the repo skill if supported and present, otherwise read `TICKETS.md`
|
|
368
397
|
2. Open the assigned ticket
|
|
369
|
-
3.
|
|
370
|
-
4.
|
|
371
|
-
5.
|
|
372
|
-
6. If
|
|
398
|
+
3. Consult `.tickets/config.yml` for repo-local defaults and semantic overrides before interpreting planning terms or creating tickets
|
|
399
|
+
4. Validate before implementation
|
|
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`
|
|
373
406
|
|
|
374
407
|
## Safety and hygiene
|
|
375
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:
|
|
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:
|
|
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.
|
|
@@ -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: 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
|
+
- `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,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:
|
|
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-tickets-spec.md`
|
|
28
|
-
- Local file in package assets: `.tickets/spec/version/20260317-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`
|
|
@@ -86,6 +88,7 @@ Default semantic mapping:
|
|
|
86
88
|
- `roadmap` -> `planning.horizon`
|
|
87
89
|
|
|
88
90
|
Repos can override those terms in `.tickets/config.yml` without changing core execution semantics.
|
|
91
|
+
Treat the list above as defaults. Agents should consult `.tickets/config.yml` before interpreting repo-specific planning vocabulary.
|
|
89
92
|
|
|
90
93
|
## Claims
|
|
91
94
|
|
|
@@ -126,6 +129,12 @@ Planning options:
|
|
|
126
129
|
- `--precedes <ticketId>` repeatable
|
|
127
130
|
- `--resolution <completed|merged|dropped>`
|
|
128
131
|
|
|
132
|
+
Behavior:
|
|
133
|
+
- `--group-id` must reference an existing `group` or `checkpoint`
|
|
134
|
+
- missing `lane` and `horizon` can be inherited from referenced parent groups when unambiguous
|
|
135
|
+
- missing `rank` is assigned automatically when the lane is known
|
|
136
|
+
- repo defaults for planning fields come from `.tickets/config.yml`
|
|
137
|
+
|
|
129
138
|
### `validate`
|
|
130
139
|
|
|
131
140
|
```bash
|
|
@@ -137,6 +146,7 @@ Validates:
|
|
|
137
146
|
- machine-written log entries
|
|
138
147
|
- claim event payloads
|
|
139
148
|
- repo-local `.tickets/config.yml`
|
|
149
|
+
- planning graph correctness such as missing references, cycles, and rank conflicts
|
|
140
150
|
|
|
141
151
|
### `status`
|
|
142
152
|
|
|
@@ -174,6 +184,8 @@ Additional filters:
|
|
|
174
184
|
- `--claimed`
|
|
175
185
|
- `--claimed-by <actorId>`
|
|
176
186
|
- `--ready`
|
|
187
|
+
- `--sort <ready|priority|lane|rank|updated|title>`
|
|
188
|
+
- `--reverse`
|
|
177
189
|
- `--json`
|
|
178
190
|
|
|
179
191
|
### `plan`
|
|
@@ -186,6 +198,7 @@ Reports ready work and derived group/checkpoint rollups.
|
|
|
186
198
|
|
|
187
199
|
Use this when you want to answer:
|
|
188
200
|
- what is ready now
|
|
201
|
+
- what is already in progress
|
|
189
202
|
- what is blocked
|
|
190
203
|
- how a group or checkpoint is progressing
|
|
191
204
|
|
|
@@ -195,6 +208,16 @@ Use this when you want to answer:
|
|
|
195
208
|
npx @picoai/tickets graph [--ticket <ticket>] [--view dependency|sequence|portfolio|all] [--format mermaid|dot|json]
|
|
196
209
|
```
|
|
197
210
|
|
|
211
|
+
`graph` is the structural view. It shows dependency, sequence, and containment relationships, with planning metadata attached to each node.
|
|
212
|
+
|
|
213
|
+
## Derived index
|
|
214
|
+
|
|
215
|
+
`list`, `plan`, and `graph` maintain a derived planning index at `/.tickets/derived/planning-index.json`.
|
|
216
|
+
|
|
217
|
+
- it is cache state, not source of truth
|
|
218
|
+
- it is safe to delete
|
|
219
|
+
- the CLI rebuilds it automatically when tickets, logs, repo config, or tool metadata change
|
|
220
|
+
|
|
198
221
|
## Assets shipped with this package
|
|
199
222
|
|
|
200
223
|
- `.tickets/spec/TICKETS.md`
|
package/package.json
CHANGED
package/release-history.json
CHANGED
|
@@ -14,6 +14,20 @@
|
|
|
14
14
|
"date": "2026-03-11",
|
|
15
15
|
"channel": "latest",
|
|
16
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"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"version": "0.4.0",
|
|
27
|
+
"commit": "93272fc",
|
|
28
|
+
"date": "2026-03-17",
|
|
29
|
+
"channel": "latest",
|
|
30
|
+
"notes": "Published to npm"
|
|
17
31
|
}
|
|
18
32
|
]
|
|
19
33
|
}
|