dsh-plugin-strict-spec 0.0.0-stage → 0.5.1
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/LICENSE +201 -0
- package/README.md +236 -2
- package/README.zh.md +191 -0
- package/cordis.patch.yml +5 -0
- package/dist/cli/strict-spec-cli.js +38892 -0
- package/dist/client.js +50 -0
- package/dist/host.js +154 -0
- package/dist/skills/strict-roadmap-plan/SKILL.md +176 -0
- package/dist/skills/strict-roadmap-recommend/SKILL.md +321 -0
- package/dist/skills/strict-roadmap-reorder/SKILL.md +194 -0
- package/dist/skills/strict-roadmap-review/SKILL.md +180 -0
- package/dist/skills/strict-roadmap-transition/SKILL.md +323 -0
- package/dist/skills/strict-scene-edit/SKILL.md +156 -0
- package/dist/skills/strict-spec-apply/SKILL.md +212 -0
- package/dist/skills/strict-spec-architecture/SKILL.md +143 -0
- package/dist/skills/strict-spec-archive/SKILL.md +165 -0
- package/dist/skills/strict-spec-auto/SKILL.md +334 -0
- package/dist/skills/strict-spec-brainstorm/SKILL.md +228 -0
- package/dist/skills/strict-spec-bugfix/SKILL.md +285 -0
- package/dist/skills/strict-spec-design/SKILL.md +168 -0
- package/dist/skills/strict-spec-design-sync/SKILL.md +165 -0
- package/dist/skills/strict-spec-init/SKILL.md +123 -0
- package/dist/skills/strict-spec-maintenance/SKILL.md +130 -0
- package/dist/skills/strict-spec-modify/SKILL.md +148 -0
- package/dist/skills/strict-spec-propose/SKILL.md +553 -0
- package/dist/skills/strict-spec-review/SKILL.md +315 -0
- package/dist/skills/strict-spec-ship/SKILL.md +94 -0
- package/dist/skills/strict-spec-spec-edit/SKILL.md +117 -0
- package/dist/skills/strict-spec-sync-specs/SKILL.md +128 -0
- package/dist/skills/strict-spec-verify/SKILL.md +79 -0
- package/dist/skills/strict-tech-edit/SKILL.md +161 -0
- package/dist/skills/strict-tech-sync/SKILL.md +202 -0
- package/package.json +109 -4
package/dist/host.js
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
// src/host.ts
|
|
2
|
+
import { readFileSync } from "node:fs";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
import path2 from "node:path";
|
|
5
|
+
import Schema from "@deepseek-ai/schemastery";
|
|
6
|
+
|
|
7
|
+
// src/host/builtinTooling.ts
|
|
8
|
+
import { readFile, readdir } from "node:fs/promises";
|
|
9
|
+
import path from "node:path";
|
|
10
|
+
var BUILTIN_TOOLING_PROVIDER_NAME = "strict-spec-plugin";
|
|
11
|
+
var BUILTIN_TOOLING_RANK = 600;
|
|
12
|
+
var SKILL_BODY_FILE = "SKILL.md";
|
|
13
|
+
var FRONTMATTER_FENCE = "---";
|
|
14
|
+
var SKILL_NAME_PATTERN = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
|
|
15
|
+
var CLI_TOKEN_PATTERN = /(?<![\w-])strict-spec-cli(?![\w.-])/g;
|
|
16
|
+
var SAFE_UNQUOTED_PATTERN = /^[A-Za-z0-9_@%+=:,./-]+$/;
|
|
17
|
+
var INVOCATION = { modelInvocable: true, userInvocable: true };
|
|
18
|
+
function buildProvenanceMarker(pluginVersion) {
|
|
19
|
+
return ` — built-in (dsh plugin ${pluginVersion})`;
|
|
20
|
+
}
|
|
21
|
+
function quoteCommandPath(value) {
|
|
22
|
+
return SAFE_UNQUOTED_PATTERN.test(value) ? value : JSON.stringify(value);
|
|
23
|
+
}
|
|
24
|
+
function buildCliInvocation(execPath, cliPath) {
|
|
25
|
+
return `${quoteCommandPath(execPath)} ${quoteCommandPath(cliPath)}`;
|
|
26
|
+
}
|
|
27
|
+
function rewriteCliToken(body, invocation) {
|
|
28
|
+
return body.replace(CLI_TOKEN_PATTERN, invocation);
|
|
29
|
+
}
|
|
30
|
+
function parseSkillFrontmatter(text) {
|
|
31
|
+
const lines = text.split(/\r?\n/);
|
|
32
|
+
if (lines[0] !== FRONTMATTER_FENCE)
|
|
33
|
+
return;
|
|
34
|
+
let name;
|
|
35
|
+
let description;
|
|
36
|
+
let closeIndex = -1;
|
|
37
|
+
for (let index = 1;index < lines.length; index += 1) {
|
|
38
|
+
const line = lines[index];
|
|
39
|
+
if (line === FRONTMATTER_FENCE) {
|
|
40
|
+
closeIndex = index;
|
|
41
|
+
break;
|
|
42
|
+
}
|
|
43
|
+
if (name === undefined && line.startsWith("name:")) {
|
|
44
|
+
name = line.slice("name:".length).trim();
|
|
45
|
+
} else if (description === undefined && line.startsWith("description:")) {
|
|
46
|
+
description = line.slice("description:".length).trim();
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
if (closeIndex < 0)
|
|
50
|
+
return;
|
|
51
|
+
if (name === undefined || name.length === 0 || !SKILL_NAME_PATTERN.test(name))
|
|
52
|
+
return;
|
|
53
|
+
if (description === undefined || description.length === 0)
|
|
54
|
+
return;
|
|
55
|
+
return { name, description, body: lines.slice(closeIndex + 1).join(`
|
|
56
|
+
`) };
|
|
57
|
+
}
|
|
58
|
+
async function listBundledSkills(skillsDir) {
|
|
59
|
+
let entries;
|
|
60
|
+
try {
|
|
61
|
+
entries = await readdir(skillsDir, { withFileTypes: true });
|
|
62
|
+
} catch {
|
|
63
|
+
return [];
|
|
64
|
+
}
|
|
65
|
+
const records = [];
|
|
66
|
+
for (const entry of entries) {
|
|
67
|
+
if (!entry.isDirectory())
|
|
68
|
+
continue;
|
|
69
|
+
const filePath = path.join(skillsDir, entry.name, SKILL_BODY_FILE);
|
|
70
|
+
let text;
|
|
71
|
+
try {
|
|
72
|
+
text = await readFile(filePath, "utf8");
|
|
73
|
+
} catch {
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
const parsed = parseSkillFrontmatter(text);
|
|
77
|
+
if (parsed === undefined)
|
|
78
|
+
continue;
|
|
79
|
+
records.push({ name: parsed.name, description: parsed.description, filePath });
|
|
80
|
+
}
|
|
81
|
+
records.sort((left, right) => left.name < right.name ? -1 : left.name > right.name ? 1 : 0);
|
|
82
|
+
return records;
|
|
83
|
+
}
|
|
84
|
+
function createBuiltinToolingProvider(assets) {
|
|
85
|
+
const invocation = buildCliInvocation(assets.execPath, assets.cliPath);
|
|
86
|
+
return {
|
|
87
|
+
name: BUILTIN_TOOLING_PROVIDER_NAME,
|
|
88
|
+
async list() {
|
|
89
|
+
const records = await listBundledSkills(assets.skillsDir);
|
|
90
|
+
return records.map((record) => ({
|
|
91
|
+
name: record.name,
|
|
92
|
+
description: `${record.description}${assets.provenanceMarker}`,
|
|
93
|
+
invocation: INVOCATION,
|
|
94
|
+
source: "bundled",
|
|
95
|
+
provider: BUILTIN_TOOLING_PROVIDER_NAME,
|
|
96
|
+
resourceBase: { kind: "directory", path: path.dirname(record.filePath) },
|
|
97
|
+
rank: BUILTIN_TOOLING_RANK,
|
|
98
|
+
locator: record.filePath
|
|
99
|
+
}));
|
|
100
|
+
},
|
|
101
|
+
async get(candidate) {
|
|
102
|
+
let text;
|
|
103
|
+
try {
|
|
104
|
+
text = await readFile(String(candidate.locator), "utf8");
|
|
105
|
+
} catch {
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
const parsed = parseSkillFrontmatter(text);
|
|
109
|
+
if (parsed === undefined || parsed.name !== candidate.name)
|
|
110
|
+
return;
|
|
111
|
+
return {
|
|
112
|
+
name: parsed.name,
|
|
113
|
+
description: `${parsed.description}${assets.provenanceMarker}`,
|
|
114
|
+
invocation: INVOCATION,
|
|
115
|
+
source: "bundled",
|
|
116
|
+
provider: BUILTIN_TOOLING_PROVIDER_NAME,
|
|
117
|
+
resourceBase: { kind: "directory", path: path.dirname(String(candidate.locator)) },
|
|
118
|
+
content: rewriteCliToken(parsed.body, invocation)
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// src/host.ts
|
|
125
|
+
var inject = ["skills"];
|
|
126
|
+
var Config = Schema.object({
|
|
127
|
+
builtinTooling: Schema.boolean().default(true).description("Serve the built-in strict skills and strict-spec-cli from this plugin.")
|
|
128
|
+
});
|
|
129
|
+
function readPluginVersion(distDir) {
|
|
130
|
+
try {
|
|
131
|
+
const manifest = JSON.parse(readFileSync(path2.join(distDir, "..", "package.json"), "utf8"));
|
|
132
|
+
return manifest.version && manifest.version.length > 0 ? manifest.version : "unknown";
|
|
133
|
+
} catch {
|
|
134
|
+
return "unknown";
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
function apply(ctx, config = {}) {
|
|
138
|
+
if (config.builtinTooling === false)
|
|
139
|
+
return;
|
|
140
|
+
const distDir = path2.dirname(fileURLToPath(import.meta.url));
|
|
141
|
+
ctx.skills.registerProvider(() => createBuiltinToolingProvider({
|
|
142
|
+
skillsDir: path2.join(distDir, "skills"),
|
|
143
|
+
cliPath: path2.join(distDir, "cli", "strict-spec-cli.js"),
|
|
144
|
+
execPath: process.execPath,
|
|
145
|
+
provenanceMarker: buildProvenanceMarker(readPluginVersion(distDir))
|
|
146
|
+
}));
|
|
147
|
+
}
|
|
148
|
+
export {
|
|
149
|
+
Config,
|
|
150
|
+
apply,
|
|
151
|
+
inject,
|
|
152
|
+
readPluginVersion
|
|
153
|
+
};
|
|
154
|
+
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: strict-roadmap-plan
|
|
3
|
+
description: Create or restructure a strict YAML roadmap under .strict-spec-driven/roadmap/.
|
|
4
|
+
metadata:
|
|
5
|
+
skill_id: strict_roadmap_plan
|
|
6
|
+
author: strict-spec-driven
|
|
7
|
+
type: agent_skill
|
|
8
|
+
version: 1.0.0
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
You are helping the user create or restructure the strict roadmap.
|
|
12
|
+
|
|
13
|
+
## This Skill's Commands
|
|
14
|
+
|
|
15
|
+
If you cannot remember the exact command used by this skill, look it up here
|
|
16
|
+
before running anything. Do not guess.
|
|
17
|
+
|
|
18
|
+
```yaml
|
|
19
|
+
check-workflow-state: strict-spec-cli check-workflow-state
|
|
20
|
+
roadmap-generate-milestone: strict-spec-cli roadmap-generate milestone --<named-args>
|
|
21
|
+
roadmap-generate-planned-change: strict-spec-cli roadmap-generate planned-change --milestone <milestone-id> --id <planned-change-id> --summary "..." --details "..." [--depends-on <planned-change-id>] [--status <planned|complete>] [--remove-depends-on <planned-change-id>]
|
|
22
|
+
roadmap-delete-planned-change: strict-spec-cli roadmap-delete-planned-change <planned-change-id> [--allow-complete] [--detach-dependents]
|
|
23
|
+
roadmap-status: strict-spec-cli roadmap-status
|
|
24
|
+
roadmap-sync: strict-spec-cli roadmap-sync [--fix-names]
|
|
25
|
+
roadmap-defer: strict-spec-cli roadmap-defer <milestone-id> [--reason "..."]
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Roadmap Linking Rules
|
|
29
|
+
|
|
30
|
+
- Milestone ownership is defined by `planned_change.milestone`.
|
|
31
|
+
- Do not expect milestone files to list standalone planned-change file paths.
|
|
32
|
+
- Use `roadmap-status` output to locate planned-change source files; each
|
|
33
|
+
`plannedChanges[]` entry reports its `path`.
|
|
34
|
+
- `planned_change.id` and `planned_change.milestone` are the source of truth
|
|
35
|
+
for identity, and the file basename is enforced to match them: the canonical
|
|
36
|
+
planned-change filename is `<milestone-id>-<planned-change-id>.yaml` (the
|
|
37
|
+
milestone prefix is not duplicated when the id already starts with it). A
|
|
38
|
+
misnamed active planned-change file is a blocking validation diagnostic;
|
|
39
|
+
never pick filenames yourself — create planned changes through
|
|
40
|
+
`roadmap-generate planned-change` and repair legacy names with
|
|
41
|
+
`roadmap-sync --fix-names`.
|
|
42
|
+
|
|
43
|
+
## CLI-Only YAML Authoring Protocol
|
|
44
|
+
|
|
45
|
+
Every mutation of repository-owned YAML in this skill goes through the strict
|
|
46
|
+
CLI. This skill writes `roadmap-state`. Before the first mutation run
|
|
47
|
+
`strict-spec-cli yaml-authoring-protocol roadmap-state`: that command reports
|
|
48
|
+
the ordered authoring steps, the owning command for each operation, and the
|
|
49
|
+
bundled schema and example keys with their cache-resolved paths, bound to the
|
|
50
|
+
artifact kind and current where a copy would go stale. Validate the result with
|
|
51
|
+
`strict-spec-cli roadmap-status`.
|
|
52
|
+
|
|
53
|
+
**Stop rather than edit YAML directly.** When a required command, argument, or
|
|
54
|
+
artifact kind is unavailable, stop and report the missing capability. Editing
|
|
55
|
+
the YAML directly, writing a raw payload, or scripting around the CLI is never
|
|
56
|
+
an available fallback, and an unavailable command is a reason to stop rather
|
|
57
|
+
than a reason to improvise.
|
|
58
|
+
|
|
59
|
+
## Preferred Human Language
|
|
60
|
+
|
|
61
|
+
Comply with `preferred_human_language` from `.strict-spec-driven/config.yaml` —
|
|
62
|
+
the user's common human language, not a programming language — for all
|
|
63
|
+
user-facing and generated operator-facing text, unless that file is absent or
|
|
64
|
+
the active user message asks otherwise.
|
|
65
|
+
|
|
66
|
+
## Steps
|
|
67
|
+
|
|
68
|
+
Before any other step, run `strict-spec-cli check-workflow-state`. If `.strict-spec-driven/` is
|
|
69
|
+
missing, stop immediately and tell the user to run `/strict-spec-init`. Do not
|
|
70
|
+
run `init` from this skill.
|
|
71
|
+
|
|
72
|
+
1. **Read strict project context** — inspect `.strict-spec-driven/config.yaml`,
|
|
73
|
+
`.strict-spec-driven/specs/INDEX.yaml`, and the main strict YAML specs that
|
|
74
|
+
define the current system.
|
|
75
|
+
|
|
76
|
+
2. **Inspect the current roadmap state** — run:
|
|
77
|
+
```bash
|
|
78
|
+
strict-spec-cli roadmap-status
|
|
79
|
+
```
|
|
80
|
+
Use the returned milestone order, diagnostics, and derived status summaries
|
|
81
|
+
as the basis for any roadmap edits under `.strict-spec-driven/roadmap/`. Use
|
|
82
|
+
the returned `plannedChanges[].path` values when you need to inspect or move
|
|
83
|
+
existing standalone roadmap items.
|
|
84
|
+
|
|
85
|
+
3. **Create or revise executable roadmap YAML artifacts** — create or update
|
|
86
|
+
milestone files with:
|
|
87
|
+
```bash
|
|
88
|
+
strict-spec-cli roadmap-generate milestone --id <milestone-id> --title "..." --goal "..." --scope-in "..." --scope-out "..." --done "..." --dependency "..." --risk "..." --note "..." --details "..."
|
|
89
|
+
```
|
|
90
|
+
A supplied scalar field replaces the recorded value with no extra flag, and list fields always append, so editing one field never discards unrelated recorded content. `--intake-question` values merge by id, and restating an id replaces just that question. Remove a recorded entry by naming it: `--remove-scope-in`, `--remove-scope-out`, `--remove-done`, `--remove-dependency`, `--remove-risk` and `--remove-note` take a substring that must match exactly one entry, and `--remove-intake-question` takes an id. Use `roadmap-generate milestone` for milestone
|
|
91
|
+
YAML shape and milestone-field changes; do not hand-roll milestone schema
|
|
92
|
+
structure.
|
|
93
|
+
Create and update standalone work items with:
|
|
94
|
+
```bash
|
|
95
|
+
strict-spec-cli roadmap-generate planned-change --milestone <milestone-id> --id <planned-change-id> --summary "..." --details "..." --depends-on <planned-change-id> --status planned
|
|
96
|
+
```
|
|
97
|
+
The CLI computes the canonical filename
|
|
98
|
+
`<milestone-id>-<planned-change-id>.yaml` under
|
|
99
|
+
`.strict-spec-driven/roadmap/planned-changes/` itself; never choose or edit
|
|
100
|
+
planned-change filenames by hand. Milestone index state is normalized by
|
|
101
|
+
`roadmap-sync`.
|
|
102
|
+
Keep milestone planning in structured YAML fields such as `goal`, `scope`,
|
|
103
|
+
`done_criteria`, `dependencies`, `risks`, `status`, `notes`, and
|
|
104
|
+
`details`. Refine each milestone until its goal, scope, done criteria,
|
|
105
|
+
dependencies, risks, notes, and details describe executable planning
|
|
106
|
+
context rather than placeholders or broad intentions. Give each standalone
|
|
107
|
+
planned-change artifact an actionable `summary`, `details`, `depends_on`,
|
|
108
|
+
and `status` so later roadmap recommendation, proposal, and implementation
|
|
109
|
+
workflows can understand the work without inventing missing detail. Keep
|
|
110
|
+
milestone `planned_changes` empty unless you are explicitly materializing
|
|
111
|
+
legacy data.
|
|
112
|
+
If a milestone needs more than ten planned changes or mixes unrelated work,
|
|
113
|
+
split it or stop for explicit user confirmation instead of hiding the scope
|
|
114
|
+
problem in one large milestone.
|
|
115
|
+
Restructuring that consolidates or drops planned work removes artifacts with:
|
|
116
|
+
```bash
|
|
117
|
+
strict-spec-cli roadmap-delete-planned-change <planned-change-id> [--allow-complete] [--detach-dependents]
|
|
118
|
+
```
|
|
119
|
+
Deletion refuses by default when other planned changes depend on the target;
|
|
120
|
+
`--detach-dependents` drops those `depends_on` edges in the same operation so
|
|
121
|
+
the roadmap is never written through a dangling-reference state. Never remove
|
|
122
|
+
a planned-change file by hand — reducing the planned-change count is a CLI
|
|
123
|
+
operation like every other roadmap mutation.
|
|
124
|
+
|
|
125
|
+
4. **Offer deferral when a milestone cannot be detailed yet** — a milestone the
|
|
126
|
+
user is committed to but genuinely cannot elaborate — because an interface is
|
|
127
|
+
still moving, a dependency has not landed, or a decision belongs to someone
|
|
128
|
+
else — should not be padded with invented content, and should not be left out
|
|
129
|
+
of the roadmap either. Record the unmatured precondition as an
|
|
130
|
+
`--intake-question`, then declare the state:
|
|
131
|
+
```bash
|
|
132
|
+
strict-spec-cli roadmap-defer <milestone-id> --reason "<the unmatured precondition>"
|
|
133
|
+
```
|
|
134
|
+
This keeps the milestone at its planned-change-derived status rather than
|
|
135
|
+
forcing `blocked`, and makes `roadmap-recommend` return a refine action for it
|
|
136
|
+
instead of recommending its placeholder work. Recommendation follows strict
|
|
137
|
+
roadmap order, so tell the user that a deferred milestone suppresses later
|
|
138
|
+
milestones' work until `/strict-roadmap-transition` with the `refine`
|
|
139
|
+
operation clears it, or its `pause` operation releases it. Never defer a
|
|
140
|
+
milestone merely because its detail is unwritten — that is authoring work,
|
|
141
|
+
not a deferred precondition — and never relax a required milestone field to
|
|
142
|
+
create one.
|
|
143
|
+
|
|
144
|
+
5. **Normalize roadmap state** — run:
|
|
145
|
+
```bash
|
|
146
|
+
strict-spec-cli roadmap-sync
|
|
147
|
+
```
|
|
148
|
+
Use this to regenerate canonical index state and reconcile roadmap status
|
|
149
|
+
with active and archived strict changes.
|
|
150
|
+
|
|
151
|
+
6. **Review the roadmap plan before handoff** — run `roadmap-status` after
|
|
152
|
+
sync, then review the edited roadmap files directly. Check for placeholders,
|
|
153
|
+
overbroad milestones, unclear dependencies, unverifiable done criteria, weak
|
|
154
|
+
planned-change detail, excessive planned change count, stale status values,
|
|
155
|
+
and current roadmap diagnostics. Fix safe structural or wording issues
|
|
156
|
+
immediately. If the review finds a product scope decision, dependency
|
|
157
|
+
decision, milestone split, or prioritization decision that requires the user,
|
|
158
|
+
stop and report the specific question instead of guessing.
|
|
159
|
+
|
|
160
|
+
7. **Summarize the result** — report the milestone set, the next planned change
|
|
161
|
+
candidates, and any roadmap diagnostics that still need human attention.
|
|
162
|
+
|
|
163
|
+
## Rules
|
|
164
|
+
|
|
165
|
+
- Keep all roadmap state under `.strict-spec-driven/roadmap/`
|
|
166
|
+
- Keep planned changes owned by exactly one milestone
|
|
167
|
+
- Keep milestone ids slug-only and stable once created; ordering comes from
|
|
168
|
+
the optional integer `order` field (use `/strict-roadmap-transition` with the
|
|
169
|
+
`reorder` operation), never from id prefixes or filenames. Legacy `NNNN-`
|
|
170
|
+
prefixed ids remain valid but do not mint new ones
|
|
171
|
+
- Keep each milestone to ten planned changes or fewer
|
|
172
|
+
- Use `roadmap-generate milestone` for milestone YAML shape and
|
|
173
|
+
`roadmap-generate planned-change` for standalone planned-change artifacts;
|
|
174
|
+
never hand-pick planned-change filenames — the CLI owns the canonical
|
|
175
|
+
`<milestone-id>-<planned-change-id>.yaml` naming and `roadmap-sync
|
|
176
|
+
--fix-names` repairs misnamed files
|
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: strict-roadmap-recommend
|
|
3
|
+
description: Recommend the next strict roadmap-backed change, then scaffold it as a normal strict change without extra user interaction.
|
|
4
|
+
metadata:
|
|
5
|
+
skill_id: strict_roadmap_recommend
|
|
6
|
+
author: strict-spec-driven
|
|
7
|
+
type: agent_skill
|
|
8
|
+
version: 1.0.0
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
You are helping the user choose the next strict roadmap-backed change and turn
|
|
12
|
+
that recommendation into a normal strict change without pausing for human
|
|
13
|
+
confirmation during the recommend step.
|
|
14
|
+
|
|
15
|
+
## This Skill's Commands
|
|
16
|
+
|
|
17
|
+
If you cannot remember the exact command used by this skill, look it up here
|
|
18
|
+
before running anything. Do not guess.
|
|
19
|
+
|
|
20
|
+
```yaml
|
|
21
|
+
check-workflow-state: strict-spec-cli check-workflow-state
|
|
22
|
+
roadmap-status: strict-spec-cli roadmap-status
|
|
23
|
+
roadmap-recommend: strict-spec-cli roadmap-recommend [--milestone <milestone-id>] [--allow-unrefined] [--create]
|
|
24
|
+
generate: strict-spec-cli generate <change-name> <proposal|design|questions|tasks|delta-spec|delta-tech> --<named-args>
|
|
25
|
+
ready: strict-spec-cli ready <change-name>
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Roadmap Linking Rules
|
|
29
|
+
|
|
30
|
+
- Milestone ownership is defined by `planned_change.milestone`.
|
|
31
|
+
- Do not expect milestone files to list standalone planned-change file paths.
|
|
32
|
+
- Use `roadmap-status` output to locate planned-change source files; each
|
|
33
|
+
`plannedChanges[]` entry reports its `path`.
|
|
34
|
+
- Treat filenames as helpful conventions only. `planned_change.id` and
|
|
35
|
+
`planned_change.milestone` are the source of truth.
|
|
36
|
+
- If `roadmap-status` reports legacy inline milestone `planned_changes`, stop
|
|
37
|
+
and materialize them before recommending work.
|
|
38
|
+
|
|
39
|
+
## Roadmap Hint Parameters
|
|
40
|
+
|
|
41
|
+
When the user supplies a roadmap hint or parameter with the request, treat it as
|
|
42
|
+
a milestone selector before running the recommendation command.
|
|
43
|
+
|
|
44
|
+
- If the hint is an exact milestone id, use it directly.
|
|
45
|
+
- If the hint is only a number, resolve it to the milestone whose id has the
|
|
46
|
+
matching numeric prefix after ignoring leading zeros. For example, `5`
|
|
47
|
+
resolves to a single milestone id such as `0005-migration-and-self-hosting`
|
|
48
|
+
when that is the only milestone with numeric prefix `5`.
|
|
49
|
+
- If the hint is not numeric, first try an exact milestone id match, then a
|
|
50
|
+
case-insensitive substring match against milestone id or title.
|
|
51
|
+
- Use `.strict-spec-driven/roadmap/INDEX.yaml` or `roadmap-status` only to
|
|
52
|
+
resolve the milestone selector. Do not inspect broad planned-change context
|
|
53
|
+
before running the scripted recommendation.
|
|
54
|
+
- If the hint matches zero milestones or more than one milestone, stop and
|
|
55
|
+
report the ambiguity. Do not manually choose a planned change.
|
|
56
|
+
- After resolving the hint to exactly one milestone id, run
|
|
57
|
+
`strict-spec-cli roadmap-recommend --milestone <resolved-milestone-id> --create` and
|
|
58
|
+
treat that scripted result as authoritative.
|
|
59
|
+
|
|
60
|
+
## CLI-Only YAML Authoring Protocol
|
|
61
|
+
|
|
62
|
+
Every mutation of repository-owned YAML in this skill goes through the strict
|
|
63
|
+
CLI. This skill writes `change-planning-state`, `change-delta-state`. Before
|
|
64
|
+
the first mutation run `strict-spec-cli yaml-authoring-protocol
|
|
65
|
+
<artifact-kind>` for each of them: that command reports the ordered authoring
|
|
66
|
+
steps, the owning command for each operation, and the bundled schema and
|
|
67
|
+
example keys with their cache-resolved paths, bound to the artifact kind and
|
|
68
|
+
current where a copy would go stale. Validate the result with `strict-spec-cli
|
|
69
|
+
verify <change-name>`.
|
|
70
|
+
|
|
71
|
+
**Stop rather than edit YAML directly.** When a required command, argument, or
|
|
72
|
+
artifact kind is unavailable, stop and report the missing capability. Editing
|
|
73
|
+
the YAML directly, writing a raw payload, or scripting around the CLI is never
|
|
74
|
+
an available fallback, and an unavailable command is a reason to stop rather
|
|
75
|
+
than a reason to improvise.
|
|
76
|
+
|
|
77
|
+
## Preferred Human Language
|
|
78
|
+
|
|
79
|
+
Comply with `preferred_human_language` from `.strict-spec-driven/config.yaml` —
|
|
80
|
+
the user's common human language, not a programming language — for all
|
|
81
|
+
user-facing and generated operator-facing text, unless that file is absent or
|
|
82
|
+
the active user message asks otherwise.
|
|
83
|
+
|
|
84
|
+
## Roadmap-Backed Intake Evidence
|
|
85
|
+
|
|
86
|
+
Apply the same plain change-intake checklist used by proposal skills, but treat
|
|
87
|
+
the selected roadmap data as first-class evidence. The selected standalone
|
|
88
|
+
planned-change `summary`, `details`, `depends_on`, labels, and owning milestone
|
|
89
|
+
`details` can answer checklist items. Carry those answers into
|
|
90
|
+
generated proposal, design, task, question, and delta artifacts instead of
|
|
91
|
+
asking the human again.
|
|
92
|
+
|
|
93
|
+
Preserve the existing rule that `roadmap-recommend` chooses exactly one eligible
|
|
94
|
+
planned change through the scripted command; do not manually select another
|
|
95
|
+
candidate. Do not mutate roadmap planned-change files during proposal creation
|
|
96
|
+
except through the existing roadmap workflows.
|
|
97
|
+
|
|
98
|
+
When roadmap detail is thin or focused spec/code search fails to identify
|
|
99
|
+
affected behavior, create `questions.yaml.open` entries before implementation.
|
|
100
|
+
Human-facing question text, context, impact, recommendations, options, and
|
|
101
|
+
summaries must use `preferred_human_language`. The open-question impact must
|
|
102
|
+
be included in `questions.yaml.open[*].context`, because the `questions`
|
|
103
|
+
generator has no `--impact` or `--recommendation` flags. The context must name
|
|
104
|
+
whether the uncertainty affects proposal scope, spec delta, implementation
|
|
105
|
+
files, tests, dependencies, or technical standards.
|
|
106
|
+
|
|
107
|
+
## Spec and Technical Artifact Routing
|
|
108
|
+
|
|
109
|
+
A strict change may legitimately have no delta spec. Do not invent a
|
|
110
|
+
`delta-spec` just to satisfy artifact shape.
|
|
111
|
+
|
|
112
|
+
- Create `delta-spec` artifacts only when the roadmap-backed change modifies
|
|
113
|
+
user-observable behavior or another requirement that belongs in a strict YAML
|
|
114
|
+
main spec.
|
|
115
|
+
- For purely technical roadmap-backed changes such as refactors, build or test
|
|
116
|
+
tooling, repository maintenance, architecture constraints, scripts,
|
|
117
|
+
validation flows, archive behavior, or skill guidance, leave `specs/` empty
|
|
118
|
+
when no main spec requirement changes.
|
|
119
|
+
- If a technical-only change alters, adds, or retires an engineering rule,
|
|
120
|
+
create a `delta-tech` artifact for the affected standard. If it only complies
|
|
121
|
+
with existing standards, leave `tech/` absent too.
|
|
122
|
+
- A technical-only change still needs complete workflow tasks: script or
|
|
123
|
+
tooling edits when applicable, focused tests, validation commands,
|
|
124
|
+
`ready`/`verify` checks, and archive-readiness or archive-merge checks when
|
|
125
|
+
the change affects artifacts consumed by archive.
|
|
126
|
+
|
|
127
|
+
## Steps
|
|
128
|
+
|
|
129
|
+
Before any other step, run `strict-spec-cli check-workflow-state`. If `.strict-spec-driven/` is
|
|
130
|
+
missing, stop immediately and tell the user to run `/strict-spec-init`. Do not
|
|
131
|
+
run `init` from this skill.
|
|
132
|
+
|
|
133
|
+
1. **Obtain the scripted recommendation and its change first** — if the user
|
|
134
|
+
supplied a roadmap hint, resolve it with the Roadmap Hint Parameters rules,
|
|
135
|
+
then run
|
|
136
|
+
`strict-spec-cli roadmap-recommend --milestone <resolved-milestone-id> --create`.
|
|
137
|
+
Without a user roadmap hint, run `strict-spec-cli roadmap-recommend --create`.
|
|
138
|
+
The change is created in the same call that recommends it: `--create` makes
|
|
139
|
+
the command create the empty change container, named exactly the
|
|
140
|
+
recommended planned change id, only when it recommends one, so the planned
|
|
141
|
+
change you explain is the change that exists. Run the
|
|
142
|
+
scripted recommendation command before reading broad roadmap context,
|
|
143
|
+
selecting work, or opening candidate planned-change files, and treat the
|
|
144
|
+
command's selected planned change as authoritative for the recommendation
|
|
145
|
+
step. The scripted result already accounts for active strict change
|
|
146
|
+
conflicts, invalid roadmap state, dependency blockers, and milestones
|
|
147
|
+
awaiting refinement. The concise JSON output includes a `status` field with
|
|
148
|
+
one of four values. Branch on `status`:
|
|
149
|
+
- `"roadmap-error"` — the roadmap has validation diagnostics, or a
|
|
150
|
+
`--milestone` selector named a milestone awaiting refinement. Surface the
|
|
151
|
+
JSON diagnostics and stop. Suggest running `roadmap-status` for details.
|
|
152
|
+
When the diagnostic names `--allow-unrefined`, report the refusal and the
|
|
153
|
+
override to the user; **never supply `--allow-unrefined` yourself.** The
|
|
154
|
+
gate exists to stop automation building a placeholder, and an override an
|
|
155
|
+
agent adds on its own is not a gate.
|
|
156
|
+
- `"refine-milestone"` — the earliest-ordered incomplete milestone is
|
|
157
|
+
deliberately deferred, so no implementation work is recommended. Do **not**
|
|
158
|
+
scaffold a strict change. Surface `refineAction` with the milestone id and
|
|
159
|
+
the recorded `reason`, and tell the user their options: elaborate that
|
|
160
|
+
milestone through `/strict-roadmap-transition` with the `refine`
|
|
161
|
+
operation, or run the reported `releaseWith` command to pause it so later
|
|
162
|
+
milestones' work becomes recommendable. Then stop.
|
|
163
|
+
- `"no-candidate"` — the roadmap is valid but no planned change is eligible
|
|
164
|
+
right now. Surface `candidateSummary` and the actionable `blockers[]`
|
|
165
|
+
entries with their `skipReasons`, then stop. If the concise output is not
|
|
166
|
+
enough to explain the blockers, rerun
|
|
167
|
+
`strict-spec-cli roadmap-recommend --details` or
|
|
168
|
+
`strict-spec-cli roadmap-recommend --milestone <resolved-milestone-id> --details`
|
|
169
|
+
and surface the full `candidates[].skipReasons`.
|
|
170
|
+
- `"recommended"` — check `createdChange`. When it is `null`, the change
|
|
171
|
+
could not be created — for example because active changes already fill
|
|
172
|
+
the limit; surface the command's diagnostics, which name the reason, the
|
|
173
|
+
commands that free a slot, and the rerun command, then stop, without
|
|
174
|
+
falling back to `propose` or inventing another name. Otherwise
|
|
175
|
+
`createdChange.name` is `<change-name>`; proceed to step 2.
|
|
176
|
+
The other three statuses create nothing.
|
|
177
|
+
Do not manually choose among planned changes; branch on `status`
|
|
178
|
+
instead of manually choosing among planned changes. Use the returned
|
|
179
|
+
recommendation `path` to open the exact standalone planned-change file you
|
|
180
|
+
are recommending from.
|
|
181
|
+
|
|
182
|
+
2. **Read targeted recommendation context** — after a successful scripted
|
|
183
|
+
recommendation, read only the files needed to explain and scaffold that
|
|
184
|
+
selected change:
|
|
185
|
+
- `.strict-spec-driven/config.yaml`
|
|
186
|
+
- `.strict-spec-driven/roadmap/INDEX.yaml`
|
|
187
|
+
- the owning milestone YAML file for the selected planned change
|
|
188
|
+
- the standalone planned-change YAML artifact reported by the
|
|
189
|
+
scripted recommendation result `path`
|
|
190
|
+
- `.strict-spec-driven/specs/INDEX.yaml`
|
|
191
|
+
- the strict YAML main specs the selected change is likely to touch, if any;
|
|
192
|
+
for a purely technical selected change, confirm from the spec index that no
|
|
193
|
+
main spec requirement is implicated instead of forcing one
|
|
194
|
+
- `roadmap-status` output only when needed to explain diagnostic context or
|
|
195
|
+
legacy inline planned-change state
|
|
196
|
+
- the owning milestone YAML file's `details` field, if present, as targeted
|
|
197
|
+
planning guidance for the recommended change
|
|
198
|
+
- the selected standalone planned-change artifact's `details` field, if the
|
|
199
|
+
planned change comes from a split-file artifact
|
|
200
|
+
Use the selected roadmap fields as change-intake evidence before generating
|
|
201
|
+
artifacts. If the roadmap data and focused repository search do not identify
|
|
202
|
+
scope, specs, implementation, tests, dependencies, or technical standards,
|
|
203
|
+
record blocking questions rather than guessing.
|
|
204
|
+
|
|
205
|
+
3. **Present a checkpoint before populating the change** — summarize:
|
|
206
|
+
- the change name, which is `createdChange.name` — the planned change id
|
|
207
|
+
itself — and never a name you choose
|
|
208
|
+
- the milestone it comes from
|
|
209
|
+
- the standalone planned-change file path from the scripted recommendation result
|
|
210
|
+
- why it is the best next step
|
|
211
|
+
- which strict specs are likely to change, or that no strict spec changes
|
|
212
|
+
are expected for a technical-only change
|
|
213
|
+
- any open questions that would need to go into the strict change proposal
|
|
214
|
+
Include any intake questions that result from thin roadmap details, missing
|
|
215
|
+
implementation/test/spec impact, dependency uncertainty, or technical
|
|
216
|
+
standard uncertainty.
|
|
217
|
+
Do not stop for human confirmation here — use the checkpoint only to explain
|
|
218
|
+
the recommendation and the change step 1 created before populating it.
|
|
219
|
+
|
|
220
|
+
4. **Populate the created change immediately** — step 1 already created
|
|
221
|
+
the change; do not run `roadmap-recommend` again. Use `createdChange.name` as
|
|
222
|
+
`<change-name>` in every later command. Roadmap status matches a change to
|
|
223
|
+
its planned change by directory name alone, so a change named anything else
|
|
224
|
+
is never marked complete when it archives.
|
|
225
|
+
Populate normal strict change artifacts under
|
|
226
|
+
`.strict-spec-driven/changes/<change-name>/` in this exact order. Generate
|
|
227
|
+
every supported artifact, including `tasks.yaml`, with direct named
|
|
228
|
+
arguments, and do not create JSON payload files.
|
|
229
|
+
- `strict-spec-cli generate <change-name> proposal --what "..." --why "..." --in "..." --out "..." --unchanged "..." --milestone <milestone-id> --planned-change <change-name>`
|
|
230
|
+
— the planned change id and the change name are the same value, and the
|
|
231
|
+
command refuses a link whose planned change is absent, owned by another
|
|
232
|
+
milestone, or named differently from the change
|
|
233
|
+
- `strict-spec-cli generate <change-name> design --approach "..." --decision <decision-id> --decision-text "..." --rationale "..."`
|
|
234
|
+
- populate `tasks.yaml` with `strict-spec-cli generate <change-name> tasks`, **one invocation per task** so no task list is hand-written:
|
|
235
|
+
- read `strict-spec-cli generate --help --json` (or `--help`) first.
|
|
236
|
+
Choose `--implementation`, `--testing`, or `--verification` for the
|
|
237
|
+
corresponding fixed section. Each takes no value and opens one task group;
|
|
238
|
+
following task fields belong to that group. Repeat a selector for each task
|
|
239
|
+
in a multi-task call. Removal and gate flags are global and need no selector.
|
|
240
|
+
- first task: `strict-spec-cli generate <change-name> tasks --implementation --task <task-id> --text "..." [--status pending|complete] [--command "..."]` — the task list starts absent and is created by this first call, so there are no placeholder tasks to remove
|
|
241
|
+
- each later task: one selector/`--task`/`--text` group per call
|
|
242
|
+
- restating an existing `(section, task-id)` is a field-level merge — it overwrites only the fields you pass, so a task's `status: complete` and `command` survive a text-only edit; a brand-new task still needs `--text`
|
|
243
|
+
- delete a task with `--remove <task-id>` (a repeatable global flag); to move a task between sections, `--remove` it and restate it under the new section in the same call
|
|
244
|
+
- place a task with `--before <task-id>` or `--after <task-id>` instead of letting
|
|
245
|
+
it append; task order is the order `apply` walks, so a task that must run before
|
|
246
|
+
existing pending work is anchored rather than appended, and naming an existing
|
|
247
|
+
task id with an anchor moves it there while preserving its `status` and
|
|
248
|
+
`command`
|
|
249
|
+
- values may begin with a dash via `--text=...` or `--command=...` (the `--flag=value` form)
|
|
250
|
+
- set the gates with `--validation-task <task-id>` and `--unit-test-task <task-id>`; both must reference `Testing` task ids
|
|
251
|
+
- the command upserts by `(section, task-id)` and is idempotent; each call returns `{valid, ready, diagnostics}` — `valid` reports write success and `ready` reports completeness, so a `ready: false` result naming empty sections or unset gates is not a failed write, keep adding tasks and confirm with `verify` before handoff
|
|
252
|
+
- cover concrete Implementation tasks for script, tooling, generated asset, documentation, or skill-prompt edits in scope; Testing tasks with runnable validation and unit/regression commands; and Verification tasks for `ready`, `verify`, and archive-readiness or archive-merge checks when relevant
|
|
253
|
+
- `strict-spec-cli generate <change-name> questions --open <question-id> --question "..." --context "..."`
|
|
254
|
+
Include impact analysis and recommendation/options in `--context`; do
|
|
255
|
+
not pass nonexistent `--impact` or `--recommendation` flags.
|
|
256
|
+
- only when the change has observable spec impact, `strict-spec-cli generate <change-name> delta-spec --target-spec <spec-id> --operation ADDED --requirement <requirement-id> --strength MUST --statement "..." --scenario <scenario-id> --given "..." --when "..." --then "..."` for each target spec
|
|
257
|
+
One requirement can include multiple scenario groups by repeating
|
|
258
|
+
`--scenario`. A later compatible call for the same operation, requirement
|
|
259
|
+
id, strength, and statement appends new scenario ids and remains idempotent
|
|
260
|
+
for equivalent scenarios. Scenarios append on their own, so nothing needs rebuilding or hand-editing to add one. Drop a single scenario with `--remove-scenario <requirement-id>:<scenario-id>` and a whole requirement with `--remove-requirement <id>`.
|
|
261
|
+
- when the change alters a technical standard, generate delta tech under `.strict-spec-driven/changes/<change-name>/tech/` with `generate <change-name> delta-tech --target-standard <id> ...`; for user interface work, capture observable UI behavior as delta-spec requirements and UI engineering and design rules as a `ui`-category technical standard, with visual fidelity governed by visual-regression snapshots rather than inlined
|
|
262
|
+
- if the change has no observable spec impact, leave the `specs/` directory
|
|
263
|
+
empty rather than inventing a prose-only file
|
|
264
|
+
Prefer one invocation per supported generated artifact (or per target spec
|
|
265
|
+
for delta specs).
|
|
266
|
+
Do this without copying full milestone-level planning metadata into the
|
|
267
|
+
change. If the selected planned change is a standalone artifact, keep that
|
|
268
|
+
artifact as the canonical home for its status, summary, dependencies, and
|
|
269
|
+
details. If the owning milestone has a `details` field or the standalone
|
|
270
|
+
planned-change artifact has a `details` field, extract only the portions
|
|
271
|
+
relevant to the selected planned change and use them as targeted planning
|
|
272
|
+
guidance when generating the change artifacts. Do not copy the full milestone
|
|
273
|
+
plan or the full planned-change details — only extract guidance relevant to
|
|
274
|
+
this one planned change. If `details` is absent, proceed normally.
|
|
275
|
+
|
|
276
|
+
5. **Run the proposal checkpoint and validate the proposed strict change** —
|
|
277
|
+
before running `ready`, perform a proposal checkpoint over the populated
|
|
278
|
+
change artifacts against the selected roadmap planned change, relevant main
|
|
279
|
+
specs, technical standards, and project constraints. Check for decision-ready
|
|
280
|
+
detail in scope, unchanged behavior, design decisions, task coverage,
|
|
281
|
+
unresolved-question impact, delta spec scenarios, and delta tech use when
|
|
282
|
+
applicable. When no delta specs are appropriate, replace delta spec scenario
|
|
283
|
+
review with a justified absence check for the technical-only change. For technical-only changes, verify that
|
|
284
|
+
tasks cover scripts or tooling, validation commands, `ready`/`verify`, and
|
|
285
|
+
archive or archive-merge checks when archive behavior is affected. The checkpoint should fix safe,
|
|
286
|
+
in-scope documentation gaps immediately, and record real ambiguity in
|
|
287
|
+
`questions.yaml` without expanding scope or answering unresolved human
|
|
288
|
+
questions.
|
|
289
|
+
|
|
290
|
+
Then run:
|
|
291
|
+
```bash
|
|
292
|
+
strict-spec-cli ready <change-name>
|
|
293
|
+
```
|
|
294
|
+
Use `ready` as the proposal handoff validation for deterministic blockers.
|
|
295
|
+
Do not run a separate full verify command at proposal time solely to
|
|
296
|
+
rediscover expected pending implementation tasks. Do not stop for human
|
|
297
|
+
question resolution during `strict-roadmap-recommend`; leave open questions
|
|
298
|
+
for `strict-spec-auto` or `strict-spec-apply` to surface before
|
|
299
|
+
implementation.
|
|
300
|
+
|
|
301
|
+
6. **Automatically continue with implementation** — immediately hand off to the
|
|
302
|
+
`/strict-spec-auto <change-name>` skill with the populated change scaffold
|
|
303
|
+
to carry the recommended change through the rest of the strict lifecycle
|
|
304
|
+
(review, apply, verify, archive). If `questions.yaml.open` is non-empty,
|
|
305
|
+
`strict-spec-auto` will surface those questions before implementation
|
|
306
|
+
begins. Do not offer a choice or ask the user which workflow to use — hand
|
|
307
|
+
off to `strict-spec-auto` and follow its guidance, however the running
|
|
308
|
+
harness loads it, relying on its populated-scaffold resume path instead of
|
|
309
|
+
regenerating the planning artifacts.
|
|
310
|
+
|
|
311
|
+
## Rules
|
|
312
|
+
|
|
313
|
+
- Recommend only work that already exists under `.strict-spec-driven/roadmap/`
|
|
314
|
+
- Keep `.strict-spec-driven/roadmap/` as the canonical home of milestone-level
|
|
315
|
+
and planned-change planning metadata
|
|
316
|
+
- Use the standalone planned-change artifact path from the scripted
|
|
317
|
+
recommendation result when opening or quoting roadmap work
|
|
318
|
+
- Convert exactly one planned change into one normal strict change scaffold
|
|
319
|
+
- Do not pause for user confirmation during the recommend step
|
|
320
|
+
- Do not manually choose among eligible roadmap planned changes once the
|
|
321
|
+
scripted recommendation command returns a recommendation
|