specdojo 0.4.5 → 0.4.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.
Files changed (46) hide show
  1. package/.github/agents/specdojo-orchestrator.md +4 -4
  2. package/CHANGELOG.md +25 -0
  3. package/dist/commands/init.js +33 -7
  4. package/dist/devcontainer/scaffold.js +5 -1
  5. package/dist/exec/evidence.js +35 -3
  6. package/dist/exec/pipeline-state.js +1 -0
  7. package/dist/exec/plans-core.js +7 -2
  8. package/dist/exec/register-resume.js +8 -4
  9. package/dist/exec/reporter.js +8 -1
  10. package/dist/exec/results.js +1 -1
  11. package/dist/exec/run/agent-pipeline.js +7 -5
  12. package/dist/exec/run/agent.js +14 -1
  13. package/dist/exec/run/register-resume.js +1 -0
  14. package/dist/exec/run/register-worktree.js +3 -0
  15. package/dist/exec/worktree-ops-lifecycle.js +4 -2
  16. package/dist/kata/command.js +54 -9
  17. package/dist/register/create-commands.js +9 -7
  18. package/dist/register/external-project.js +18 -7
  19. package/dist/register/views.js +3 -0
  20. package/dist/shared/git.js +3 -2
  21. package/dist/shared/lefthook-scaffold.js +5 -22
  22. package/dist/shared/markdownlint-scaffold.js +67 -0
  23. package/dist/shared/provider-scaffold.js +2 -2
  24. package/dist/shared/slidev-scaffold.js +102 -0
  25. package/dist/shared/specdojo-config.js +9 -3
  26. package/docs/ja/specdojo/exec-templates/xep-register-template.md +5 -4
  27. package/docs/ja/specdojo/guides/exec-config-guide.md +46 -16
  28. package/docs/ja/specdojo/guides/kata-guide.md +108 -1
  29. package/docs/ja/specdojo/guides/orchestrator-operation-guide.md +6 -6
  30. package/docs/ja/specdojo/guides/register-operation-guide.md +2 -0
  31. package/docs/ja/specdojo/references/command-reference.md +126 -35
  32. package/docs/ja/specdojo/references/specdojo-config-reference.md +2 -0
  33. package/docs/specdojo/schemas/v1/exec-evidence.schema.yaml +17 -1
  34. package/package.json +5 -5
  35. package/templates/antigravity/orchestrator.md +4 -4
  36. package/templates/claude/README.md +2 -0
  37. package/templates/claude/agents/specdojo-orchestrator.md +4 -4
  38. package/templates/codex/README.md +38 -9
  39. package/templates/codex/agents/codex-executor.toml +1 -1
  40. package/templates/codex/agents/codex-expert-executor.toml +1 -1
  41. package/templates/codex/agents/codex-expert-review-executor.toml +1 -1
  42. package/templates/codex/agents/codex-review-executor.toml +1 -1
  43. package/templates/codex/agents/specdojo-orchestrator.toml +5 -5
  44. package/templates/codex/orchestrator.md +4 -4
  45. package/templates/init-agent-members.yaml +85 -13
  46. package/templates/opencode/agents/specdojo-orchestrator.md +4 -4
@@ -341,13 +341,15 @@ export function registerUpdateCommand(reg, dependencies) {
341
341
  itemId: item.id,
342
342
  derivedFrom: nextDerivedFrom,
343
343
  });
344
- validateRegisterApproachTargetsForProject({
345
- projectId: paths.projectId,
346
- ...(nextApproach !== undefined ? { approach: nextApproach } : {}),
347
- ...(nextTargets !== undefined ? { targets: nextTargets } : {}),
348
- ...(normalizedNextSources !== undefined ? { sources: normalizedNextSources } : {}),
349
- validateTargetsWithoutApproach: opts.target !== undefined || opts.source !== undefined,
350
- });
344
+ if (opts.approach !== undefined || opts.target !== undefined || opts.source !== undefined) {
345
+ validateRegisterApproachTargetsForProject({
346
+ projectId: paths.projectId,
347
+ ...(nextApproach !== undefined ? { approach: nextApproach } : {}),
348
+ ...(nextTargets !== undefined ? { targets: nextTargets } : {}),
349
+ ...(normalizedNextSources !== undefined ? { sources: normalizedNextSources } : {}),
350
+ validateTargetsWithoutApproach: opts.target !== undefined || opts.source !== undefined,
351
+ });
352
+ }
351
353
  const shouldUpdateTargets = opts.target !== undefined ||
352
354
  (authoring && opts.source !== undefined && (item.targets?.length ?? 0) > 1);
353
355
  const shouldUpdateSources = opts.source !== undefined || (authoring && providedLegacySources.length > 0);
@@ -1,5 +1,5 @@
1
1
  import { spawnSync } from "node:child_process";
2
- import { existsSync } from "node:fs";
2
+ import { existsSync, readFileSync } from "node:fs";
3
3
  import { join } from "node:path";
4
4
  import { loadConfig, resolveExternalProjectRoot, specdojoRootDir, } from "../shared/specdojo-config.js";
5
5
  export const MINIMUM_EXTERNAL_REGISTER_VERSION = "0.4.2";
@@ -84,11 +84,22 @@ function versionAtLeast(version, required) {
84
84
  }
