@codetreker/daynight 0.13.0 → 0.16.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.
Files changed (36) hide show
  1. package/dist/api/client.d.ts +3 -6
  2. package/dist/api/client.js +23 -13
  3. package/dist/api/client.js.map +1 -1
  4. package/dist/api/parse.js +6 -7
  5. package/dist/api/parse.js.map +1 -1
  6. package/dist/api/types.d.ts +9 -3
  7. package/dist/commands/skill/refresh-installed.d.ts +1 -0
  8. package/dist/commands/skill/refresh-installed.js +17 -0
  9. package/dist/commands/skill/refresh-installed.js.map +1 -0
  10. package/dist/commands/skill/refresh.d.ts +4 -0
  11. package/dist/commands/skill/refresh.js +87 -0
  12. package/dist/commands/skill/refresh.js.map +1 -0
  13. package/dist/commands/skill/skills/using-daynight/SKILL.md +55 -18
  14. package/dist/commands/skill/skills/using-daynight/references/autopilot.md +75 -44
  15. package/dist/commands/skill/skills/using-daynight/references/create-task.md +52 -28
  16. package/dist/commands/skill/skills/using-daynight/references/goal.md +177 -173
  17. package/dist/commands/skill/skills/using-daynight/references/handbook.md +56 -36
  18. package/dist/commands/skill/skills/using-daynight/references/run-task.md +56 -34
  19. package/dist/commands/skill/targets.d.ts +1 -0
  20. package/dist/commands/skill/targets.js +17 -9
  21. package/dist/commands/skill/targets.js.map +1 -1
  22. package/dist/commands/task/command.js +18 -13
  23. package/dist/commands/task/command.js.map +1 -1
  24. package/dist/commands/task/definition.js +20 -21
  25. package/dist/commands/task/definition.js.map +1 -1
  26. package/dist/commands/task/rendering.js +3 -1
  27. package/dist/commands/task/rendering.js.map +1 -1
  28. package/dist/commands/update/definition.js +2 -2
  29. package/dist/commands/update/definition.js.map +1 -1
  30. package/dist/commands/update/updater.d.ts +2 -1
  31. package/dist/commands/update/updater.js +19 -4
  32. package/dist/commands/update/updater.js.map +1 -1
  33. package/dist/repository/git.d.ts +6 -3
  34. package/dist/repository/git.js +6 -4
  35. package/dist/repository/git.js.map +1 -1
  36. package/package.json +2 -2
@@ -1,186 +1,190 @@
1
1
  # Goal protocol
2
2
 
3
- Read this reference when creating a multi-stage Goal, running one of its tasks,
4
- or advancing its authorized scope. Use [create-task](create-task.md) for content
5
- and registration rules, [run-task](run-task.md) for one task's lifecycle, and
3
+ Read this reference when starting or registering a Goal, discussing one of its
4
+ stages, or advancing its authorized scope. Use [create-task](create-task.md) for
5
+ content and registration, [run-task](run-task.md) for task execution, and
6
6
  [the handbook](handbook.md) for CLI semantics. A Goal uses existing tasks,
7
7
  attachments, complete `dependsOn` relationships, their `externalDependsOn`
