@codetreker/daynight 0.6.2 → 0.8.5

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 (84) hide show
  1. package/dist/api/client.d.ts +1 -0
  2. package/dist/api/client.js +17 -0
  3. package/dist/api/client.js.map +1 -1
  4. package/dist/cli/cancellation.d.ts +5 -0
  5. package/dist/cli/cancellation.js +24 -0
  6. package/dist/cli/cancellation.js.map +1 -0
  7. package/dist/cli/commands.js +4 -0
  8. package/dist/cli/commands.js.map +1 -1
  9. package/dist/cli/context.d.ts +2 -0
  10. package/dist/cli/context.js +2 -0
  11. package/dist/cli/context.js.map +1 -1
  12. package/dist/cli/prompts.d.ts +22 -0
  13. package/dist/cli/prompts.js +83 -0
  14. package/dist/cli/prompts.js.map +1 -0
  15. package/dist/commands/completion/command.js +14 -6
  16. package/dist/commands/completion/command.js.map +1 -1
  17. package/dist/commands/completion/definition.js +18 -4
  18. package/dist/commands/completion/definition.js.map +1 -1
  19. package/dist/commands/completion/setup.d.ts +21 -0
  20. package/dist/commands/completion/setup.js +210 -0
  21. package/dist/commands/completion/setup.js.map +1 -0
  22. package/dist/commands/project/command.js +23 -2
  23. package/dist/commands/project/command.js.map +1 -1
  24. package/dist/commands/project/definition.js +3 -3
  25. package/dist/commands/project/definition.js.map +1 -1
  26. package/dist/commands/review/adapters/copilot.js +3 -3
  27. package/dist/commands/review/adapters/copilot.js.map +1 -1
  28. package/dist/commands/review/command.js +3 -2
  29. package/dist/commands/review/command.js.map +1 -1
  30. package/dist/commands/review/config.js +10 -3
  31. package/dist/commands/review/config.js.map +1 -1
  32. package/dist/commands/review/repositories.d.ts +2 -0
  33. package/dist/commands/review/repositories.js +2 -2
  34. package/dist/commands/review/repositories.js.map +1 -1
  35. package/dist/commands/review/skill.js +5 -83
  36. package/dist/commands/review/skill.js.map +1 -1
  37. package/dist/commands/review/skills/daynight-review/SKILL.md +43 -14
  38. package/dist/commands/server/runtime.js +19 -3
  39. package/dist/commands/server/runtime.js.map +1 -1
  40. package/dist/commands/setup/command.d.ts +2 -0
  41. package/dist/commands/setup/command.js +21 -0
  42. package/dist/commands/setup/command.js.map +1 -0
  43. package/dist/commands/setup/definition.d.ts +2 -0
  44. package/dist/commands/setup/definition.js +12 -0
  45. package/dist/commands/setup/definition.js.map +1 -0
  46. package/dist/commands/skill/agents.d.ts +23 -0
  47. package/dist/commands/skill/agents.js +14 -0
  48. package/dist/commands/skill/agents.js.map +1 -0
  49. package/dist/commands/skill/command.d.ts +12 -0
  50. package/dist/commands/skill/command.js +76 -0
  51. package/dist/commands/skill/command.js.map +1 -0
  52. package/dist/commands/skill/definition.d.ts +2 -0
  53. package/dist/commands/skill/definition.js +12 -0
  54. package/dist/commands/skill/definition.js.map +1 -0
  55. package/dist/commands/skill/install.d.ts +12 -0
  56. package/dist/commands/skill/install.js +118 -0
  57. package/dist/commands/skill/install.js.map +1 -0
  58. package/dist/commands/skill/skills/daynight/SKILL.md +95 -0
  59. package/dist/commands/skill/skills/daynight/references/commands.md +155 -0
  60. package/dist/commands/skill/targets.d.ts +10 -0
  61. package/dist/commands/skill/targets.js +29 -0
  62. package/dist/commands/skill/targets.js.map +1 -0
  63. package/dist/commands/task/command.js +9 -0
  64. package/dist/commands/task/command.js.map +1 -1
  65. package/dist/commands/task/definition.js +6 -0
  66. package/dist/commands/task/definition.js.map +1 -1
  67. package/dist/config/errors.d.ts +9 -0
  68. package/dist/config/errors.js +24 -0
  69. package/dist/config/errors.js.map +1 -0
  70. package/dist/config/files.d.ts +1 -1
  71. package/dist/config/files.js +36 -2
  72. package/dist/config/files.js.map +1 -1
  73. package/dist/config/server.js +2 -1
  74. package/dist/config/server.js.map +1 -1
  75. package/dist/config/setup.d.ts +10 -0
  76. package/dist/config/setup.js +123 -0
  77. package/dist/config/setup.js.map +1 -0
  78. package/dist/platform/skill-bundle.d.ts +10 -0
  79. package/dist/platform/skill-bundle.js +82 -0
  80. package/dist/platform/skill-bundle.js.map +1 -0
  81. package/dist/repository/git.d.ts +1 -0
  82. package/dist/repository/git.js +6 -3
  83. package/dist/repository/git.js.map +1 -1
  84. package/package.json +6 -2
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: daynight-review
3
- description: Review the immutable pull-request target supplied by Daynight, proving introduced Critical or Major defects and preparing actionable inline findings.
3
+ description: Enforce a clear, focused pull-request scope and verify introduced Critical or Major defects.
4
4
  ---
