@codetreker/daynight 0.21.2 → 0.21.8

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 (48) hide show
  1. package/README.md +1176 -0
  2. package/dist/api/client.js +15 -2
  3. package/dist/api/client.js.map +1 -1
  4. package/dist/api/types.d.ts +1 -0
  5. package/dist/commands/review/instance-lock.js +2 -114
  6. package/dist/commands/review/instance-lock.js.map +1 -1
  7. package/dist/commands/skill/skills/using-daynight/SKILL.md +39 -41
  8. package/dist/commands/skill/skills/using-daynight/references/create-task.md +15 -12
  9. package/dist/commands/skill/skills/using-daynight/references/execute-task-in-managed.md +91 -0
  10. package/dist/commands/skill/skills/using-daynight/references/goal.md +34 -32
  11. package/dist/commands/skill/skills/using-daynight/references/handbook.md +41 -10
  12. package/dist/commands/skill/skills/using-daynight/references/handoff.md +1 -1
  13. package/dist/commands/skill/skills/using-daynight/references/run-task.md +55 -164
  14. package/dist/commands/skill/skills/using-daynight/references/task-content.md +6 -4
  15. package/dist/commands/skill/skills/using-daynight/references/task-execution.md +136 -0
  16. package/dist/commands/task/command.js +13 -1
  17. package/dist/commands/task/command.js.map +1 -1
  18. package/dist/commands/task/definition.js +3 -2
  19. package/dist/commands/task/definition.js.map +1 -1
  20. package/dist/commands/worker/identity.d.ts +2 -0
  21. package/dist/commands/worker/identity.js +41 -0
  22. package/dist/commands/worker/identity.js.map +1 -0
  23. package/dist/commands/worker/instance-lock.d.ts +6 -0
  24. package/dist/commands/worker/instance-lock.js +7 -0
  25. package/dist/commands/worker/instance-lock.js.map +1 -0
  26. package/dist/commands/worker/paths.d.ts +11 -0
  27. package/dist/commands/worker/paths.js +16 -0
  28. package/dist/commands/worker/paths.js.map +1 -0
  29. package/dist/commands/worker/store.d.ts +55 -0
  30. package/dist/commands/worker/store.js +460 -0
  31. package/dist/commands/worker/store.js.map +1 -0
  32. package/dist/commands/worker/types.d.ts +101 -0
  33. package/dist/commands/worker/types.js +2 -0
  34. package/dist/commands/worker/types.js.map +1 -0
  35. package/dist/commands/worker/worktrees.d.ts +29 -0
  36. package/dist/commands/worker/worktrees.js +285 -0
  37. package/dist/commands/worker/worktrees.js.map +1 -0
  38. package/dist/config/document.d.ts +1 -1
  39. package/dist/config/document.js +1 -0
  40. package/dist/config/document.js.map +1 -1
  41. package/dist/platform/instance-lock.d.ts +5 -0
  42. package/dist/platform/instance-lock.js +115 -0
  43. package/dist/platform/instance-lock.js.map +1 -0
  44. package/dist/repository/git.d.ts +2 -0
  45. package/dist/repository/git.js +8 -5
  46. package/dist/repository/git.js.map +1 -1
  47. package/package.json +2 -2
  48. package/dist/commands/skill/skills/using-daynight/references/autopilot.md +0 -136