8
- classification and PR properties; it adds no Goal-specific command, task type,
9
- status, or execution authority.
10
-
11
- ## Identify and register a Goal
12
-
13
- Use a Goal when completing the request requires multiple independently tracked
14
- delivery stages. One independently tracked outcome remains a normal task;
15
- commands, tests, and temporary execution steps do not each need persistent tasks.
16
- The user need not use the word Goal.
17
-
18
- Explicit permission to create a Goal covers its two starting tasks and the later
19
- breakdown within that Goal. It covers no unrelated tasks and grants no execution,
20
- publication, deployment, external communication, merge, or mainline push
21
- permission. Existing explicit authorization continues to apply within its scope.
22
- Implementation or autopilot permission alone does not grant creation permission.
23
- Goal-creation permission does not authorize approval. Approve only tasks or a
24
- Goal-task scope explicitly approved by the user, using each reviewed task's exact
25
- version; CLI and Web approval are available. Goal creation, requirements/prototype
26
- completion, design completion and autopilot never imply that instruction. Approval
27
- itself grants no execution or delivery permission.
28
-
29
- During registration, create or reuse both starting tasks:
30
-
31
- | Task | Title | Initial content |
32
- |---|---|---|
33
- | Goal description | `[Goal]<outcome>` | The known overall problem, intended results, scope, constraints, UI applicability, exclusions, and observable acceptance summary; a stage brief for resolving open requirements and producing the complete Goal. |
34
- | Architecture design and task breakdown | `Architecture design and task breakdown: <outcome>` | Its concrete work: consume the completed Goal, design the architecture, register the complete delivery breakdown, verify its artifacts and dependencies, and deliver any required design PR. Its own stage brief defines the approach and acceptance. |
35
-
36
- The `[Goal]` marker is followed directly by the outcome. Goal description names
37
- the stage; it is not the title prefix. Titles communicate purpose but do not
38
- establish stable identity. Preserve confirmed IDs and inspect full content when
39
- reusing an existing chain.
40
-
41
- Set the design task's ordinary `--depends-on` to the Goal description task.
42
- Confirmed within-Goal stages and delivery prerequisites stay ordinary. Verified
43
- prerequisites owned by other same-project chains use `--external-depends-on`; even a Goal's
44
- top-level task may have such external predecessors. They remain real blockers.
45
- Preserve both kinds through the handbook's complete CLI replacement semantics,
46
- not by inferring classification from done status or the current rendered graph.
47
- Each task starts
48
- in `proposed` with its own self-contained Markdown description and primary Markdown
49
- containing Solution and Acceptance criteria. State unanswered questions honestly.
50
- Complete requirements, prototypes, architecture, and breakdown are produced by their
51
- respective stages; they are not prerequisites for registering the chain or
52
- starting the stage that produces them. Confirm both tasks, stage briefs,
53
- references, and dependency through real reads, then return from `create-task`.
54
- Registration completeness leaves approval pending unless the user separately
55
- authorized approval for those tasks. Metadata and attachment writes do not approve.
8
+ classification, and PR properties. It adds no resource, command, or status.
9
+
10
+ ## Identify the current discussion
11
+
12
+ Use a Goal when a concrete outcome needs requirements discussion, solution or
13
+ architecture discussion, and actual delivery work. Independently understandable
14
+ features, bug fixes, architecture/design assignments, and real breakdown items
15
+ are tasks. Agent-generated commands, file reads, and routine checks stay in the
16
+ owning task's execution plan.
17
+
18
+ Permission to create a Goal covers its requirements discussion, the later solution
19
+ discussion, and the confirmed in-scope delivery breakdown. Create each only at
20
+ its stage below. Reuse suitable existing tasks after reading their full problem,
21
+ scope, materials, acceptance, and actual context; a title alone is not identity.
22
+ An explicit user or applicable repository tracking/review instruction supplies
23
+ standing creation permission within the confirmed scope. It grants no unrelated
24
+ work, implementation, external communication, deployment, merge, or mainline push
25
+ permission.
26
+
27
+ A request to start a Goal discussion authorizes creating and starting
28
+ that discussion task so it becomes `in_progress`. A registration-only request
29
+ creates only the current discussion task in `todo` and returns without execution. A generic run request, Goal registration, or autopilot
30
+ activation does not supply discussion-start or delivery execution authorization.
31
+
32
+ ## Start requirements discussion
33
+
34
+ Create or reuse only the requirements discussion task, titled `[Goal]<outcome>`.
35
+ The marker is followed directly by the outcome. Do not create an architecture
36
+ placeholder or delivery tasks at this point. Give the task a self-contained Markdown description
37
+ for the known problem, intended outcome, scope, constraints, open
38
+ questions, and observable completion conditions. Its primary Markdown's Solution
39
+ and Acceptance criteria describe this discussion and its user-confirmation gate;
40
+ finished requirements and prototypes are outputs, not prerequisites to starting.
41
+
42
+ Each task starts in `todo`. For an explicit discussion-start request, read its
43
+ current materials and exact version, use `task set-status <task-id> in_progress`
44
+ with the version observed for that decision and confirm `in_progress`.
45
+ All direct prerequisites must be done. Preserve real external blockers rather
46
+ than removing dependencies to make a discussion ready. An already in-progress
47
+ task is resumed after checking its actual work and context.
48
+
49
+ Discuss requirements with the user: the whole problem, desired behavior, scope,
50
+ constraints, exclusions, and whole-Goal acceptance. Keep current material and open
51
+ questions in this task's description or attachments. The description remains a
52
+ self-contained brief; its primary Markdown owns detailed requirements, validation,
53
+ and evidence. Before requesting user review, save the complete current material,
54
+ read it back, and provide the task and resource reference.
55
+
56
+ For a UI Goal, produce a final-style interactive frontend-only prototype with
57
+ working relative resources and relevant populated, empty, loading, failure,
58
+ disabled, long-content, and narrow-screen states. View and exercise it. Prototype
59
+ code is a requirements artifact; this discussion does not implement production
60
+ code or decide the architecture.
61
+
62
+ ## Confirm requirements and start solution discussion
63
+
64
+ Keep the requirements task `in_progress` until the user explicitly confirms the
65
+ current requirements and directs the next discussion, for example, "Requirements
66
+ are settled; move to architecture discussion." Agent confidence, completed text,
67
+ a review result, or elapsed time does not satisfy this gate.
68
+
69
+ Record the user's confirmation with the accepted material in the owning task and
70
+ verify it is readable. A material revision after confirmation requires renewed
71
+ user confirmation before advancement. When the discussion's acceptance is met,
72
+ reread the task, use `task set-status <task-id> done` with its observed version, and confirm done.
73
+ Do not create the solution discussion until that completion is confirmed; reconcile
74
+ an uncertain completion before another mutation.
75
+
76
+ Then create or reuse the solution discussion task, with a purpose-specific title
77
+ such as `Architecture discussion: <outcome>`, and an ordinary prerequisite on the
78
+ completed requirements task. The user's direction to start this discussion
79
+ provides its scoped execution authorization. Prepare its stage brief,
80
+ read its current version, set in_progress through the same lifecycle, and
81
+ confirm `in_progress`. This user-directed transition does not require autopilot
82
+ and does not authorize selection of another unrelated task.
56
83
 