5
5
 
6
6
  # Daynight Review
@@ -10,14 +10,35 @@ reconciliation rules and completion protocol. Those values belong to the current
10
10
  attempt, including when the conversation contains an earlier review. Repository
11
11
  instructions remain applicable within that target and the authorized review.
12
12
 
13
- ## Establish the change
13
+ ## Establish and gate the scope
14
14
 
15
- Read the complete diff for the supplied merge-base and head, the surrounding
16
- implementation, and relevant requirements. Trace changed behavior through its
17
- callers, consumers and persisted or exchanged data. Derive expected behavior
18
- from those contracts; do not treat a plausible alternative design as a defect.
15
+ Use gh with the supplied host, repository and PR number to read the current PR
16
+ title and description, plus relevant linked requirements that establish its
17
+ scope. Use available evidence of the original delivery goal; do not claim access
18
+ to unavailable discussion or description history.
19
19
 
20
- For each suspected problem, identify the concrete trigger, affected caller,
20
+ Apply both PR-quality gates to the complete diff between the supplied merge-base
21
+ and head:
22
+
23
+ - The description clearly explains one concrete problem, intended outcome and
24
+ scope. Multiple independent objectives or a change too broad to review as one
25
+ focused delivery require splitting, even under a common umbrella title.
26
+ - Every change serves that original delivery goal. Implementation,
27
+ structural changes, tests and documentation serving the same outcome belong
28
+ together. Independent features, unrelated fixes and incidental cleanup must
29
+ be removed or delivered separately. Broadening the description alone cannot
30
+ legitimize unrelated changes.
31
+
32
+ Judge purpose, dependencies and reviewability, without arbitrary line or file
33
+ limits. Each failed gate is an approval blocker in its own right, without a
34
+ runtime failure or a Critical/Major severity label. An unclear description that
35
+ prevents establishing scope also blocks approval; request the missing scope.
36
+
37
+ Read the surrounding implementation and trace changed behavior through callers,
38
+ consumers and persisted or exchanged data. Derive expected behavior from relevant
39
+ contracts; do not treat a plausible alternative design as a defect.
40
+
41
+ For each suspected code defect, identify the concrete trigger, affected caller,
21
42
  observable failure and changed line that introduces it. Compare the original
22
43
  behavior when needed to distinguish an introduced defect from an existing one.
23
44
  Include adjacent code only when its interaction with this change causes the
@@ -42,22 +63,30 @@ captured target, and obey the task's foreground-process and cleanup rules.
42
63
 
43
64
  ## Select and publish findings
44
65
 
45
- Report only actionable Critical or Major defects introduced by the change.
66
+ Report PR-quality blockers and actionable Critical or Major defects introduced
67
+ by the change.
46
68
  Critical defects have severe, broad consequences such as destructive data loss
47
69
  or a fundamental security failure. Major defects break required behavior for a
48
70
  concrete supported use case. Judge severity by the demonstrated consequence and
49
71
  reach, not by how small the fix appears.
50
72
 
51
- Defer minor improvements, style preferences, pre-existing defects and unrelated
52
- cleanup. Do not grow the review into a repository-wide audit. If an uncertain
73
+ Defer minor improvement requests, style preferences and pre-existing defects.
74
+ Do not grow the review into a repository-wide audit. If an uncertain code-defect
53
75
  candidate cannot be established with the available evidence, leave it out of
54
76
  published findings.
55
77
 
56
- Write English inline comments on the relevant changed lines and identify the
57
- reviewing agent as required by the task. Each comment states the defect, the
58
- trigger or affected behavior, and the necessary correction concisely. Keep
78
+ Write English comments and identify the reviewing agent as required by the task.
79
+ Put out-of-scope changes and code defects on the relevant changed lines. Put
80
+ description or PR-wide blockers in the review body when no suitable changed line
81
+ exists; a COMMENT review may contain only a body. State the violated scope or
82
+ behavior, its concrete effect, and the necessary correction concisely. Keep
59
83
  investigation narration, reproduction transcripts and lists of things checked
60
- out of the comment. Combine duplicate manifestations of one cause.
84
+ out of comments. Combine duplicate manifestations of one cause.
85
+
86
+ Approve only when both PR-quality gates pass and no Critical or Major defect
87
+ remains. Before publication or retry confirmation, re-read the current title and
88
+ description and evaluate the gates again. A matching stable identity on an old
89
+ APPROVE does not establish that the current description and scope pass.
61
90
 
