@llman-sdd/core 0.10.1 → 0.11.0
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/package.json +7 -7
- package/src/archive/freeze.ts +43 -4
- package/src/archive/frozenCard.ts +62 -5
- package/src/change/lifecycle.ts +55 -59
- package/src/config/schema.ts +0 -13
- package/src/config/surface.ts +2 -12
- package/src/context/sddState.ts +23 -18
- package/src/index.ts +7 -36
- package/src/init/defaultConfig.ts +2 -13
- package/src/init/init.ts +50 -19
- package/src/init/skillCheck.ts +60 -0
- package/src/project/migrations.ts +81 -9
- package/src/spec/authoring.ts +5 -1
- package/src/templates/skills.ts +15 -12
- package/templates/zh-Hans/skills/llman-sdd-apply-cycle.md +5 -5
- package/templates/zh-Hans/skills/llman-sdd-apply.md +8 -9
- package/templates/zh-Hans/skills/llman-sdd-arch-review.md +1 -1
- package/templates/zh-Hans/skills/llman-sdd-archive.md +13 -14
- package/templates/zh-Hans/skills/llman-sdd-continue.md +3 -3
- package/templates/zh-Hans/skills/llman-sdd-draft.md +3 -3
- package/templates/zh-Hans/skills/llman-sdd-explore.md +2 -3
- package/templates/zh-Hans/skills/llman-sdd-ff.md +3 -2
- package/templates/zh-Hans/skills/llman-sdd-graph.md +1 -1
- package/templates/zh-Hans/skills/llman-sdd-propose.md +8 -9
- package/templates/zh-Hans/skills/llman-sdd-quick.md +4 -5
- package/templates/zh-Hans/skills/llman-sdd-research.md +1 -1
- package/templates/zh-Hans/skills/llman-sdd-specs-compact.md +4 -3
- package/templates/zh-Hans/skills/llman-sdd-validate.md +2 -2
- package/templates/zh-Hans/skills/llman-sdd-verify.md +3 -3
- package/templates/zh-Hans/skills/llman-sdd-wayfinder.md +2 -2
- package/templates/zh-Hans/units/skills/git-native-flow.md +8 -8
- package/templates/zh-Hans/units/skills/stage-guard.md +3 -3
- package/templates/zh-Hans/units/skills/structured-protocol.md +1 -1
- package/templates/zh-Hans/units/skills/validation-hints.md +3 -3
- package/src/context/indexStore.ts +0 -171
- package/src/context/retrieve.ts +0 -332
- package/src/context/tree.ts +0 -112
- package/templates/zh-Hans/units/skills/index-fallback.md +0 -1
package/src/init/init.ts
CHANGED
|
@@ -15,6 +15,8 @@ import { writeSddState } from '../context/sddState.ts';
|
|
|
15
15
|
import { DEFAULT_LOCALE, localeFallbacks, normalizeLocale } from '../locale.ts';
|
|
16
16
|
import { renderTemplate } from '../templates/engine.ts';
|
|
17
17
|
import {
|
|
18
|
+
MANUAL_INVOCATION_SKILLS,
|
|
19
|
+
OPENAI_EXPLICIT_POLICY,
|
|
18
20
|
buildTemplateVars,
|
|
19
21
|
enforceEthicsGovernance,
|
|
20
22
|
loadLocaleResource,
|
|
@@ -49,7 +51,32 @@ export function updateFileWithMarkers(content: string, body: string): string {
|
|
|
49
51
|
return `${MARKER_START}\n\n${body}\n${MARKER_END}\n\n${content}`;
|
|
50
52
|
}
|
|
51
53
|
|
|
52
|
-
/**
|
|
54
|
+
/** Drop a root AGENTS.md managed block. `null` means the file should be removed. */
|
|
55
|
+
export function stripManagedBlock(content: string): string | null {
|
|
56
|
+
const start = content.indexOf(MARKER_START);
|
|
57
|
+
const end = content.indexOf(MARKER_END);
|
|
58
|
+
if (start === -1 && end === -1) return content;
|
|
59
|
+
if (start === -1 || end === -1 || end < start) {
|
|
60
|
+
if (start !== -1 && end !== -1 && end < start) {
|
|
61
|
+
throw new Error('Invalid marker state: end marker appears before start marker.');
|
|
62
|
+
}
|
|
63
|
+
return content;
|
|
64
|
+
}
|
|
65
|
+
const before = content.slice(0, start);
|
|
66
|
+
let after = content.slice(end + MARKER_END.length);
|
|
67
|
+
if (before === '') after = after.replace(/^(?:\r?\n)+/u, '');
|
|
68
|
+
else after = after.replace(/^(?:\r?\n)/u, '');
|
|
69
|
+
const rest = before + after;
|
|
70
|
+
if (rest.trim() === '') return null;
|
|
71
|
+
return rest.endsWith('\n') ? rest : `${rest}\n`;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function stripRootAgents(io: InitIo): void {
|
|
75
|
+
if (!io.exists('AGENTS.md')) return;
|
|
76
|
+
const next = stripManagedBlock(io.readText('AGENTS.md'));
|
|
77
|
+
if (next === null) io.remove('AGENTS.md');
|
|
78
|
+
else if (next !== io.readText('AGENTS.md')) io.writeText('AGENTS.md', next);
|
|
79
|
+
}
|
|
53
80
|
function separatorAfterEndMarker(suffix: string): string {
|
|
54
81
|
const br = /^\r?\n/u.exec(suffix);
|
|
55
82
|
if (br === null) return suffix === '' ? '\n' : `\n\n${suffix}`;
|
|
@@ -63,7 +90,7 @@ export const TEMPLATES_ROOT = join(import.meta.dirname, '..', '..', 'templates')
|
|
|
63
90
|
/** Repo-root-relative filesystem effects needed by the init flow. */
|
|
64
91
|
export type InitIo = Pick<
|
|
65
92
|
FsPort,
|
|
66
|
-
'exists' | 'readText' | 'writeText' | 'mkdirp' | 'listDir' | 'removeDir'
|
|
93
|
+
'exists' | 'readText' | 'writeText' | 'mkdirp' | 'listDir' | 'removeDir' | 'remove'
|
|
67
94
|
>;
|
|
68
95
|
|
|
69
96
|
function writeDefaultConfig(io: InitIo, locale: string): void {
|
|
@@ -124,7 +151,7 @@ export interface InitResult {
|
|
|
124
151
|
|
|
125
152
|
const SKILLS_BASE = '.agents/skills';
|
|
126
153
|
|
|
127
|
-
/** Managed AGENTS.md
|
|
154
|
+
/** Managed llmanspec/AGENTS.md block, plus removal of a root AGENTS.md block. */
|
|
128
155
|
function writeManagedBlocks(
|
|
129
156
|
io: InitIo,
|
|
130
157
|
templates: TemplateIo,
|
|
@@ -133,22 +160,22 @@ function writeManagedBlocks(
|
|
|
133
160
|
): void {
|
|
134
161
|
const vars = buildTemplateVars(config, version);
|
|
135
162
|
const locales = localeFallbacks(config.locale);
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
);
|
|
147
|
-
}
|
|
148
|
-
const existing = io.exists(agentsPath) ? io.readText(agentsPath) : '';
|
|
149
|
-
const body = renderTemplate(stubRaw, new Map(), vars);
|
|
150
|
-
io.writeText(agentsPath, updateFileWithMarkers(existing, body));
|
|
163
|
+
const stubRaw = loadLocaleResource(
|
|
164
|
+
templates,
|
|
165
|
+
TEMPLATES_ROOT,
|
|
166
|
+
locales,
|
|
167
|
+
'llmanspec-agents-stub.md',
|
|
168
|
+
);
|
|
169
|
+
if (stubRaw === null) {
|
|
170
|
+
throw new Error(
|
|
171
|
+
`template resource missing: llmanspec-agents-stub.md (locales tried: ${locales.join(', ')})`,
|
|
172
|
+
);
|
|
151
173
|
}
|
|
174
|
+
const agentsPath = 'llmanspec/AGENTS.md';
|
|
175
|
+
const existing = io.exists(agentsPath) ? io.readText(agentsPath) : '';
|
|
176
|
+
const body = renderTemplate(stubRaw, new Map(), vars);
|
|
177
|
+
io.writeText(agentsPath, updateFileWithMarkers(existing, body));
|
|
178
|
+
stripRootAgents(io);
|
|
152
179
|
}
|
|
153
180
|
|
|
154
181
|
export function runInit(
|
|
@@ -187,7 +214,7 @@ export function runInit(
|
|
|
187
214
|
io.writeText(`${CHANGES_DIR}/archive/.gitkeep`, '');
|
|
188
215
|
}
|
|
189
216
|
|
|
190
|
-
// 3) AGENTS.md managed
|
|
217
|
+
// 3) llmanspec/AGENTS.md managed block; strip a root AGENTS.md block if present.
|
|
191
218
|
writeManagedBlocks(io, templates, config, opts.version);
|
|
192
219
|
const vars = buildTemplateVars(config, opts.version);
|
|
193
220
|
const skillTemplates = loadSkillTemplates(templates, TEMPLATES_ROOT, config, vars);
|
|
@@ -217,6 +244,10 @@ export function runInit(
|
|
|
217
244
|
const dirName = t.name.replace(/\.md$/u, '');
|
|
218
245
|
io.mkdirp(`${SKILLS_BASE}/${dirName}`);
|
|
219
246
|
io.writeText(`${SKILLS_BASE}/${dirName}/SKILL.md`, `${t.content.trimEnd()}\n`);
|
|
247
|
+
if (MANUAL_INVOCATION_SKILLS.includes(dirName)) {
|
|
248
|
+
io.mkdirp(`${SKILLS_BASE}/${dirName}/agents`);
|
|
249
|
+
io.writeText(`${SKILLS_BASE}/${dirName}/agents/openai.yaml`, OPENAI_EXPLICIT_POLICY);
|
|
250
|
+
}
|
|
220
251
|
}
|
|
221
252
|
|
|
222
253
|
return { skills: skillTemplates.map((t) => t.name.replace(/\.md$/u, '')), removed, configPath };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `init --check`: installed llman-sdd skill versions must share the CLI's
|
|
3
|
+
* major.minor. Patch may differ. Missing or unreadable versions fail.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
const VERSION_RE = /version:\s*["']?(\d+\.\d+(?:\.\d+)?)["']?/u;
|
|
7
|
+
|
|
8
|
+
export function readSkillVersion(markdown: string): string | null {
|
|
9
|
+
if (!markdown.startsWith('---')) return null;
|
|
10
|
+
const end = markdown.indexOf('\n---', 3);
|
|
11
|
+
if (end < 0) return null;
|
|
12
|
+
const match = VERSION_RE.exec(markdown.slice(0, end));
|
|
13
|
+
return match?.[1] ?? null;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function part(version: string, index: number): number {
|
|
17
|
+
return Math.trunc(Number(version.split('.')[index] ?? '0')) || 0;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/** Compatible when major and minor both match. */
|
|
21
|
+
export function skillVersionCompatible(skillVersion: string, cliVersion: string): boolean {
|
|
22
|
+
return (
|
|
23
|
+
part(skillVersion, 0) === part(cliVersion, 0) && part(skillVersion, 1) === part(cliVersion, 1)
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface SkillVersionCheck {
|
|
28
|
+
ok: boolean;
|
|
29
|
+
message: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export function checkSkillVersions(
|
|
33
|
+
skills: readonly { name: string; markdown: string }[],
|
|
34
|
+
cliVersion: string,
|
|
35
|
+
): SkillVersionCheck {
|
|
36
|
+
if (skills.length === 0) {
|
|
37
|
+
return {
|
|
38
|
+
ok: false,
|
|
39
|
+
message: `no llman-sdd skills installed; run \`llman-sdd init --update\``,
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
const problems: string[] = [];
|
|
43
|
+
for (const skill of skills) {
|
|
44
|
+
const found = readSkillVersion(skill.markdown);
|
|
45
|
+
if (found === null) {
|
|
46
|
+
problems.push(`${skill.name}: metadata.version missing`);
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
if (!skillVersionCompatible(found, cliVersion)) {
|
|
50
|
+
problems.push(`${skill.name}: ${found} is outside ${cliVersion} (same major.minor required)`);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
if (problems.length > 0) {
|
|
54
|
+
return {
|
|
55
|
+
ok: false,
|
|
56
|
+
message: `${problems.join('\n')}\nrun \`llman-sdd init --update\``,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
return { ok: true, message: `skill versions match llman-sdd ${cliVersion}` };
|
|
60
|
+
}
|
|
@@ -31,8 +31,7 @@ export const MIGRATIONS: readonly MigrationDoc[] = [
|
|
|
31
31
|
{
|
|
32
32
|
title: 'Governance metadata retirement (`# reviewed-through:` stamp & `# scope:` header)',
|
|
33
33
|
steps: [
|
|
34
|
-
'
|
|
35
|
-
'Run `llman-sdd project migrate strip-legacy-headers` to strip legacy `# scope:` / `# reviewed-through:` / `# capability:` header comment lines (idempotent).',
|
|
34
|
+
'Delete leftover `# scope:`, `# reviewed-through:`, and `# capability:` header comment lines under `llmanspec/specs/**` by hand. The one-shot command was removed and has no alias.',
|
|
36
35
|
'Run `llman-sdd init --update` to refresh the managed AGENTS blocks and agent skills.',
|
|
37
36
|
'Run `llman-sdd validate --all --strict` — it must pass.',
|
|
38
37
|
],
|
|
@@ -51,8 +50,7 @@ export const MIGRATIONS: readonly MigrationDoc[] = [
|
|
|
51
50
|
{
|
|
52
51
|
title: 'Retire `# capability:` header; assign spec ids from paths (r101)',
|
|
53
52
|
steps: [
|
|
54
|
-
'
|
|
55
|
-
'Run `llman-sdd project migrate strip-legacy-headers` to remove `# capability:` (and any remaining `# scope:` / `# reviewed-through:`) lines.',
|
|
53
|
+
'Delete leftover `# capability:` (and any remaining `# scope:` / `# reviewed-through:`) lines under `llmanspec/specs/**` by hand. The one-shot command was removed and has no alias.',
|
|
56
54
|
'Ensure each `功能:` / `Feature:` title equals the assigned spec id (`llman-sdd list --specs` for ids).',
|
|
57
55
|
'Run `llman-sdd init --update` to refresh managed skills and feature-contract guidance.',
|
|
58
56
|
'Run `llman-sdd validate --all --strict` — it must pass.',
|
|
@@ -100,12 +98,12 @@ export const MIGRATIONS: readonly MigrationDoc[] = [
|
|
|
100
98
|
steps: [
|
|
101
99
|
'Optionally pin `locale: zh-Hans` in `llmanspec/config.yaml` — `en` and any unknown value now render Chinese.',
|
|
102
100
|
'Run `llman-sdd init --update` and commit the refreshed managed AGENTS blocks and `.agents/skills/**`.',
|
|
103
|
-
'Re-run `llman-sdd spec
|
|
101
|
+
'Re-run `llman-sdd spec new <name>` where a skeleton dialect matters — it now emits `# language: zh-CN`.',
|
|
104
102
|
'Run `llman-sdd validate --all --strict` — it must pass.',
|
|
105
103
|
],
|
|
106
104
|
checks: [
|
|
107
105
|
'No English-rendered managed block or skill remains after `init --update`.',
|
|
108
|
-
'`llman-sdd spec
|
|
106
|
+
'`llman-sdd spec new <name>` emits `# language: zh-CN`.',
|
|
109
107
|
'A missing template resource makes `init` fail instead of silently skipping.',
|
|
110
108
|
],
|
|
111
109
|
},
|
|
@@ -116,10 +114,10 @@ export const MIGRATIONS: readonly MigrationDoc[] = [
|
|
|
116
114
|
'For a change that touches the contract, land and commit your `llmanspec/specs/**` edits on the bound branch before closing out.',
|
|
117
115
|
'Set `needs_specs_change: false` in `proposal.md` frontmatter only when the change genuinely needs no contract edit.',
|
|
118
116
|
'Keep `tasks.md` fully checked whenever the file exists.',
|
|
119
|
-
'Run `llman-sdd change
|
|
117
|
+
'Run `llman-sdd change archive <id>` — the gate runs before any merge and writes nothing on failure.',
|
|
120
118
|
],
|
|
121
119
|
checks: [
|
|
122
|
-
'`llman-sdd change
|
|
120
|
+
'`llman-sdd change archive <id>` on a spec-unlanded change fails with zero writes.',
|
|
123
121
|
'A change that landed its specs, or declared `needs_specs_change: false`, still closes out cleanly.',
|
|
124
122
|
],
|
|
125
123
|
},
|
|
@@ -167,6 +165,80 @@ export const MIGRATIONS: readonly MigrationDoc[] = [
|
|
|
167
165
|
},
|
|
168
166
|
],
|
|
169
167
|
},
|
|
168
|
+
{
|
|
169
|
+
version: '0.11.0',
|
|
170
|
+
items: [
|
|
171
|
+
{
|
|
172
|
+
title: 'Frozen cards normalized to single-document YAML (no `---` fences)',
|
|
173
|
+
steps: [
|
|
174
|
+
'Run `llman-sdd project migrate frozen-cards-unfence --dry-run` to preview the legacy fenced cards.',
|
|
175
|
+
'Run `llman-sdd project migrate frozen-cards-unfence` to rewrite them as fence-free single-document YAML (idempotent).',
|
|
176
|
+
'Drop any `check-yaml` exemption you added for `llmanspec/changes/archive/*.yaml` — stock pre-commit accepts the cards as-is.',
|
|
177
|
+
'Run `llman-sdd validate --all --strict` — it must pass.',
|
|
178
|
+
],
|
|
179
|
+
checks: [
|
|
180
|
+
'No `llmanspec/changes/archive/<YYYY-MM-DD>-<id>.yaml` card opens with a bare `---` line.',
|
|
181
|
+
'The stock `check-yaml` hook (no `--allow-multiple-documents`, no exclude) passes on the archive directory.',
|
|
182
|
+
'`llman-sdd graph --scope archived` shows the same frozen nodes and dependency edges as before.',
|
|
183
|
+
],
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
title: 'Index and context commands removed',
|
|
187
|
+
steps: [
|
|
188
|
+
'Stop calling `llman-sdd index` and `llman-sdd context`. Both are unknown commands and have no aliases.',
|
|
189
|
+
'Unset `LLMAN_SDD_INDEX_BACKEND`, `LLMAN_SDD_INDEX_CHAT_MODEL`, `LLMAN_SDD_INDEX_CHAT_API_HOST`, `LLMAN_SDD_INDEX_CHAT_API_KEY`, `LLMAN_SDD_INDEX_OPENAI_API_HOST`, and `LLMAN_SDD_INDEX_OPENAI_API_KEY` if you exported them.',
|
|
190
|
+
'Locate specs with `llman-sdd list --specs` and read the `.feature` files.',
|
|
191
|
+
'Leave `llmanspec/.context/pageindex/` in place if you want; nothing reads it. Delete that directory yourself when you no longer need it.',
|
|
192
|
+
'The version stamp moved to `llmanspec/.sdd-state.json`. An existing `llmanspec/.context/sdd-state.json` is still read until the next `llman-sdd init --update`, which writes only the new path and does not delete the old file.',
|
|
193
|
+
'Run `llman-sdd init --update` so installed skills stop mentioning index and context.',
|
|
194
|
+
],
|
|
195
|
+
checks: [
|
|
196
|
+
'`llman-sdd index` and `llman-sdd context` exit 2 as unknown commands.',
|
|
197
|
+
'`llmanspec/.sdd-state.json` exists after `init --update` and contains `cli_version`.',
|
|
198
|
+
'If `llmanspec/.context/sdd-state.json` was present, it is still on disk after the update.',
|
|
199
|
+
],
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
title: 'Command surface: one close-out, one bind, top-level cold backup',
|
|
203
|
+
steps: [
|
|
204
|
+
'Replace `llman-sdd change finalize` with `llman-sdd change archive`. There is no alias. Close-out now also requires a clean tree and refuses `--force`.',
|
|
205
|
+
'Replace `llman-sdd archive freeze` with `llman-sdd freeze`, and `llman-sdd archive thaw` with `llman-sdd thaw`. Flags are unchanged.',
|
|
206
|
+
'Replace `llman-sdd change attach` with `llman-sdd change start`. On the default branch it creates `sdd/<id>`; on another local branch it binds the current checkout. `--force` rebinds.',
|
|
207
|
+
'Replace `llman-sdd spec skeleton` with `llman-sdd spec new`.',
|
|
208
|
+
'Stop calling `spec migrate-native`, `project migrate strip-legacy-headers`, `project migrate --kind`, and `--version-expr`. Those commands and flags are gone and have no aliases. Keep `project migrate prompt` and `project migrate frozen-cards-unfence`.',
|
|
209
|
+
'Run `llman-sdd init --update` so installed skills name the new commands.',
|
|
210
|
+
],
|
|
211
|
+
checks: [
|
|
212
|
+
'`llman-sdd change finalize`, `llman-sdd change attach`, `llman-sdd spec skeleton`, and `llman-sdd archive` exit 2 as unknown commands.',
|
|
213
|
+
'`llman-sdd change archive --help` lists `--no-check`, `--no-commit`, and `--dry-run`, and does not list `--force`.',
|
|
214
|
+
'`llman-sdd freeze --help` and `llman-sdd thaw --help` succeed.',
|
|
215
|
+
],
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
title: 'Skill discovery no longer uses extra_skills or a root AGENTS.md block',
|
|
219
|
+
steps: [
|
|
220
|
+
'Remove `extra_skills` from `llmanspec/config.yaml` if present. Leftover keys are ignored.',
|
|
221
|
+
'Run `llman-sdd init --update`. It writes every built-in `llman-sdd-*` skill, leaves unprefixed custom skills, and strips an existing `LLMANSPEC` marker block from the repository-root `AGENTS.md` while keeping text outside the markers. It does not create a root `AGENTS.md` when none exists. `llmanspec/AGENTS.md` stays managed.',
|
|
222
|
+
'Run `llman-sdd init --check`. Installed `llman-sdd-*` skills must share this CLI major and minor. On mismatch, run `llman-sdd init --update` again.',
|
|
223
|
+
],
|
|
224
|
+
checks: [
|
|
225
|
+
'`llman-sdd init --check` exits 0.',
|
|
226
|
+
'The repository-root `AGENTS.md` has no `LLMANSPEC` markers. `llmanspec/AGENTS.md` still has its managed block.',
|
|
227
|
+
],
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
title: 'Binary build defines use the DEV_BUILD prefix',
|
|
231
|
+
steps: [
|
|
232
|
+
'If a custom build script defines `process.env.LLMAN_SDD_VERSION`, `process.env.LLMAN_SDD_EMBEDDED_TEMPLATES`, or `process.env.LLMAN_SDD_EMBEDDED_7ZZ_WASM_B64`, rename those keys to `process.env.LLMAN_SDD_DEV_BUILD_VERSION`, `process.env.LLMAN_SDD_DEV_BUILD_EMBEDDED_TEMPLATES`, and `process.env.LLMAN_SDD_DEV_BUILD_EMBEDDED_7ZZ_WASM_B64`. The source literal must match the define key exactly.',
|
|
233
|
+
'Leave `LLMAN_SDD_HARNESS_ACTIVE` unchanged. It is a runtime nested-run guard, not a compile define.',
|
|
234
|
+
],
|
|
235
|
+
checks: [
|
|
236
|
+
'A rebuilt binary reports this release from `llman-sdd --version`.',
|
|
237
|
+
'`llman-sdd init` from that binary still renders skills, and `freeze` / `thaw` still round-trip.',
|
|
238
|
+
],
|
|
239
|
+
},
|
|
240
|
+
],
|
|
241
|
+
},
|
|
170
242
|
];
|
|
171
243
|
|
|
172
244
|
const VERSION_RE = /^\d+\.\d+\.\d+$/u;
|
|
@@ -232,6 +304,6 @@ export function migrationOverviewLines(): string[] {
|
|
|
232
304
|
'Versioned migration playbooks (agent-readable, via `project migrate prompt`):',
|
|
233
305
|
versions,
|
|
234
306
|
'Usage: llman-sdd project migrate prompt --from-version <from> --to-version <to>',
|
|
235
|
-
'
|
|
307
|
+
'Legacy frozen-card unfence: llman-sdd project migrate frozen-cards-unfence [--dry-run]',
|
|
236
308
|
];
|
|
237
309
|
}
|
package/src/spec/authoring.ts
CHANGED
|
@@ -165,7 +165,11 @@ export function addScenario(
|
|
|
165
165
|
`${givenLine} ${kw.when} ${opts.when}\n ${kw.thenText} ${opts.thenText}\n`;
|
|
166
166
|
// insert with a leading blank separator so the file stays readable
|
|
167
167
|
lines.splice(end, 0, '', scenarioBlock.trimEnd());
|
|
168
|
-
|
|
168
|
+
const joined = lines.join('\n');
|
|
169
|
+
// 末尾换行保真:插入落在文件尾时,split 产生的结尾空串不再是最后一项,
|
|
170
|
+
// join 会把原文件的尾换行吃掉;中段插入无此问题。缺行尾换行会让
|
|
171
|
+
// end-of-file-fixer 之类的钩子反复改写文件。
|
|
172
|
+
io.writeText(path, content.endsWith('\n') && !joined.endsWith('\n') ? `${joined}\n` : joined);
|
|
169
173
|
return path;
|
|
170
174
|
}
|
|
171
175
|
|
package/src/templates/skills.ts
CHANGED
|
@@ -29,7 +29,6 @@ export const OPTIONAL_SKILL_FILES: readonly string[] = [
|
|
|
29
29
|
];
|
|
30
30
|
|
|
31
31
|
export const UNIT_FILES: readonly string[] = [
|
|
32
|
-
'skills/index-fallback.md',
|
|
33
32
|
'skills/validation-hints.md',
|
|
34
33
|
'skills/human-readable-summary.md',
|
|
35
34
|
'skills/git-native-flow.md',
|
|
@@ -50,17 +49,28 @@ export const ETHICS_KEYS: readonly string[] = [
|
|
|
50
49
|
];
|
|
51
50
|
|
|
52
51
|
/** All-string globals (predecessor BTreeMap<String, String> semantics). */
|
|
52
|
+
/** Skills the model must not load on its own. Init writes the Codex policy file for these. */
|
|
53
|
+
export const MANUAL_INVOCATION_SKILLS: readonly string[] = [
|
|
54
|
+
'llman-sdd-apply-cycle',
|
|
55
|
+
'llman-sdd-wayfinder',
|
|
56
|
+
'llman-sdd-specs-compact',
|
|
57
|
+
'llman-sdd-ff',
|
|
58
|
+
];
|
|
59
|
+
|
|
60
|
+
export const OPENAI_EXPLICIT_POLICY = `policy:\n allow_implicit_invocation: false\n`;
|
|
61
|
+
|
|
53
62
|
export function buildTemplateVars(config: SddConfig, version: string): Record<string, string> {
|
|
54
63
|
const vars: Record<string, string> = { llman_version: version };
|
|
55
64
|
if (config.specs) {
|
|
56
65
|
vars['specs_enabled'] = 'true';
|
|
57
66
|
if (config.specs.verify_prompt) vars['specs_verify_prompt'] = config.specs.verify_prompt;
|
|
58
67
|
}
|
|
59
|
-
|
|
68
|
+
// Every optional skill is installed. Template conditionals that used to
|
|
69
|
+
// follow extra_skills therefore always see the skill as present.
|
|
60
70
|
for (const name of OPTIONAL_SKILL_FILES) {
|
|
61
71
|
const stem = name.replace(/\.md$/u, '');
|
|
62
72
|
const key = `extra_skill_${stem.replace(/^llman-sdd-/u, '').replaceAll('-', '_')}`;
|
|
63
|
-
|
|
73
|
+
vars[key] = 'true';
|
|
64
74
|
}
|
|
65
75
|
return vars;
|
|
66
76
|
}
|
|
@@ -103,15 +113,8 @@ export interface SkillTemplate {
|
|
|
103
113
|
content: string;
|
|
104
114
|
}
|
|
105
115
|
|
|
106
|
-
export function skillCandidates(
|
|
107
|
-
|
|
108
|
-
return [
|
|
109
|
-
...DEFAULT_SKILL_FILES,
|
|
110
|
-
...OPTIONAL_SKILL_FILES.filter((f) => {
|
|
111
|
-
const stem = f.replace(/\.md$/u, '');
|
|
112
|
-
return extras.includes(stem);
|
|
113
|
-
}),
|
|
114
|
-
];
|
|
116
|
+
export function skillCandidates(_config: SddConfig): string[] {
|
|
117
|
+
return [...DEFAULT_SKILL_FILES, ...OPTIONAL_SKILL_FILES];
|
|
115
118
|
}
|
|
116
119
|
|
|
117
120
|
export function loadSkillTemplates(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "llman-sdd-apply-cycle"
|
|
3
|
-
description: "
|
|
3
|
+
description: "仅手动。用户显式调用 /llman-sdd-apply-cycle 时使用。一轮做完单个 change 的实施到归档。"
|
|
4
4
|
metadata:
|
|
5
5
|
version: "{{ llman_version }}"
|
|
6
6
|
disable-model-invocation: true
|
|
@@ -21,7 +21,7 @@ llman-sdd show <change-id> --output json --type change
|
|
|
21
21
|
> 阶段判定用 `stage` / `readyToImplement` 字段;完整判定表见 llman-sdd-apply。
|
|
22
22
|
|
|
23
23
|
- 须在绑定的非默认分支上。
|
|
24
|
-
- specs-landed 门未过 → STOP(先提交 specs 或 `needs_specs_change: false`)。已绿但 `readyToImplement=false` → 正常:tasks 待完成,继续实施;**仅当 `readyToImplement=true` 才
|
|
24
|
+
- specs-landed 门未过 → STOP(先提交 specs 或 `needs_specs_change: false`)。已绿但 `readyToImplement=false` → 正常:tasks 待完成,继续实施;**仅当 `readyToImplement=true` 才 `change archive`**。
|
|
25
25
|
- 进度以 `tasks.md` checkbox 为准(或 `llman-sdd list` 任务计数);实现时仍须读 `tasks.md`、proposal/design 与绑定分支上的 `llmanspec/specs/**`(唯一事实来源)。
|
|
26
26
|
|
|
27
27
|
### 1) 循环:实施 → 测试
|
|
@@ -42,9 +42,9 @@ llman-sdd validate <change-id> --strict
|
|
|
42
42
|
|
|
43
43
|
### 4) 归档 + 提交
|
|
44
44
|
```bash
|
|
45
|
-
llman-sdd change
|
|
45
|
+
llman-sdd change archive <change-id>
|
|
46
46
|
```
|
|
47
|
-
|
|
47
|
+
工作区须先提交干净。自动合并(默认 squash)+ 改名 + **自动提交** `archive(sdd): <change-id>` 单进程完成。`--no-commit` 跳过自动提交(手动/CI 历史)——此时自行 `git add -A && git commit -m "archive(sdd): <change-id>"`。
|
|
48
48
|
|
|
49
49
|
### 5) 可选清理
|
|
50
50
|
```bash
|
|
@@ -60,7 +60,7 @@ push / PR 仅当用户明确要求。
|
|
|
60
60
|
{{ unit("skills/ethics-governance") }}
|
|
61
61
|
|
|
62
62
|
### Ethics Governance 覆写
|
|
63
|
-
本技能含
|
|
63
|
+
本技能含 `change archive` 合并等不可逆动作,以下键覆写共享单元:
|
|
64
64
|
|
|
65
65
|
- `ethics.risk_level`: medium。
|
|
66
66
|
- `ethics.required_evidence`: 另须 `readyToImplement=true` 与 tasks 全勾。
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "llman-sdd-apply"
|
|
3
|
-
description: "
|
|
3
|
+
description: "提案已提交规格后使用。按 tasks 实现到门禁全绿。不用于还没绑定分支的变更。"
|
|
4
4
|
metadata:
|
|
5
5
|
version: "{{ llman_version }}"
|
|
6
6
|
---
|
|
@@ -31,12 +31,12 @@ flowchart LR
|
|
|
31
31
|
- **管辖范围**:SDD 流程(change 分支、proposal、specs 编辑门)只约束行为合约面——`llmanspec/**` 及其产物对齐(如 `.agents/skills` 渲染新鲜度)。仓库其余文件(构建脚本、CI、一般文档、测试实现)按项目常规工程流程直改直提交,不经 change 包装;改动触及行为合约语义时,回到对应 skill 流程。
|
|
32
32
|
- **不得猜测**:需求不明或 specs 与现实矛盾 → STOP 报告,不自行假定。
|
|
33
33
|
- **不留旧兼容层**:change 要求改行为就全量升级到新写法,除非 tasks/proposal 明确要兼容。
|
|
34
|
-
- **收尾**:该轮以宜接 `llman-sdd-verify`
|
|
34
|
+
- **收尾**:该轮以宜接 `llman-sdd-verify` 收束;`change archive` 归 `llman-sdd-archive`(不得在自修复循环里收口)。
|
|
35
35
|
|
|
36
36
|
## Commit 策略
|
|
37
37
|
|
|
38
|
-
- **change
|
|
39
|
-
- **默认收尾**:全部 task 过门禁且 verify
|
|
38
|
+
- **change 分支上提交自由**:按 task 或里程碑分段提交。收口 `change archive` 要求干净工作区,先提交再跑。
|
|
39
|
+
- **默认收尾**:全部 task 过门禁且 verify 全绿后,提交工作区,再 `llman-sdd change archive <id>`。它自动提交 `archive(sdd): <change-id>`(改名与合并一笔)。不得在 apply 循环内收口。`--no-commit` 跳过自动提交(手动/CI 历史、pre-commit hook 冲突)。
|
|
40
40
|
- **blocker 中断**:因 blocker STOP 前先做**一次** WIP commit(如 `wip(sdd): <change-id> <摘要>`)保全现场再报告。
|
|
41
41
|
|
|
42
42
|
## 步骤
|
|
@@ -49,10 +49,9 @@ flowchart LR
|
|
|
49
49
|
|
|
50
50
|
### 1) 选定 change id 并查前置
|
|
51
51
|
- 已提供则直接用;否则从上下文推断,不明确就跑 `llman-sdd list --json` 让用户选。始终说明“使用变更:<id>”并告知如何覆盖。
|
|
52
|
-
- 确认在经 `llman-sdd change start <id>` 或 `change
|
|
52
|
+
- 确认在经 `llman-sdd change start <id>` 或 `change start <id>` 绑定的非默认分支上(仅重绑用 `--force`)。分支上的 specs 即唯一事实来源——不得在 `changes/<id>/specs/` 下编写。
|
|
53
53
|
{{ unit("skills/stage-guard") }}
|
|
54
|
-
- 用 `llman-sdd
|
|
55
|
-
- {{ unit("skills/index-fallback") }}
|
|
54
|
+
- 用 `llman-sdd list --specs` 列出规格,再直读相关 `.feature`。
|
|
56
55
|
|
|
57
56
|
### 2) 通读事实来源工件
|
|
58
57
|
- `llmanspec/changes/<id>/proposal.md`、`design.md`(如有)、`tasks.md`
|
|
@@ -66,7 +65,7 @@ flowchart LR
|
|
|
66
65
|
### 4) 逐任务实施(循环)
|
|
67
66
|
对每个未完成 task:
|
|
68
67
|
1. **实现**:严格按 task 描述 + specs 要求,改动最小。
|
|
69
|
-
2. **完成后立刻勾 checkbox**:`- [ ]` → `- [x]`。**收口不是 task**:`change
|
|
68
|
+
2. **完成后立刻勾 checkbox**:`- [ ]` → `- [x]`。**收口不是 task**:`change archive` 是流水线步骤,不得出现在 tasks.md——若已列(如“收口——finalize”),删掉(收口的任务门要求全部任务已勾)。
|
|
70
69
|
3. **编辑与验证串行**:验证 必须 在编辑落盘后执行;不得 把编辑与测试/校验放进同一批并行工具调用(可能读到旧文件,产生假失败/假通过)。
|
|
71
70
|
4. task 不明、遇 blocker、或 specs/design 与现实不一致 → STOP 报告,不自行假定。
|
|
72
71
|
|
|
@@ -79,7 +78,7 @@ flowchart LR
|
|
|
79
78
|
- L1 最小单元:已声明验证手段中能直接加载被改模块的最快一层,仅覆盖当前改动点。
|
|
80
79
|
- L2 定向行为:定向执行已声明验证手段中匹配当前场景的子集(已配置 `specs.check_command` 时优先),只复现目标行为。
|
|
81
80
|
- L3 显式全量:`llman-sdd validate --check`(配置 `specs.check_command` 时执行全量 harness;缺省 validate 不再执行 harness)。
|
|
82
|
-
- L4 收口兜底:`change
|
|
81
|
+
- L4 收口兜底:`change archive` 预合并强制真实 harness——每次收口至少 1 次全量。
|
|
83
82
|
- 自修复循环默认用 L1/L2 快速复现;只有需要全量验收时才 L3;避免无谓白付全量成本。
|
|
84
83
|
|
|
85
84
|
**门禁证据**:
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "llman-sdd-archive"
|
|
3
|
-
description: "
|
|
3
|
+
description: "verify 通过后使用。把已完成 change 合并回基准分支并归档。不用于仍在实施的变更。"
|
|
4
4
|
metadata:
|
|
5
5
|
version: "{{ llman_version }}"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# LLMAN SDD 归档
|
|
9
9
|
|
|
10
|
-
归档已完成的变更。前置:verify 全绿,且 change 已绑定分支、specs 已提交(或 `needs_specs_change: false`)。`change
|
|
10
|
+
归档已完成的变更。前置:verify 全绿,且 change 已绑定分支、specs 已提交(或 `needs_specs_change: false`)。`change archive` **自动合并**到基准分支(目标:`--into` > 绑定 `base_branch` > 默认分支;目标即绑定分支时跳过合并就地收口,输出含 in-place close-out 提示;方式:`--method` > 配置 `sdd.merge_method`,默认 squash——feature diff + 改名收敛为目标分支单个 commit)、**改名** change 文档到 `changes/archive/`、**自动提交** `archive(sdd): <change-id>`(`--no-commit` 跳过)。`git push` / PR 仅可选。
|
|
11
11
|
|
|
12
12
|
## Pipeline 位置
|
|
13
13
|
|
|
@@ -22,7 +22,7 @@ flowchart LR
|
|
|
22
22
|
|
|
23
23
|
## 硬约束
|
|
24
24
|
|
|
25
|
-
- **必须先 verify 全绿**;**须已绑定分支**(`change start
|
|
25
|
+
- **必须先 verify 全绿**;**须已绑定分支**(`change start`),无绑定 STOP。
|
|
26
26
|
- 每个 change 归档前必须通过 `llman-sdd validate <id> --strict`。
|
|
27
27
|
- **不得问“是否继续”**:批量归档一路执行到底,除非遇到无法自动解决的错误。
|
|
28
28
|
- **收尾不默认导向 PR/push**:CLI 本地合并(默认 squash)+ 一次性收口提交。push / PR 仅在用户或项目明确要求远程审查时做——**Agent 不得** 默认 push 或建 PR。
|
|
@@ -42,31 +42,30 @@ flowchart LR
|
|
|
42
42
|
- 执行:`llman-sdd change archive <id>`;**任一失败立即停止**,报告剩余 ID。
|
|
43
43
|
- **分支收尾**:
|
|
44
44
|
- 前置:已绑定分支;仍在绑定分支上(或合并后已在目标分支)。
|
|
45
|
-
- `change archive`
|
|
46
|
-
- **默认 `change
|
|
45
|
+
- `change archive` **先自动合并**(目标 `--into` > `base_branch` > 默认分支;方式默认 squash 或 `ff`;目标被其他 worktree 持有时在该 worktree 内原地执行,输出标注 `executed in target worktree <path>`;该 worktree 脏时中止报错并列出处置选项,零写入),**再**改名到 `changes/archive/`——合并失败不回滚改名,降级提示显式可见。
|
|
46
|
+
- **默认 `change archive`(单命令收口)**——门禁 → 合并 → 改名 → **自动提交** `archive(sdd): <change-id>`(无需手动 `git commit`;锁定规则改动为报告制 WARNING,只警告不阻断)。收口要求干净工作区:先提交实现,再跑命令。没有 `--force`,不能跳过任务门或 git 门:
|
|
47
47
|
```text
|
|
48
|
-
1. 实现 specs +
|
|
49
|
-
2. llman-sdd change
|
|
48
|
+
1. 实现 specs + 代码,并在绑定分支上提交(工作区须干净)
|
|
49
|
+
2. llman-sdd change archive <id> # 门禁 + 合并(默认 squash)+ 改名 + 自动提交
|
|
50
50
|
3. 可选:git commit --amend 调整说明;git branch -D <feature> # squash 后分支不再是祖先,-d 会被拒
|
|
51
51
|
```
|
|
52
|
-
`--no-commit` 跳过自动提交(CI / pre-commit hook
|
|
53
|
-
- **Fallback:`change archive <id>`**——与 finalize 同样的自动合并 + 改名 + 收口提交(此路无 `--no-commit`);门禁:task 全勾 + 干净树 + 在绑定非默认分支(`--force` 跳过)。快照审查用 `change diff`。
|
|
52
|
+
`--no-commit` 跳过自动提交(CI / pre-commit hook 冲突):命令改名后留脏工作区并打印手动提交命令。幂等重试:自动提交失败后重跑会识别已归档改名并补提交。
|
|
54
53
|
|
|
55
54
|
### 3) 全量校验
|
|
56
55
|
- 全部归档后 `llman-sdd validate --all --strict`,确认 specs 工件一致。
|
|
57
56
|
|
|
58
57
|
### 4) Commit 引导
|
|
59
|
-
-
|
|
58
|
+
- `change archive` 已自动提交;`--no-commit` 时手动:`git add -A && git commit -m "archive(sdd): <id1>, <id2>"`。
|
|
60
59
|
- 可选:合并后 `git branch -D <feature>`。push / PR 仅在明确要求时做。
|
|
61
60
|
- **破坏性合约变更**(移除/重命名 frontmatter 字段、命令、tag 或 stage 值域)必须 提供 `migrations/v<from>-v<to>/` 升级路径(README + 一次性脚本随仓库发布)——收口前确认存在。
|
|
62
61
|
- **archived `depends_on`**:archive 把 change 目录改名为 `archive/YYYY-MM-DD-<id>`;validate 把指向 archived/frozen id 的 `depends_on` 识别为 INFO(非 ERROR),**无需**手动更新其它 change 的 frontmatter。
|
|
63
62
|
|
|
64
63
|
## Archive 冷备引导
|
|
65
64
|
- archive 目录过大时用冷备维护(冻结 = 正文入 7z 冷备 + 以 `<YYYY-MM-DD>-<id>.yaml` 平铺索引卡替代目录,卡为单文档纯 YAML、仅含 title 与 depends_on):
|
|
66
|
-
- 预览冻结候选:`llman-sdd
|
|
67
|
-
- 冻结旧归档:`llman-sdd
|
|
68
|
-
- 列出已冻结条目:`llman-sdd
|
|
69
|
-
- 需要恢复时:`llman-sdd
|
|
65
|
+
- 预览冻结候选:`llman-sdd freeze --dry-run`
|
|
66
|
+
- 冻结旧归档:`llman-sdd freeze --before <YYYY-MM-DD> --keep-recent <N>`
|
|
67
|
+
- 列出已冻结条目:`llman-sdd freeze --list`
|
|
68
|
+
- 需要恢复时:`llman-sdd thaw --change <YYYY-MM-DD-id>`(正文解回目录并移除平铺卡)
|
|
70
69
|
- freeze/thaw 仅用于日期归档目录(`YYYY-MM-DD-*`);宜保留最近 2 个目录不冻结。
|
|
71
70
|
- 平铺索引卡常驻磁盘:title(frontmatter `title` 非空时优先,否则取 proposal H1)与 depends_on(graph 依赖边种子)可 grep、可追溯;
|
|
72
71
|
id 与日期由文件名隐含——冻结 change 的用途与依赖关系无需解冻即可查阅,正文在 7z 冷备按需取用。
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "llman-sdd-continue"
|
|
3
|
-
description: "
|
|
3
|
+
description: "已有 change 缺工件时使用。补建下一个缺失工件。不用于从零开新变更。"
|
|
4
4
|
metadata:
|
|
5
5
|
version: "{{ llman_version }}"
|
|
6
6
|
---
|
|
@@ -17,10 +17,10 @@ metadata:
|
|
|
17
17
|
1) `proposal.md`
|
|
18
18
|
2) `design.md`(仅有设计权衡时)
|
|
19
19
|
3) `tasks.md`
|
|
20
|
-
4) `llman-sdd change start <id>`(分支已存在用 `change
|
|
20
|
+
4) `llman-sdd change start <id>`(分支已存在用 `change start <id>`)——绑定分支
|
|
21
21
|
5) 在**绑定分支**编辑 `llmanspec/specs/<capability>.feature`(扁平,或目录主文件)并 commit——提交 specs(无合约变更设 `needs_specs_change: false`)
|
|
22
22
|
4. 只创建**一个**缺失工件(或一次绑定分支上的 spec 编辑)。
|
|
23
|
-
- 不得写应用代码;**不得**建 `changes/<id>/specs/`;**不得**在 start
|
|
23
|
+
- 不得写应用代码;**不得**建 `changes/<id>/specs/`;**不得**在 `change start` 前改 `llmanspec/specs/**`。
|
|
24
24
|
5. 工件已齐全时,按 `llman-sdd show <id> --output json` 宜接的下一步:
|
|
25
25
|
- specs-landed 门未过 → 先提交 specs(或 `needs_specs_change: false`);不得提示可进 apply
|
|
26
26
|
- specs-landed 门已绿(即使实施中期 `readyToImplement=false`、tasks 未完)→ `llman-sdd-apply`
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "llman-sdd-draft"
|
|
3
|
-
description: "
|
|
3
|
+
description: "只把想法记成 proposal.md 时使用。不创建 tasks,不改规格。"
|
|
4
4
|
metadata:
|
|
5
5
|
version: "{{ llman_version }}"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# LLMAN SDD 草案(Draft)
|
|
9
9
|
|
|
10
|
-
把 change 想法记成**草案**(仅 `proposal.md
|
|
10
|
+
把 change 想法记成**草案**(仅 `proposal.md`)——“先记下来”的轻量入口:不判断规模、不写 tasks、不改 specs、不绑定分支。落实时用 `llman-sdd-propose` 正式化。
|
|
11
11
|
|
|
12
12
|
## Pipeline 位置
|
|
13
13
|
|
|
@@ -24,7 +24,7 @@ flowchart LR
|
|
|
24
24
|
## 硬约束
|
|
25
25
|
|
|
26
26
|
- **不得 询问 change id**:由 `change new --from` 从描述推导并告知用户。
|
|
27
|
-
-
|
|
27
|
+
- **不得创建 tasks/design/specs/绑定**:只建 `proposal.md` 草案;完整规划归 `llman-sdd-propose`。
|
|
28
28
|
- **不得 判断变更规模**:那是 propose 的职责。用户想开始实现 → 宜转 `llman-sdd-propose`。
|
|
29
29
|
- **适用边界**:描述明显涉及行为合约(需求语义)变更或多文件改动时,宜转 `llman-sdd-propose`——但仍先建草案以免想法丢失。
|
|
30
30
|
- **frontmatter 有固定 schema**:`proposal.md` 只接受 `llmanspec/AGENTS.md`“Change Proposal Frontmatter SSOT”的合法字段(`depends_on`、`title`、`blocks`、`branch`、`base_branch`、`base_sha`、`needs_specs_change` 等);`title` 必须为非空的一句话概念式标题,不得复读 change id——缺失或为空串时 `llman-sdd validate` 报 ERROR;`status`/`priority`/`author` 等集外字段同样报 ERROR。生命周期阶段是推断量(用 `llman-sdd show`/`list` 查),不得写进 frontmatter。正文不得复读 frontmatter 字段(不得 `## Status` 段);H1 宜保留人类可读标题(freeze 取 title 时 frontmatter 优先、H1 回退),不复读 change id。
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "llman-sdd-explore"
|
|
3
|
-
description: "
|
|
3
|
+
description: "意图不明或要先分析时使用。只调查不改应用代码。不用于已经明确的实现任务。"
|
|
4
4
|
metadata:
|
|
5
5
|
version: "{{ llman_version }}"
|
|
6
6
|
---
|
|
@@ -36,8 +36,7 @@ flowchart LR
|
|
|
36
36
|
- 需要时用 ASCII 图可视化;同时保留多个选项与权衡。
|
|
37
37
|
|
|
38
38
|
## 动作清单
|
|
39
|
-
1. 用 `llman-sdd
|
|
40
|
-
- {{ unit("skills/index-fallback") }}
|
|
39
|
+
1. 用 `llman-sdd list --specs` 列出规格,再直读相关 `.feature`。
|
|
41
40
|
2. 澄清目标与约束(问 1–3 个问题)。
|
|
42
41
|
3. **逐问深挖分支(可选,用户显式触发才进入)**:触发词“深挖”“grill”“逐个问”“彻底理清”。进入后一问一答走清决策:
|
|
43
42
|
- 一次只问一个问题,附你的推荐答案,等反馈再问下一个。
|