@codetreker/daynight 0.13.1 → 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.
- package/dist/api/client.d.ts +3 -6
- package/dist/api/client.js +23 -13
- package/dist/api/client.js.map +1 -1
- package/dist/api/parse.js +6 -7
- package/dist/api/parse.js.map +1 -1
- package/dist/api/types.d.ts +9 -3
- package/dist/commands/skill/refresh-installed.d.ts +1 -0
- package/dist/commands/skill/refresh-installed.js +17 -0
- package/dist/commands/skill/refresh-installed.js.map +1 -0
- package/dist/commands/skill/refresh.d.ts +4 -0
- package/dist/commands/skill/refresh.js +87 -0
- package/dist/commands/skill/refresh.js.map +1 -0
- package/dist/commands/skill/skills/using-daynight/SKILL.md +17 -13
- package/dist/commands/skill/skills/using-daynight/references/autopilot.md +69 -48
- package/dist/commands/skill/skills/using-daynight/references/create-task.md +18 -17
- package/dist/commands/skill/skills/using-daynight/references/goal.md +23 -17
- package/dist/commands/skill/skills/using-daynight/references/handbook.md +56 -39
- package/dist/commands/skill/skills/using-daynight/references/run-task.md +27 -24
- package/dist/commands/skill/targets.d.ts +1 -0
- package/dist/commands/skill/targets.js +17 -9
- package/dist/commands/skill/targets.js.map +1 -1
- package/dist/commands/task/command.js +18 -13
- package/dist/commands/task/command.js.map +1 -1
- package/dist/commands/task/definition.js +20 -21
- package/dist/commands/task/definition.js.map +1 -1
- package/dist/commands/task/rendering.js +3 -1
- package/dist/commands/task/rendering.js.map +1 -1
- package/dist/commands/update/definition.js +2 -2
- package/dist/commands/update/definition.js.map +1 -1
- package/dist/commands/update/updater.d.ts +2 -1
- package/dist/commands/update/updater.js +19 -4
- package/dist/commands/update/updater.js.map +1 -1
- package/dist/repository/git.d.ts +6 -3
- package/dist/repository/git.js +6 -4
- package/dist/repository/git.js.map +1 -1
- package/package.json +2 -2
|
@@ -26,54 +26,76 @@ possible. Do not select another task because CI, review, or merge is pending.
|
|
|
26
26
|
|
|
27
27
|
## Select one related task
|
|
28
28
|
|
|
29
|
-
When
|
|
29
|
+
When the user explicitly supplies a task or fixed Goal queue, inspect its next
|
|
30
|
+
unfinished task by ID and use the manual execution path regardless of
|
|
31
|
+
`allowAgents` or platform compatibility. Preserve readiness, stage inputs, and
|
|
32
|
+
the existing execution scope; a fixed queue does not authorize unrelated discovery.
|
|
33
|
+
Existing scoped authorization covers its ready successors without per-task reauthorization.
|
|
34
|
+
|
|
35
|
+
Otherwise, when there is no current task, identify the actual runtime in the
|
|
36
|
+
environment where task commands and implementation will execute:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
node -p "process.platform"
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Map `win32` to `windows`, `darwin` to `macos`, and `linux` to `linux`.
|
|
43
|
+
A Linux runtime in WSL is `linux`, regardless of its outer Windows host.
|
|
44
|
+
Unsupported or unknown runtime platforms leave selection waiting with the concrete
|
|
45
|
+
reason. Do not substitute a configured platform, remote host OS, or requested task
|
|
46
|
+
platform for the observed runtime. Query platform-compatible candidates:
|
|
30
47
|
|
|
31
48
|
```bash
|
|
32
|
-
daynight task ready --allow-agents true --json
|
|
49
|
+
daynight task ready --allow-agents true --compatible-platform <actual-platform> --json
|
|
33
50
|
```
|
|
34
51
|
|
|
35
|
-
Pick exactly one
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
confirmed scope. Readiness checks all
|
|
43
|
-
completeness or execution authorization.
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
`--
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
52
|
+
Pick exactly one ready `todo` task with `allowAgents=true` and `requiredPlatform`
|
|
53
|
+
either null or equal to the actual platform, most relevant to the confirmed Goal
|
|
54
|
+
and authorized work. Compare actions, scope, deliverables, solution, acceptance
|
|
55
|
+
criteria and actual dependencies; creation order does not establish relevance.
|
|
56
|
+
Read full details and actual task-specific and shared inputs for plausible
|
|
57
|
+
candidates. Inspect complete `dependsOn` and its `externalDependsOn` subset.
|
|
58
|
+
External prerequisites still block readiness, and cross-chain classification does
|
|
59
|
+
not authorize executing them or expand the confirmed scope. Readiness checks all
|
|
60
|
+
prerequisites, not stage artifact completeness or execution authorization.
|
|
61
|
+
|
|
62
|
+
Pass the selected ID, automatic-selection mode and actual platform to `run-task`.
|
|
63
|
+
Immediately before setting in_progress, reread the full task with
|
|
64
|
+
`daynight task show <task-id> --json` and recheck `todo`, ready, `allowAgents=true`,
|
|
65
|
+
and `requiredPlatform` either null or equal to the same actual platform. A changed
|
|
66
|
+
or incompatible requirement prevents starting and requires a new selection decision;
|
|
67
|
+
a changed execution environment requires fresh runtime identification and candidate
|
|
68
|
+
queries. Run-task enters in_progress using the version observed for that decision
|
|
69
|
+
before starting, using the exact version from this full-task recheck with
|
|
70
|
+
`--if-version`. An earlier compatible page does not authorize bypassing changed
|
|
71
|
+
eligibility. Autopilot cannot supply user confirmation of requirements or solution;
|
|
72
|
+
an explicit discussion-start request uses the Goal protocol's scoped manual path.
|
|
73
|
+
|
|
74
|
+
Ready returns at most 10 candidates by default or the requested bounded `--limit`;
|
|
75
|
+
it is not a complete backlog. Supplement an empty or unmatched page only with
|
|
76
|
+
needed selected reads, the graph, or
|
|
77
|
+
`daynight task list --allow-agents true --compatible-platform <actual-platform> --json`.
|
|
78
|
+
Both ready and supplemental list queries retain the actual-platform filter before
|
|
79
|
+
pagination and permission=true; do not filter a bounded unfiltered page locally.
|
|
80
|
+
Distinguish completed scope, missing execution authorization, prerequisite blockers,
|
|
81
|
+
other ongoing work and insufficient candidates. Do not take unrelated work to stay
|
|
82
|
+
busy or report completion from an empty or unrelated bounded page.
|
|
60
83
|
|
|
61
84
|
Autopilot permission alone covers execution of existing tasks, not creation of
|
|
62
|
-
new ones.
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
of the flag; preserve all approval, prerequisite and authorization checks.
|
|
85
|
+
new ones. Explicit user or repository tracking/review requirements supply standing
|
|
86
|
+
creation permission within the confirmed scope. Use existing creation permission
|
|
87
|
+
or obtain it before [create-task](create-task.md). Goal permission covers discussion
|
|
88
|
+
stages and the confirmed breakdown at user-confirmation gates; do not precreate
|
|
89
|
+
architecture placeholders or delivery tasks. Delivery registration leaves todo
|
|
90
|
+
without execution; complete solution discussion only after accepted material and
|
|
91
|
+
the real breakdown are verified. Existing explicit execution scope continues to
|
|
92
|
+
cover its ready successors without another per-task authorization.
|
|
93
|
+
|
|
94
|
+
Automatic selection never enables `allowAgents`. An explicitly selected task or
|
|
95
|
+
fixed Goal queue's manual execution path remains available regardless of the flag
|
|
96
|
+
or platform compatibility; preserve prerequisite, stage-input and authorization
|
|
97
|
+
checks. An automatically selected ID passed to run-task remains automatic
|
|
98
|
+
selection and does not acquire this manual exception.
|
|
77
99
|
|
|
78
100
|
## Advance serially and accept the scope
|
|
79
101
|
|
|
@@ -83,12 +105,11 @@ separate task. Ordinary CI, review, and merge waits keep that target. After
|
|
|
83
105
|
task within the same authorized scope. For Goal discussions, stop at each user
|
|
84
106
|
confirmation gate; completing requirements and starting solution discussion
|
|
85
107
|
requires the user's explicit confirmation and direction under the Goal protocol.
|
|
86
|
-
Solution confirmation permits
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
discussion confirmation do not.
|
|
108
|
+
Solution confirmation permits todo delivery registration. Later delivery selection
|
|
109
|
+
requires a ready todo with complete inputs, explicit autopilot activation, and
|
|
110
|
+
execution authorization. Discussion completion satisfies a dependency and grants
|
|
111
|
+
no delivery execution permission. Existing scoped execution authorization
|
|
112
|
+
continues to apply to its stated ready successors.
|
|
92
113
|
|
|
93
114
|
If `run-task` returns a wait requiring external intervention, preserve its
|
|
94
115
|
current-task checkpoint and report the blocker and required next action. An
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Use this mode to prepare and register work that needs persistent tracking. Read
|
|
4
4
|
[the handbook](handbook.md) before discovery, queries, or writes. Return after
|
|
5
|
-
registration; registration alone does not authorize
|
|
5
|
+
registration; registration alone does not authorize execution or
|
|
6
6
|
autopilot. An explicit request to start a Goal discussion routes the registered
|
|
7
7
|
current stage to run-task under the Goal protocol.
|
|
8
8
|
|
|
@@ -12,8 +12,7 @@ or review supplies standing creation permission for necessary tasks within the
|
|
|
12
12
|
confirmed scope. Reuse suitable tasks and do not ask for that permission again.
|
|
13
13
|
Loading this mode, needing durable tracking, or permission to implement or run
|
|
14
14
|
autopilot alone does not grant creation permission. Ask when it is missing; reuse
|
|
15
|
-
permission already granted for the scope. Creation does not authorize
|
|
16
|
-
execution, or delivery.
|
|
15
|
+
permission already granted for the scope. Creation does not authorize execution or delivery.
|
|
17
16
|
|
|
18
17
|
## Choose the tracked outcome
|
|
19
18
|
|
|
@@ -37,8 +36,8 @@ or delivery tasks upfront. Its stage brief describes the discussion and its
|
|
|
37
36
|
user-confirmation gate; finished requirements and applicable prototypes are
|
|
38
37
|
outputs. User-confirmed requirements permit creation and start of solution
|
|
39
38
|
discussion. Only user-confirmed solution permits actual delivery registration.
|
|
40
|
-
A registration-only request leaves the current stage
|
|
41
|
-
explicit discussion-start request authorizes its
|
|
39
|
+
A registration-only request leaves the current stage todo and returns; an
|
|
40
|
+
explicit discussion-start request authorizes its start through
|
|
42
41
|
run-task. Creating a Goal covers the later in-scope stages and breakdown only
|
|
43
42
|
at those confirmation gates.
|
|
44
43
|
|
|
@@ -154,10 +153,14 @@ evidence. The prototype remains with its actual owner when shared across a Goal.
|
|
|
154
153
|
## Register and verify
|
|
155
154
|
|
|
156
155
|
New tasks have `allowAgents=false`; creation cannot enable the permission.
|
|
157
|
-
Automatic workers and agent workflows must not turn it on themselves.
|
|
158
|
-
and automatic-
|
|
156
|
+
Automatic workers and agent workflows must not turn it on themselves. Execution
|
|
157
|
+
authorization and automatic-discovery permission remain separate decisions.
|
|
159
158
|
|
|
160
|
-
|
|
159
|
+
Tasks without `--required-platform` are unrestricted. Set windows, linux or macos
|
|
160
|
+
only when the confirmed task needs that execution environment. Platform requirements
|
|
161
|
+
do not start tasks or enable automatic execution; they survive all status changes.
|
|
162
|
+
|
|
163
|
+
Reuse the established project and suitable tasks. Create new tasks in `todo`,
|
|
161
164
|
retaining each confirmed ID. Set concrete descriptions and actual ordinary and
|
|
162
165
|
external prerequisites using the handbook's full CLI replacement rule. Upload each task's own primary Markdown and required
|
|
163
166
|
resources; add actual attachment references to the complete description using
|
|
@@ -172,17 +175,15 @@ interaction. For a Goal, verify only the current discussion stage and its brief;
|
|
|
172
175
|
verify later stages and delivery tasks when their confirmation gate permits
|
|
173
176
|
registration.
|
|
174
177
|
Registration is complete only when required artifacts and associations are
|
|
175
|
-
confirmed readable.
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
stated task or Goal-task scope, or approve directly through CLI/Web; an authorized Agent uses each reviewed
|
|
182
|
-
task's exact version through `task approve`.
|
|
178
|
+
confirmed readable. Registration leaves work todo and does not execute it. A Goal
|
|
179
|
+
discussion-start request is scoped execution authorization for that discussion,
|
|
180
|
+
as the Goal protocol specifies. User solution confirmation permits registration
|
|
181
|
+
of todo delivery tasks and grants no delivery execution permission. Apply any
|
|
182
|
+
existing explicit execution authorization only within its stated task or Goal
|
|
183
|
+
scope; ready successors in an authorized fixed queue need no per-task authorization.
|
|
183
184
|
|
|
184
185
|
If creation succeeds but a later operation fails, retain the confirmed IDs and
|
|
185
|
-
resume missing operations there. Tasks remain `
|
|
186
|
+
resume missing operations there. Tasks remain `todo`. Reconcile uncertain results through the handbook before another
|
|
186
187
|
mutation. Report incomplete registration with the exact missing operation or
|
|
187
188
|
artifact and next step. Do not move detailed plans into descriptions to bypass
|
|
188
189
|
an attachment failure. Return after verified registration without selecting or
|
|
@@ -24,11 +24,10 @@ standing creation permission within the confirmed scope. It grants no unrelated
|
|
|
24
24
|
work, implementation, external communication, deployment, merge, or mainline push
|
|
25
25
|
permission.
|
|
26
26
|
|
|
27
|
-
A request to start a Goal discussion authorizes creating
|
|
27
|
+
A request to start a Goal discussion authorizes creating and starting
|
|
28
28
|
that discussion task so it becomes `in_progress`. A registration-only request
|
|
29
|
-
creates only the current discussion task in `
|
|
30
|
-
|
|
31
|
-
activation does not supply discussion-start or delivery approval authorization.
|
|
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.
|
|
32
31
|
|
|
33
32
|
## Start requirements discussion
|
|
34
33
|
|
|
@@ -40,9 +39,9 @@ questions, and observable completion conditions. Its primary Markdown's Solution
|
|
|
40
39
|
and Acceptance criteria describe this discussion and its user-confirmation gate;
|
|
41
40
|
finished requirements and prototypes are outputs, not prerequisites to starting.
|
|
42
41
|
|
|
43
|
-
Each task starts in `
|
|
44
|
-
current materials and exact version, use `task
|
|
45
|
-
|
|
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`.
|
|
46
45
|
All direct prerequisites must be done. Preserve real external blockers rather
|
|
47
46
|
than removing dependencies to make a discussion ready. An already in-progress
|
|
48
47
|
task is resumed after checking its actual work and context.
|
|
@@ -70,15 +69,15 @@ a review result, or elapsed time does not satisfy this gate.
|
|
|
70
69
|
Record the user's confirmation with the accepted material in the owning task and
|
|
71
70
|
verify it is readable. A material revision after confirmation requires renewed
|
|
72
71
|
user confirmation before advancement. When the discussion's acceptance is met,
|
|
73
|
-
reread the task, use `task
|
|
72
|
+
reread the task, use `task set-status <task-id> done` with its observed version, and confirm done.
|
|
74
73
|
Do not create the solution discussion until that completion is confirmed; reconcile
|
|
75
74
|
an uncertain completion before another mutation.
|
|
76
75
|
|
|
77
76
|
Then create or reuse the solution discussion task, with a purpose-specific title
|
|
78
77
|
such as `Architecture discussion: <outcome>`, and an ordinary prerequisite on the
|
|
79
78
|
completed requirements task. The user's direction to start this discussion
|
|
80
|
-
provides its scoped
|
|
81
|
-
read its current version,
|
|
79
|
+
provides its scoped execution authorization. Prepare its stage brief,
|
|
80
|
+
read its current version, set in_progress through the same lifecycle, and
|
|
82
81
|
confirm `in_progress`. This user-directed transition does not require autopilot
|
|
83
82
|
and does not authorize selection of another unrelated task.
|
|
84
83
|
|
|
@@ -105,8 +104,8 @@ After explicit user confirmation of the current solution, record that confirmati
|
|
|
105
104
|
with the accepted material and register the delivery breakdown below. Complete
|
|
106
105
|
the solution discussion only after the accepted solution and actual registered delivery tasks,
|
|
107
106
|
their required materials, and their dependencies are read back
|
|
108
|
-
and verified. Use `task
|
|
109
|
-
Completion satisfies dependencies
|
|
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
|
|
110
109
|
either discussion does not establish whole-Goal completion.
|
|
111
110
|
|
|
112
111
|
## Register the confirmed delivery breakdown
|
|
@@ -118,8 +117,8 @@ and real input references. Include independently scoped acceptance work when it
|
|
|
118
117
|
has its own outcome; do not turn agent-generated execution steps into tasks.
|
|
119
118
|
The combined scope must cover the confirmed Goal, rather than a vague placeholder.
|
|
120
119
|
|
|
121
|
-
Create new delivery tasks in `
|
|
122
|
-
confirmed breakdown's registration, not
|
|
120
|
+
Create new delivery tasks in `todo`. Solution confirmation authorizes the
|
|
121
|
+
confirmed breakdown's registration, not implementation, autopilot,
|
|
123
122
|
automatic-execution permission, publishing, deployment, or merge. Apply any
|
|
124
123
|
separate explicit authorization only within its stated scope. New tasks have
|
|
125
124
|
`allowAgents=false`; automated workflows must not enable it themselves.
|
|
@@ -158,7 +157,7 @@ a matching title or lost response does not establish success or failure. If the
|
|
|
158
157
|
identity cannot be established uniquely, preserve the failure and information
|
|
159
158
|
needed to reconcile it rather than creating a duplicate chain.
|
|
160
159
|
|
|
161
|
-
Bind metadata updates
|
|
160
|
+
Bind metadata updates and status changes to the exact version
|
|
162
161
|
observed for that decision. Attachment bytes have independent concurrency and
|
|
163
162
|
must be verified separately; task versions cannot prove the reviewed content is
|
|
164
163
|
unchanged. Generic updates cannot write status. A version conflict requires a
|
|
@@ -166,12 +165,19 @@ new decision. Readiness and `in_progress` provide no ownership lock or lease.
|
|
|
166
165
|
|
|
167
166
|
## Advance and accept the whole Goal
|
|
168
167
|
|
|
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
|
+
|
|
169
174
|
A user-directed requirements-to-solution transition follows the confirmation
|
|
170
175
|
protocol above. Ordinary `run-task` otherwise returns after its specified task
|
|
171
176
|
completes or needs external intervention. Neither discussion completion nor
|
|
172
177
|
breakdown registration activates autopilot or starts delivery. Only explicitly
|
|
173
|
-
active autopilot selects later delivery work, and only with the existing
|
|
174
|
-
`allowAgents
|
|
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
|
|
175
181
|
waits stay with the current delivery task.
|
|
176
182
|
|
|
177
183
|
Delivery tasks follow normal run-task completion: accepted outcomes, required
|
|
@@ -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
|
|
17
|
-
| `task ready` | Read a bounded candidate page of
|
|
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
|
|
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
|
|
52
|
-
creation rather than relevance. An empty page does not rule out
|
|
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,
|
|
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,49 +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
|
-
**
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
to
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
Cancel and Escape submit no action. Task approval itself grants no implementation,
|
|
82
|
-
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.
|
|
83
77
|
|
|
84
78
|
**Automatic execution permission.** Tasks expose the required boolean
|
|
85
|
-
`allowAgents`, independent of status
|
|
79
|
+
`allowAgents`, independent of status and dependency readiness. New tasks
|
|
86
80
|
start false; public creation cannot set it. Existing tasks receive true through
|
|
87
81
|
the database migration. Use `task update <task-id> --allow-agents true|false --if-version <version>` only
|
|
88
82
|
for an explicitly authorized permission change.
|
|
89
83
|
Omission preserves the current value, including explicit false. Actual changes
|
|
90
84
|
are locked during in_progress; exact-version same-value requests keep the
|
|
91
|
-
version and timestamps, while stale versions still conflict.
|
|
92
|
-
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.
|
|
93
86
|
|
|
94
87
|
`task list` and `task ready` accept `--allow-agents true|false`. The server
|
|
95
88
|
combines that condition with other filters before pagination and the ready limit;
|
|
96
89
|
an unfiltered ready page may contain tasks without automatic-execution permission.
|
|
97
90
|
Automatic selection requires true and automated workflows must not enable it
|
|
98
|
-
themselves. An explicitly user-selected task may still use manual
|
|
91
|
+
themselves. An explicitly user-selected task may still use manual execution regardless
|
|
99
92
|
of the flag. Permission does not grant execution, publication or merge authority.
|
|
100
93
|
A lost permission PATCH response is an unconfirmed write: read actual task state
|
|
101
94
|
before reconsidering the operation, without resubmitting automatically.
|
|
102
95
|
|
|
103
|
-
**
|
|
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
|
|
104
119
|
the exact version read for that decision using `--if-version`; the CLI's default
|
|
105
120
|
pre-submit read cannot protect an earlier decision. Preserve full int64 decimal
|
|
106
|
-
digits without numeric rounding.
|
|
121
|
+
digits without numeric rounding. Entering in_progress is a versioned transition, not an
|
|
107
122
|
assignee lock, renewable lease or proof that existing work belongs to this
|
|
108
123
|
session. On a conflict, reread and reconsider; a new action needs a fresh
|
|
109
124
|
decision, not merely a newer version. Never retry a mutation automatically.
|
|
@@ -111,7 +126,7 @@ decision, not merely a newer version. Never retry a mutation automatically.
|
|
|
111
126
|
**Dependency classification.** `dependsOn` contains every direct prerequisite;
|
|
112
127
|
`externalDependsOn` is its explicit external subset. Ordinary prerequisites are
|
|
113
128
|
`dependsOn` minus that subset. Both are canonical, duplicate-free UUID sets,
|
|
114
|
-
not insertion order. Every prerequisite must be done before
|
|
129
|
+
not insertion order. Every prerequisite must be done before entering in_progress or done,
|
|
115
130
|
including external ones; cycle checks and project access rules use all edges.
|
|
116
131
|
External means cross-chain within the same project, not a cross-project
|
|
117
132
|
reference. It separates chain ownership, not blocking or authorization. Use
|
|
@@ -174,5 +189,7 @@ resource IDs rather than reporting success or blindly resending a write.
|
|
|
174
189
|
Task registration, execution, and selection follow [create-task](create-task.md),
|
|
175
190
|
[run-task](run-task.md), and [autopilot](autopilot.md), respectively. For a chain
|
|
176
191
|
of independently tracked delivery stages, use [the Goal protocol](goal.md).
|
|
177
|
-
|
|
178
|
-
|
|
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.
|
|
@@ -29,15 +29,26 @@ applicable prototype. When a prototype is a required input, view and exercise it
|
|
|
29
29
|
with its resources. An unfinished output of the current stage is not a missing
|
|
30
30
|
input.
|
|
31
31
|
|
|
32
|
-
An explicitly user-selected task may use the manual
|
|
33
|
-
`allowAgents
|
|
34
|
-
|
|
32
|
+
An explicitly user-selected task may use the manual execution path regardless of
|
|
33
|
+
`allowAgents` or platform compatibility; a fixed queue explicitly selected by the
|
|
34
|
+
user has the same manual path. These conditions gate automatic selection, not
|
|
35
|
+
explicit assignment. Automated task selection requires true and must not enable
|
|
36
|
+
the flag itself. An automatically selected ID passed here remains automatic
|
|
37
|
+
selection, even though run-task receives a concrete ID. Carry its actual runtime
|
|
38
|
+
platform from autopilot and wait if unsupported or unknown. Immediately before
|
|
39
|
+
setting in_progress, reread the full task and recheck `todo`, ready,
|
|
40
|
+
`allowAgents=true`, and `requiredPlatform` either null or equal to that same actual
|
|
41
|
+
platform. A changed or incompatible requirement prevents starting and requires a
|
|
42
|
+
new selection decision; a changed execution environment requires fresh runtime
|
|
43
|
+
identification and candidate queries. Use the exact version from this full-task
|
|
44
|
+
recheck with `--if-version`; an earlier candidate page does not authorize the
|
|
45
|
+
manual exception after automatic eligibility changes.
|
|
35
46
|
|
|
36
47
|
Check state, every direct prerequisite, authorized scope, and required stage
|
|
37
48
|
inputs. Read `dependsOn` and its `externalDependsOn` subset: ordinary edges
|
|
38
49
|
express same-chain prerequisites, external marks distinguish verified cross-chain
|
|
39
|
-
ownership. Both kinds must be done
|
|
40
|
-
never grants permission to execute a prerequisite,
|
|
50
|
+
ownership. Both kinds must be done before entering in_progress or done. Classification
|
|
51
|
+
never grants permission to execute a prerequisite, enable automatic
|
|
41
52
|
execution, or remove a blocker.
|
|
42
53
|
A missing or unreadable primary Markdown, missing Solution or Acceptance criteria,
|
|
43
54
|
or absent required input leaves execution unready. Resolve it within the
|
|
@@ -46,27 +57,20 @@ from a title, silently invent acceptance criteria, or move detailed plans into
|
|
|
46
57
|
the description. Do not execute prerequisites as an implicit expansion of the
|
|
47
58
|
requested task.
|
|
48
59
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
`task approve` with that exact observed version, then confirm the resulting todo
|
|
56
|
-
state. The user can also approve directly through the CLI or Web. Approval does
|
|
57
|
-
not expand implementation or delivery authorization.
|
|
58
|
-
|
|
59
|
-
If approval is withdrawn before claim, the task is proposed again and waits for
|
|
60
|
-
new explicit approval. Do not infer approval from its earlier todo state or
|
|
61
|
-
retry a failed claim with a newer version.
|
|
60
|
+
Creation leaves a task `todo` and does not execute it. An explicit request to
|
|
61
|
+
start the current Goal discussion, or the user-directed transition that starts
|
|
62
|
+
solution discussion, authorizes entering in_progress for that discussion under
|
|
63
|
+
the Goal protocol; registration alone does not. Existing execution authorization
|
|
64
|
+
may cover the stated task or fixed Goal queue and its ready successors. Task
|
|
65
|
+
status never expands implementation or delivery authorization.
|
|
62
66
|
|
|
63
67
|
For ready `todo`, begin only when dependencies are done, required stage inputs are complete
|
|
64
|
-
and the work is authorized. Use `task
|
|
68
|
+
and the work is authorized. Use `task set-status <task-id> in_progress` with the exact version observed for
|
|
65
69
|
that decision and confirm in_progress before starting. A stale version or
|
|
66
70
|
changed prerequisite requires rereading and reconsidering, with no automatic
|
|
67
|
-
|
|
71
|
+
mutation retry. For `in_progress`, recover existing work and coordinate using the
|
|
68
72
|
project's established mechanisms; the state is not an assignee lock or lease.
|
|
69
|
-
A task already `done` is reported as such
|
|
73
|
+
A task already `done` is reported as such unless reopening is within the explicit requested scope; use the same versioned status setter and dependency protection.
|
|
70
74
|
Preserve the requested task ID through recovery and waiting.
|
|
71
75
|
|
|
72
76
|
## Execute and maintain continuity
|
|
@@ -132,7 +136,7 @@ pending and successors blocked.
|
|
|
132
136
|
|
|
133
137
|
For tasks without a development or PR delivery path, use their stated stage
|
|
134
138
|
acceptance. In every case, confirm required evidence is recorded and readable,
|
|
135
|
-
then reread the complete in-progress task and use `task
|
|
139
|
+
then reread the complete in-progress task and use `task set-status <task-id> done` with its exact
|
|
136
140
|
observed version. For Goal discussions, use their confirmation gates and verified
|
|
137
141
|
accepted materials; for delivery tasks, use their acceptance and required authorized PR
|
|
138
142
|
merges.
|
|
@@ -144,8 +148,7 @@ actual verified breakdown are delivered. Neither establishes whole-Goal completi
|
|
|
144
148
|
Continue ordinary CI and review waits as this task. When progress requires
|
|
145
149
|
external intervention, preserve the target, actual state, concrete blocker,
|
|
146
150
|
existing work, and next action in the checkpoint, then return the waiting result.
|
|
147
|
-
|
|
148
|
-
work stays `in_progress`. Do not declare
|
|
151
|
+
Unstarted work stays `todo`; active work stays `in_progress`. Do not declare
|
|
149
152
|
completion or select other work to bypass a wait. After completion, return
|
|
150
153
|
without selecting a successor, except for an explicit user-directed discussion
|
|
151
154
|
transition under the Goal protocol. That transition does not activate autopilot
|
|
@@ -8,4 +8,5 @@ export type SkillTarget = {
|
|
|
8
8
|
missingParents: readonly string[];
|
|
9
9
|
agents: SkillAgent[];
|
|
10
10
|
};
|
|
11
|
+
export declare const mergeSkillTargets: (candidates: readonly SkillTarget[]) => SkillTarget[];
|
|
11
12
|
export declare const planSkillTargets: (base: string, agents: readonly SkillAgent[]) => Promise<SkillTarget[]>;
|
|
@@ -5,17 +5,16 @@ const contains = (parent, child) => {
|
|
|
5
5
|
const relative = path.relative(comparisonPath(parent), comparisonPath(child));
|
|
6
6
|
return relative !== "" && relative !== ".." && !relative.startsWith(`..${path.sep}`) && !path.isAbsolute(relative);
|
|
7
7
|
};
|
|
8
|
-
export const
|
|
8
|
+
export const mergeSkillTargets = (candidates) => {
|
|
9
9
|
const targets = [];
|
|
10
|
-
for (const
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const existing = targets.find((target) => comparisonPath(target.path) === comparisonPath(targetPath));
|
|
15
|
-
if (existing !== undefined)
|
|
16
|
-
existing.agents.push(agent);
|
|
10
|
+
for (const candidate of candidates) {
|
|
11
|
+
const existing = targets.find((target) => comparisonPath(target.path) === comparisonPath(candidate.path));
|
|
12
|
+
if (existing === undefined)
|
|
13
|
+
targets.push({ ...candidate, agents: [...candidate.agents] });
|
|
17
14
|
else
|
|
18
|
-
|
|
15
|
+
for (const agent of candidate.agents)
|
|
16
|
+
if (!existing.agents.some(({ id }) => id === agent.id))
|
|
17
|
+
existing.agents.push(agent);
|
|
19
18
|
}
|
|
20
19
|
for (const [index, first] of targets.entries()) {
|
|
21
20
|
for (const second of targets.slice(index + 1)) {
|
|
@@ -33,4 +32,13 @@ export const planSkillTargets = async (base, agents) => {
|
|
|
33
32
|
}
|
|
34
33
|
return targets;
|
|
35
34
|
};
|
|
35
|
+
export const planSkillTargets = async (base, agents) => {
|
|
36
|
+
const targets = [];
|
|
37
|
+
for (const agent of agents) {
|
|
38
|
+
const parent = await resolvePhysicalDirectory(path.join(base, agent.directory, "skills"));
|
|
39
|
+
const physicalParent = path.join(parent.ancestorPath, ...parent.missingComponents);
|
|
40
|
+
targets.push({ path: path.join(physicalParent, "using-daynight"), legacyPath: path.join(physicalParent, "daynight"), parent: physicalParent, ancestor: parent.ancestorPath, missingParents: parent.missingComponents, agents: [agent] });
|
|
41
|
+
}
|
|
42
|
+
return mergeSkillTargets(targets);
|
|
43
|
+
};
|
|
36
44
|
//# sourceMappingURL=targets.js.map
|