57
84
  ## Execute the appropriate stage
58
85
 
59
- New Goal stages and delivery tasks start with `allowAgents=false`. Creation and
60
- approval do not enable automatic execution. Automated workflows must not enable
61
- the flag themselves; explicit user-selected execution may use manual claim
62
- regardless of it while retaining all authorization and prerequisite checks.
63
-
64
- Every stage uses the same explicit task lifecycle. Proposed work waits for the
65
- user's scoped approval; an authorized `task approve` moves it to todo even with
66
- unfinished prerequisites. Begin only from approved ready todo with complete
67
- stage inputs and execution authorization: use `task claim` with the exact version
68
- observed for that decision and confirm in_progress. Resume existing in-progress
69
- work after checking its actual checkpoint. After the stage acceptance and every
70
- required authorized PR merge, reread and use `task complete` with the observed
71
- version. Completion satisfies dependencies but never approves the next stage.
72
- Unstarted todo work can return to proposed through explicitly authorized
73
- unapprove; it then waits for a new approval before claim.
74
-
75
- | Stage | Required inputs to start | Outputs and completion |
76
- |---|---|---|
77
- | Goal description | Its stage brief, current problem and scope, and available background. | Complete overall requirements, applicable final-style interactive UI prototype, verified stage acceptance, and repository-required delivery. Finishing this task completes problem definition. |
78
- | Architecture design and task breakdown | Completed Goal description, its full requirements and applicable prototype, and the design stage brief. | Complete architecture and the actual registered delivery tasks, verified task-specific artifacts and dependencies, satisfied stage acceptance, and platform-confirmed merge of every required design PR. |
79
- | Delivery task | Completed design prerequisite, delivered architecture, its own solution and acceptance criteria, and applicable prototype and resources. | This task's deliverable, verification, required review and PR merges, and readable acceptance evidence under the normal run-task rules. |
80
-
81
- ### Goal description
82
-
83
- Explain the whole problem and why it matters, the final observable results,
84
- required behavior and constraints, scope, explicit exclusions, and how the whole
85
- Goal will be accepted. The task description itself must communicate this complete
86
- overall brief and a concise acceptance summary. Its primary Markdown owns the
87
- full requirements, verification methods, and stage evidence. Resolve blocking
88
- ambiguities without making architecture decisions or changing production
89
- implementation code.
90
-
91
- For a UI Goal, specify final layout, visual styling, interactions, representative
92
- data, and relevant states. Produce an interactive prototype that runs with
93
- frontend code alone, with final styling and all necessary resources. Cover
94
- applicable populated, empty, loading, failure, disabled, long-content, and
95
- narrow-screen states; explain exclusions when a relevant-looking state does not
96
- apply. Prototype code is an allowed problem-definition artifact. View and
97
- exercise the result when verifying this stage.
98
-
99
- Confirm the full requirements are clear, the applicable prototype is usable,
100
- and this stage's acceptance and repository delivery rules are satisfied. If
101
- repository rules require a PR for these artifacts, use the existing PR completion
102
- rules. Otherwise use the stated stage acceptance. Complete only this in-progress
103
- task through `task complete` with its observed version after verification. This
104
- satisfies design's dependency; design still needs its own approval and claim, and
105
- whole-Goal delivery remains unverified.
106
-
107
- ### Architecture design and actual task breakdown
108
-
109
- Consume the completed Goal and prototype. Design the responsibilities, boundaries,
110
- data and control flow, contracts, error behavior, key decisions, and validation
111
- approach required by the target repository and Goal.
112
-
113
- During this task, register the complete set of persistent delivery tasks needed
114
- to satisfy the Goal. Each represents a concrete outcome with its own actions,
115
- scope, deliverables, constraints, solution, acceptance criteria, verification
116
- methods, and real input references. Their combined scope must cover the complete
117
- Goal. A future registration list or a vague implementation placeholder does not
118
- satisfy task breakdown.
119
-
120
- Use ordinary edges for actual within-Goal prerequisites. Every delivery root
121
- with no other ordinary implementation prerequisite depends directly on the
122
- design task, so every within-Goal delivery path passes through design completion.
123
- External prerequisites keep their verified source ownership and do not replace
124
- that ordinary design gate; they also must be done before execution. Keep delivery tasks blocked
125
- while design is unfinished. This stage registers and verifies them; it does not
126
- execute them. New successors are proposed; approval requires a separate explicit
127
- user instruction covering them, even when Goal creation already permits their
128
- registration. Approved successors still wait for completed design prerequisites.
129
-
130
- Upload each successor's own primary Markdown and needed resources, referencing
131
- shared Goal and design inputs at their verified source. The design task owns its
132
- architecture and breakdown outputs. Read back every registered task, required
133
- attachment, source reference, and dependency. Verify the full breakdown before
134
- handing over the design PR. When review changes the design, update its owning
135
- artifacts and affected task summaries, plans, and references coherently, then
136
- reread them before completion.
137
-
138
- Follow repository document and independent review requirements. When a design
139
- PR is required, create it and maintain the full `properties.pullRequests` list.
140
- Keep this task `in_progress` until every necessary PR is platform-confirmed merged
141
- and stage acceptance is satisfied. An open PR, successful CI, or approval does
142
- not complete design. A user-review or no-merge instruction preserves this task
143
- and its blocking dependency while waiting; it grants no merge authority.
86
+ During solution discussion, consume the confirmed requirements and applicable
87
+ prototype. Discuss how to achieve the outcome: responsibilities, data and control
88
+ flow, interfaces, error behavior, key decisions, verification, and the proposed
89
+ breakdown. The solution task owns the current architecture, proposal, and draft
90
+ breakdown. Keep discussion material accessible in its description or attachments,
91
+ verify it before user review, and synchronize revisions and review decisions.
92
+ Do not register delivery subtasks before the user confirms the current solution.
93
+
94
+ A discussion task completes from user-confirmed Daynight material and its stated
95
+ stage acceptance. Repository document/code delivery still follows normal PR and
96
+ merge rules, but a generic repository PR rule does not add a merge prerequisite
97
+ to a Daynight discussion. If the user explicitly makes particular repository
98
+ artifacts or PR delivery part of that discussion's acceptance, honor that
99
+ requirement and its delivery permissions. An unresolved user review keeps the
100
+ current discussion `in_progress`. Successful CI or a design review cannot replace
101
+ the user's confirmation.
102
+
103
+ After explicit user confirmation of the current solution, record that confirmation
104
+ with the accepted material and register the delivery breakdown below. Complete
105
+ the solution discussion only after the accepted solution and actual registered delivery tasks,
106
+ their required materials, and their dependencies are read back
107
+ and verified. Use `task set-status <task-id> done` with the observed version and confirm done.
108
+ Completion satisfies dependencies and grants no delivery execution permission. Completing
109
+ either discussion does not establish whole-Goal completion.
110
+
111
+ ## Register the confirmed delivery breakdown
112
+
113
+ Only after user solution confirmation, create or reuse the concrete delivery tasks
114
+ needed for the agreed outcome. Each needs its own problem, objective, scope,
115
+ deliverables, constraints, solution, observable acceptance, verification methods,
116
+ and real input references. Include independently scoped acceptance work when it
117
+ has its own outcome; do not turn agent-generated execution steps into tasks.
118
+ The combined scope must cover the confirmed Goal, rather than a vague placeholder.
119
+
120
+ Create new delivery tasks in `todo`. Solution confirmation authorizes the
121
+ confirmed breakdown's registration, not implementation, autopilot,
122
+ automatic-execution permission, publishing, deployment, or merge. Apply any
123
+ separate explicit authorization only within its stated scope. New tasks have
124
+ `allowAgents=false`; automated workflows must not enable it themselves.
125
+
126
+ Use ordinary dependencies for real within-Goal prerequisites. Every delivery root
127
+ without another ordinary implementation prerequisite depends directly on the
128
+ solution discussion, so each delivery path includes confirmed design completion.
129
+ Mark verified prerequisites owned by another same-project chain as external;
130
+ external prerequisites remain real blockers and do not replace that ordinary
131
+ design gate. Preserve the complete relationship sets under the handbook's CLI
132
+ replacement semantics. Do not create dependencies merely to group cards.
133
+
134
+ Upload each task's own primary Markdown and needed resources. Keep shared
135
+ requirements with the requirements task and the solution and breakdown with the
136
+ solution task. Consumers reference the verified source task ID and attachment
137
+ path, or an immutable repository source. Read back every task, required attachment,
138
+ shared input, and dependency before reporting the breakdown registered. Keep the
139
+ solution discussion `in_progress` when registration is incomplete. If the accepted
140
+ solution materially changes, obtain renewed user confirmation before registering
141
+ or advancing the changed work.
144
142
 