62
91
  Follow the current task's result-publication and retry-reconciliation protocol.
63
92
  Only its successful publication or confirmation permits its completion marker.
@@ -1,9 +1,12 @@
1
1
  import { createApiClient, createOperation } from "../../api/index.js";
2
2
  import { resolveConfigurationPaths } from "../../config/paths.js";
3
3
  import { loadServerConfiguration } from "../../config/server.js";
4
+ import { isMissingConfiguration } from "../../config/errors.js";
5
+ import { guideMissingConfiguration } from "../../config/setup.js";
4
6
  export const runServerCommand = async (context, command, options = {}) => {
5
7
  const cancellation = new AbortController();
6
- const operation = createOperation({ signal: cancellation.signal, ...(options.operationLimits === undefined ? {} : { limits: options.operationLimits }) });
8
+ const startOperation = () => createOperation({ signal: cancellation.signal, ...(options.operationLimits === undefined ? {} : { limits: options.operationLimits }) });
9
+ let operation = startOperation();
7
10
  const emitter = options.signalEmitter ?? process;
8
11
  const signals = (options.platform ?? process.platform) === "win32" ? ["SIGINT", "SIGTERM", "SIGBREAK"] : ["SIGINT", "SIGTERM"];
9
12
  const listeners = [];
@@ -17,7 +20,20 @@ export const runServerCommand = async (context, command, options = {}) => {
17
20
  }
18
21
  operation.check();
19
22
  const paths = resolveConfigurationPaths(context.homeDirectory());
20
- const { serverUrl } = await loadServerConfiguration(paths, operation.signal);
23
+ const { serverUrl } = await guideMissingConfiguration(context, "server", async () => {
24
+ operation ??= startOperation();
25
+ try {
26
+ return await loadServerConfiguration(paths, operation.signal);
27
+ }
28
+ catch (cause) {
29
+ if (isMissingConfiguration(cause, "serverUrl")) {
30
+ operation.dispose();
31
+ operation = undefined;
32
+ }
33
+ throw cause;
34
+ }
35
+ }, cancellation.signal);
36
+ operation ??= startOperation();
21
37
  operation.check();
22
38
  const api = createApiClient({ serverUrl, operation, ...(options.fetch === undefined ? {} : { fetch: options.fetch }) });
23
39
  const output = await command({ api, operation, serverUrl });
@@ -40,7 +56,7 @@ export const runServerCommand = async (context, command, options = {}) => {
40
56
  }
41
57
  }
42
58
  try {
43
- operation.dispose();
59
+ operation?.dispose();
44
60
  }