85
85
  function targetSpecdojoExecutable(repoRoot) {
86
86
  const executable = join(repoRoot, "node_modules", ".bin", process.platform === "win32" ? "specdojo.cmd" : "specdojo");
87
- if (!existsSync(executable)) {
88
- throw new Error(`External project repository does not have SpecDojo installed: ${executable}. ` +
89
- `Install specdojo ${MINIMUM_EXTERNAL_REGISTER_VERSION} or newer in that repository.`);
87
+ if (existsSync(executable))
88
+ return { command: executable, args: [] };
89
+ const packagePath = join(repoRoot, "package.json");
90
+ if (existsSync(packagePath)) {
91
+ const pkg = JSON.parse(readFileSync(packagePath, "utf8"));
92
+ if (pkg && typeof pkg === "object" && "name" in pkg && pkg.name === "specdojo") {
93
+ const entrypoint = join(repoRoot, "dist", "specdojo.js");
94
+ if (!existsSync(entrypoint)) {
95
+ throw new Error(`External SpecDojo repository has not been built: ${entrypoint}. ` +
96
+ "Run npm run build in that repository.");
97
+ }
98
+ return { command: process.execPath, args: [entrypoint] };
99
+ }
90
100
  }
91
- return executable;
101
+ throw new Error(`External project repository does not have SpecDojo installed: ${executable}. ` +
102
+ `Install specdojo ${MINIMUM_EXTERNAL_REGISTER_VERSION} or newer in that repository.`);
92
103
  }
93
104
  /**
94
105
  * Delegate `register add` when `--project` names an external-project alias.
@@ -110,7 +121,7 @@ export function delegateExternalRegisterAdd(opts, run = spawnSync) {
110
121
  }
111
122
  const repoRoot = resolveExternalProjectRoot(rootDir, externalProject);
112
123
  const executable = targetSpecdojoExecutable(repoRoot);
113
- const versionResult = run(executable, ["--version"], {
124
+ const versionResult = run(executable.command, [...executable.args, "--version"], {
114
125
  cwd: repoRoot,
115
126
  encoding: "utf8",
116
127
  stdio: ["ignore", "pipe", "pipe"],
@@ -132,7 +143,7 @@ export function delegateExternalRegisterAdd(opts, run = spawnSync) {
132
143
  throw new Error(`External project ${alias} uses SpecDojo ${version}; ` +
133
144
  `${MINIMUM_EXTERNAL_SOURCE_VERSION} or newer is required for --source.`);
134
145
  }
135
- const result = run(executable, buildExternalRegisterAddArgs(alias, externalProject, opts), {
146
+ const result = run(executable.command, [...executable.args, ...buildExternalRegisterAddArgs(alias, externalProject, opts)], {
136
147
  cwd: repoRoot,
137
148
  encoding: "utf8",
138
149
  stdio: "inherit",
@@ -47,7 +47,10 @@ export function injectViewSlots(content, slots) {
47
47
  }
48
48
  // グループ(状態別・優先度別・担当者別など)を `### <chapter>.<n>. <label>` 見出し付きの
49
49
  // テーブル群へ整形する。章見出しラベルは template 側が持つため、ここでは番号と値のみ扱う。
50
+ // 項目がない場合は空文字列を差し込むと前後の空行が重なり MD012 に当たるため、「該当なし」を書く。
50
51
  function renderGroupedTables(groups, chapter, heading) {
52
+ if (groups.length === 0)
53
+ return "該当なし";
51
54
  return groups
52
55
  .map((group, index) => [
53
56
  `### ${chapter}.${index + 1}. ${group.label}`,
@@ -232,8 +232,9 @@ export function summarizeGitHookFailure(output) {
232
232
  // parallel: true の lefthook は成功した step の出力も並べるため、最初の step 見出しが
233
233
  // 失敗した step とは限らない。末尾の summary で失敗印(🥊 など)が付いた step を優先する。
234
234
  const failedSteps = lines
235
- .map((line) => line.match(/^(?:🥊|✗|✘|✕|❌)️?\s*([^\s(]+)/u)?.[1])
236
- .filter((name) => name !== undefined && name !== "lefthook");
235
+ // step 名には空白や括弧を含む description も使われる。末尾の所要時間だけを除く。
236
+ .map((line) => line.match(/^(?:🥊|✗|✘|✕|❌)️?\s*(.+?)(?:\s+\([\d.]+\s+seconds?\))?$/u)?.[1])
237
+ .filter((name) => name !== undefined && !/^lefthook(?:\s|$)/u.test(name));
237
238
  const selected = stepHeaders.find((header) => failedSteps.includes(header.step)) ?? stepHeaders[0];
238
239
  const step = selected?.step ?? failedSteps[0] ?? "";
239
240
  const stepIndex = selected?.index ?? -1;
@@ -1,26 +1,12 @@
1
1
  import { existsSync } from "node:fs";
2
2
  import { copyFile, mkdir, readFile, writeFile } from "node:fs/promises";
3
3
  import path from "node:path";
4
+ import { writeMarkdownlintConfigs } from "./markdownlint-scaffold.js";
4
5
  const REQUIRED_DEV_DEPENDENCIES = ["lefthook", "prettier", "markdownlint-cli"];
5
6
  const REQUIRED_SCRIPTS = {
6
7
  prepare: "node tools/install-lefthook.mjs",
7
8
  "pre-commit": "lefthook run pre-commit",
8
9
  };
9
- const MARKDOWNLINT_CONFIG_FILES = [
10
- ".markdownlint.jsonc",
11
- ".markdownlint.json",
12
- ".markdownlint.yaml",
13
- ".markdownlint.yml",
14
- ".markdownlintrc",
15
- ];
16
- const MARKDOWNLINT_CONFIG = `${JSON.stringify({
17
- MD013: false,
18
- MD024: false,
19
- MD033: false,
20
- MD036: false,
21
- MD041: false,
22
- MD060: false,
23
- }, null, 2)}\n`;
24
10
  const MARKDOWNLINT_IGNORE = [".claude/agents/", ".github/agents/", ".opencode/agents/", ""].join("\n");
25
11
  function isRecord(value) {
26
12
  return typeof value === "object" && value !== null && !Array.isArray(value);
@@ -151,14 +137,11 @@ async function writeScaffoldFile(sourcePath, destinationPath, destinationLabel,
151
137
  process.stdout.write(`Written: ${destinationLabel}\n`);
152
138
  }
153
139
  async function writeMarkdownlintScaffold(opts) {
154
- const existingConfig = MARKDOWNLINT_CONFIG_FILES.find((filename) => existsSync(path.join(opts.repoRoot, filename)));
155
- if (existingConfig) {
156
- process.stdout.write(`Skipped (markdownlint config already exists): ${existingConfig}\n`);
140
+ if (opts.slidevKataPatterns?.length) {
141
+ process.stdout.write(`Planned Slidev .markdownlintignore entries:\n${opts.slidevKataPatterns.join("\n")}\n`);
157
142
  }
158
- else {
159
- await writeScaffoldFile(undefined, path.join(opts.repoRoot, ".markdownlint.jsonc"), ".markdownlint.jsonc", MARKDOWNLINT_CONFIG, { force: false, dryRun: opts.dryRun });
160
- }
161
- await writeScaffoldFile(undefined, path.join(opts.repoRoot, ".markdownlintignore"), ".markdownlintignore", MARKDOWNLINT_IGNORE, { force: false, dryRun: opts.dryRun });
143
+ await writeMarkdownlintConfigs(opts);
144
+ await writeScaffoldFile(undefined, path.join(opts.repoRoot, ".markdownlintignore"), ".markdownlintignore", MARKDOWNLINT_IGNORE + (opts.slidevKataPatterns ?? []).map((pattern) => `${pattern}\n`).join(""), { force: false, dryRun: opts.dryRun });
162
145
  }
163
146
  export async function runLefthookScaffold(opts) {
164
147
  const templateTools = path.join(opts.packageRoot, "templates", "lefthook", "tools");
@@ -0,0 +1,67 @@
1
+ import { existsSync } from "node:fs";
2
+ import { readdir, writeFile } from "node:fs/promises";
3
+ import path from "node:path";
4
+ import { dump } from "js-yaml";
5
+ const BASE_CONFIG = {
6
+ MD013: false,
7
+ MD024: false,
8
+ MD033: false,
9
+ MD036: false,
10
+ MD041: false,
11
+ MD060: false,
12
+ };
13
+ // Slide boundaries and per-slide frontmatter interrupt normal Markdown blocks.
14
+ // Each slide may start with its own H1 or use a heading level chosen for its layout.
15
+ const SLIDEV_CONFIG = {
16
+ MD001: false,
17
+ MD022: false,
18
+ MD025: false,
19
+ MD031: false,
20
+ MD032: false,
21
+ };
22
+ export async function writeMarkdownlintConfigs(opts) {
23
+ const files = await readdir(opts.repoRoot);
24
+ const legacyConfigs = files.filter((file) => file.startsWith(".markdownlint."));
25
+ const cli2Configs = files.filter((file) => file.startsWith(".markdownlint-cli2."));
26
+ const hasRc = existsSync(path.join(opts.repoRoot, ".markdownlintrc"));
27
+ const rcContent = `${JSON.stringify(BASE_CONFIG, null, 2)}\n`;
28
+ const cli2Content = dump({
29
+ config: { extends: ".markdownlintrc" },
30
+ ...(opts.slidevKataPatterns?.length
31
+ ? {
32
+ overrides: [{ filter: opts.slidevKataPatterns, combine: "merge", config: SLIDEV_CONFIG }],
33
+ }
34
+ : {}),
35
+ });
36
+ process.stdout.write(`Planned markdownlint base (.markdownlintrc):\n${rcContent}` +
37
+ `Planned markdownlint-cli2 configuration (.markdownlint-cli2.yaml):\n${cli2Content}`);
38
+ if (opts.slidevKataPatterns?.length) {
39
+ process.stdout.write("Place the Slidev override FIRST in markdownlint-cli2 overrides (first match wins).\n");
40
+ }
41
+ if (legacyConfigs.length > 0) {
42
+ process.stdout.write(`Kept existing markdownlint config: ${legacyConfigs.join(", ")}.\n` +
43
+ "Migrate its rules to .markdownlintrc (JSON starting with {, without a leading comment), " +
44
+ "then remove the old .markdownlint.* config, including any in parent directories. " +
45
+ "Merge the CLI2 configuration above manually; see docs/ja/specdojo/references/command-reference.md.\n");
46
+ }
47
+ // Do not introduce competing settings or an extends pointing to a missing rc.
48
+ // Existing CLI2 configurations may have their own base; show additions for manual review.
49
+ const canCreateRc = legacyConfigs.length === 0 && cli2Configs.length === 0;
50
+ const canCreateCli2 = legacyConfigs.length === 0 && (hasRc || canCreateRc);
51
+ for (const [filename, content, canCreate] of [
52
+ [".markdownlintrc", rcContent, canCreateRc],
53
+ [".markdownlint-cli2.yaml", cli2Content, canCreateCli2],
54
+ ]) {
55
+ const existing = filename === ".markdownlintrc" ? hasRc : cli2Configs.length > 0;
56
+ if (existing || !canCreate) {
57
+ process.stdout.write(`Kept existing markdownlint settings. Merge any missing ${filename} entries above manually.\n`);
58
+ }
59
+ else if (opts.dryRun) {
60
+ process.stdout.write(`[dry-run] would write: ${filename}\n`);
61
+ }
62
+ else {
63
+ await writeFile(path.join(opts.repoRoot, filename), content, "utf8");
64
+ process.stdout.write(`Written: ${filename}\n`);
65
+ }
66
+ }
67
+ }
@@ -12,8 +12,8 @@ export const ORCHESTRATOR_NPM_SCRIPTS = {
12
12
  "orch:sonnet": "specdojo orchestrator launch --provider claude -- --agent specdojo-orchestrator --model sonnet --settings .specdojo/claude/settings.orchestrator.json",
13
13
  },
14
14
  codex: {
15
- "orch:sol": 'specdojo orchestrator launch --provider codex -- -m gpt-5.6-sol "$(cat .specdojo/codex/orchestrator.md)"',
16
- "orch:terra": 'specdojo orchestrator launch --provider codex -- -m gpt-5.6-terra "$(cat .specdojo/codex/orchestrator.md)"',
15
+ "orch:sol": 'specdojo orchestrator launch --provider codex -- -m gpt-6.1-sol "$(cat .specdojo/codex/orchestrator.md)"',
16
+ "orch:luna": 'specdojo orchestrator launch --provider codex -- -m gpt-6-luna "$(cat .specdojo/codex/orchestrator.md)"',
17
17
  },
18
18
  antigravity: {
19
19
  "orch:flash": 'specdojo orchestrator launch --provider antigravity -- --add-dir "$(pwd)" --model gemini-3.8-flash-high -i "$(cat .specdojo/antigravity/orchestrator.md)"',
@@ -0,0 +1,102 @@
1
+ import { existsSync } from "node:fs";
2
+ import { readFile, writeFile } from "node:fs/promises";
3
+ import path from "node:path";
4
+ import { writeMarkdownlintConfigs } from "./markdownlint-scaffold.js";
5
+ // Keep ordinary kata Markdown on the standard parser. Existing decks with other
6
+ // names can be added to the displayed overrides and ignore patterns by the user.
7
+ export const SLIDEV_KATA_PATTERNS = [
8
+ "docs/ja/specdojo/samples/**/*-slidev-sample.md",
9
+ "docs/ja/specdojo/templates/**/*-slidev-template.md",
10
+ ];
11
+ const DEV_DEPENDENCIES = {
12
+ "@slidev/cli": "^53.0.0",
13
+ "prettier-plugin-slidev": "^1.0.5",
14
+ prettier: "^3.8.4",
15
+ };
16
+ const PRETTIER_CONFIG = {
17
+ overrides: [
18
+ {
19
+ files: SLIDEV_KATA_PATTERNS,
20
+ options: { parser: "slidev", plugins: ["prettier-plugin-slidev"] },
21
+ },
22
+ ],
23
+ };
24
+ const PRETTIER_CONFIG_FILES = [
25
+ ".prettierrc",
26
+ ...["json", "json5", "yml", "yaml", "js", "ts", "mjs", "mts", "cjs", "cts", "toml"].map((extension) => `.prettierrc.${extension}`),
27
+ ...["js", "ts", "mjs", "mts", "cjs", "cts"].map((extension) => `prettier.config.${extension}`),
28
+ ];
29
+ function isRecord(value) {
30
+ return typeof value === "object" && value !== null && !Array.isArray(value);
31
+ }
32
+ export async function runSlidevScaffold(opts) {
33
+ const packagePath = path.join(opts.repoRoot, "package.json");
34
+ const packageContent = existsSync(packagePath) ? await readFile(packagePath, "utf8") : undefined;
35
+ const parsed = packageContent === undefined ? {} : JSON.parse(packageContent);
36
+ if (!isRecord(parsed))
37
+ throw new Error(`Invalid ${packagePath}: expected an object`);
38
+ for (const field of ["dependencies", "devDependencies"]) {
39
+ if (parsed[field] !== undefined && !isRecord(parsed[field])) {
40
+ throw new Error(`Invalid ${packagePath}: ${field} must be an object`);
41
+ }
42
+ }
43
+ const dependencies = isRecord(parsed.dependencies) ? parsed.dependencies : {};
44
+ const devDependencies = isRecord(parsed.devDependencies) ? parsed.devDependencies : {};
45
+ const additions = Object.fromEntries(Object.entries(DEV_DEPENDENCIES).filter(([name]) => !Object.hasOwn(dependencies, name) && !Object.hasOwn(devDependencies, name)));
46
+ process.stdout.write(`Planned package.json additions (Slidev):\n${JSON.stringify({ devDependencies: additions }, null, 2)}\n`);
47
+ for (const name of Object.keys(DEV_DEPENDENCIES)) {
48
+ if (Object.hasOwn(dependencies, name) || Object.hasOwn(devDependencies, name)) {
49
+ process.stdout.write(`Skipped (dependency already exists): ${name} in package.json\n`);
50
+ }
51
+ }
52
+ if (packageContent === undefined) {
53
+ process.stdout.write("Skipped package.json update (not found). Create it and add the entries above.\n");
54
+ }
55
+ const prettierConfig = Object.hasOwn(parsed, "prettier")
56
+ ? "package.json#prettier"
57
+ : PRETTIER_CONFIG_FILES.find((file) => existsSync(path.join(opts.repoRoot, file)));
58
+ const prettierContent = `${JSON.stringify(PRETTIER_CONFIG, null, 2)}\n`;
59
+ process.stdout.write(`Planned Slidev Prettier overrides:\n${prettierContent}`);
60
+ if (prettierConfig) {
61
+ process.stdout.write(`Kept existing ${prettierConfig}. Merge the overrides above manually for your Slidev kata paths.\n`);
62
+ }
63
+ const ignorePath = path.join(opts.repoRoot, ".markdownlintignore");
64
+ const ignoreExists = existsSync(ignorePath);
65
+ const ignoreContent = `${SLIDEV_KATA_PATTERNS.join("\n")}\n`;
66
+ process.stdout.write(`Planned Slidev .markdownlintignore entries:\n${ignoreContent}`);
67
+ if (ignoreExists) {
68
+ process.stdout.write("Kept existing .markdownlintignore. Add any missing patterns above manually.\n");
69
+ }
70
+ process.stdout.write("Place the Slidev override LAST in Prettier overrides (last match wins).\n");
71
+ await writeMarkdownlintConfigs({ ...opts, slidevKataPatterns: SLIDEV_KATA_PATTERNS });
72
+ // Preview all additions before the first write, including on a normal run.
73
+ if (opts.dryRun) {
74
+ if (packageContent !== undefined && Object.keys(additions).length > 0) {
75
+ process.stdout.write("[dry-run] would update: package.json\n");
76
+ }
77
+ if (!prettierConfig)
78
+ process.stdout.write("[dry-run] would write: .prettierrc\n");
79
+ if (!ignoreExists)
80
+ process.stdout.write("[dry-run] would write: .markdownlintignore\n");
81
+ return;
82
+ }
83
+ if (packageContent !== undefined && Object.keys(additions).length > 0) {
84
+ parsed.devDependencies = { ...devDependencies, ...additions };
85
+ const indent = packageContent.match(/^([\t ]+)\S/m)?.[1] ?? " ";
86
+ await writeFile(packagePath, `${JSON.stringify(parsed, null, indent)}\n`, "utf8");
87
+ process.stdout.write("Updated: package.json\n");
88
+ }
89
+ if (!prettierConfig) {
90
+ await writeFile(path.join(opts.repoRoot, ".prettierrc"), prettierContent, "utf8");
91
+ process.stdout.write("Written: .prettierrc\n");
92
+ }
93
+ if (!ignoreExists) {
94
+ await writeFile(ignorePath, ignoreContent, "utf8");
95
+ process.stdout.write("Written: .markdownlintignore\n");
96
+ }
97
+ process.stdout.write("Next steps (Slidev):\n" +
98
+ " 1. Review the additions and any manual merges above, then run npm install.\n" +
99
+ " 2. Install the theme used by the kata and supply its project-specific components/assets.\n" +
100
+ ' 3. Run ./node_modules/.bin/slidev build <kata-sample.md> --out "$PWD/tmp/slidev-dist".\n' +
101
+ " See docs/ja/specdojo/guides/kata-guide.md for the verification workflow.\n");
102
+ }
@@ -6,6 +6,7 @@ import Ajv2020Module from "ajv/dist/2020.js";
6
6
  import { runProviderScaffold, specdojoPackageRootDir } from "./provider-scaffold.js";