145
143
  ## Preserve ownership and recover partial registration
146
144
 
147
- Every stage and delivery task needs its own self-contained Markdown description
148
- and detailed primary Markdown. Follow create-task's Markdown and verified-resource
149
- rules without claiming unfinished stage outputs are already available. Keep shared
150
- requirements on the Goal description task and shared architecture and breakdown on the design task. Later tasks reference
151
- verified source task IDs and attachment paths, read through the installed CLI,
152
- or verified immutable repository references. Do not distribute a duplicate whole
153
- packet to all tasks. Only copy a snapshot when the consuming task needs it,
154
- recording the purpose, original source, and source revision or content identity.
155
-
156
- Registration comprises independent writes, not a transaction. Reuse confirmed
157
- IDs if creating the second starting task, uploading an artifact, updating a
158
- reference, or registering part of the breakdown fails. Before retrying an
159
- uncertain write, read the complete actual resource and operation context as the
160
- handbook requires. A similar title does not prove success, and a lost response
161
- does not prove failure. If identity cannot be established uniquely, preserve the
162
- specific error and request the information needed to reconcile it; do not create
163
- another chain.
164
-
165
- Apply the handbook's exact-version rules to metadata updates, approval,
166
- withdrawal, claim and completion, and preserve complete-field replacement semantics for updates. Attachments are independent of task versions, status, and timestamps;
167
- verify actual file contents and metadata separately. Do not unlock delivery by
168
- marking incomplete registration or unfinished design complete. Readiness and
169
- `in_progress` provide no ownership lock; claim is a versioned transition, not an
170
- assignee lease. Generic updates cannot write status or bypass stages.
145
+ Stage briefs describe the work to produce the stage's outputs; they do not claim
146
+ unfinished results exist. Every stage and delivery task has its own self-contained
147
+ Markdown brief and detailed primary Markdown. Keep shared inputs at their actual
148
+ owner. Do not distribute a duplicate whole packet to every task. An independently
149
+ needed snapshot records its purpose, original source, and source revision or
150
+ content identity. Existing attachment reads support these references; do not
151
+ invent a URL scheme, cross-task relative links, or fixed service host.
152
+
153
+ Creation, uploads, metadata changes, and lifecycle actions are independent writes.
154
+ Retain confirmed IDs and resume missing operations after partial success. Read
155
+ actual task fields and attachment contents before retrying an uncertain write;
156
+ a matching title or lost response does not establish success or failure. If the
157
+ identity cannot be established uniquely, preserve the failure and information
158
+ needed to reconcile it rather than creating a duplicate chain.
159
+
160
+ Bind metadata updates and status changes to the exact version
161
+ observed for that decision. Attachment bytes have independent concurrency and
162
+ must be verified separately; task versions cannot prove the reviewed content is
163
+ unchanged. Generic updates cannot write status. A version conflict requires a
164
+ new decision. Readiness and `in_progress` provide no ownership lock or lease.
171
165
 
