@codetreker/daynight 0.8.15 → 0.8.19
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 +1 -0
- package/dist/api/client.js +6 -2
- package/dist/api/client.js.map +1 -1
- package/dist/api/parse.js +8 -4
- package/dist/api/parse.js.map +1 -1
- package/dist/api/types.d.ts +4 -3
- package/dist/cli/commands.js +1 -0
- package/dist/cli/commands.js.map +1 -1
- package/dist/cli/context.d.ts +1 -0
- package/dist/cli/context.js +2 -0
- package/dist/cli/context.js.map +1 -1
- package/dist/cli/input.d.ts +4 -0
- package/dist/cli/input.js +40 -0
- package/dist/cli/input.js.map +1 -0
- package/dist/cli/prompts.d.ts +1 -0
- package/dist/cli/prompts.js +25 -0
- package/dist/cli/prompts.js.map +1 -1
- package/dist/commands/completion/bash.js +1 -1
- package/dist/commands/completion/bash.js.map +1 -1
- package/dist/commands/completion/zsh.js +1 -1
- package/dist/commands/completion/zsh.js.map +1 -1
- package/dist/commands/server/runtime.js +2 -2
- package/dist/commands/server/runtime.js.map +1 -1
- package/dist/commands/setup/command.js +8 -1
- package/dist/commands/setup/command.js.map +1 -1
- package/dist/commands/setup/definition.js +2 -1
- package/dist/commands/setup/definition.js.map +1 -1
- package/dist/commands/skill/skills/using-daynight/SKILL.md +24 -19
- package/dist/commands/skill/skills/using-daynight/references/autopilot.md +45 -33
- package/dist/commands/skill/skills/using-daynight/references/create-task.md +87 -80
- package/dist/commands/skill/skills/using-daynight/references/goal.md +148 -0
- package/dist/commands/skill/skills/using-daynight/references/handbook.md +18 -4
- package/dist/commands/skill/skills/using-daynight/references/run-task.md +71 -52
- package/dist/commands/task/command.js +1 -1
- package/dist/commands/task/command.js.map +1 -1
- package/dist/commands/task/definition.js +1 -1
- package/dist/commands/task/definition.js.map +1 -1
- package/dist/commands/task/rendering.js +1 -0
- package/dist/commands/task/rendering.js.map +1 -1
- package/dist/config/document.d.ts +1 -1
- package/dist/config/document.js +25 -10
- package/dist/config/document.js.map +1 -1
- package/dist/config/files.js +4 -1
- package/dist/config/files.js.map +1 -1
- package/dist/config/server-token.d.ts +3 -0
- package/dist/config/server-token.js +14 -0
- package/dist/config/server-token.js.map +1 -0
- package/dist/config/server.d.ts +1 -0
- package/dist/config/server.js +7 -1
- package/dist/config/server.js.map +1 -1
- package/dist/config/setup.d.ts +1 -0
- package/dist/config/setup.js +54 -5
- package/dist/config/setup.js.map +1 -1
- package/package.json +4 -3
|
@@ -3,10 +3,11 @@ export const setupDefinition = {
|
|
|
3
3
|
description: "Configure the server connection or review repositories",
|
|
4
4
|
options: [
|
|
5
5
|
{ names: ["--server-url"], description: "HTTP(S) server origin", value: { name: "url", kind: "text" } },
|
|
6
|
+
{ names: ["--server-token-stdin"], description: "Read one personal access token from piped stdin" },
|
|
6
7
|
{ names: ["--review-repo"], description: "HTTPS or SSH GitHub repository address", value: { name: "remote", kind: "text" } },
|
|
7
8
|
{ names: ["--review-path"], description: "Dedicated review clone path (requires --review-repo)", value: { name: "path", kind: "directory" } },
|
|
8
9
|
{ names: ["-h", "--help"], description: "Show this help", action: "help" },
|
|
9
10
|
],
|
|
10
|
-
details: "Without options, choose server, review, or both interactively.\nExplicit options configure only the selected capabilities without prompting.\nReview clone paths default to repositoryRoot (default: ~/daynights).",
|
|
11
|
+
details: "Without options, choose server, review, or both interactively; server tokens use hidden terminal input.\nExplicit options configure only the selected capabilities without prompting.\n--server-token-stdin reads one nonempty line and uses --server-url or the configured server origin.\nChanging the server origin clears its token unless a replacement is supplied.\nReview clone paths default to repositoryRoot (default: ~/daynights).",
|
|
11
12
|
};
|
|
12
13
|
//# sourceMappingURL=definition.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definition.js","sourceRoot":"","sources":["../../../src/commands/setup/definition.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,eAAe,GAAsB;IAChD,IAAI,EAAE,OAAO;IACb,WAAW,EAAE,wDAAwD;IACrE,OAAO,EAAE;QACP,EAAE,KAAK,EAAE,CAAC,cAAc,CAAC,EAAE,WAAW,EAAE,uBAAuB,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;QACvG,EAAE,KAAK,EAAE,CAAC,eAAe,CAAC,EAAE,WAAW,EAAE,wCAAwC,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;QAC5H,EAAE,KAAK,EAAE,CAAC,eAAe,CAAC,EAAE,WAAW,EAAE,sDAAsD,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE;QAC7I,EAAE,KAAK,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,EAAE;KAC3E;IACD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"definition.js","sourceRoot":"","sources":["../../../src/commands/setup/definition.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,eAAe,GAAsB;IAChD,IAAI,EAAE,OAAO;IACb,WAAW,EAAE,wDAAwD;IACrE,OAAO,EAAE;QACP,EAAE,KAAK,EAAE,CAAC,cAAc,CAAC,EAAE,WAAW,EAAE,uBAAuB,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;QACvG,EAAE,KAAK,EAAE,CAAC,sBAAsB,CAAC,EAAE,WAAW,EAAE,iDAAiD,EAAE;QACnG,EAAE,KAAK,EAAE,CAAC,eAAe,CAAC,EAAE,WAAW,EAAE,wCAAwC,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;QAC5H,EAAE,KAAK,EAAE,CAAC,eAAe,CAAC,EAAE,WAAW,EAAE,sDAAsD,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE;QAC7I,EAAE,KAAK,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,EAAE;KAC3E;IACD,OAAO,EAAE,ibAAib;CAC3b,CAAC"}
|
|
@@ -19,7 +19,7 @@ requires. Do not load every mode by default.
|
|
|
19
19
|
| Mode | Use when | Reference |
|
|
20
20
|
|---|---|---|
|
|
21
21
|
| `handbook` | Answering usage questions or performing requested task-management operations | [Handbook](references/handbook.md) |
|
|
22
|
-
| `create-task <request>` | Preparing or registering
|
|
22
|
+
| `create-task <request>` | Preparing or registering persistent work explicitly requested by the user | [Create task](references/create-task.md) |
|
|
23
23
|
| `run-task <task-id>` | Executing one specified task | [Run task](references/run-task.md) |
|
|
24
24
|
| `autopilot <goal or scope>` | The user explicitly requests automatic execution of Daynight tasks | [Autopilot](references/autopilot.md) |
|
|
25
25
|
|
|
@@ -30,27 +30,32 @@ to `handbook` or select a task merely because one is ready.
|
|
|
30
30
|
|
|
31
31
|
Enter `autopilot` only after an explicit user request for automatic Daynight task
|
|
32
32
|
execution. A bare invocation may resume it when the conversation establishes
|
|
33
|
-
that it is already active. Loading this skill, discovering tasks, creating
|
|
34
|
-
|
|
33
|
+
that it is already active. Loading this skill, discovering tasks, creating work,
|
|
34
|
+
and completing `run-task` never activate it.
|
|
35
35
|
|
|
36
36
|
## Shared constraints
|
|
37
37
|
|
|
38
|
-
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
38
|
+
- Create tasks only with explicit permission for their scope. Implementation
|
|
39
|
+
requests, tracking needs, inferred mode selection, and autopilot activation
|
|
40
|
+
do not grant creation permission. Permission to create a Goal covers its two
|
|
41
|
+
starting tasks and later breakdown within that Goal; unrelated work needs
|
|
42
|
+
separate permission.
|
|
43
|
+
- Use a normal task for one independently tracked outcome. Work requiring
|
|
44
|
+
multiple independently tracked delivery stages is a Goal, expressed through
|
|
45
|
+
existing tasks and `dependsOn`. Read [the Goal protocol](references/goal.md)
|
|
46
|
+
when creating, executing, or advancing such a chain.
|
|
43
47
|
- Advance one task at a time, including CI, review, and merge waits. Subagents
|
|
44
48
|
collaborate on the same task. `autopilot` owns selection of subsequent work;
|
|
45
49
|
`run-task` and `create-task` return when their own work ends.
|
|
46
|
-
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
context;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
user review keeps that task pending; completion
|
|
50
|
+
- Each task description states its concrete work, scope, deliverables,
|
|
51
|
+
constraints, observable completion summary, and real input references. Its own
|
|
52
|
+
primary Markdown owns the detailed solution, acceptance criteria, and evidence.
|
|
53
|
+
Attach resources according to actual task ownership and need; reference shared
|
|
54
|
+
inputs at their verified source. Express prerequisites only through `dependsOn`.
|
|
55
|
+
- Preserve the exact version observed when deciding an update. Confirm writes,
|
|
56
|
+
reconcile uncertain results before further mutations, and preserve actual
|
|
57
|
+
failures. The handbook explains operational context; installed CLI help owns
|
|
58
|
+
command usage.
|
|
59
|
+
- Follow the target repository's delivery rules and the user's authorization.
|
|
60
|
+
A request to leave a PR for user review keeps that task pending; completion
|
|
61
|
+
rules grant no merge authority.
|
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
# Autopilot
|
|
2
2
|
|
|
3
3
|
Enter this mode only when the user explicitly requests automatic execution of
|
|
4
|
-
Daynight tasks. Use the confirmed
|
|
5
|
-
|
|
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
6
|
`using-daynight` invocation can resume it only when the conversation establishes
|
|
7
7
|
that the user already activated it.
|
|
8
8
|
|
|
9
|
-
Read [the handbook](handbook.md) for discovery and query semantics.
|
|
10
|
-
|
|
11
|
-
|
|
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.
|
|
12
13
|
|
|
13
14
|
## Restore the current target
|
|
14
15
|
|
|
15
|
-
Resume this session's current task before selecting new work. Read
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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.
|
|
21
22
|
|
|
22
23
|
A waiting checkpoint retains its task until that task is confirmed done or the
|
|
23
24
|
user explicitly changes the target. Resume the required next action when
|
|
@@ -31,41 +32,52 @@ When there is no current task, query:
|
|
|
31
32
|
daynight task ready --json
|
|
32
33
|
```
|
|
33
34
|
|
|
34
|
-
Pick exactly one ready `todo` task most relevant to the confirmed
|
|
35
|
-
authorized work. Compare
|
|
36
|
-
dependencies; creation order does not establish
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
execution authorization. Pass the selected
|
|
35
|
+
Pick exactly one ready `todo` task most relevant to the confirmed Goal and
|
|
36
|
+
authorized work. Compare concrete actions, scope, deliverables, solution,
|
|
37
|
+
acceptance criteria, and actual dependencies; creation order does not establish
|
|
38
|
+
relevance. Read full details and actual task-specific and shared inputs for
|
|
39
|
+
plausible candidates before choosing. Readiness checks prerequisites, not stage
|
|
40
|
+
artifact completeness or execution authorization. Pass the selected ID to
|
|
41
|
+
`run-task`.
|
|
40
42
|
|
|
41
43
|
Ready returns at most 10 candidates by default, or the requested bounded
|
|
42
44
|
`--limit`; it is not a complete backlog. If this page is empty or no candidate
|
|
43
45
|
matches, obtain the additional context actually needed through selected reads,
|
|
44
46
|
the graph, or a complete filtered list as described in the handbook. Distinguish
|
|
45
|
-
completed scope,
|
|
46
|
-
|
|
47
|
-
|
|
47
|
+
completed scope, prerequisite-blocked work, other ongoing work, and insufficient
|
|
48
|
+
candidates. Do not take unrelated work to stay busy or report completion from an
|
|
49
|
+
empty or unrelated bounded page.
|
|
48
50
|
|
|
49
51
|
Autopilot permission covers execution of existing tasks, not creation of new
|
|
50
|
-
ones. If the confirmed
|
|
51
|
-
|
|
52
|
-
[create-task](create-task.md).
|
|
53
|
-
|
|
52
|
+
ones. If the confirmed Goal requires missing tracked work, use explicit creation
|
|
53
|
+
permission already granted for that scope or obtain it, then use
|
|
54
|
+
[create-task](create-task.md). Permission to create a Goal already covers both
|
|
55
|
+
starting tasks and its later in-scope breakdown; do not ask again for each one.
|
|
56
|
+
Creation returns to this mode without starting execution. The design stage must
|
|
57
|
+
actually register and verify the complete delivery breakdown before handing over
|
|
58
|
+
its required PR; successor execution waits for design completion.
|
|
54
59
|
|
|
55
|
-
## Advance serially
|
|
60
|
+
## Advance serially and accept the scope
|
|
56
61
|
|
|
57
|
-
Run one task at a time. Subagents collaborate on
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
62
|
+
Run one task at a time. Subagents collaborate on it; they do not each choose a
|
|
63
|
+
separate task. Ordinary CI, review, and merge waits keep that target. After
|
|
64
|
+
`run-task` confirms `done`, refresh readiness and select at most one next related
|
|
65
|
+
task within the same authorized scope. Description completion permits design
|
|
66
|
+
selection, and design completion permits delivery selection, only while this
|
|
67
|
+
mode is explicitly active and the next task is authorized.
|
|
61
68
|
|
|
62
69
|
If `run-task` returns a wait requiring external intervention, preserve its
|
|
63
70
|
current-task checkpoint and report the blocker and required next action. An
|
|
64
71
|
explicit no-merge or user-review requirement is such a wait; it never permits
|
|
65
72
|
auto-merge or marking the task done. Return without replacing the target.
|
|
66
73
|
|
|
74
|
+
Before reporting a Goal complete, apply the Goal protocol's whole-Goal acceptance:
|
|
75
|
+
verify the full registered scope, every delivery task's completion, all necessary
|
|
76
|
+
PR merges, and the original overall acceptance evidence. A completed description
|
|
77
|
+
or design is only a stage result. For other scopes, verify their confirmed
|
|
78
|
+
completion conditions against the actual work.
|
|
79
|
+
|
|
67
80
|
Stop when the confirmed scope is complete, the user requests a stop, or progress
|
|
68
|
-
needs external intervention. Report
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
or push mainline.
|
|
81
|
+
needs external intervention. Report observed results, remaining blockers, and
|
|
82
|
+
the checkpoint. Automatic task selection does not expand permission to merge,
|
|
83
|
+
deploy, communicate externally, or push mainline.
|
|
@@ -2,102 +2,109 @@
|
|
|
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; creating
|
|
6
|
-
autopilot.
|
|
5
|
+
registration; creating work does not authorize execution or activate autopilot.
|
|
7
6
|
|
|
8
|
-
Create
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
before creating a task; do not repeat a request already covered by explicit
|
|
13
|
-
permission.
|
|
7
|
+
Create tasks only with the user's explicit permission for the relevant scope.
|
|
8
|
+
Loading this mode, needing durable tracking, or permission to implement or run
|
|
9
|
+
autopilot does not grant creation permission. Ask when it is missing; reuse
|
|
10
|
+
permission already granted for the scope.
|
|
14
11
|
|
|
15
|
-
##
|
|
12
|
+
## Choose the tracked outcome
|
|
16
13
|
|
|
17
|
-
One-off operations and trivial work do not need a task. Keep transient
|
|
18
|
-
steps in the existing
|
|
19
|
-
independently understandable outcome when
|
|
20
|
-
cross-session continuity, handoff, or dependency coordination. If the
|
|
21
|
-
|
|
14
|
+
One-off operations and trivial work do not need a task. Keep transient commands,
|
|
15
|
+
tests, and execution steps in the existing plan. With creation permission,
|
|
16
|
+
register an independently understandable outcome when delivery needs continued
|
|
17
|
+
tracking, cross-session continuity, handoff, or dependency coordination. If the
|
|
18
|
+
request does not merit a task, explain that conclusion and return.
|
|
22
19
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
20
|
+
For multiple independently tracked delivery stages, follow
|
|
21
|
+
[the Goal protocol](goal.md). Register its Goal description task and dependent
|
|
22
|
+
architecture-and-breakdown placeholder together. Their own stage briefs are
|
|
23
|
+
required at registration; the finished Goal, UI prototype, architecture, and
|
|
24
|
+
breakdown are outputs of the stages that produce them. Creating a Goal covers
|
|
25
|
+
both starting tasks and its later in-scope breakdown within the granted creation
|
|
26
|
+
permission. Do not execute a stage in this mode.
|
|
30
27
|
|
|
31
|
-
|
|
28
|
+
For a single tracked outcome, prepare its solution, acceptance criteria, and
|
|
29
|
+
applicable mock UI before registration, following the artifact rules below.
|
|
32
30
|
|
|
33
|
-
|
|
34
|
-
the
|
|
31
|
+
Look for existing work with the same problem and scope, including completed
|
|
32
|
+
tasks; the default list contains only unfinished work. Inspect full descriptions,
|
|
33
|
+
actual dependencies, primary Markdown, and acceptance criteria. For a Goal,
|
|
34
|
+
inspect the existing chain and its owning inputs. Titles alone do not establish
|
|
35
|
+
identity. Reuse suitable work and preserve valid requirements; interrupted
|
|
36
|
+
registration does not justify a duplicate task or chain.
|
|
37
|
+
|
|
38
|
+
## Write task-specific content
|
|
39
|
+
|
|
40
|
+
Use the target repository's document and workspace rules.
|
|
35
41
|
|
|
36
42
|
| Content | Owner |
|
|
37
43
|
|---|---|
|
|
38
|
-
|
|
|
39
|
-
|
|
|
40
|
-
|
|
|
44
|
+
| Concrete problem, current actions and scope, deliverables, constraints, completion summary, and real input references | Task `description` |
|
|
45
|
+
| Detailed solution, full acceptance criteria, verification methods, and completion evidence | This task's primary Markdown attachment |
|
|
46
|
+
| Applicable visual and interaction design | Owning task's interactive mock UI and resources, referenced by consumers |
|
|
41
47
|
| Prerequisite tasks | `dependsOn` only |
|
|
42
48
|
| Delivery PR URLs and titles | `properties.pullRequests` |
|
|
43
49
|
|
|
44
|
-
Give
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
primary
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
A frontend task requires
|
|
50
|
+
Give each task an outcome-focused title and a self-contained description: a
|
|
51
|
+
reader must understand what this specific task will do, deliver, and verify
|
|
52
|
+
without opening attachments. Summarize the approach and observable completion
|
|
53
|
+
conditions, then reference the real detailed sources. A generic problem sentence
|
|
54
|
+
and a link list are insufficient. Keep the summary consistent with its primary
|
|
55
|
+
Markdown without maintaining a second complete plan in the description.
|
|
56
|
+
|
|
57
|
+
The primary Markdown must contain **Solution** and **Acceptance criteria**
|
|
58
|
+
sections; equivalent headings in the task's language are valid. Define the
|
|
59
|
+
current task's approach, scope, behavioral constraints, observable completion
|
|
60
|
+
conditions, and how to verify them. Stage briefs describe the work that will
|
|
61
|
+
produce that stage's results. They do not claim unfinished outputs already exist.
|
|
62
|
+
Link supporting resources from the primary document.
|
|
63
|
+
|
|
64
|
+
Attach only this task's detailed plan, needed resources, and outputs. Shared
|
|
65
|
+
Goal requirements stay with the Goal description task; architecture and
|
|
66
|
+
breakdown stay with the design task. Consumers identify the source task ID and
|
|
67
|
+
attachment path and confirm the contents using the installed CLI's attachment
|
|
68
|
+
read command. For repository inputs, use verified immutable references. Do not
|
|
69
|
+
assume a `task://` scheme, cross-task relative links, or a fixed service host.
|
|
70
|
+
Do not upload the same whole packet to every task. Create a separate snapshot
|
|
71
|
+
only when the task needs an independent copy, recording its purpose, original
|
|
72
|
+
source, and source revision or content identity.
|
|
73
|
+
|
|
74
|
+
A frontend task requires an interactive mock UI that runs with frontend code
|
|
69
75
|
alone, matches final visual styling, and represents relevant data and interaction
|
|
70
76
|
states. Include applicable populated, empty, loading, failure, disabled, long
|
|
71
|
-
content, and narrow-screen cases.
|
|
77
|
+
content, and narrow-screen cases. Provide required CSS, JavaScript, images, and
|
|
72
78
|
other resources with working relative references. A static sketch or simplified
|
|
73
|
-
styling does not satisfy this requirement.
|
|
79
|
+
styling does not satisfy this requirement. For a UI Goal, this prototype is
|
|
80
|
+
produced by the Goal description stage and referenced by later tasks.
|
|
74
81
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
verifiable acceptance criteria.
|
|
82
|
+
Use established task IDs in `dependsOn` for real prerequisites. Do not add a
|
|
83
|
+
Dependencies section or duplicate the dependency list in the description or
|
|
84
|
+
Markdown. A top-level task has no dependencies. Repository specifications and
|
|
85
|
+
design documents retain their full contracts; the task's own primary attachment
|
|
86
|
+
must still provide a specific solution and verifiable acceptance criteria.
|
|
81
87
|
|
|
82
88
|
## Register and verify
|
|
83
89
|
|
|
84
|
-
Reuse the established project and
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
resources
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
Read back
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
with the exact missing
|
|
102
|
-
|
|
103
|
-
failure.
|
|
90
|
+
Reuse the established project and suitable tasks. Create new tasks in `todo`,
|
|
91
|
+
retaining each confirmed ID. Set their concrete descriptions and actual
|
|
92
|
+
`dependsOn` prerequisites. Upload each task's own primary Markdown and required
|
|
93
|
+
resources; add actual attachment references to the complete description using
|
|
94
|
+
the observed task version. Reference already readable shared inputs at their
|
|
95
|
+
source. Do not present planned uploads as existing attachments.
|
|
96
|
+
|
|
97
|
+
Read back each complete task, its attachment inventory and required contents,
|
|
98
|
+
and its referenced shared inputs. Verify task-specific descriptions, the two
|
|
99
|
+
required Markdown sections, real source identities, intended dependencies, and
|
|
100
|
+
applicable mock UI resources and interaction. For a Goal, verify both starting
|
|
101
|
+
tasks and their stage briefs. Registration is complete only when required
|
|
102
|
+
artifacts and associations are confirmed readable.
|
|
103
|
+
|
|
104
|
+
If creation succeeds but a later operation fails, retain the confirmed IDs and
|
|
105
|
+
resume missing operations there. Tasks remain `todo`; there is no additional
|
|
106
|
+
draft state. Reconcile uncertain results through the handbook before another
|
|
107
|
+
mutation. Report incomplete registration with the exact missing operation or
|
|
108
|
+
artifact and next step. Do not move detailed plans into descriptions to bypass
|
|
109
|
+
an attachment failure. Return after verified registration without selecting or
|
|
110
|
+
executing a task.
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
# Goal protocol
|
|
2
|
+
|
|
3
|
+
Read this reference when creating a multi-stage Goal, running one of its tasks,
|
|
4
|
+
or advancing its authorized scope. Use [create-task](create-task.md) for content
|
|
5
|
+
and registration rules, [run-task](run-task.md) for one task's lifecycle, and
|
|
6
|
+
[the handbook](handbook.md) for CLI semantics. A Goal uses existing tasks,
|
|
7
|
+
attachments, `dependsOn`, and PR properties; it adds no CLI command, task type,
|
|
8
|
+
status, or execution authority.
|
|
9
|
+
|
|
10
|
+
## Identify and register a Goal
|
|
11
|
+
|
|
12
|
+
Use a Goal when completing the request requires multiple independently tracked
|
|
13
|
+
delivery stages. One independently tracked outcome remains a normal task;
|
|
14
|
+
commands, tests, and temporary execution steps do not each need persistent tasks.
|
|
15
|
+
The user need not use the word Goal.
|
|
16
|
+
|
|
17
|
+
Explicit permission to create a Goal covers its two starting tasks and the later
|
|
18
|
+
breakdown within that Goal. It covers no unrelated tasks and grants no execution,
|
|
19
|
+
publication, deployment, external communication, merge, or mainline push
|
|
20
|
+
permission. Existing explicit authorization continues to apply within its scope.
|
|
21
|
+
Implementation or autopilot permission alone does not grant creation permission.
|
|
22
|
+
|
|
23
|
+
During registration, create or reuse both starting tasks:
|
|
24
|
+
|
|
25
|
+
| Task | Title | Initial content |
|
|
26
|
+
|---|---|---|
|
|
27
|
+
| Goal description | `[Goal]<outcome>` | The known overall problem, intended results, scope, constraints, UI applicability, exclusions, and observable acceptance summary; a stage brief for resolving open requirements and producing the complete Goal. |
|
|
28
|
+
| Architecture design and task breakdown | `Architecture design and task breakdown: <outcome>` | Its concrete work: consume the completed Goal, design the architecture, register the complete delivery breakdown, verify its artifacts and dependencies, and deliver any required design PR. Its own stage brief defines the approach and acceptance. |
|
|
29
|
+
|
|
30
|
+
The `[Goal]` marker is followed directly by the outcome. Goal description names
|
|
31
|
+
the stage; it is not the title prefix. Titles communicate purpose but do not
|
|
32
|
+
establish stable identity. Preserve confirmed IDs and inspect full content when
|
|
33
|
+
reusing an existing chain.
|
|
34
|
+
|
|
35
|
+
Set the design task's `dependsOn` to the Goal description task. Each task starts
|
|
36
|
+
in `todo` with its own self-contained description and primary Markdown containing
|
|
37
|
+
Solution and Acceptance criteria. State unanswered questions honestly. Complete
|
|
38
|
+
requirements, prototypes, architecture, and breakdown are produced by their
|
|
39
|
+
respective stages; they are not prerequisites for registering the chain or
|
|
40
|
+
starting the stage that produces them. Confirm both tasks, stage briefs,
|
|
41
|
+
references, and dependency through real reads, then return from `create-task`.
|
|
42
|
+
|
|
43
|
+
## Execute the appropriate stage
|
|
44
|
+
|
|
45
|
+
| Stage | Required inputs to start | Outputs and completion |
|
|
46
|
+
|---|---|---|
|
|
47
|
+
| Goal description | Its stage brief, current problem and scope, and available background. | Complete overall requirements, applicable final-style interactive UI prototype, verified stage acceptance, and repository-required delivery. Finishing this task completes problem definition. |
|
|
48
|
+
| Architecture design and task breakdown | Completed Goal description, its full requirements and applicable prototype, and the design stage brief. | Complete architecture and the actual registered delivery tasks, verified task-specific artifacts and dependencies, satisfied stage acceptance, and platform-confirmed merge of every required design PR. |
|
|
49
|
+
| Delivery task | Completed design prerequisite, delivered architecture, its own solution and acceptance criteria, and applicable prototype and resources. | This task's deliverable, verification, required review and PR merges, and readable acceptance evidence under the normal run-task rules. |
|
|
50
|
+
|
|
51
|
+
### Goal description
|
|
52
|
+
|
|
53
|
+
Explain the whole problem and why it matters, the final observable results,
|
|
54
|
+
required behavior and constraints, scope, explicit exclusions, and how the whole
|
|
55
|
+
Goal will be accepted. The task description itself must communicate this complete
|
|
56
|
+
overall brief and a concise acceptance summary. Its primary Markdown owns the
|
|
57
|
+
full requirements, verification methods, and stage evidence. Resolve blocking
|
|
58
|
+
ambiguities without making architecture decisions or changing production
|
|
59
|
+
implementation code.
|
|
60
|
+
|
|
61
|
+
For a UI Goal, specify final layout, visual styling, interactions, representative
|
|
62
|
+
data, and relevant states. Produce an interactive prototype that runs with
|
|
63
|
+
frontend code alone, with final styling and all necessary resources. Cover
|
|
64
|
+
applicable populated, empty, loading, failure, disabled, long-content, and
|
|
65
|
+
narrow-screen states; explain exclusions when a relevant-looking state does not
|
|
66
|
+
apply. Prototype code is an allowed problem-definition artifact. View and
|
|
67
|
+
exercise the result when verifying this stage.
|
|
68
|
+
|
|
69
|
+
Confirm the full requirements are clear, the applicable prototype is usable,
|
|
70
|
+
and this stage's acceptance and repository delivery rules are satisfied. If
|
|
71
|
+
repository rules require a PR for these artifacts, use the existing PR completion
|
|
72
|
+
rules. Otherwise use the stated stage acceptance. Set only this task to `done`
|
|
73
|
+
after verification; this unlocks design and does not establish whole-Goal delivery.
|
|
74
|
+
|
|
75
|
+
### Architecture design and actual task breakdown
|
|
76
|
+
|
|
77
|
+
Consume the completed Goal and prototype. Design the responsibilities, boundaries,
|
|
78
|
+
data and control flow, contracts, error behavior, key decisions, and validation
|
|
79
|
+
approach required by the target repository and Goal.
|
|
80
|
+
|
|
81
|
+
During this task, register the complete set of persistent delivery tasks needed
|
|
82
|
+
to satisfy the Goal. Each represents a concrete outcome with its own actions,
|
|
83
|
+
scope, deliverables, constraints, solution, acceptance criteria, verification
|
|
84
|
+
methods, and real input references. Their combined scope must cover the complete
|
|
85
|
+
Goal. A future registration list or a vague implementation placeholder does not
|
|
86
|
+
satisfy task breakdown.
|
|
87
|
+
|
|
88
|
+
Use `dependsOn` for actual prerequisites. Every delivery root with no other
|
|
89
|
+
implementation prerequisite depends directly on the design task; all delivery
|
|
90
|
+
paths must therefore pass through design completion. Keep delivery tasks blocked
|
|
91
|
+
while design is unfinished. This stage registers and verifies them; it does not
|
|
92
|
+
execute them.
|
|
93
|
+
|
|
94
|
+
Upload each successor's own primary Markdown and needed resources, referencing
|
|
95
|
+
shared Goal and design inputs at their verified source. The design task owns its
|
|
96
|
+
architecture and breakdown outputs. Read back every registered task, required
|
|
97
|
+
attachment, source reference, and dependency. Verify the full breakdown before
|
|
98
|
+
handing over the design PR. When review changes the design, update its owning
|
|
99
|
+
artifacts and affected task summaries, plans, and references coherently, then
|
|
100
|
+
reread them before completion.
|
|
101
|
+
|
|
102
|
+
Follow repository document and independent review requirements. When a design
|
|
103
|
+
PR is required, create it and maintain the full `properties.pullRequests` list.
|
|
104
|
+
Keep this task `in_progress` until every necessary PR is platform-confirmed merged
|
|
105
|
+
and stage acceptance is satisfied. An open PR, successful CI, or approval does
|
|
106
|
+
not complete design. A user-review or no-merge instruction preserves this task
|
|
107
|
+
and its blocking dependency while waiting; it grants no merge authority.
|
|
108
|
+
|
|
109
|
+
## Preserve ownership and recover partial registration
|
|
110
|
+
|
|
111
|
+
Every stage and delivery task needs its own concrete description and detailed
|
|
112
|
+
primary Markdown. Keep shared requirements on the Goal description task and
|
|
113
|
+
shared architecture and breakdown on the design task. Later tasks reference
|
|
114
|
+
verified source task IDs and attachment paths, read through the installed CLI,
|
|
115
|
+
or verified immutable repository references. Do not distribute a duplicate whole
|
|
116
|
+
packet to all tasks. Only copy a snapshot when the consuming task needs it,
|
|
117
|
+
recording the purpose, original source, and source revision or content identity.
|
|
118
|
+
|
|
119
|
+
Registration comprises independent writes, not a transaction. Reuse confirmed
|
|
120
|
+
IDs if creating the second starting task, uploading an artifact, updating a
|
|
121
|
+
reference, or registering part of the breakdown fails. Before retrying an
|
|
122
|
+
uncertain write, read the complete actual resource and operation context as the
|
|
123
|
+
handbook requires. A similar title does not prove success, and a lost response
|
|
124
|
+
does not prove failure. If identity cannot be established uniquely, preserve the
|
|
125
|
+
specific error and request the information needed to reconcile it; do not create
|
|
126
|
+
another chain.
|
|
127
|
+
|
|
128
|
+
Apply the handbook's exact-version and complete-field replacement rules to task
|
|
129
|
+
updates. Attachments are independent of task versions, status, and timestamps;
|
|
130
|
+
verify actual file contents and metadata separately. Do not unlock delivery by
|
|
131
|
+
marking incomplete registration or unfinished design complete. Readiness and
|
|
132
|
+
`in_progress` provide no ownership lock.
|
|
133
|
+
|
|
134
|
+
## Advance and accept the whole Goal
|
|
135
|
+
|
|
136
|
+
`run-task` returns after its specified task completes or requires external
|
|
137
|
+
intervention. Completing registration, Goal description, or design never activates
|
|
138
|
+
autopilot. Only explicitly active `autopilot` may select the next related task
|
|
139
|
+
after confirming the current task `done`, within the user's authorized scope.
|
|
140
|
+
CI, review, and merge waits remain with the current task.
|
|
141
|
+
|
|
142
|
+
To report the whole Goal complete, inspect the full registered delivery scope,
|
|
143
|
+
confirm every delivery task completed and every necessary PR actually merged,
|
|
144
|
+
and verify the original Goal's overall acceptance criteria with recorded
|
|
145
|
+
evidence. Description completion, design completion, one delivery PR, or an empty
|
|
146
|
+
ready page is insufficient. Distinguish verified partial results and remaining
|
|
147
|
+
blockers from whole-Goal completion. This check does not create a new Goal status
|
|
148
|
+
or reopen the completed problem-definition task.
|
|
@@ -26,6 +26,17 @@ needed to use them correctly.
|
|
|
26
26
|
|
|
27
27
|
## Operational context
|
|
28
28
|
|
|
29
|
+
**Service credentials.** Read the installed `daynight setup --help` for credential
|
|
30
|
+
configuration. Use setup's hidden interactive token prompt or its explicit
|
|
31
|
+
stdin option; never put a token in command arguments, chat, task descriptions,
|
|
32
|
+
checkpoints or attachments. A configured token is bound to the normalized service
|
|
33
|
+
origin: changing the origin removes the previous token. Tokens require HTTPS
|
|
34
|
+
except for literal localhost or loopback HTTP addresses. Project discovery and
|
|
35
|
+
explicit project IDs grant no access; the service decides from current
|
|
36
|
+
membership. A 401 points to setup and does not permit an anonymous retry or a
|
|
37
|
+
blind repeat of a mutation. Reconcile an unconfirmed write before another
|
|
38
|
+
mutation. Setup only saves configuration and performs no login or network check.
|
|
39
|
+
|
|
29
40
|
**Project discovery.** Inside a Git worktree, task commands can omit `--project`:
|
|
30
41
|
the CLI matches the origin repository URL to a project on the configured
|
|
31
42
|
service. An explicit project overrides discovery for that invocation. Resolve
|
|
@@ -44,9 +55,11 @@ properties, or versions. Read
|
|
|
44
55
|
the selected task's details before acting. A graph-limit error still permits
|
|
45
56
|
bounded candidate and individual task reads.
|
|
46
57
|
|
|
47
|
-
**Task concurrency.**
|
|
48
|
-
|
|
49
|
-
|
|
58
|
+
**Task concurrency.** New tasks start in `todo`; execution uses `todo`,
|
|
59
|
+
`in_progress`, and `done`. Reads may also return `proposed`, which is outside
|
|
60
|
+
this skill's executable task flow. Preserve its actual state and resolve the
|
|
61
|
+
authorized process before execution; do not implicitly promote it. Ready means
|
|
62
|
+
`todo` with completed direct prerequisites. These facts grant no ownership or lock. Bind each update to the exact version read for that decision using
|
|
50
63
|
`--if-version`; the CLI's default pre-submit read cannot protect an earlier
|
|
51
64
|
decision. Preserve full int64 decimal digits without numeric rounding. On a
|
|
52
65
|
conflict, reread and reconsider rather than merely swapping in a newer version.
|
|
@@ -71,4 +84,5 @@ actual errors and resource IDs rather than reporting success or blindly
|
|
|
71
84
|
resending a write.
|
|
72
85
|
|
|
73
86
|
Task registration, execution, and selection follow [create-task](create-task.md),
|
|
74
|
-
[run-task](run-task.md), and [autopilot](autopilot.md), respectively.
|
|
87
|
+
[run-task](run-task.md), and [autopilot](autopilot.md), respectively. For a chain
|
|
88
|
+
of independently tracked delivery stages, use [the Goal protocol](goal.md).
|