@bvdm/delano 0.2.4 → 0.2.6
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/.delano/viewer/public/styles.css +1 -1
- package/README.md +35 -0
- package/assets/install-manifest.json +9 -0
- package/assets/payload/.agents/adapters/manifest.schema.json +103 -0
- package/assets/payload/.agents/adapters/spec-kit/adapter.json +71 -0
- package/assets/payload/.agents/schemas/status-transitions.json +17 -0
- package/assets/payload/.agents/scripts/check-status-transitions.mjs +83 -2
- package/assets/payload/.agents/scripts/pm/import-spec-kit.sh +605 -0
- package/assets/payload/.agents/scripts/pm/init.sh +31 -2
- package/assets/payload/.agents/scripts/pm/research.sh +296 -0
- package/assets/payload/.agents/scripts/pm/validate.sh +15 -0
- package/assets/payload/.agents/skills/README.md +1 -0
- package/assets/payload/.agents/skills/research-skill/SKILL.md +66 -0
- package/assets/payload/.agents/skills/research-skill/references/runbook.md +59 -0
- package/assets/payload/.agents/skills/research-skill/templates/fold-forward-checklist.md +9 -0
- package/assets/payload/.agents/skills/research-skill/templates/research-summary.md +21 -0
- package/assets/payload/.delano/viewer/public/styles.css +1 -1
- package/assets/payload/.project/templates/decisions.md +18 -0
- package/assets/payload/.project/templates/plan.md +17 -0
- package/assets/payload/.project/templates/spec.md +12 -0
- package/assets/payload/.project/templates/task.md +6 -0
- package/assets/payload/.project/templates/workstream.md +1 -0
- package/package.json +4 -2
- package/src/cli/commands/state.js +689 -0
- package/src/cli/commands/wrapper.js +16 -3
- package/src/cli/index.js +119 -7
- package/src/cli/lib/project-state.js +918 -0
|
@@ -1,13 +1,19 @@
|
|
|
1
|
+
const path = require("node:path");
|
|
2
|
+
|
|
1
3
|
const { runPmScript } = require("../lib/pm");
|
|
2
4
|
|
|
3
|
-
function createWrapperCommand(scriptName) {
|
|
5
|
+
function createWrapperCommand(scriptName, options = {}) {
|
|
4
6
|
return {
|
|
5
|
-
description: `Run .agents/scripts/pm/${scriptName}.sh in the current Delano repository.`,
|
|
7
|
+
description: options.description || `Run .agents/scripts/pm/${scriptName}.sh in the current Delano repository.`,
|
|
6
8
|
run(args) {
|
|
7
9
|
const passthrough = args[0] === "--" ? args.slice(1) : args;
|
|
8
|
-
return runPmScript(scriptName, passthrough);
|
|
10
|
+
return runPmScript(scriptName, normalizePassthrough(scriptName, passthrough));
|
|
9
11
|
},
|
|
10
12
|
help() {
|
|
13
|
+
if (typeof options.help === "function") {
|
|
14
|
+
return options.help();
|
|
15
|
+
}
|
|
16
|
+
|
|
11
17
|
const lines = [
|
|
12
18
|
"Usage:",
|
|
13
19
|
` delano ${scriptName} [-- <script-args>]`,
|
|
@@ -32,6 +38,13 @@ function createWrapperCommand(scriptName) {
|
|
|
32
38
|
};
|
|
33
39
|
}
|
|
34
40
|
|
|
41
|
+
function normalizePassthrough(scriptName, args) {
|
|
42
|
+
if (scriptName !== "import-spec-kit" || args.length < 2 || path.isAbsolute(args[1])) {
|
|
43
|
+
return args;
|
|
44
|
+
}
|
|
45
|
+
return [args[0], path.resolve(process.cwd(), args[1]), ...args.slice(2)];
|
|
46
|
+
}
|
|
47
|
+
|
|
35
48
|
module.exports = {
|
|
36
49
|
createWrapperCommand
|
|
37
50
|
};
|
package/src/cli/index.js
CHANGED
|
@@ -7,9 +7,28 @@ const { getOnboardingHelp, runOnboarding } = require("./commands/onboarding");
|
|
|
7
7
|
const { runInstall, getInstallHelp } = require("./commands/install");
|
|
8
8
|
const { runViewer, getViewerHelp } = require("./commands/viewer");
|
|
9
9
|
const { createWrapperCommand } = require("./commands/wrapper");
|
|
10
|
+
const {
|
|
11
|
+
getProjectHelp,
|
|
12
|
+
getTaskHelp,
|
|
13
|
+
getUpdateHelp,
|
|
14
|
+
getWorkstreamHelp,
|
|
15
|
+
parseTaskArgs,
|
|
16
|
+
runProjectCommand,
|
|
17
|
+
runTaskCommand,
|
|
18
|
+
runUpdateCommand,
|
|
19
|
+
runWorkstreamCommand
|
|
20
|
+
} = require("./commands/state");
|
|
10
21
|
|
|
11
22
|
const wrapperCommands = {
|
|
12
23
|
init: createWrapperCommand("init"),
|
|
24
|
+
"import-spec-kit": createWrapperCommand("import-spec-kit", {
|
|
25
|
+
description: "Create a planned Delano project from a Spec Kit-style markdown artifact.",
|
|
26
|
+
help: getImportSpecKitHelp
|
|
27
|
+
}),
|
|
28
|
+
research: createWrapperCommand("research", {
|
|
29
|
+
description: "Create repo-native research intake files for a Delano project.",
|
|
30
|
+
help: getResearchHelp
|
|
31
|
+
}),
|
|
13
32
|
validate: createWrapperCommand("validate"),
|
|
14
33
|
status: createWrapperCommand("status"),
|
|
15
34
|
next: createWrapperCommand("next")
|
|
@@ -31,18 +50,36 @@ const commands = {
|
|
|
31
50
|
run: runViewer,
|
|
32
51
|
help: getViewerHelp
|
|
33
52
|
},
|
|
53
|
+
project: {
|
|
54
|
+
description: "Create, show, and patch Delano project contracts.",
|
|
55
|
+
run: runProjectCommand,
|
|
56
|
+
help: getProjectHelp
|
|
57
|
+
},
|
|
58
|
+
workstream: {
|
|
59
|
+
description: "Add and patch Delano workstream contracts.",
|
|
60
|
+
run: runWorkstreamCommand,
|
|
61
|
+
help: getWorkstreamHelp
|
|
62
|
+
},
|
|
63
|
+
task: {
|
|
64
|
+
description: "Add and patch Delano task contracts with scoped lifecycle rollups.",
|
|
65
|
+
run: runTaskCommand,
|
|
66
|
+
help: getTaskHelp
|
|
67
|
+
},
|
|
68
|
+
update: {
|
|
69
|
+
description: "Add project progress updates from the project update template.",
|
|
70
|
+
run: runUpdateCommand,
|
|
71
|
+
help: getUpdateHelp
|
|
72
|
+
},
|
|
34
73
|
init: wrapperCommands.init,
|
|
74
|
+
"import-spec-kit": wrapperCommands["import-spec-kit"],
|
|
75
|
+
research: wrapperCommands.research,
|
|
35
76
|
validate: wrapperCommands.validate,
|
|
36
77
|
status: wrapperCommands.status,
|
|
37
78
|
next: wrapperCommands.next
|
|
38
79
|
};
|
|
39
80
|
|
|
40
81
|
function isInstallShorthand(argv) {
|
|
41
|
-
|
|
42
|
-
return false;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
return argv[0].startsWith("-");
|
|
82
|
+
return argv.length > 0 && argv[0].startsWith("-");
|
|
46
83
|
}
|
|
47
84
|
|
|
48
85
|
function resolveInvocation(argv) {
|
|
@@ -99,8 +136,14 @@ function getGeneralHelp() {
|
|
|
99
136
|
" onboarding Analyze AGENTS.md with the approval-first onboarding skill",
|
|
100
137
|
" install Install the approved Delano runtime payload",
|
|
101
138
|
" viewer Launch the read-only local UI for .project contracts",
|
|
102
|
-
"
|
|
103
|
-
"
|
|
139
|
+
" project Create, show, and patch project contracts",
|
|
140
|
+
" workstream Add and patch workstream contracts",
|
|
141
|
+
" task Add and patch task contracts with scoped lifecycle rollups",
|
|
142
|
+
" update Add a progress update from .project/templates",
|
|
143
|
+
" init Run .agents/scripts/pm/init.sh in the current Delano repo",
|
|
144
|
+
" import-spec-kit Create a planned project from a Spec Kit-style markdown artifact",
|
|
145
|
+
" research Create repo-native research intake files for a project",
|
|
146
|
+
" validate Run .agents/scripts/pm/validate.sh in the current Delano repo",
|
|
104
147
|
" status Run .agents/scripts/pm/status.sh in the current Delano repo",
|
|
105
148
|
" next Run .agents/scripts/pm/next.sh in the current Delano repo",
|
|
106
149
|
"",
|
|
@@ -115,6 +158,14 @@ function getGeneralHelp() {
|
|
|
115
158
|
" delano --target ../my-repo --yes",
|
|
116
159
|
" npx -y @bvdm/delano@latest --yes",
|
|
117
160
|
" delano viewer",
|
|
161
|
+
" delano project create my-project --name \"My Project\" --owner team",
|
|
162
|
+
" delano workstream add my-project WS-A --name \"API Foundation\" --owner backend-team",
|
|
163
|
+
" delano task add my-project T-001 --name \"Build endpoint\" --workstream WS-A",
|
|
164
|
+
" delano task start my-project T-001",
|
|
165
|
+
" delano task close my-project T-001 --evidence \"Implemented and tested\"",
|
|
166
|
+
" delano update add my-project --message \"Implemented endpoint smoke test\"",
|
|
167
|
+
" delano import-spec-kit reminder-email-preferences docs/spec-kit/fixtures/minimal-spec-kit-project.md --json",
|
|
168
|
+
" delano research my-project api-options --title \"API options\" --question \"Which API shape should we use?\" --json",
|
|
118
169
|
" delano validate",
|
|
119
170
|
" delano status --open --brief",
|
|
120
171
|
" delano next -- --all",
|
|
@@ -129,6 +180,63 @@ function getGeneralHelp() {
|
|
|
129
180
|
].join("\n");
|
|
130
181
|
}
|
|
131
182
|
|
|
183
|
+
function getResearchHelp() {
|
|
184
|
+
return [
|
|
185
|
+
"Usage:",
|
|
186
|
+
" delano research <project-slug> <research-slug> [options]",
|
|
187
|
+
"",
|
|
188
|
+
"Creates repo-native research intake files under .project/projects/<project-slug>/research/<research-slug>/, then runs Delano validation by default.",
|
|
189
|
+
"",
|
|
190
|
+
"Arguments:",
|
|
191
|
+
" project-slug Existing Delano project slug",
|
|
192
|
+
" research-slug Research folder slug in kebab-case",
|
|
193
|
+
"",
|
|
194
|
+
"Options:",
|
|
195
|
+
" --title <title> Human-readable research title",
|
|
196
|
+
" --question <question> Primary research question",
|
|
197
|
+
" --owner <owner> Research owner, defaults to team",
|
|
198
|
+
" --no-validate Create artifacts without running Delano validation",
|
|
199
|
+
" --json Print a single machine-readable JSON result",
|
|
200
|
+
" -h, --help Show help",
|
|
201
|
+
"",
|
|
202
|
+
"Agent examples:",
|
|
203
|
+
" delano research delano-spec-kit-interop import-edge-cases --title \"Import edge cases\" --question \"Which inputs should block import?\" --json",
|
|
204
|
+
"",
|
|
205
|
+
"Output:",
|
|
206
|
+
" Human mode prints a concise summary plus validation output.",
|
|
207
|
+
" JSON mode prints: { ok, command, project, research, files, validation }."
|
|
208
|
+
].join("\n");
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
function getImportSpecKitHelp() {
|
|
212
|
+
return [
|
|
213
|
+
"Usage:",
|
|
214
|
+
" delano import-spec-kit <slug> <source-md> [options]",
|
|
215
|
+
"",
|
|
216
|
+
"Creates a planned Delano project from the first supported Spec Kit-style markdown fixture, then runs Delano validation by default.",
|
|
217
|
+
"",
|
|
218
|
+
"Arguments:",
|
|
219
|
+
" slug Target Delano project slug in kebab-case",
|
|
220
|
+
" source-md Path to the markdown source artifact",
|
|
221
|
+
"",
|
|
222
|
+
"Options:",
|
|
223
|
+
" --name <project-name> Project name override",
|
|
224
|
+
" --owner <owner> Project owner, defaults to team",
|
|
225
|
+
" --lead <lead> Project lead, defaults to owner",
|
|
226
|
+
" --no-validate Create artifacts without running Delano validation",
|
|
227
|
+
" --json Print a single machine-readable JSON result",
|
|
228
|
+
" -h, --help Show help",
|
|
229
|
+
"",
|
|
230
|
+
"Agent examples:",
|
|
231
|
+
" delano import-spec-kit reminder-email-preferences docs/spec-kit/fixtures/minimal-spec-kit-project.md --json",
|
|
232
|
+
" delano import-spec-kit reminder-email-preferences input.md --name \"Reminder Email Preferences\" --owner platform --lead clark --json",
|
|
233
|
+
"",
|
|
234
|
+
"Output:",
|
|
235
|
+
" Human mode prints a concise summary plus validation output.",
|
|
236
|
+
" JSON mode prints: { ok, command, project, source, validation }."
|
|
237
|
+
].join("\n");
|
|
238
|
+
}
|
|
239
|
+
|
|
132
240
|
async function run(argv) {
|
|
133
241
|
const invocation = resolveInvocation(argv);
|
|
134
242
|
|
|
@@ -156,6 +264,10 @@ async function run(argv) {
|
|
|
156
264
|
module.exports = {
|
|
157
265
|
commands,
|
|
158
266
|
getGeneralHelp,
|
|
267
|
+
getImportSpecKitHelp,
|
|
268
|
+
getResearchHelp,
|
|
269
|
+
getTaskHelp,
|
|
270
|
+
parseTaskArgs,
|
|
159
271
|
resolveInvocation,
|
|
160
272
|
run
|
|
161
273
|
};
|