172
166
  ## Advance and accept the whole Goal
173
167
 
174
- `run-task` returns after its specified task completes or requires external
175
- intervention. Completing registration, Goal description, or design never activates
176
- autopilot. Only explicitly active `autopilot` may select the next related task
177
- after confirming the current task `done`, within the user's authorized scope.
178
- CI, review, and merge waits remain with the current task.
179
-
180
- To report the whole Goal complete, inspect the full registered delivery scope,
181
- confirm every delivery task completed and every necessary PR actually merged,
182
- and verify the original Goal's overall acceptance criteria with recorded
183
- evidence. Description completion, design completion, one delivery PR, or an empty
184
- ready page is insufficient. Distinguish verified partial results and remaining
185
- blockers from whole-Goal completion. This check does not create a new Goal status
186
- or reopen the completed problem-definition task.
168
+ Automatic delivery discovery requires actual-runtime platform compatibility.
169
+ Use autopilot's platform-filtered queries and preserve automatic-selection context
170
+ for run-task's full-task recheck before setting in_progress. A user-specified fixed
171
+ Goal queue keeps its manual path and existing execution scope across ready successors;
172
+ it does not enable automatic discovery permission or bypass stage confirmation.
173
+
174
+ A user-directed requirements-to-solution transition follows the confirmation
175
+ protocol above. Ordinary `run-task` otherwise returns after its specified task
176
+ completes or needs external intervention. Neither discussion completion nor
177
+ breakdown registration activates autopilot or starts delivery. Only explicitly
178
+ active autopilot selects later delivery work, and only with the existing readiness, input, and execution requirements. Automatic discovery
179
+ requires `allowAgents=true`; an explicitly selected task or fixed Goal queue
180
+ uses the manual execution path regardless of that flag. CI, review, and merge
181
+ waits stay with the current delivery task.
182
+
183
+ Delivery tasks follow normal run-task completion: accepted outcomes, required
184
+ review, all necessary authorized PR merges, and readable evidence. To report the
185
+ whole Goal complete, inspect the full confirmed delivery scope, every delivery
186
+ task's completion, all required PR merges, and the original whole-Goal acceptance.
187
+ The requirements task being done means only that requirements discussion is
188
+ complete. The solution task being done means the confirmed solution and verified
189
+ breakdown are delivered. An empty ready page or a single delivery result proves
190
+ neither the whole outcome nor completion of all its work.
@@ -13,15 +13,12 @@ needed to use them correctly.
13
13
  | `project create` | Register a repository as a project or find its existing project. |
