@codetreker/daynight 0.25.0 → 0.25.4

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 (34) hide show
  1. package/README.md +12 -70
  2. package/config.example.yml +1 -1
  3. package/dist/commands/skill/skills/using-daynight/SKILL.md +24 -20
  4. package/dist/commands/skill/skills/using-daynight/references/autopilot-managed-task.md +16 -10
  5. package/dist/commands/skill/skills/using-daynight/references/create-task.md +40 -39
  6. package/dist/commands/skill/skills/using-daynight/references/goal.md +40 -29
  7. package/dist/commands/skill/skills/using-daynight/references/handbook.md +4 -3
  8. package/dist/commands/skill/skills/using-daynight/references/handoff.md +3 -0
  9. package/dist/commands/skill/skills/using-daynight/references/run-task.md +3 -3
  10. package/dist/commands/skill/skills/using-daynight/references/task-content.md +96 -51
  11. package/dist/commands/skill/skills/using-daynight/references/task-execution.md +28 -22
  12. package/dist/commands/worker/config.d.ts +1 -1
  13. package/dist/commands/worker/config.js +1 -1
  14. package/dist/commands/worker/config.js.map +1 -1
  15. package/dist/commands/worker/definition.js +0 -5
  16. package/dist/commands/worker/definition.js.map +1 -1
  17. package/dist/commands/worker/herdr/agents.js +6 -7
  18. package/dist/commands/worker/herdr/agents.js.map +1 -1
  19. package/dist/commands/worker/herdr/arguments.js +1 -1
  20. package/dist/commands/worker/herdr/arguments.js.map +1 -1
  21. package/dist/commands/worker/index.d.ts +0 -5
  22. package/dist/commands/worker/index.js +0 -5
  23. package/dist/commands/worker/index.js.map +1 -1
  24. package/dist/commands/worker/runtime.js +0 -3
  25. package/dist/commands/worker/runtime.js.map +1 -1
  26. package/dist/commands/worker/worktrees.js +9 -8
  27. package/dist/commands/worker/worktrees.js.map +1 -1
  28. package/package.json +2 -2
  29. package/dist/commands/worker/migration-state.d.ts +0 -40
  30. package/dist/commands/worker/migration-state.js +0 -197
  31. package/dist/commands/worker/migration-state.js.map +0 -1
  32. package/dist/commands/worker/migration.d.ts +0 -21
  33. package/dist/commands/worker/migration.js +0 -406
  34. package/dist/commands/worker/migration.js.map +0 -1