45
61
  catch (cause) {
46
62
  cleanup.push(cause);
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.js","sourceRoot":"","sources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H,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { CliContext } from "../../cli/context.js";
2
+ export declare const runSetupCommand: (args: readonly string[], context: CliContext) => Promise<void>;
@@ -0,0 +1,21 @@
1
+ import { UsageError } from "../../cli/context.js";
2
+ import { parseCommand, renderCommandHelp } from "../../cli/schema.js";
3
+ import { configure } from "../../config/setup.js";
4
+ import { setupDefinition } from "./definition.js";
5
+ export const runSetupCommand = async (args, context) => {
6
+ const command = parseCommand(setupDefinition, args, ["daynight", "setup"], "daynight setup --help");
7
+ if (command.kind !== "run") {
8
+ context.stdout(renderCommandHelp(command.command, command.path));
9
+ return;
10
+ }
11
+ const serverUrl = command.options.get("--server-url");
12
+ const remote = command.options.get("--review-repo");
13
+ const repositoryPath = command.options.get("--review-path");
14
+ if (repositoryPath !== undefined && remote === undefined)
15
+ throw new UsageError("--review-path requires --review-repo.", "daynight setup --help");
16
+ await configure(context, serverUrl === undefined && remote === undefined ? undefined : {
17
+ ...(serverUrl === undefined ? {} : { serverUrl }),
18
+ ...(remote === undefined ? {} : { reviewRepository: { remote, ...(repositoryPath === undefined ? {} : { path: repositoryPath }) } }),
19
+ });
20
+ };
21
+ //# sourceMappingURL=command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command.js","sourceRoot":"","sources":["../../../src/commands/setup/command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,EAAE,IAAuB,EAAE,OAAmB,EAAiB,EAAE;IACnG,MAAM,OAAO,GAAG,YAAY,CAAC,eAAe,EAAE,IAAI,EAAE,CAAC,UAAU,EAAE,OAAO,CAAC,EAAE,uBAAuB,CAAC,CAAC;IACpG,IAAI,OAAO,CAAC,IAAI,KAAK,KAAK,EAAE,CAAC;QAAC,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;QAAC,OAAO;IAAC,CAAC;IACzG,MAAM,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAuB,CAAC;IAC5E,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAuB,CAAC;IAC1E,MAAM,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAuB,CAAC;IAClF,IAAI,cAAc,KAAK,SAAS,IAAI,MAAM,KAAK,SAAS;QAAE,MAAM,IAAI,UAAU,CAAC,uCAAuC,EAAE,uBAAuB,CAAC,CAAC;IACjJ,MAAM,SAAS,CAAC,OAAO,EAAE,SAAS,KAAK,SAAS,IAAI,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;QACrF,GAAG,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC;QACjD,GAAG,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,EAAE,MAAM,EAAE,GAAG,CAAC,cAAc,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC,EAAE,EAAE,CAAC;KACrI,CAAC,CAAC;AACL,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { CommandDefinition } from "../../cli/schema.js";
2
+ export declare const setupDefinition: CommandDefinition;
@@ -0,0 +1,12 @@
1
+ export const setupDefinition = {
2
+ name: "setup",
3
+ description: "Configure the server connection or review repositories",
4
+ options: [
5
+ { names: ["--server-url"], description: "HTTP(S) server origin", value: { name: "url", kind: "text" } },
6
+ { names: ["--review-repo"], description: "HTTPS or SSH GitHub repository address", value: { name: "remote", kind: "text" } },
7
+ { names: ["--review-path"], description: "Dedicated review clone path (requires --review-repo)", value: { name: "path", kind: "directory" } },
8
+ { names: ["-h", "--help"], description: "Show this help", action: "help" },
9
+ ],
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
+ };
12
+ //# sourceMappingURL=definition.js.map
@@ -0,0 +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,oNAAoN;CAC9N,CAAC"}
@@ -0,0 +1,23 @@
1
+ export declare const skillAgents: readonly [{
2
+ readonly id: "codex";
3
+ readonly name: "Codex";
4
+ readonly command: "codex";
5
+ readonly directory: ".agents";
6
+ readonly reload: "Codex discovers skills automatically; restart the session if it is not listed.";
7
+ }, {
8
+ readonly id: "copilot";
9
+ readonly name: "Copilot CLI";
10
+ readonly command: "copilot";
11
+ readonly directory: ".agents";
12
+ readonly reload: "In Copilot CLI, run /skills reload and /skills info daynight.";
13
+ }, {
14
+ readonly id: "claude";
15
+ readonly name: "Claude Code";
16
+ readonly command: "claude";
17
+ readonly directory: ".claude";
18
+ readonly reload: "Claude Code discovers existing skill directories automatically; run /reload-skills after creating a new top-level directory.";
19
+ }];
20
+ export type SkillAgent = typeof skillAgents[number];
21
+ export type SkillAgentId = SkillAgent["id"];
22
+ export type AgentLookup = (command: string) => Promise<string | null>;
23
+ export declare const detectSkillAgents: (lookup?: AgentLookup) => Promise<SkillAgent[]>;
@@ -0,0 +1,14 @@
1
+ import which from "which";
2
+ export const skillAgents = [
3
+ { id: "codex", name: "Codex", command: "codex", directory: ".agents", reload: "Codex discovers skills automatically; restart the session if it is not listed." },
4
+ { id: "copilot", name: "Copilot CLI", command: "copilot", directory: ".agents", reload: "In Copilot CLI, run /skills reload and /skills info daynight." },
5
+ { id: "claude", name: "Claude Code", command: "claude", directory: ".claude", reload: "Claude Code discovers existing skill directories automatically; run /reload-skills after creating a new top-level directory." },
6
+ ];
7
+ export const detectSkillAgents = async (lookup = async (command) => which(command, { nothrow: true })) => {
8
+ const detected = [];
9
+ for (const agent of skillAgents)
10
+ if (await lookup(agent.command) !== null)
11
+ detected.push(agent);
12
+ return detected;
13
+ };
14
+ //# sourceMappingURL=agents.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agents.js","sourceRoot":"","sources":["../../../src/commands/skill/agents.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,gFAAgF,EAAE;IAChK,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,+DAA+D,EAAE;IACzJ,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,8HAA8H,EAAE;CAC9M,CAAC;AAMX,MAAM,CAAC,MAAM,iBAAiB,GAAG,KAAK,EACpC,MAAM,GAAgB,KAAK,EAAE,OAAO,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,EACnD,EAAE;IACzB,MAAM,QAAQ,GAAiB,EAAE,CAAC;IAClC,KAAK,MAAM,KAAK,IAAI,WAAW;QAAE,IAAI,MAAM,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,IAAI;YAAE,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAChG,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { CliContext } from "../../cli/context.js";
2
+ import type { SkillAgent } from "./agents.js";
3
+ import type { SkillBundle } from "./install.js";
4
+ import type { SkillTarget } from "./targets.js";
5
+ export type SkillCommandDependencies = {
6
+ detectAgents: () => Promise<SkillAgent[]>;
7
+ projectRoot: (cwd: string, signal: AbortSignal) => Promise<string>;
8
+ captureBundle: (packageDirectory: string) => Promise<SkillBundle>;
9
+ planTargets: (base: string, agents: readonly SkillAgent[]) => Promise<SkillTarget[]>;
10
+ install: (targets: readonly SkillTarget[], bundle: SkillBundle, signal: AbortSignal, installed: (target: SkillTarget) => void) => Promise<void>;
11
+ };
12
+ export declare const runSkillCommand: (args: readonly string[], context: CliContext, dependencies?: SkillCommandDependencies, suppliedSignal?: AbortSignal) => Promise<void>;
@@ -0,0 +1,76 @@
1
+ import { withCliCancellation } from "../../cli/cancellation.js";
2
+ import { parseCommand, renderCommandHelp } from "../../cli/schema.js";
3
+ import { skillDefinition } from "./definition.js";
4
+ const defaultDependencies = {
5
+ detectAgents: async () => (await import("./agents.js")).detectSkillAgents(),
6
+ projectRoot: async (cwd, signal) => {
7
+ const { createOperation } = await import("../../api/operation.js");
8
+ const operation = createOperation({ signal, limits: { totalMs: 30_000 } });
9
+ try {
10
+ return await (await import("../../repository/git.js")).discoverWorktreeRoot(cwd, operation);
11
+ }
12
+ finally {
13
+ operation.dispose();
14
+ }
15
+ },
16
+ captureBundle: async (packageDirectory) => (await import("./install.js")).captureInstalledSkill(packageDirectory),
17
+ planTargets: async (...args) => (await import("./targets.js")).planSkillTargets(...args),
18
+ install: async (...args) => (await import("./install.js")).installSkillTargets(...args),
19
+ };
20
+ export const runSkillCommand = async (args, context, dependencies = defaultDependencies, suppliedSignal) => {
21
+ const command = parseCommand(skillDefinition, args, ["daynight", "skill"], "daynight skill --help");
22
+ if (command.kind !== "run") {
23
+ context.stdout(renderCommandHelp(command.command, command.path));
24
+ return;
25
+ }
26
+ await withCliCancellation(context, async (signal) => {
27
+ const prompt = context.prompt;
28
+ if (prompt?.isInteractive !== true)
29
+ throw new Error("Skill installation requires terminal input and stderr. Run daynight skill install from an interactive terminal.");
30
+ signal.throwIfAborted();
31
+ const detected = await dependencies.detectAgents();
32
+ signal.throwIfAborted();
33
+ if (detected.length === 0)
34
+ throw new Error("No supported agent launchers were detected on PATH (codex, copilot, claude). Install an agent and run daynight skill install again.");
35
+ const selection = await prompt.selectMany({
36
+ message: "Install the Daynight skill for which agents?",
37
+ choices: detected.map(({ id, name }) => ({ name, value: id })),
38
+ requiredMessage: "Select at least one agent.",
39
+ }, signal);
40
+ signal.throwIfAborted();
41
+ const agents = detected.filter(({ id }) => selection.includes(id));
42
+ if (agents.length === 0)
43
+ throw new Error("Select at least one detected agent to install the Daynight skill.");
44
+ const scope = await prompt.select({
45
+ message: "Where should the skill be installed?",
46
+ choices: [{ name: "User", value: "user" }, { name: "Project", value: "project" }],
47
+ default: "user",
48
+ }, signal);
49
+ signal.throwIfAborted();
50
+ const scopeName = scope === "user" ? "User" : "Project";
51
+ const base = scope === "user" ? context.homeDirectory() : await dependencies.projectRoot(context.workingDirectory(), signal);
52
+ const bundle = await dependencies.captureBundle(context.packageDirectory);
53
+ const targets = await dependencies.planTargets(base, agents);
54
+ signal.throwIfAborted();
55
+ try {
56
+ await dependencies.install(targets, bundle, signal, (target) => {
57
+ for (const [index, agent] of target.agents.entries()) {
58
+ context.stdout(`Installed ${agent.name}: ${scopeName} skill at ${target.path} (package ${context.version}${index === 0 ? "" : "; shared installation"}).\n${agent.reload}\n`);
59
+ }
60
+ });
61
+ }
62
+ catch (cause) {
63
+ const { SkillInstallationError } = await import("./install.js");
64
+ if (cause instanceof SkillInstallationError) {
65
+ if (cause.failed !== undefined)
66
+ for (const agent of cause.failed.agents)
67
+ context.stderr(`Failed ${agent.name}: ${scopeName} skill at ${cause.failed.path}.\n`);
68
+ for (const target of cause.unattempted)
69
+ for (const agent of target.agents)
70
+ context.stderr(`Not attempted ${agent.name}: ${scopeName} skill at ${target.path}.\n`);
71
+ }
72
+ throw cause;
73
+ }
74
+ }, suppliedSignal);
75
+ };
76
+ //# sourceMappingURL=command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command.js","sourceRoot":"","sources":["../../../src/commands/skill/command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAalD,MAAM,mBAAmB,GAA6B;IACpD,YAAY,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,iBAA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AAG,MAAM,MAAM,CAAC,cAAc,CAAC,CAAC;YAChE,IAAI,KAAK,YAAY,sBAAsB,EAAE,CAAC;gBAC5C,IAAI,KAAK,CAAC,MAAM,KAAK,SAAS;oBAAE,KAAK,MAAM,KAAK,IAAI,KAAK,CAAC,MAAM,CAAC,MAAM;wBAAE,OAAO,CAAC,MAAM,CAAC,UAAU,KAAK,CAAC,IAAI,KAAK,SAAS,aAAa,KAAK,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,CAAC;gBAC/J,KAAK,MAAM,MAAM,IAAI,KAAK,CAAC,WAAW;oBAAE,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,MAAM;wBAAE,OAAO,CAAC,MAAM,CAAC,iBAAiB,KAAK,CAAC,IAAI,KAAK,SAAS,aAAa,MAAM,CAAC,IAAI,KAAK,CAAC,CAAC;YACpK,CAAC;YACD,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC,EAAE,cAAc,CAAC,CAAC;AACrB,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { CommandDefinition } from "../../cli/schema.js";
2
+ export declare const skillDefinition: CommandDefinition;
@@ -0,0 +1,12 @@
1
+ export const skillDefinition = {
2
+ name: "skill",
3
+ description: "Install the Daynight project and task skill for coding agents",
4
+ commands: [{
5
+ name: "install",
6
+ description: "Choose detected agents and install or replace their Daynight skill",
7
+ options: [{ names: ["-h", "--help"], description: "Show this help", action: "help" }],
8
+ details: "Requires interactive terminal input and stderr. Choose agents, then User or Project scope.\nReplaces the complete daynight skill directory, including local edits and obsolete files.",
9
+ }],
10
+ options: [{ names: ["-h", "--help"], description: "Show this help", action: "help" }],
11
+ };
12
+ //# sourceMappingURL=definition.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"definition.js","sourceRoot":"","sources":["../../../src/commands/skill/definition.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,eAAe,GAAsB;IAChD,IAAI,EAAE,OAAO;IACb,WAAW,EAAE,+DAA+D;IAC5E,QAAQ,EAAE,CAAC;YACT,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,oEAAoE;YACjF,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;YACrF,OAAO,EAAE,uLAAuL;SACjM,CAAC;IACF,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;CACtF,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { BundleEntry } from "../../platform/skill-bundle.js";
2
+ import type { SkillTarget } from "./targets.js";
3
+ export type SkillBundle = readonly BundleEntry[];
4
+ export type SkillInstallFilesystem = Pick<typeof import("node:fs/promises"), "mkdir" | "mkdtemp" | "rename" | "rm" | "rmdir" | "writeFile">;
5
+ export declare const captureInstalledSkill: (packageDirectory: string) => Promise<SkillBundle>;
6
+ export declare class SkillInstallationError extends Error {
7
+ readonly completed: readonly SkillTarget[];
8
+ readonly failed: SkillTarget | undefined;
9
+ readonly unattempted: readonly SkillTarget[];
10
+ constructor(completed: readonly SkillTarget[], failed: SkillTarget | undefined, unattempted: readonly SkillTarget[], message: string, options: ErrorOptions);
11
+ }
12
+ export declare const installSkillTargets: (targets: readonly SkillTarget[], bundle: SkillBundle, signal: AbortSignal, installed: (target: SkillTarget) => void, fs?: SkillInstallFilesystem) => Promise<void>;
@@ -0,0 +1,118 @@
1
+ import { mkdir, mkdtemp, rename, rm, rmdir, writeFile } from "node:fs/promises";
2
+ import path from "node:path";
3
+ import { captureSkillBundle, validateSkillEntrypoint } from "../../platform/skill-bundle.js";
4
+ const filesystem = { mkdir, mkdtemp, rename, rm, rmdir, writeFile };
5
+ const hasCode = (cause, code) => cause instanceof Error && "code" in cause && cause.code === code;
6
+ export const captureInstalledSkill = async (packageDirectory) => {
7
+ const source = path.join(packageDirectory, "dist", "commands", "skill", "skills", "daynight");
8
+ try {
9
+ const bundle = await captureSkillBundle(source, "Daynight skill");
10
+ validateSkillEntrypoint(bundle, "daynight", "Daynight skill");
11
+ return bundle;
12
+ }
13
+ catch (cause) {
14
+ throw new Error(`Cannot capture installed Daynight skill bundle ${source}. Reinstall the npm package and try again.`, { cause });
15
+ }
16
+ };
17
+ export class SkillInstallationError extends Error {
18
+ completed;
19
+ failed;
20
+ unattempted;
21
+ constructor(completed, failed, unattempted, message, options) {
22
+ super(message, options);
23
+ this.completed = completed;
24
+ this.failed = failed;
25
+ this.unattempted = unattempted;
26
+ this.name = "SkillInstallationError";
27
+ }
28
+ }
29
+ const replaceTarget = async (target, bundle, signal, fs) => {
30
+ const created = [];
31
+ let stage;
32
+ let phase = "create parent directories";
33
+ let removed = false;
34
+ let failure;
35
+ try {
36
+ signal.throwIfAborted();
37
+ let cursor = target.ancestor;
38
+ for (const component of target.missingParents) {
39
+ cursor = path.join(cursor, component);
40
+ try {
41
+ await fs.mkdir(cursor);
42
+ created.push(cursor);
43
+ }
44
+ catch (cause) {
45
+ if (!hasCode(cause, "EEXIST"))
46
+ throw cause;
47
+ }
48
+ signal.throwIfAborted();
49
+ }
50
+ phase = "stage bundle";
51
+ stage = await fs.mkdtemp(path.join(target.parent, ".daynight-install-"));
52
+ for (const entry of bundle) {
53
+ signal.throwIfAborted();
54
+ const destination = path.join(stage, ...entry.relativePath.split("/"));
55
+ if (entry.type === "directory")
56
+ await fs.mkdir(destination);
57
+ else
58
+ await fs.writeFile(destination, entry.contents, { flag: "wx" });
59
+ }
60
+ signal.throwIfAborted();
61
+ phase = "remove existing skill";
62
+ // Cancellation is observed after publishing, so removal cannot interrupt replacement.
63
+ await fs.rm(target.path, { recursive: true, force: true });
64
+ removed = true;
65
+ phase = "publish staged bundle";
66
+ await fs.rename(stage, target.path);
67
+ stage = undefined;
68
+ return;
69
+ }
70
+ catch (cause) {
71
+ failure = new Error(`Cannot ${phase} at ${target.path}.${removed ? " The previous skill was removed; the target may now be absent. Run daynight skill install again to restore it." : ""}`, { cause });
72
+ }
73
+ finally {
74
+ const cleanup = [];
75
+ if (stage !== undefined) {
76
+ try {
77
+ await fs.rm(stage, { recursive: true, force: true });
78
+ }
79
+ catch (cause) {
80
+ cleanup.push(new Error(`Cannot remove skill installation stage ${stage}.`, { cause }));
81
+ }
82
+ }
83
+ if (failure !== undefined)
84
+ for (const directory of created.toReversed()) {
85
+ try {
86
+ await fs.rmdir(directory);
87
+ }
88
+ catch (cause) {
89
+ if (!hasCode(cause, "ENOTEMPTY") && !hasCode(cause, "EEXIST") && !hasCode(cause, "ENOENT"))
90
+ cleanup.push(new Error(`Cannot remove newly created skill parent ${directory}.`, { cause }));
91
+ }
92
+ }
93
+ if (cleanup.length !== 0)
94
+ throw new AggregateError(cleanup, "Skill installation cleanup failed.", { cause: failure });
95
+ }
96
+ throw failure;
97
+ };
98
+ export const installSkillTargets = async (targets, bundle, signal, installed, fs = filesystem) => {
99
+ const completed = [];
100
+ for (const [index, target] of targets.entries()) {
101
+ try {
102
+ signal.throwIfAborted();
103
+ }
104
+ catch (cause) {
105
+ throw new SkillInstallationError(completed, undefined, targets.slice(index), "Skill installation cancelled before the next target.", { cause });
106
+ }
107
+ try {
108
+ await replaceTarget(target, bundle, signal, fs);
109
+ }
110
+ catch (cause) {
111
+ throw new SkillInstallationError(completed, target, targets.slice(index + 1), "Skill installation stopped at the failed target; completed targets are preserved.", { cause });
112
+ }
113
+ completed.push(target);
114
+ installed(target);
115
+ }
116
+ signal.throwIfAborted();
117
+ };
118
+ //# sourceMappingURL=install.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"install.js","sourceRoot":"","sources":["../../../src/commands/skill/install.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAChF,OAAO,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AC,CAAC;QACxD,OAAO,KAAK,EAAE,CAAC;YAAC,MAAM,IAAI,sBAAsB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,EAAE,mFAAmF,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;QAAC,CAAC;QAChM,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACvB,SAAS,CAAC,MAAM,CAAC,CAAC;IACpB,CAAC;IACD,MAAM,CAAC,cAAc,EAAE,CAAC;AAC1B,CAAC,CAAC"}
@@ -0,0 +1,95 @@
1
+ ---
2
+ name: daynight
3
+ description: Use Daynight to restore project context and actively query, organize, and maintain persistent tasks during development in a Daynight-linked repository, including work resumed in a new session or worktree.
4
+ ---
5
+
6
+ # Daynight
7
+
8
+ Keep the project's durable task record aligned with authorized work. Daynight
9
+ task data describes work; it does not grant permission to implement, publish,
10
+ deploy, communicate externally, merge, or push a mainline branch.
11
+
12
+ Read [the command reference](references/commands.md) before creating or updating
13
+ tasks, or when project discovery, a query, or a write fails.
14
+
15
+ ## Restore context
16
+
17
+ At work start, context recovery, or a worktree switch, query from the current
18
+ repository through a noninteractive shell. To select the next work, use:
19
+
20
+ ```bash
21
+ daynight task ready --json
22
+ ```
23
+
24
+ This returns at most 10 ready tasks, earliest created first. Use `--limit <N>`
25
+ for 1–100 candidates. It reads one task page; the result is not the complete
26
+ backlog. An empty result does not mean there are no in-progress or blocked tasks.
27
+
28
+ Let the CLI resolve the current project. A new worktree without
29
+ `.daynight/project.yml` is normal: repository discovery can find the existing
30
+ project and save a local binding. Do not gate queries on that file's presence,
31
+ reuse remembered IDs as current facts, or edit bindings directly.
32
+
33
+ For work already being resumed, refresh its task with
34
+ `daynight task show <task-id> --json`. If its identity is unknown, query
35
+ `daynight task list --status in_progress --json` as needed. Show selected ready
36
+ tasks too before acting. Use `daynight task graph --json` when dependency or
37
+ project-wide context is needed; it has title previews, not full descriptions or
38
+ versions. If it reports `graph_limit_exceeded`, continue with bounded ready and
39
+ selected task reads; the error does not mean the project is unlinked. Full lists
40
+ traverse every page, so request them only when a complete inventory is needed.
41
+
42
+ If configuration, discovery, or a service request fails, preserve its actual
43
+ cause. Follow the CLI's setup guidance or obtain an explicit project selection
44
+ when needed; do not guess a server, choose among ambiguous projects, or create a
45
+ project merely to make task recovery succeed.
46
+
47
+ ## Maintain useful tasks
48
+
49
+ Reuse an existing task whose scope matches the authorized work. Create durable
50
+ tasks for independently understandable outcomes that need cross-session
51
+ tracking, delivery verification, or handoff. Keep transient command steps in
52
+ the agent's own execution plan. Repository requirements and design documents
53
+ continue to own their full specifications.
54
+
55
+ Write an outcome-focused title and a coherent description containing scope,
56
+ acceptance, necessary decisions, current progress, blockers, and next action.
57
+ Rewrite that description as the work changes; do not accumulate a running log.
58
+ Express real prerequisites with dependencies.
59
+
60
+ Start authorized work by setting `in_progress`. The only states are `todo`,
61
+ `in_progress`, and `done`; readiness means a todo task's direct prerequisites are
62
+ done. Neither readiness nor `in_progress` is an exclusive claim, lock, lease, or
63
+ ownership guarantee. Coordinate concurrent work using observed task facts and
64
+ the project's existing communication rules.
65
+
66
+ Before changing any field, read the complete task and pass that exact observed
67
+ version as `--if-version`. Preserve the full int64 decimal value. A conflict
68
+ requires rereading and reconsidering the intended change, not replaying it with
69
+ a newer version. Descriptions and dependency sets are complete replacements;
70
+ the command reference explains clearing and omitted fields.
71
+
72
+ Only report a write as successful after service confirmation. When a result is
73
+ unconfirmed, reconcile it with service reads before taking another write action;
74
+ do not blindly resend a create or update.
75
+
76
+ ## Verify delivery before completion
77
+
78
+ Development tasks, and design or documentation tasks delivered through PRs,
79
+ remain `in_progress` until the hosting platform confirms that **all necessary
80
+ delivery PRs are merged** and the task's acceptance criteria are satisfied.
81
+ Code completion, an open PR, approved review, or passing CI does not meet this
82
+ condition. Record PR URLs, outstanding checks, and waiting items while delivery
83
+ is pending.
84
+
85
+ Before setting `done`, query the platform's actual merge state for every required
86
+ PR and retain its PR URL and merge commit reference in the task description.
87
+ Then reread the task and update with its observed version. Missing merge
88
+ visibility, a missing permission, or an unmet merge check keeps the task
89
+ `in_progress`; the completion rule grants no merge authority. Tasks with no
90
+ development or PR delivery path use their stated acceptance criteria.
91
+
92
+ After confirmed completion, query `daynight task ready --json` to see which
93
+ dependent tasks became available. A ready successor still needs authorization within the
94
+ current scope before work starts. Refresh task facts at these semantic
95
+ checkpoints; do not reload the full project on every conversational turn.