14
14
  | `project list` | Find projects on the configured service. |
15
15
  | `project show` | Inspect a project's details. |
16
- | `task create` | Register a proposed task with its metadata and dependencies. |
17
- | `task ready` | Read a bounded candidate page of approved todo tasks with completed prerequisites. |
16
+ | `task create` | Register a todo task with its metadata and dependencies. |
17
+ | `task ready` | Read a bounded candidate page of todo tasks with completed prerequisites. |
18
18
  | `task list` | Read every matching page; defaults to unfinished tasks. |
19
19
  | `task show` | Read one task's complete details and exact version. |
20
- | `task update` | Change metadata, automatic-execution permission, dependencies, or PR references; status is not writable. |
21
- | `task approve` | Change proposed to todo using an observed version and explicit approval authorization. |
22
- | `task unapprove` | Withdraw approval of todo work, returning it to proposed using an observed version. |
23
- | `task claim` | Change ready todo to in_progress using an observed version. |
24
- | `task complete` | Change in_progress to done after acceptance and required authorized delivery. |
20
+ | `task update` | Change metadata, automatic-execution permission, platform requirements, dependencies, or PR references; status is not writable. |
21
+ | `task set-status` | Set todo, in_progress, or done using an observed exact version. |
25
22
  | `task graph` | Inspect the project's dependency graph and summary. |
26
23
  | `task attachment put` | Upload or replace one attachment file. |
27
24
  | `task attachment list` | Read a task's attachment inventory and metadata. |