package/README.md CHANGED
@@ -22,7 +22,6 @@ GitHub CLI and Copilot CLI on `PATH`.
22
22
  - [Task deletion](#task-deletion)
23
23
  - [Task attachments](#task-attachments)
24
24
  - [Worker configuration and startup](#worker-configuration-and-startup)
25
- - [Worker workspace upgrade](#worker-workspace-upgrade)
26
25
  - [Worker manual management](#worker-manual-management)
27
26
  - [Review configuration and startup](#review-configuration-and-startup)
28
27
  - [Review status listing](#review-status-listing)
@@ -102,7 +101,6 @@ daynight worker # Show worker help
102
101
  daynight worker setup # Check prerequisites and choose an agent and Projects
103
102
  daynight worker run # Run until interrupted
104
103
  daynight worker attach # Open the worker Herdr session
105
- daynight worker migrate-workspaces [--rollback]
106
104
  daynight worker repo list [--json]
107
105
  daynight worker repo add [--project <project-id>]
108
106
  daynight worker repo remove [--project <project-id>]
@@ -941,7 +939,7 @@ settings and configure worker directly:
941
939
  worker:
942
940
  repositoryRoot: ~/daynights
943
941
  maxConcurrent: 1
944
- pollIntervalMs: 5000
942
+ pollIntervalMs: 60000
945
943
  recoveryLimit: 3
946
944
  agent: copilot
947
945
  model: null
@@ -976,7 +974,9 @@ Entry paths are absolute or relative to the configuration directory, never the
976
974
  launch directory. They do not expand tilde or accept Windows drive-relative
977
975
  paths. Duplicate repositories/Projects and overlapping repository/state paths
978
976
  are errors. maxConcurrent is positive, recoveryLimit is nonnegative, and
979
- pollIntervalMs is a positive safe integer within the timer range.
977
+ pollIntervalMs is a positive safe integer within the timer range. After each
978
+ reconciliation round completes, the worker waits this interval (60 seconds by
979
+ default). Explicit values, including 5000 for a 5-second wait, remain unchanged.
980
980
 
981
981
  Repository agent settings override fields independently for the same type.
982
982
  Explicit null model or [] args clears that field; switching type clears omitted
@@ -1136,10 +1136,14 @@ trust. Copilot receives `--allow-all --no-ask-user --no-sandbox` and per-workspa
1136
1136
  `COPILOT_ALLOW_ALL=true`, `COPILOT_ASSISTED_APPROVAL=false`, overriding inherited
1137
1137
  values. Codex receives `--no-daemon`,
1138
1138
  `--dangerously-bypass-approvals-and-sandbox`,
1139
- `--dangerously-bypass-hook-trust` and a final `-c` trusted-project override for
1140
- the task's canonical path, using Codex's normalized Windows trust keys. These
1141
- invocation settings require no native tool,
1142
- folder or hook permission confirmation and are not optional configuration.
1139
+ `--dangerously-bypass-hook-trust`, `-c check_for_update_on_startup=false` and a
1140
+ final `-c` trusted-project override for the task's canonical path, using Codex's
1141
+ normalized Windows trust keys. The update setting follows configured arguments,
1142
+ so startup update checks and their interactive prompts stay disabled for fresh
1143
+ and resumed Codex processes. Herdr receives the option and its value as separate
1144
+ arguments; task input is submitted separately. These invocation settings require
1145
+ no native tool, folder or hook permission confirmation and are not optional
1146
+ configuration.
1143
1147
 
1144
1148
  Copilot arguments that enable assisted approval or sandboxing, deny tools/URLs,
1145
1149
  or restrict available tools are rejected. Codex approval/sandbox controls and
@@ -1219,68 +1223,6 @@ recovery ledger. The
1219
1223
  [worker requirements](../../docs/spec/daynight-worker.md) and
1220
1224
  [design](../../docs/design/daynight-worker.md) own full behavior and validation.
1221
1225
 
1222
- ## Worker workspace upgrade
1223
-
1224
- Stop `daynight worker run` and confirm that its private Herdr and native agents
1225
- have stopped before changing an existing workspace identity format. Normal
1226
- execution accepts the current four-ID format and reports old labels or Git
1227
- markers with a migration instruction. It does not interpret legacy ownership
1228
- while running tasks.
1229
-
1230
- ```bash
1231
- daynight worker migrate-workspaces
1232
- ```
1233
-
1234
- This explicit local operation uses the worker instance lock. It validates the old
1235
- service identity against the configured service, canonical owner IDs, task and
1236
- native-session records, actual workspace directories and Git administrative
1237
- ownership fingerprints. Configured project paths keep their logical spelling;
1238
- ancestor-directory aliases are accepted when Git registration pointers and saved
1239
- and restored pane working directories resolve to the same physical task path,
1240
- while the worktree leaf must remain an ordinary directory with matching physical
1241
- fingerprints. It preserves the SQLite claim/session index, task
1242
- branches, dirty worktrees and original native conversations. An unfinished
1243
- execution with legacy resources must have its recorded native session ID;
1244
- a fresh pending claim without resources does not block migration. Unknown
1245
- formats, conflicting identities and missing original resources are errors,
1246
- with the original resources retained. A current-format or resource-free state
1247
- needs no conversion, and the command returns without starting a daemon.
1248
-
1249
- Before mutation, migration backs up its affected files below
1250
- `~/.daynight/worker/workspace-migration-backups/<UUID>/` and persists
1251
- `~/.daynight/worker/workspace-migration.json`. Run and manual management refuse
1252
- to proceed while that blocking manifest remains. The backup retains its original
1253
- manifest, file hashes, private Herdr tree and completion outcome.
1254
- A maintenance Herdr keeps automatic native-agent restoration disabled and closes
1255
- only verified legacy task workspaces. Migration waits for its shutdown and reads
1256
- back the saved layout before rewriting the Git administration `locked` markers
1257
- with four IDs and their original physical fingerprints. Old automatic recovery
1258
- snapshots stay with the migration backup so they cannot restore legacy labels.
1259
- Herdr owns its snapshot and terminal-history writes; the operation does not edit
1260
- its history fingerprint.
1261
-
1262
- After successful migration, start `daynight worker run`. It creates task-title
1263
- workspaces and resumes the original SQLite native session IDs. Workspace/pane
1264
- IDs and the closed Herdr terminal scrollback are replaced; the native conversation
1265
- history and task work remain. The operation changes local resource representation,
1266
- not remote claims or business task status.
1267
-
1268
- A failed or interrupted migration keeps normal startup blocked. Restore and verify
1269
- the complete saved state through the same command before retrying the migration:
1270
-
1271
- ```bash
1272
- daynight worker migrate-workspaces --rollback
1273
- ```
1274
-
1275
- Rollback requires an incomplete blocking manifest; it cannot revert a completed
1276
- migration or later execution state. It restores the backed-up Herdr state,
1277
- database and Git markers as one verified old-format set. It leaves an error and
1278
- the startup block when restoration cannot be verified. A normal migration request
1279
- with an incomplete manifest directs the operator to rollback before retrying.
1280
- Resume an old-format runner only after a successful rollback;
1281
- use the new runner after migration completes. The [workspace naming decision](../../.agents/notes/implemented/architecture/2026-10-28-worker-workspace-names.md)
1282
- records the format and the costs of rebuilding the Herdr workspace.
1283
-
1284
1226
  ## Worker manual management
1285
1227
 
1286
1228
  Stop `daynight worker run` before retry, release or resume. Each command
@@ -43,7 +43,7 @@ worker:
43
43
  # Used only for new worker repo registrations; independent of review's root.
44
44
  repositoryRoot: ~/daynights
45
45
  maxConcurrent: 1
46
- pollIntervalMs: 5000
46
+ pollIntervalMs: 60000
47
47
  recoveryLimit: 3
48
48
  agent: copilot
49
49
  model: null
@@ -17,18 +17,19 @@ with a defined objective and completion conditions: features, bug fixes,
17
17
  architecture/design work, actual work items produced by their breakdown, and
18
18
  independently scoped [final acceptance](#final-acceptance). An agent's transient
19
19
  execution steps, such as reading files, running commands, and routine checks,
20
- belong in its execution plan; their presence in a plan does not make them
21
- Daynight tasks. Use the owning Daynight task for every solution, architecture,
22
- and design review.
23
-
24
- Before asking the user to review any solution, architecture, design, or related
25
- discussion, save the complete current review material in the owning task's
26
- description or attachments. Read it back to confirm it is accessible, then
27
- provide the task ID or verified URL and any attachment paths. Keep revisions and
28
- review decisions synchronized with that task. Chat summaries and repository or
29
- PR links may supplement the material; they do not replace it. The description
30
- and its actual sources follow the shared [task content standard](references/task-content.md),
31
- including task-owned confirmation and delivery evidence.
20
+ belong in its session execution plan, not task descriptions or attachments.
21
+ Their presence in a plan does not make them Daynight tasks. Use the owning
22
+ Daynight task for every solution, architecture, and design review.
23
+
24
+ Before asking the user to review a solution, architecture, design, or related
25
+ task result, save the complete current artifact in the owning task's description
26
+ or attachments. Read it back to confirm it is accessible, then provide the task
27
+ ID or verified URL and any attachment paths. Keep the current artifact, accepted
28
+ decisions, and necessary rationale synchronized there. Discussion and review
29
+ processes remain in the session. Chat summaries and repository or PR links may
30
+ supplement the artifact; they do not replace it. Use the shared
31
+ [task content standard](references/task-content.md) for task definitions, inputs,
32
+ and results, and its boundary between task material and session context.
32
33
 
33
34
  Confirm the CLI, configured service, and intended project are accessible using
34
35
  the handbook's discovery rules. Preserve actual availability or upload failures;
@@ -38,9 +39,11 @@ do not claim materials are ready for review until the saved contents are verifie
38
39
 
39
40
  Final acceptance determines whether the complete requested task or Goal satisfies
40
41
  its confirmed requirements. Define that outcome explicitly when creating or
41
- breaking down work. Deliver the requirement-based conclusion, supporting evidence,
42
- defects, and unverified items on the owning task. Record the verification methods,
43
- tested source and environment, observations, and material limits.
42
+ breaking down work. Deliver the requirement-based conclusion, defects, and
43
+ unverified items on the owning task, with the assessed source, key observations,
44
+ and material limits needed to support that result. Keep verification procedures,
45
+ commands, debugging history, and execution progress in the session unless they
46
+ are themselves a required task deliverable.
44
47
 
45
48
  Use manual verification, existing checks, or temporary helper scripts as
46
49
  appropriate. Keep final-acceptance helpers in the project's temporary area and
@@ -129,11 +132,12 @@ is ready. This skill does not discover and continuously select subsequent tasks.
129
132
  task may cover the whole Goal when that is its confirmed scope.
130
133
  - Use the shared [task content standard](references/task-content.md) when
131
134
  creating, breaking down, handing off, or executing tasks. The description and
132
- actual references jointly supply the six content requirements; complete inline
133
- content needs no primary attachment. Give confirmations and delivery evidence
134
- an explicit location in the owning task. Confirm resources before linking and
135
- keep shared sources at their real owner. Each Goal delivery description directly
136
- identifies the architecture task and every required source location, including
135
+ actual references jointly supply the task definition and produced results;
136
+ complete inline content needs no primary attachment. Keep execution and
137
+ discussion methods and processes in the session. Confirm resources before
138
+ linking and keep shared sources at their real owner. Each Goal delivery
139
+ description directly identifies the architecture task and every required source
140
+ location, including
137
141
  inline description sections and full paths for actual attachment documents,
138
142
  even for indirect successors, under the Goal protocol's readback rules. Express
139
143
  necessary direct prerequisites through complete `dependsOn` and its
@@ -55,7 +55,7 @@ business writes immediately.
55
55
  The worker has already claimed and started this task. Do not claim it, set it
56
56
  to `in_progress`, select candidates, or rerun automatic candidate qualification.
57
57
  Read and apply [shared task execution](task-execution.md) for the complete task
58
- and stage inputs, current prerequisites, authorized work, evidence, and
58
+ and stage inputs, current prerequisites, authorized work, results, and
59
59
  acceptance. A missing required input or unmet prerequisite keeps this assignment
60
60
  waiting in `in_progress`; it does not authorize another task.
61
61
 
@@ -84,7 +84,9 @@ local planning mechanism. Retain the original assignment identities, supplied
84
84
  worktree and branch, existing authorization, confirmed scope and acceptance,
85
85
  PR URLs and head SHA, validation and review state, blockers, attributable
86
86
  resources, and next action. Identify the invocation configuration without
87
- copying credentials or secrets into checkpoints, task evidence, or logs.
87
+ copying credentials or secrets into checkpoints, task material, or logs. Keep
88
+ this recovery context out of task descriptions and attachments; task material
89
+ cannot replace missing operational authorization or the original assignment.
88
90
 
89
91
  Refresh the checkpoint before a long wait or session compaction. On recovery,
90
92
  restore it, verify the original active claim, and refresh remote PR state before
@@ -95,8 +97,9 @@ honor explicit pause, stop, and authorization changes without discarding its wor
95
97
  ## Deliver the assigned task
96
98
 
97
99
  1. **Implement and verify.** Read applicable repository instructions and existing
98
- mechanisms. Reuse the confirmed task plan and acceptance criteria. Implement
99
- the complete agreed behavior in the supplied worktree, synchronize affected
100
+ mechanisms. Use the task's required design inputs and acceptance criteria;
101
+ keep the execution plan in this session. Implement the complete agreed behavior
102
+ in the supplied worktree, synchronize affected
100
103
  documents, and run relevant checks and behavioral verification. Collaborating
101
104
  agents share this assignment and worktree. Use research and independent review
102
105
  agents when available and authorized. Reassess the design when repeated
@@ -138,15 +141,18 @@ honor explicit pause, stop, and authorization changes without discarding its wor
138
141
  the platform supports it. A changed head or failed precondition requires a
139
142
  fresh decision from current state.
140
143
 
141
- Confirm the platform reports every necessary delivery PR as merged and record
142
- each resulting merge commit. An accepted auto-merge request or merge-queue
144
+ Confirm the platform reports every necessary delivery PR as merged and retain
145
+ its merge result in the session. A final revision may identify the task's
146
+ delivered artifact. An accepted auto-merge request or merge-queue
143
147
  entry is not completion. Do not wait for post-merge mainline CI unless the user
144
148
  explicitly requires that verification. Continue with required task acceptance
145
- and evidence after the platform confirms the merge.
149
+ and results after the platform confirms the merge.
146
150
 
147
151
  5. **Record acceptance and close this claim.** Complete the task's confirmed
148
- acceptance and save readable evidence at its identified owner, including actual
149
- validation and remaining limitations. Release attributable temporary services,
152
+ acceptance and save its readable results at their actual owners, including the
153
+ acceptance conclusion and material limitations. Keep verification procedures
154
+ and CI/review/merge history in the session. Release attributable temporary
155
+ services,
150
156
  probes, and monitoring resources, including those left by failed collaborators,
151
157
  while preserving controller-owned resources. Finish that cleanup before
152
158
  [original-claim completion](#complete-the-original-claim), because confirmed
@@ -179,7 +185,7 @@ never treat a blocker or ordinary waiting as completion.
179
185
  ## Complete the original claim
180
186
 
181
187
  When [shared acceptance readiness](task-execution.md#confirm-acceptance-readiness)
182
- is satisfied, all required evidence is readable, and attributable temporary
188
+ is satisfied, all required task results are readable, and attributable temporary
183
189
  resources have been released, reread the complete task, verify the same active
184
190
  claim, and finish with the original claim ID and the version observed for that
185
191
  decision:
@@ -23,18 +23,20 @@ conditions. Solution, architecture, and design reviews use their owning task
23
23
  under the entrypoint's required tracking and review rules.
24
24
 
25
25
  Keep an agent's transient execution steps, such as reading files, running
26
- commands, and routine checks, in the existing execution plan. Do not turn these
27
- steps into Daynight tasks merely because an agent generated them. A distinct
28
- acceptance or validation assignment with its own outcome can still be a task.
26
+ commands, and routine checks, in the session's execution plan. Do not put these
27
+ steps in task descriptions or attachments or turn them into Daynight tasks
28
+ merely because an agent generated them. A distinct acceptance or validation
29
+ assignment with its own outcome can still be a task.
29
30
  For [final acceptance](../SKILL.md#final-acceptance), identify the entire task or
30
31
  Goal being assessed and its confirmed requirement sources. Define the deliverable
31
- as the acceptance conclusion, evidence, defects, and unverified items. Apply the
32
- shared rule to temporary helpers; do not make their development or repository
32
+ as the requirement-based acceptance conclusion, supporting observations, defects,
33
+ and unverified items. Apply the shared rule to temporary helpers; do not make
34
+ their development or repository
33
35
  delivery the acceptance outcome.
34
36
 
35
37
  Running a check while delivering an existing task is an execution step. If the
36
- request contains only execution steps for existing work, keep them with that
37
- work and return without registering additional tasks.
38
+ request contains only execution steps for existing work, keep them in that
39
+ work's session and return without registering additional tasks.
38
40
 
39
41
  For a multi-stage Goal, follow [the Goal protocol](goal.md). Register only the
40
42
  current requirements discussion task; do not create an architecture placeholder
@@ -47,8 +49,10 @@ explicit discussion-start request authorizes its start through
47
49
  run-task. Creating a Goal covers the later in-scope stages and breakdown only
48
50
  at those confirmation gates.
49
51
 
50
- For a single tracked outcome, prepare its solution, acceptance criteria, and
51
- applicable mock UI before registration, following the artifact rules below.
52
+ For a single tracked outcome, prepare its stage-appropriate task definition,
53
+ actual required inputs, and acceptance criteria before registration. A frontend
54
+ delivery task also needs its applicable mock UI under the artifact rules below.
55
+ A design-producing task does not require its unfinished design as an input.
52
56
 
53
57
  Look for existing work with the same problem and scope, including completed
54
58
  tasks; the default list contains only unfinished work. Inspect full descriptions,
@@ -59,16 +63,16 @@ registration does not justify a duplicate task or chain.
59
63
 
60
64
  ## Write task-specific content
61
65
 
62
- Use the target repository's document and workspace rules and the shared six-item
66
+ Use the target repository's document and workspace rules and the shared task
63
67
  content standard. Give each task an outcome-focused title and a Markdown
64
68
  description that identifies its concrete work, responsibility, and actual content
65
- sources. The description and readable references together provide the objective,
66
- scope, solution, exchange contracts, acceptance, and sources. Complete inline
67
- content needs no primary attachment; reference-owned and mixed content are also
68
- valid without repeating complete documents. State where this task's confirmations,
69
- acceptance conclusions, and delivery evidence will live in its description or
70
- attachments. Stage briefs describe work that produces the stage's outputs; do
71
- not claim unfinished outputs already exist.
69
+ sources. The description and readable references together provide its objective
70
+ and requirements, scope and constraints, inputs and sources, deliverables and
71
+ contracts, and acceptance criteria. Complete inline content needs no primary
72
+ attachment; reference-owned and mixed content are also valid without repeating
73
+ complete documents. Save results as they are produced. Stage briefs describe
74
+ work that produces the stage's outputs; do not claim unfinished outputs already
75
+ exist or require an execution plan, confirmation log, or evidence attachment.
72
76
 
73
77
  Attach only resources this task needs or owns. Keep shared Goal requirements
74
78
  with the requirements task and architecture and breakdown with the solution
@@ -102,7 +106,7 @@ ownership before registering the relationship. A top-level task has no ordinary
102
106
  prerequisites; it may still have real external prerequisites that block execution.
103
107
  Do not add a Dependencies section or duplicate the relationship lists in task
104
108
  prose. Repository specifications and design documents retain their full contracts;
105
- the current task identifies its specific solution and verifiable acceptance
109
+ the current task identifies its required design inputs and verifiable acceptance
106
110
  criteria directly or through their actual owners.
107
111
 
108
112
  ## Author Markdown
@@ -122,33 +126,30 @@ attachment path, or by an immutable repository URL. A relative link cannot
122
126
  identify another task's content.
123
127
 
124
128
  For example, the following brief applies to a task whose confirmed, readable
125
- attachments include its own `plan.md` and the complete `mockui/index.html`
126
- prototype with its resources. Use these paths only when those files actually
127
- belong to that task; adapt the content and references to the actual assignment.
128
- A Goal stage that produces a prototype links it only after producing and
129
- confirming it.
129
+ attachments include the complete `mockui/index.html` prototype and its resources.
130
+ Use this path only when those files actually belong to that task; adapt the
131
+ content and references to the actual assignment. A Goal stage that produces a
132
+ prototype links it only after producing and confirming it.
130
133
 
131
134
  ```markdown
132
- ## 问题与行动
133
- 登录失败后,用户无法判断是否可以重试。实现明确的失败原因和重试入口,保留当前登录表单输入。
135
+ ## 问题与要求
136
+ 登录失败后,用户无法判断是否可以重试。显示明确的失败原因和重试入口,保留当前登录表单输入。
134
137
 
135
138
  ## 范围与交付
136
- 更新登录页的错误提示、重试交互和中英文文案;沿用现有认证接口与会话边界。
139
+ 交付登录页的错误提示、重试交互和中英文文案;沿用现有认证接口与会话边界。
137
140
 
138
- ## 完成条件
139
- 网络失败和凭据错误均显示对应提示;重试成功后进入工作区。桌面与窄屏、两种语言的交互通过验证,表单输入保持正确。
140
-
141
- ## 资料
141
+ ## 输入
142
+ [交互原型](mockui/index.html) 定义相关视觉样式和交互状态;认证接口沿用仓库现有契约,无新增任务间交换。
142
143
 
143
- - [方案与验收](plan.md)
144
- - [交互原型](mockui/index.html)
144
+ ## 完成条件
145
+ 网络失败和凭据错误均显示对应提示;重试成功后进入工作区。桌面与窄屏、两种语言的交互正确,表单输入保持。
145
146
  ```
146
147
 
147
- This example uses an attachment for the detailed content; the same six-item
148
- standard also permits complete inline or mixed organization. Its actual `plan.md`
149
- provides the requirements, solution, applicable exchange contracts, acceptance,
150
- and task-owned evidence location. The prototype stays with its actual owner when
151
- shared across a Goal.
148
+ This example defines the task inline and references its actual prototype. Shared
149
+ design inputs retain their real owner under the source rules above. Neither the
150
+ brief nor an attachment needs the session's implementation steps, tool choices,
151
+ or review schedule. A filename such as `plan.md` does not determine whether its
152
+ contents belong to the task.
152
153
 
153
154
  ## Register and verify
154
155
 
@@ -170,8 +171,8 @@ already readable shared inputs at their source. Do not present planned uploads a
170
171
 
171
172
  Read back each complete task, its attachment inventory and required contents,
172
173
  and its referenced shared inputs. Verify self-contained Markdown descriptions,
173
- valid links and images, all six content requirements, the explicit task-owned
174
- evidence location, real source identities, complete necessary direct prerequisites
174
+ valid links and images, the stage-appropriate task definition, produced results,
175
+ real source identities, complete necessary direct prerequisites
175
176
  and their intended external subset, absence of redundant dependencies under the
176
177
  handbook's reduction rule, and applicable mock UI resources and interaction. For a
177
178
  Goal, verify only the current discussion stage and its brief;
@@ -2,8 +2,8 @@
2
2
 
3
3
  Read this reference when starting or registering a Goal, discussing one of its
4
4
  stages, or advancing its authorized scope. Use [create-task](create-task.md) for
5
- registration, [the task content standard](task-content.md) for the shared six
6
- content requirements, [shared task execution](task-execution.md) for input,
5
+ registration, [the task content standard](task-content.md) for task definitions
6
+ and results, [shared task execution](task-execution.md) for input,
7
7
  delivery, and acceptance rules, and [the handbook](handbook.md) for CLI semantics.
8
8
  The selected execution mode owns task lifecycle and return behavior. A Goal uses existing tasks,
9
9
  attachments, complete `dependsOn` relationships, their `externalDependsOn`
@@ -15,7 +15,7 @@ Use a Goal when a concrete outcome needs requirements discussion, solution or
15
15
  architecture discussion, and actual delivery work. Independently understandable
16
16
  features, bug fixes, architecture/design assignments, and real breakdown items
17
17
  are tasks. Agent-generated commands, file reads, and routine checks stay in the
18
- owning task's execution plan.
18
+ session's execution plan, not task descriptions or attachments.
19
19
 
20
20
  Permission to create a Goal covers its requirements discussion, the later solution
21
21
  discussion, and the confirmed in-scope delivery breakdown. Create each only at
@@ -38,10 +38,11 @@ Create or reuse only the requirements discussion task, titled `[Goal]<outcome>`.
38
38
  The marker is followed directly by the outcome. Do not create an architecture
39
39
  placeholder or delivery tasks at this point. Give the task a self-contained Markdown description
40
40
  for the known problem, intended outcome, scope, constraints, open
41
- questions, and observable completion conditions. The description and actual
42
- references provide this discussion's solution, acceptance criteria, confirmation
43
- gate, and task-owned evidence location under the shared content standard;
44
- finished requirements and prototypes are outputs, not prerequisites to starting.
41
+ questions, and observable completion conditions under the shared content
42
+ standard. Include the intended requirements and applicable prototype deliverables
43
+ and the required human-confirmation completion condition. Finished requirements
44
+ and prototypes are outputs, not prerequisites to starting; the session holds the
45
+ discussion plan and process.
45
46
 
46
47
  Each task starts in `todo`. For an explicit discussion-start request, read its
47
48
  current materials and exact version, use `task set-status <task-id> in_progress`
@@ -53,9 +54,10 @@ task is resumed after checking its actual work and context.
53
54
  Discuss requirements with the user: the whole problem, desired behavior, scope,
54
55
  constraints, exclusions, and whole-Goal acceptance. Keep current material and open
55
56
  questions in this task's description or attachments. The description remains a
56
- task-specific brief and source entrypoint; detailed requirements have one owner,
57
- and confirmation, validation, and evidence stay at an identified task-owned location. Before requesting user review, save the complete current material,
58
- read it back, and provide the task and resource reference.
57
+ task-specific brief and source entrypoint; detailed requirements have one owner.
58
+ Before requesting user review, save the complete current requirements artifact,
59
+ read it back, and provide the task and resource reference. Keep discussion,
60
+ validation, and confirmation processes in the session.
59
61
 
60
62
  For a UI Goal, produce a final-style interactive frontend-only prototype with
61
63
  working relative resources and relevant populated, empty, loading, failure,
@@ -70,9 +72,11 @@ current requirements and directs the next discussion, for example, "Requirements
70
72
  are settled; move to architecture discussion." Agent confidence, completed text,
71
73
  a review result, or elapsed time does not satisfy this gate.
72
74
 
73
- Record the user's confirmation with the accepted material in the owning task and
74
- verify it is readable. A material revision after confirmation requires renewed
75
- user confirmation before advancement. When the discussion's acceptance is met,
75
+ Keep the accepted requirements and their effective state in the owning task and
76
+ verify they are readable. Preserve the actual confirmation and transition
77
+ authorization in the session. A material revision after confirmation requires
78
+ renewed user confirmation before advancement. When the discussion's acceptance
79
+ is met,
76
80
  reread the task, use `task set-status <task-id> done` with its observed version, and confirm done.
77
81
  Do not create the solution discussion until that completion is confirmed; reconcile
78
82
  an uncertain completion before another mutation.
@@ -91,8 +95,10 @@ During solution discussion, consume the confirmed requirements and applicable
91
95
  prototype. Discuss how to achieve the outcome: responsibilities, data and control
92
96
  flow, interfaces, error behavior, key decisions, verification, and the proposed
93
97
  breakdown. The solution task owns the current architecture, proposal, and draft
94
- breakdown. Keep discussion material accessible in its description or attachments,
95
- verify it before user review, and synchronize revisions and review decisions.
98
+ breakdown. Keep these current artifacts accessible in its description or
99
+ attachments, verify them before user review, and synchronize accepted decisions
100
+ and necessary rationale. The discussion plan, review handling, and confirmation
101
+ process remain in the session.
96
102
  Do not register delivery subtasks before the user confirms the current solution.
97
103
 
98
104
  A discussion task completes from user-confirmed Daynight material and its stated
@@ -104,8 +110,9 @@ requirement and its delivery permissions. An unresolved user review keeps the
104
110
  current discussion `in_progress`. Successful CI or a design review cannot replace
105
111
  the user's confirmation.
106
112
 
107
- After explicit user confirmation of the current solution, record that confirmation
108
- with the accepted material and register the delivery breakdown below. Complete
113
+ After explicit user confirmation of the current solution, keep the accepted
114
+ solution and its effective state in the owning task, preserve the confirmation
115
+ in the session, and register the delivery breakdown below. Complete
109
116
  the solution discussion only after the accepted solution and actual registered delivery tasks,
110
117
  their required materials, and their dependencies are read back
111
118
  and verified. Use `task set-status <task-id> done` with the observed version and confirm done.
@@ -116,9 +123,10 @@ either discussion does not establish whole-Goal completion.
116
123
 
117
124
  Only after user solution confirmation, create or reuse the concrete delivery tasks
118
125
  needed for the agreed outcome. Each description and its actual references must
119
- satisfy the six-item content standard, including task-specific responsibility,
120
- input/output contracts, observable acceptance, verification, and evidence ownership. Include independently scoped acceptance work when it
121
- has its own outcome. A [final-acceptance](../SKILL.md#final-acceptance) brief
126
+ satisfy the task content standard, including task-specific responsibility,
127
+ actual required inputs, deliverables and contracts, and observable acceptance.
128
+ Include independently scoped acceptance work when it has its own outcome. A
129
+ [final-acceptance](../SKILL.md#final-acceptance) brief
122
130
  identifies the original whole-Goal requirements and confirmed changes, and assesses
123
131
  the combined delivery under the shared rule. Do not turn agent-generated execution
124
132
  steps into tasks. The combined scope must cover the confirmed Goal, rather than a
@@ -190,8 +198,9 @@ Read these attachments from that task before implementation:
190
198
  - `design/architecture.md`: upload flow and component responsibilities.
191
199
  - `design/upload-errors.md`: error classification and retry behavior.
192
200
 
193
- ## Task plan
194
- This task's `plan.md` owns its implementation plan and full acceptance criteria.
201
+ ## Deliverable
202
+ Upload retry controls in the existing upload UI, using the API's error contract;
203
+ no additional task-to-task exchange is introduced.
195
204
  ```
196
205
 
197
206
  When the shared architecture is inline, the architecture inputs instead identify
@@ -204,9 +213,10 @@ paths only for actual attachment documents that are also required.
204
213
  Stage briefs describe the work to produce the stage's outputs; they do not claim
205
214
  unfinished results exist. Every stage and delivery task provides a task-specific
206
215
  Markdown brief and the complete applicable content, directly or through verified
207
- references. Complete inline content needs no primary attachment. Identify each
208
- task's own confirmation and evidence location. Keep shared inputs at their actual
209
- owner. Do not distribute a duplicate whole packet to every task. An independently
216
+ references. Complete inline content needs no primary attachment. Save produced
217
+ results at their actual owner and make them discoverable from the task. Keep
218
+ shared inputs at their actual owner. Do not distribute a duplicate whole packet
219
+ to every task. An independently
210
220
  needed snapshot records its purpose, original source, and source revision or
211
221
  content identity. Existing attachment reads support these references; do not
212
222
  invent a URL scheme, cross-task relative links, or fixed service host.
@@ -237,13 +247,14 @@ modes preserve their own return boundary when reading this stage protocol.
237
247
 
238
248
  Delivery tasks satisfy [shared acceptance readiness](task-execution.md#confirm-acceptance-readiness)
239
249
  and complete through their selected execution mode: accepted outcomes, required
240
- review, all necessary authorized PR merges, and readable evidence. To report the
250
+ review, all necessary authorized PR merges, and readable task results. To report
251
+ the
241
252
  whole Goal complete, inspect the full confirmed delivery scope, every delivery
242
253
  task's completion, all required delivery PR merges, and the original whole-Goal
243
254
  requirements with their confirmed changes. Apply
244
- [Final acceptance](../SKILL.md#final-acceptance) to the combined delivery and its
245
- evidence; completing or passing temporary helpers does not establish that the
246
- Goal is complete.
255
+ [Final acceptance](../SKILL.md#final-acceptance) to the combined delivery;
256
+ completing or passing temporary helpers does not establish that the Goal is
257
+ complete.
247
258
 
248
259
  The requirements task being done means only that requirements discussion is
249
260
  complete. The solution task being done means the confirmed solution and verified
@@ -255,9 +255,10 @@ unchanged; clearing and option-pairing syntax is in command help.
255
255
 
256
256
  **Markdown descriptions.** Write task-specific Markdown descriptions following
257
257
  [create-task](create-task.md) and [the task content standard](task-content.md).
258
- The description and actual references jointly supply the six requirements;
259
- complete inline content needs no primary attachment, and task-owned confirmation
260
- and evidence locations must be explicit. The Web displays CommonMark/GFM, while
258
+ The description and actual references jointly supply the task definition and
259
+ produced results; complete inline content needs no primary attachment. Execution
260
+ and discussion plans, processes, and operational authorization stay in the
261
+ session under the shared content boundary. The Web displays CommonMark/GFM, while
261
262
  API and CLI reads preserve the original string, including line breaks and fenced code. There
262
263
  is no format flag. Relative description links and images start at the current
263
264
  task's attachment root; Markdown attachment internals start at their containing
@@ -21,6 +21,9 @@ required source contents, including referenced source-task descriptions or
21
21
  actual attachments, and necessary further references under the content standard.
22
22
  Check current-stage sufficiency, responsibility boundaries, relevant
23
23
  producer/consumer contracts, and Goal delivery tasks' direct architecture index.
24
+ Check the task definition, actual required inputs, and produced results; do not
25
+ require a session execution plan or record the handoff review process in task
26
+ material.
24
27
 
25
28
  For a `todo` task with permission false, organize its description or authorized
26
29
  source documents only from existing confirmed information. Missing decisions
@@ -11,7 +11,7 @@ transition under [the Goal protocol](goal.md).
11
11
  Read the complete task with `daynight task show <task-id> --json`. Preserve the
12
12
  requested task ID through recovery and waiting. Read and apply
13
13
  [shared task execution](task-execution.md) for its required inputs,
14
- prerequisites, confirmed scope, work, evidence, and acceptance.
14
+ prerequisites, confirmed scope, work, results, and acceptance.
15
15
 
16
16
  An explicitly user-selected task may use this execution path regardless of
17
17
  `allowAgents` or platform compatibility. These conditions gate automatic worker
@@ -47,8 +47,8 @@ its delivery or acceptance is complete.
47
47
 
48
48
  ## Complete or return waiting
49
49
 
50
- When all task acceptance and delivery conditions are satisfied and its evidence
51
- is readable, reread the complete in-progress task and use
50
+ When all task acceptance and delivery conditions are satisfied and its required
51
+ results are readable, reread the complete in-progress task and use
52
52
  `task set-status <task-id> done --if-version <observed-version>` with its exact
53
53
  observed version. Only service confirmation establishes the status update;
54
54
  reconcile uncertain results before reporting success. Do not replay an