7
7
  import { runWorkspaceScaffold } from "./workspace-scaffold.js";
8
8
  import { runLefthookScaffold } from "./lefthook-scaffold.js";
9
+ import { runSlidevScaffold, SLIDEV_KATA_PATTERNS } from "./slidev-scaffold.js";
9
10
  import { ensureGitignore, formatGitignoreReport, gitignorePatternsForLayouts, } from "./specdojo-gitignore.js";
10
11
  /** Default IANA time zone for register date derivation when run.register_date_timezone is unset. */
11
12
  export const DEFAULT_REGISTER_DATE_TIMEZONE = "UTC";
@@ -786,18 +787,19 @@ export function registerConfigCommands(program) {
786
787
  });
787
788
  cfg
788
789
  .command("scaffold")
789
- .description("Scaffold provider settings, a VS Code multi-root workspace, or Git hooks")
790
+ .description("Scaffold provider settings, a VS Code multi-root workspace, Git hooks, or Slidev")
790
791
  .option("--provider <name>", "Provider template to copy (antigravity|claude|codex|copilot|opencode)")
791
792
  .option("--workspace", "Generate VS Code multi-root workspace (<project-id>.code-workspace) from repos config", false)
792
793
  .option("--lefthook", "Generate pre-commit hooks for SpecDojo repositories", false)