@@ -48,12 +45,11 @@ service. An explicit project overrides discovery for that invocation. Resolve
48
45
  missing or ambiguous matches rather than guessing an ID or creating a project
49
46
  to make a query succeed.
50
47
 
51
- **Read scope.** Ready is a candidate page of approved todo tasks, ordered by
52
- creation rather than relevance. An empty page does not rule out proposed,
53
- in-progress or dependency-blocked work. List traverses every matching page but
48
+ **Read scope.** Ready is a candidate page of todo tasks, ordered by
49
+ creation rather than relevance. An empty page does not rule out in-progress or dependency-blocked work. List traverses every matching page but
54
50
  excludes `done` by default; include completed tasks explicitly when checking the
55
51
  full backlog or prior registrations. Its grouping is in-progress, ready todo,
56
- blocked todo, proposed, then done when included; this does not rank relevance.
52
+ blocked todo, then done when included; this does not rank relevance.
57
53
  Human lists are summaries; JSON lists omit only `description` and preserve every
58
54
  other task field. Use show when a description is needed; ready, details and write
59
55
  results retain full tasks. Graph provides compact dependency context without
@@ -61,46 +57,68 @@ full descriptions, PR properties, or versions. Read the selected task's details
61
57
  before acting. A graph-limit error still permits bounded candidate and
62
58
  individual task reads.
63
59
 
64
- **Lifecycle and approval.** Creation starts in `proposed`. Explicit approval
65
- moves proposed to todo; unapprove returns only unstarted todo work to proposed;
66
- claim moves ready todo to in_progress; complete moves in_progress to done.
67
- Approval and withdrawal allow unfinished prerequisites. Claim and completion
68
- require every direct prerequisite to be done. Proposed is never ready, even
69
- with no prerequisites. Withdrawal preserves task materials, dependencies,
70
- execution timestamps and attachments; it does not change successor states.
71
- Repeated actions and wrong predecessor states fail. There is no reopening of
72
- in-progress or done work, execution release, or direct todo-to-done transition.
73
- Metadata, attachments and PR references cannot approve, withdraw approval or
74
- claim work. Approve or unapprove only when the user explicitly authorizes that
75
- action for the task or stated scope; creation, execution requests, `run-task`
76
- and autopilot grant none. In the Web, the title-row entry opens a confirmation;
77
- only deliberate confirmation is the user's approval or withdrawal instruction.
78
- Cancel and Escape submit no action. Task approval itself grants no implementation,
79
- publication, deployment or merge permission.
60
+ **Task status.** Creation starts in `todo` with no task approval stage and does
61
+ not start execution. `task set-status <task-id> <status> --if-version <version>`
62
+ sets any of `todo`, `in_progress`, or `done`. The service checks the exact version
63
+ before a same-status no-op; it preserves all fields for a current-version no-op
64
+ and refuses stale versions. A real change increments the version once. Generic
65
+ metadata updates cannot write status. Status, materials, and readiness grant no
66
+ implementation, publication, deployment, or merge permission.
67
+
68
+ Entering in_progress or done requires every direct prerequisite done. Reopening
69
+ done to todo or in_progress is refused when a direct successor is in_progress or
70
+ done; successors are never changed automatically. Entering in_progress starts a
71
+ new execution interval and clears completion; returning to todo clears both
72
+ endpoints. In_progress to done retains the nullable start and records completion.
73
+ Todo to done records only completion, with unknown duration. Same-status and
74
+ metadata updates preserve timing. State changes provide no process ownership,
75
+ release, transfer, stop, or lease semantics. The Web confirms every status choice,
76
+ including the current status; cancel and Escape submit no request.
80
77
 
81
78
  **Automatic execution permission.** Tasks expose the required boolean
82
- `allowAgents`, independent of status approval and dependency readiness. New tasks
79
+ `allowAgents`, independent of status and dependency readiness. New tasks
83
80
  start false; public creation cannot set it. Existing tasks receive true through
84
81
  the database migration. Use `task update <task-id> --allow-agents true|false --if-version <version>` only
85
82
  for an explicitly authorized permission change.
86
83
  Omission preserves the current value, including explicit false. Actual changes
87
84
  are locked during in_progress; exact-version same-value requests keep the
88
- version and timestamps, while stale versions still conflict. Approve, unapprove,
89
- claim, complete and other metadata updates preserve the flag.
85
+ version and timestamps, while stale versions still conflict. Status changes and other metadata updates preserve the flag.
90
86
 