@@ -1,136 +0,0 @@
1
- # Autopilot
2
-
3
- Enter this mode only when the user explicitly requests automatic execution of
4
- Daynight tasks. Use the confirmed Goal or work scope. Loading the skill, a ready
5
- task, or a completed `run-task` does not activate autopilot. A bare
6
- `using-daynight` invocation can resume it only when the conversation establishes
7
- that the user already activated it.
8
-
9
- Read [the handbook](handbook.md) for discovery and query semantics. For a Goal
10
- chain, read [the Goal protocol](goal.md) for stage requirements, breakdown, and
11
- whole-Goal acceptance. Delegate execution and completion to
12
- [run-task](run-task.md); do not maintain a separate delivery lifecycle here.
13
-
14
- ## Restore the current target
15
-
16
- Resume this session's current task before selecting new work. Read its ID from
17
- the conversation or existing execution checkpoint, then refresh it with
18
- `daynight task show <task-id> --json`. If identity is unknown, query
19
- `daynight task list --status in_progress --json` as needed and establish which
20
- task belongs to the current work. An arbitrary `in_progress` task is not
21
- this session's target.
22
-
23
- A waiting checkpoint retains its task until that task is confirmed done or the
24
- user explicitly changes the target. Resume the required next action when
25
- possible. Do not select another task because CI, review, or merge is pending.
26
-
27
- ## Select one related task
28
-
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:
47
-
48
- ```bash
49
- daynight task ready --allow-agents true --compatible-platform <actual-platform> --json
50
- ```
51
-
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 under [the task content standard](task-content.md). Satisfy the same
58
- six requirements whether content is inline, referenced, or mixed, and identify
59
- the task-owned evidence location; permission true is not a permanent review
60
- certificate. Reassess changed required sources before execution. Inspect complete
61
- `dependsOn` and its `externalDependsOn` subset.
62
- External prerequisites still block readiness, and cross-chain classification does
63
- not authorize executing them or expand the confirmed scope. Readiness checks all
64
- prerequisites, not stage artifact completeness or execution authorization.
65
-
66
- Pass the selected ID, automatic-selection mode and actual platform to `run-task`.
67
- Immediately before setting in_progress, reread the full task with
68
- `daynight task show <task-id> --json` and recheck `todo`, ready, `allowAgents=true`,
69
- and `requiredPlatform` either null or equal to the same actual platform. A changed
70
- or incompatible requirement prevents starting and requires a new selection decision;
71
- a changed execution environment requires fresh runtime identification and candidate
72
- queries. Run-task enters in_progress using the version observed for that decision
73
- before starting, using the exact version from this full-task recheck with
74
- `--if-version`. An earlier compatible page does not authorize bypassing changed
75
- eligibility. Autopilot cannot supply user confirmation of requirements or solution;
76
- an explicit discussion-start request uses the Goal protocol's scoped manual path.
77
-
78
- Ready returns at most 10 candidates by default or the requested bounded `--limit`;
79
- it is not a complete backlog. Supplement an empty or unmatched page only with
80
- needed selected reads, the graph, or
81
- `daynight task list --allow-agents true --compatible-platform <actual-platform> --json`.
82
- Both ready and supplemental list queries retain the actual-platform filter before
83
- pagination and permission=true; do not filter a bounded unfiltered page locally.
84
- Distinguish completed scope, missing execution authorization, prerequisite blockers,
85
- other ongoing work and insufficient candidates. Do not take unrelated work to stay
86
- busy or report completion from an empty or unrelated bounded page.
87
-
88
- Autopilot permission alone covers execution of existing tasks, not creation of
89
- new ones. Explicit user or repository tracking/review requirements supply standing
90
- creation permission within the confirmed scope. Use existing creation permission
91
- or obtain it before [create-task](create-task.md). Goal permission covers discussion
92
- stages and the confirmed breakdown at user-confirmation gates; do not precreate
93
- architecture placeholders or delivery tasks. Delivery registration leaves todo
94
- without execution; complete solution discussion only after accepted material and
95
- the real breakdown are verified. Existing explicit execution scope continues to
96
- cover its ready successors without another per-task authorization.
97
-
98
- Automatic selection never enables `allowAgents`; explicit
99
- [handoff](handoff.md) is a separate review and permission operation that does not
100
- activate this mode. An explicitly selected task or
101
- fixed Goal queue's manual execution path remains available regardless of the flag
102
- or platform compatibility; preserve prerequisite, stage-input and authorization
103
- checks. An automatically selected ID passed to run-task remains automatic
104
- selection and does not acquire this manual exception.
105
-
106
- ## Advance serially and accept the scope
107
-
108
- Run one task at a time. Subagents collaborate on it; they do not each choose a
109
- separate task. Ordinary CI, review, and merge waits keep that target. After
110
- `run-task` confirms `done`, refresh readiness and select at most one next related
111
- task within the same authorized scope. For Goal discussions, stop at each user
112
- confirmation gate; completing requirements and starting solution discussion
113
- requires the user's explicit confirmation and direction under the Goal protocol.
114
- Solution confirmation permits todo delivery registration. Later delivery selection
115
- requires a ready todo with complete inputs, explicit autopilot activation, and
116
- execution authorization. Discussion completion satisfies a dependency and grants
117
- no delivery execution permission. Existing scoped execution authorization
118
- continues to apply to its stated ready successors.
119
-
120
- If `run-task` returns a wait requiring external intervention, preserve its
121
- current-task checkpoint and report the blocker and required next action. An
122
- explicit no-merge or user-review requirement on a delivery task is such a wait; it never permits
123
- auto-merge or marking the task done. An unfinished external prerequisite outside
124
- the authorized scope is also an external blocker: preserve its ID and reason,
125
- without dropping or reclassifying it to manufacture readiness. Return without replacing the target.
126
-
127
- Before reporting a Goal complete, apply the Goal protocol's whole-Goal acceptance:
128
- verify the full registered scope, every delivery task's completion, all necessary
129
- PR merges, and the original overall acceptance evidence. A completed description
130
- or design is only a stage result. For other scopes, verify their confirmed
131
- completion conditions against the actual work.
132
-
133
- Stop when the confirmed scope is complete, the user requests a stop, or progress
134
- needs external intervention. Report observed results, remaining blockers, and
135
- the checkpoint. Automatic task selection does not expand permission to merge,
136
- deploy, communicate externally, or push mainline.