794
+ .option("--slidev", "Set up Slidev and formatting for kata", false)
793
795
  .option("--project <id>", "Target project ID for workspace scaffolding (defaults to current_project)")
794
796
  .option("--force", "Overwrite existing files", false)
795
797
  .option("--dry-run", "Show planned files without writing", false)
796
798
  .option("--global", "Merge provider permissions into user-level settings (currently antigravity only)", false)
797
799
  .action(async (opts) => {
798
800
  try {
799
- if (!opts.provider && !opts.workspace && !opts.lefthook) {
800
- throw new Error("Specify --provider <name>, --workspace, or --lefthook to scaffold.");
801
+ if (!opts.provider && !opts.workspace && !opts.lefthook && !opts.slidev) {
802
+ throw new Error("Specify --provider <name>, --workspace, --lefthook, or --slidev to scaffold.");
801
803
  }
802
804
  if (opts.global && !opts.provider) {
803
805
  throw new Error("--global requires --provider antigravity");
@@ -828,10 +830,14 @@ export function registerConfigCommands(program) {
828
830
  packageRoot: specdojoPackageRootDir(),
829
831
  repoRoot: specdojoRootDir(),
830
832
  config,
833
+ slidevKataPatterns: opts.slidev ? SLIDEV_KATA_PATTERNS : [],
831
834
  force: !!opts.force,
832
835
  dryRun: !!opts.dryRun,
833
836
  });
834
837
  }
838
+ if (opts.slidev) {
839
+ await runSlidevScaffold({ repoRoot: specdojoRootDir(), dryRun: !!opts.dryRun });
840
+ }
835
841
  }
836
842
  catch (error) {
837
843
  const message = error instanceof Error ? error.message : String(error);
@@ -21,16 +21,17 @@ _PJR_DESCRIPTION_
21
21
  ## 3. 進め方
22
22
 
23
23
  1. 個票(存在する場合)を読み、目的・完了条件・制約を把握する。登録簿の一覧は大きいため読まない。
24
- 2. 個票に完了条件がある場合はそれを作業の基準にする。無い場合はタイトルと説明から完了条件の仮説を立て、その仮説を result に明記する。
24
+ 2. 個票に完了条件がある場合はそれを作業の基準にする。無い場合はタイトルと説明から完了条件の仮説を立て、記録する。pipeline では個票の対応結果と executor の報告の `handoff` に書き、result を直接書ける実行形式では result に明記する。
25
25
  3. 関連する成果物・設計書・実装を確認し、対象ファイルを特定して変更する。
26
26
  4. 個票が存在する場合は、個票の作業内容・対応結果セクションを実施内容で更新する。
27
- 5. 判断に迷う箇所は _TODO_ / _ASSUMPTION_ で残し、根拠と次のアクションを result に書く。
27
+ 5. 個票の完了条件が result への記載を求める場合、pipeline の executor は個票の対応結果と報告の `handoff` の両方に書く。reporter と runner が result の申し送りへ反映する。executor は result を直接編集しない。
28
+ 6. 判断に迷う箇所は _TODO_ / _ASSUMPTION_ で残し、根拠と次のアクションを記録する。pipeline では個票の対応結果と報告の `handoff` に書き、result を直接書ける実行形式では result に書く。
28
29
 
29
30
  ### grade result から展開された finding
30
31
 
31
32
  _GRADE_FINDINGS_
32
33
 
33
- plan に展開された finding は、message と同じ viewpoint ID の判定根拠に照らして解消する。未解消、根拠不足、または判断不能の場合は、理由と次のアクションを result に記録する。grade result サイドカーは再評価時に更新されるため、本タスクでは直接編集しない。
34
+ plan に展開された finding は、message と同じ viewpoint ID の判定根拠に照らして解消する。未解消、根拠不足、または判断不能の場合は、理由と次のアクションを記録する。pipeline では個票の対応結果と報告の `handoff` に書き、result を直接書ける実行形式では result に書く。grade result サイドカーは再評価時に更新されるため、本タスクでは直接編集しない。
34
35
 
35
36
  _AUTOPILOT_CONSTRAINTS_
36
37
 
@@ -38,7 +39,7 @@ _AUTOPILOT_CONSTRAINTS_
38
39
 
39
40
  1. 「進め方」に従って対応を完了する。
40
41
  2. 共通規約に従って、必要な整形・静的検査を実行する。
41
- 3. result に実施内容・変更ファイル・申し送りを記入する。これはタスク完了に必須であり、_TODO_ を残したまま終了しない(詳細は共通規約を参照)。
42
+ 3. result に実施内容・変更ファイル・申し送りを記入する。pipeline では executor は実施内容・変更ファイル・検証結果を報告し、申し送りを `handoff` に記載する。reporter と runner が result を記入する。これはタスク完了に必須であり、_TODO_ を残したまま終了しない(詳細は共通規約を参照)。
42
43
  4. 登録簿(`pjr-index.md`)の行と個票のステータス項目は変更しない。状態遷移(review / close など)は runner と人間が行う。
43
44
 
44
45
  ## 5. 異常終了の条件
@@ -130,7 +130,7 @@ members:
130
130
  roles: []
131
131
  type: agent
132
132
  provider: codex
133
- model: gpt-5.6-sol
133
+ model: gpt-6.1-sol
134
134
  effort: high
135
135
  mode: edit
136
136
  stage_role: executor
@@ -507,13 +507,13 @@ specdojo exec run --project <project-id> --task <task-id> \
507
507
 
508
508
  executor の出力は、そのまま reporter へ渡さずに run 単位の evidence へ整形して保存します。保存先は `<execution_path>/exec/evidence/<task-id>/<run-id>/` です。
509
509
 
510
- | ファイル | 内容 |
511
- | --------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
512
- | `evidence.json` | stage の実行結果、変更ファイル一覧、diff サマリ、検証結果、最終メッセージ、失敗理由、ログ参照 |
513
- | `executor.log` | executor の標準出力・標準エラーの抜粋(人が調査するための参照先) |
514
- | `reporter-attempt-<n>.stdout.log` / `reporter-attempt-<n>.stderr.log` | 失敗した reporter の形式試行ごとの stdout / stderr(秘匿処理後の生出力) |
515
- | `parent-validation-attempt-<n>-<id>.log` | 失敗した親検証の stdout / stderr(秘匿処理後の出力) |
516
- | `pipeline-state.json` | executor / reporter の状態・actor・試行回数・成果物参照 |
510
+ | ファイル | 内容 |
511
+ | --------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
512
+ | `evidence.json` | stage の実行結果、変更ファイル一覧、diff サマリ、検証結果、最終メッセージ、申し送り、失敗理由、ログ参照 |
513
+ | `executor.log` | executor の標準出力・標準エラーの抜粋(人が調査するための参照先) |
514
+ | `reporter-attempt-<n>.stdout.log` / `reporter-attempt-<n>.stderr.log` | 失敗した reporter の形式試行ごとの stdout / stderr(秘匿処理後の生出力) |
515
+ | `parent-validation-attempt-<n>-<id>.log` | 失敗した親検証の stdout / stderr(秘匿処理後の出力) |
516
+ | `pipeline-state.json` | executor / reporter の状態・actor・試行回数・成果物参照 |
517
517
 
518
518
  引き渡しの方針は次のとおりです。
519
519
 
@@ -524,10 +524,12 @@ executor の出力は、そのまま reporter へ渡さずに run 単位の evid
524
524
  - reporter が非ゼロ終了または形式エラーで失敗した場合、同じ reporter stage 内の各形式試行を `reporter-attempt-<n>.stdout.log` と `reporter-attempt-<n>.stderr.log` に保存します。同じ run を resume して再度失敗した場合は、直近の失敗内容でこれらのファイルと `log_refs` を置き換えます。
525
525
  - 親検証は失敗時だけ出力を保存し、成功時は要約だけを記録します。失敗ログは `parent-validation-output` として `log_refs` から参照します。同じ run の resume や統合段の再検証では attempt 番号を増やして新しいログを追加し、以前の失敗ログを上書きしません。親検証の要約は 1,000 文字以内で先頭と末尾を残すため、末尾に出る失敗ケース名と件数を evidence から確認できます。
526
526
  - evidence ディレクトリは Git の管理対象です。成功して統合された run のログは履歴に残り、失敗中の worktree では未コミットのまま保持されます。`--force-restart` などで worktree を破棄すると未コミットログも失われるため、必要な調査を先に行います。既知パターンは保存前に秘匿しますが、未知形式の秘密が残る可能性を考慮し、ログを外部共有する前に内容を確認します。
527
- - executor が構造化した最終報告を返す場合は、標準出力に `<specdojo_executor_evidence>` タグで JSON(`final_message`・`validations`)を出します。`validations[].status` は `passed` / `failed` / `not_run` / `not_applicable` / `requires_human` のいずれかです。`not_applicable` はリポジトリが検査の適用条件を満たさない場合に使い、`reason` へ理由を必ず記録します。`requires_human` は、実 agent CLI の起動、利用枠や課金を伴う操作、認証情報やホスト側の操作など、agent の sandbox から実行できない確認だけに使います。実行できるが省略した検証には使わず、`not_run` として記録します。タグが無い場合は標準出力の残りを最終メッセージとして扱います。
527
+ - executor が構造化した最終報告を返す場合は、標準出力に `<specdojo_executor_evidence>` タグで JSON(`final_message`・`validations`・省略可能な `completion_status`・`handoff`)を出します。`validations[].status` は `passed` / `failed` / `not_run` / `not_applicable` / `requires_human` のいずれかです。`not_applicable` はリポジトリが検査の適用条件を満たさない場合に使い、`reason` へ理由を必ず記録します。`requires_human` は、実 agent CLI の起動、利用枠や課金を伴う操作、認証情報やホスト側の操作など、agent の sandbox から実行できない確認だけに使います。実行できるが省略した検証には使わず、`not_run` として記録します。タグが無い場合は標準出力の残りを最終メッセージとして扱います。
528
528
  - `pipeline.parent_validations` には `validate-schema`(`npm run validate:schema`)、`typecheck`(`npm run typecheck`)、`test-unit`(`npm run test:unit`)、`test-integration`(`npm run test:integration`)、`lint-ts`(`npm run lint:ts`)、`lint-fm`(`npm run lint:fm`)、`lint-md`(`npm run lint:md`)、`build`(`npm run build`)、`format-check`(`npm run format:check`)を指定できます。親 runner は executor の成功後・reporter の起動前に、指定順で固定 argv の検証を実行します。
529
529
  - executor prompt には設定済み ID と対応コマンドを明示します。executor はそのコマンドや対象限定版を sandbox 内で実行せず、executor evidence の validations にも含めなくてよいものとします。親 runner の結果は `source: runner` と許可リスト `id` 付きで同じ `validations` 配列へ保存します。executor が同じ検査を `not_run` または `not_applicable` として含めた場合も、同じリポジトリで実行された親 runner の結果を正とします。これにより sandbox 内で成立しない検証を親へ移した場合も二重実行せず、executor の重複報告で run を止めません。
530
530
  - result の `changed_files` のパスは evidence の `changes` から、execution の evidence、project register とその派生ビュー、当該 result という runner 管理記録を除いて runner が機械生成します。除外後の変更一覧だけを reporter へ渡し、edit の変更説明は evidence のパスと対にして受け取ります。runner はパスで突き合わせるため、説明の順序は問いません。説明が不足したパスには Git の変更メタデータ(追加・変更・削除・名前の変更、行数)を記録し、変更ファイルが多い場合(50 件超)はディレクトリごとに集約して記録します。evidence にないパスの説明は捨てます。`outcome` と `block_reason` は stage の状態・終了コード・保護機構が保存した理由・executor / 親 runner の検証から機械生成します。reporter の JSON Schema は文章項目と対応づけ用のパスだけを受け付け、いずれかの検証が failed または `not_run` なら、reporter の文章にかかわらず機械判定は blocked です。ただし、executor が `not_run` または `not_applicable` と記録したコマンドを、親 runner が同じリポジトリで同じコマンドとして実行し成功していれば、親 runner の結果を正として executor の報告を無視します。さらに、`npm run <name>` に対応する script がない、`npx <package>` の package が `dependencies` / `devDependencies` にない、検査の対象となる種類の変更ファイルがない、または SpecDojo サブコマンドの設定上の適用条件を満たさないことを runner が機械的に確定できる場合、その `not_run` は block せず、edit result の申し送りへ「適用外の検証(runner の判定)」として追記します。変更ファイル種別で判定する対応は共通規約の検査表を正本とし、`validate:schema:file` は `*.yaml` / `*.yml`、Prettier は `*.md` / `*.ts` / `*.js` / `*.json` / `*.yaml` / `*.yml`、markdownlint は `*.md` の変更がある場合だけ適用対象とします。rename は変更前後の両方を見て、プロダクトリポジトリのコマンドはそのリポジトリの変更だけで判定します。`typecheck` など、この対応に含まれない検査の判定は変更しません。SpecDojo の起動形は `specdojo <subcommand>`、`npx specdojo <subcommand>`、ソース/配布済み CLI の直接起動を認識し、`catalog validate` は対象 project の `catalog_path` で判定します。対象 project は、コマンドの `--project <id>`、run の対象 project(runner が execution path に一致する project を設定から特定したもの)、`current_project` の順に決めます。別の project が `catalog_path` を持っていても、run の対象 project に `catalog_path` がなければ適用外です。対象 project に `catalog_path` があっても、executor の変更(runner 管理記録を除き、rename は変更前後の両方を見ます)が `docs/ja/projects/` 配下に及ばない run では、plan の共通規約の検証表と同じく適用外とし、executor の `not_applicable` も受理します。変更が及ぶ run では従来どおり適用対象です。また、`<repo>:<path>` を引数に含むコマンド、`--prefix <repo>` 付きのコマンド、または `$SPECDOJO_REPO_<NAME>` / `${SPECDOJO_REPO_<NAME>}` を含むコマンドは、対象 project が `repos` で宣言したそのプロダクトリポジトリの `package.json` で script と依存を判定します(`--prefix` はリポジトリ名か設定の `path` と一致するものを対象にします)。設定が読めない、対象 project を特定できない、または適用条件を未定義のサブコマンドは機械的な救済をせず、通常の `not_run` として扱います。executor の failed は親 runner の成功や適用外判定で打ち消しません。`npm run check` のように npm script を `&&` でつないだだけの合成コマンドを executor が `not_run` とした場合は、対象リポジトリの `package.json` の script を展開し、構成する各コマンドが同じリポジトリの親検証か executor 自身の検証で通っていれば満たされたものとして扱います。`npm test` は、`npm run test:unit` と `npm run test:integration` の両方が通っていれば満たされたものとします。構成するコマンドの script の中身と同じコマンドを executor が直接実行して通した場合も満たします(`tsx` の起動の書き方の違いはそろえて比べます)。任意のシェルを含む script は展開しません。理由付きの `not_applicable` は block の理由にせず、runner が edit result の申し送りへ「適用外の検証: `<コマンド>`(<理由>)」として機械的に追記します。ただし、理由がない場合、変更ファイル種別を含む適用条件を満たした `npm run <name>` の script が存在する場合、または同条件を満たした `npx <package>` の package が `dependencies` / `devDependencies` に存在する場合は誤申告として blocked にします。SpecDojo サブコマンドは package の有無だけでは反証せず、既知の適用条件を設定から判定します。適用条件が未定義なら理由付きの agent の申告に従います。`specdojo index build`(`npx specdojo index build`・`node --import tsx src/specdojo.ts index build` などの起動形を含みます)は runner が担う検証です。出力先の `.specdojo/doc-index.json` は agent が書き込めず、index は worktree の準備と統合の前に runner が再生成するため、executor への指示では実行も記録もしないよう伝えます。executor が `not_run` / `not_applicable` と記録しても block の理由にせず、`not_run` の場合は edit result の申し送りへ「runner が担う検証: `<コマンド>`(<理由>)」として追記します。runner の再生成が失敗した場合は worktree の準備で run が止まるか、runner の検証の失敗として block するため、満たしたものとは扱いません。executor の failed は救済せず、ほかの SpecDojo サブコマンドの `not_run` の扱いも変えません。executor の `requires_human` は block の理由にせず、runner が edit result の申し送りへ「人の確認が必要: `<コマンド>`(<要約>)」として機械的に追記します。項目は review へ進み、人が確認してから close します。
531
+ - `completion_status` は作業の完了状態を示す省略可能な欄で、値は `complete` / `incomplete` です。欄のない既存の報告は `complete` として扱います。値が指定されていてこの 2 値に合わない場合は、安全側に倒して `incomplete` として保存します。executor は計画の作業を終えられなかった場合、`incomplete` とし、理由を `final_message`、残作業を `handoff` に書きます。終了コード 0 や親検証の成功では未完了の申告を上書きしません。`exec run --register` は親検証・reporter を起動する前に停止し、項目を `waiting` にして、秘匿処理・文字数制限を適用した `final_message` の要旨を `block_reason` に記録します。worktree 実行では変更と evidence を残し、統合しません。pipeline の executor は `blocked`、evidence の `stage.status` と `exit_code` は実際のプロセス結果のままとします。`--resume --resume-from executor`(または `--resume`)で再開でき、前回の理由と `handoff`、途中の変更を executor に引き継ぎます。完了を申告し直し、必要な検証を通過してから review・統合へ進みます。
532
+ - `handoff` は executor が申し送る判断の理由、保護された設定の変更案、次のアクションなどの文字列配列です。先頭 100 件、各 4,000 文字までを秘匿処理して evidence に保存し、空文字列や文字列以外の要素は除外します。省略した既存の報告・evidence も有効です。reporter にはこの欄も渡し、edit result の「申し送り」には runner が reporter の補足と合わせて機械的に転記します。同一の文字列は重複させず、reporter が省略しても executor の記録は残します。register の完了条件が result への記録を求める場合、pipeline の executor は個票の対応結果と報告の `handoff` の両方に書きます。close の前には個票の対応結果と result の両方を確認します。
531
533
  - reporter の出力は JSON Schema で厳格に検証します。形式不正のときは同じ plan と evidence のまま reporter だけを最大 3 回再実行し、executor は再実行しません。
532
534
  - reporter stage の再開では、現在の設定 ID と一致する親検証が保存済み evidence にそろっている場合だけ executor evidence を再利用します。`{ id, repo }` を使う場合は、ID とリポジトリの組が一致することを求めます。再実行時も同じ割り当てで、各リポジトリの worktree を `cwd` にします。保存済みの親検証がすべて成功していれば再実行しません。`failed` / `not_run` があれば、親 runner が現在の worktree で固定許可リストの親検証を再実行し、同じ ID の結果を evidence 上で置換してから reporter へ渡します。過去の親検証ログは置換せず、新しい失敗ログだけを追加します。executor 由来の検証は再実行・置換しません。設定 ID が変わった、または結果が欠けている場合、Schedule 実行は新しい executor run としてやり直し、register 実行は明示的な再実行を促して再開を拒否します。
533
535
  - result の frontmatter は runner が scaffold した内容を保ち、本文は検証済みの reporter 文章と evidence 由来の事実を組み合わせて runner が描画します。reporter はファイルを書きません。
@@ -583,16 +585,44 @@ specdojo config scaffold --provider claude
583
585
 
584
586
  `specdojo init --exec` と `config scaffold` が配布する agent の名簿と定義は、実体と別名の 2 段構成です(0.4.0 から)。実体は model の系統と役割で名付け、provider・`model`・役割を持ちます。従来の名前は `aliases` で実体を指す別名として残します。claude と opencode の agent の定義は役割(executor・review executor・reporter)ごとの 1 ファイルで `model` を持たず、`command_params.by_mode` で mode から定義を選び、model は実体の `model` を `--model {model}` で渡します。
585
587
 
586
- | provider | init が生成する実体 | 別名(従来の名前) | model の書き場所 |
587
- | ----------- | ----------------------------------------------------------------- | -------------------------------------------------------------------- | ---------------------------------------------------- |
588
- | claude | `sonnet-executor`・`sonnet-review-executor`・`sonnet-reporter` | `claude-executor`・`claude-review-executor`・`claude-reporter` | 実体の `model`(`sonnet`) |
589
- | codex | `terra-executor`・`terra-review-executor`・`terra-reporter` | `codex-executor`・`codex-review-executor`・`codex-reporter` | 実体の `model`(effort は `by_proficiency`) |
590
- | opencode | `gemma-executor`・`gemma-review-executor`・`gemma-reporter` | `opencode-executor`・`opencode-review-executor`・`opencode-reporter` | 実体の `model`(`opencode.json` の provider 名込み) |
591
- | antigravity | `flash-executor`・`flash-review-executor`・`flash-reporter` | `agy-executor`・`agy-review-executor`・`agy-reporter` | 実体の `model`(推論強度を含む ID) |
592
- | copilot | `copilot-executor`・`copilot-review-executor`・`copilot-reporter` | なし(`--model auto` で model を自動選択するため系統で名付けない) | `command_template` の `--model auto` |
588
+ | provider | init が生成する実体 | 別名(従来の名前) | model の書き場所 |
589
+ | ----------- | ----------------------------------------------------------------- | -------------------------------------------------------------------- | ----------------------------------------------------------- |
590
+ | claude | `sonnet-executor`・`sonnet-review-executor`・`sonnet-reporter` | `claude-executor`・`claude-review-executor`・`claude-reporter` | 実体の `model`(`sonnet`) |
591
+ | claude | `opus-executor`・`opus-review-executor`(expert) | `claude-expert-executor`・`claude-expert-review-executor` | 実体の `model`(`opus`) |
592
+ | codex | `luna-executor`・`luna-review-executor`・`luna-reporter` | `codex-executor`・`codex-review-executor`・`codex-reporter` | 実体の `model`(`gpt-6-luna`、effort は `by_proficiency`) |
593
+ | codex | `sol-executor`・`sol-review-executor`(expert) | `codex-expert-executor`・`codex-expert-review-executor` | 実体の `model`(`gpt-6.1-sol`、effort は `by_proficiency`) |
594
+ | opencode | `gemma-executor`・`gemma-review-executor`・`gemma-reporter` | `opencode-executor`・`opencode-review-executor`・`opencode-reporter` | 実体の `model`(`opencode.json` の provider 名込み) |
595
+ | antigravity | `flash-executor`・`flash-review-executor`・`flash-reporter` | `agy-executor`・`agy-review-executor`・`agy-reporter` | 実体の `model`(推論強度を含む ID) |
596
+ | copilot | `copilot-executor`・`copilot-review-executor`・`copilot-reporter` | なし(`--model auto` で model を自動選択するため系統で名付けない) | `command_template` の `--model auto` |
597
+
598
+ claude と codex は normal と expert の 2 段を持ちます(0.4.6 から)。expert の実体には `proficiency: expert` を付けます。init が書く振り分けの表(`routing`)は、hard を expert の別名(`claude-expert-executor`・`codex-expert-executor`)、medium と easy を normal の別名にし、reporter はどの難易度でも normal の別名にします。expert の段がない provider(opencode・antigravity など)は、hard も normal の別名を使います。codex の reasoning effort は `by_proficiency` で normal が `medium`、expert が `high` で、`gpt-6-luna` は Max までしか受け付けないため Ultra を割り当てません。
593
599
 
594
600
  init は選んだ provider の実体だけを名簿へ書き、別名は向き先の実体が選ばれたものだけを残します。次の手順の案内(`--executor-by` / `--reporter-by`)には別名を示します。antigravity の `agent-members-snippet.yaml` は実体を `disabled: true` で配布するため、別名は末尾にコメントの例として置きます。別名は無効な member を指せないので、向き先の実体を有効にしたものだけを `aliases` へ写します。
595
601
 
602
+ `gpt-6-astra` は雛形の既定に入れません。使う場合は、次のように実体を名簿へ足し、`--executor-by astra-executor` や `routing` で指名します。
603
+
604
+ ```yaml
605
+ members:
606
+ - nickname: astra-executor
607
+ display_name: Codex Astra Executor
608
+ email: null
609
+ roles: []
610
+ type: agent
611
+ provider: codex
612
+ model: gpt-6-astra
613
+ mode: edit
614
+ stage_role: executor
615
+ capabilities: [web_search]
616
+ proficiency: expert
617
+ priority: 1
618
+ persona: task-executor
619
+ scheduler_strategy: critical-first
620
+ ```
621
+
622
+ 0.4.5 までの init が作った名簿(`terra-executor` などの `gpt-5.6-terra` の実体と `orch:terra`)は、init も scaffold も書き換えません。新しい名前へそろえる場合は、`.specdojo/agent-members.yaml` の `terra-*` を `luna-*`(`model: gpt-6-luna`)へ名前を変え、`sol-*` を加えるか `model` を `gpt-6.1-sol` にし、`aliases` の `codex-*` の向き先を合わせます。`package.json` は `config scaffold --provider codex` を実行すると `orch:luna` が加わります。不要になった `orch:terra` は手で消し、既存の `orch:sol` は上書きされないため `-m gpt-6.1-sol` へ手で直します。
623
+
624
+ 配布する `templates/codex/agents/*.toml` も名簿と同じく GPT-6 の 2 段構成(normal の `codex-executor`・`codex-review-executor` は `gpt-6-luna`、expert の `codex-expert-executor`・`codex-expert-review-executor` と `specdojo-orchestrator` は `gpt-6.1-sol`)にそろえています。既存の利用者の `.codex/agents/*.toml` は scaffold でも上書きされないため、`specdojo config scaffold --provider codex --force` で配布原本を再配置するか、各 `.codex/agents/*.toml` の `model`(`gpt-5.4-mini`・`gpt-5.5`・`gpt-5.6-terra`)を手動で `gpt-6-luna` / `gpt-6.1-sol` へ書き換えます。
625
+
596
626
  既存の利用者の 1 段の名簿(`aliases` も `model` も持たない member と、`--agent {nickname}` の `command_template`)は、変更しなくてもそのまま動きます。
597
627
 
598
628
  - `aliases` は省略でき、`model` を持たない member は従来どおり `command_params`(`by_proficiency` など)の `model` で起動します。member の `model` がある場合だけ、そちらが優先されます。