91
87
  `task list` and `task ready` accept `--allow-agents true|false`. The server
92
88
  combines that condition with other filters before pagination and the ready limit;
93
89
  an unfiltered ready page may contain tasks without automatic-execution permission.
94
90
  Automatic selection requires true and automated workflows must not enable it
95
- themselves. An explicitly user-selected task may still use manual claim regardless
91
+ themselves. An explicitly user-selected task may still use manual execution regardless
96
92
  of the flag. Permission does not grant execution, publication or merge authority.
97
93
  A lost permission PATCH response is an unconfirmed write: read actual task state
98
94
  before reconsidering the operation, without resubmitting automatically.
99
95
 
100
- **Task concurrency.** Bind each metadata update, approve, unapprove, claim and complete to
96
+ **Execution platform.** Complete tasks, inventory items and graph nodes expose
97
+ `requiredPlatform` as `null`, `windows`, `linux` or `macos`; null means unrestricted.
98
+ Set a requirement with `task create --required-platform <platform>` or
99
+ `task update <task-id> --required-platform <platform> --if-version <version>`.
100
+ Clear it with `task update <task-id> --clear-required-platform --if-version <version>`;
101
+ setting and clearing in one command is invalid. Omitting both update options
102
+ preserves the requirement. Existing and new tasks without a requirement are
103
+ unrestricted. Actual changes are locked during in_progress; an exact-version
104
+ same-value request keeps version and timestamps, while stale versions conflict.
105
+ Explicitly user-selected tasks and fixed queues retain their manual execution
106
+ path independently of platform compatibility. Automatic selections keep their
107
+ actual-platform context and recheck full-task eligibility before set-status.
108
+
109
+ `task list` and `task ready` accept `--compatible-platform <platform>`. The
110
+ server includes unrestricted tasks and exact matches, combining this condition
111
+ with status, readiness and `--allow-agents` before pagination or the ready limit.
112
+ Platform compatibility does not change readiness or enable automatic execution.
113
+ Preserve the filter when requesting additional candidate inventory; do not filter
114
+ a bounded unfiltered ready page locally. A query option selects a candidate
115
+ platform and does not establish the actual execution environment. Worker runtime
116
+ must identify its own platform; a Linux runtime in WSL is Linux.
117
+
118
+ **Task concurrency.** Bind each metadata update and status change to
101
119
  the exact version read for that decision using `--if-version`; the CLI's default
102
120
  pre-submit read cannot protect an earlier decision. Preserve full int64 decimal
103
- digits without numeric rounding. A claim is a versioned transition, not an
121
+ digits without numeric rounding. Entering in_progress is a versioned transition, not an
104
122
  assignee lock, renewable lease or proof that existing work belongs to this
105
123
  session. On a conflict, reread and reconsider; a new action needs a fresh
106
124
  decision, not merely a newer version. Never retry a mutation automatically.
@@ -108,7 +126,7 @@ decision, not merely a newer version. Never retry a mutation automatically.
108
126
  **Dependency classification.** `dependsOn` contains every direct prerequisite;
109
127
  `externalDependsOn` is its explicit external subset. Ordinary prerequisites are
110
128
  `dependsOn` minus that subset. Both are canonical, duplicate-free UUID sets,
111
- not insertion order. Every prerequisite must be done before claim or completion,
129
+ not insertion order. Every prerequisite must be done before entering in_progress or done,
112
130
  including external ones; cycle checks and project access rules use all edges.
113
131
  External means cross-chain within the same project, not a cross-project
114
132
  reference. It separates chain ownership, not blocking or authorization. Use
@@ -171,5 +189,7 @@ resource IDs rather than reporting success or blindly resending a write.
171
189
  Task registration, execution, and selection follow [create-task](create-task.md),
172
190
  [run-task](run-task.md), and [autopilot](autopilot.md), respectively. For a chain
173
191
  of independently tracked delivery stages, use [the Goal protocol](goal.md).
174
- Goal scope grants no implicit approval: every stage and delivery task follows the
175
- same proposed/approve/unapprove/claim/complete lifecycle.
192
+ Every stage and delivery task follows the same todo/in_progress/done contract.
193
+ A fixed Goal queue may use existing scoped execution authorization for its ready
194
+ successors; registration and discussion confirmation grant no delivery execution
195
+ permission.