spec-runner 1.1.7 → 1.1.9

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 (92) hide show
  1. package/README.md +51 -80
  2. package/bin/spec-runner-installer.js +411 -0
  3. package/install.sh +1 -1
  4. package/package.json +7 -6
  5. package/spec-runner/templates/.claude/agents/code-reviewer.md +69 -0
  6. package/spec-runner/templates/.claude/agents/design-reviewer.md +65 -0
  7. package/spec-runner/templates/.claude/agents/test-runner.md +34 -0
  8. package/spec-runner/templates/.claude/rules/coding.md +106 -0
  9. package/spec-runner/templates/.claude/rules/design-docs.md +63 -0
  10. package/spec-runner/templates/.claude/skills/architecture-definition/SKILL.md +60 -0
  11. package/spec-runner/templates/.claude/skills/architecture-skill-development/SKILL.md +126 -0
  12. package/spec-runner/templates/.claude/skills/commit/SKILL.md +83 -0
  13. package/spec-runner/templates/.claude/skills/design-change/SKILL.md +94 -0
  14. package/spec-runner/templates/.claude/skills/design-change/references//345/275/261/351/237/277/347/257/204/345/233/262/343/203/201/343/202/247/343/203/203/343/202/257/343/203/252/343/202/271/343/203/210.md +66 -0
  15. package/spec-runner/templates/.claude/skills/design-change/templates/90_ADR/ADR/343/203/206/343/203/263/343/203/227/343/203/254/343/203/274/343/203/210.md +81 -0
  16. package/spec-runner/templates/.claude/skills/existing-project-to-docs/SKILL.md +57 -0
  17. package/spec-runner/templates/.claude/skills/harness-engineering/SKILL.md +100 -0
  18. package/spec-runner/templates/.claude/skills/plugin-development/SKILL.md +173 -0
  19. package/spec-runner/templates/.claude/skills/plugin-development/templates/01_/350/246/201/344/273/266/345/256/232/347/276/251//346/246/202/350/246/201/343/203/206/343/203/263/343/203/227/343/203/254/343/203/274/343/203/210.md +88 -0
  20. package/spec-runner/templates/.claude/skills/plugin-development/templates/02_/346/246/202/350/246/201/350/250/255/350/250/210/90_ADR/ADR/343/203/206/343/203/263/343/203/227/343/203/254/343/203/274/343/203/210.md +81 -0
  21. package/spec-runner/templates/.claude/skills/plugin-development/templates/02_/346/246/202/350/246/201/350/250/255/350/250/210//343/202/267/343/202/271/343/203/206/343/203/240/345/205/250/344/275/223/344/277/257/347/236/260/343/203/206/343/203/263/343/203/227/343/203/254/343/203/274/343/203/210.md +80 -0
  22. package/spec-runner/templates/.claude/skills/plugin-development/templates/02_/346/246/202/350/246/201/350/250/255/350/250/210//343/203/246/343/203/274/343/202/271/343/202/261/343/203/274/343/202/271/344/270/200/350/246/247/343/203/206/343/203/263/343/203/227/343/203/254/343/203/274/343/203/210.md +57 -0
  23. package/spec-runner/templates/.claude/skills/plugin-development/templates/03_/350/251/263/347/264/260/350/250/255/350/250/210/infrastructure/aws.md +53 -0
  24. package/spec-runner/templates/.claude/skills/plugin-development/templates/03_/350/251/263/347/264/260/350/250/255/350/250/210/infrastructure/database.md +54 -0
  25. package/spec-runner/templates/.claude/skills/plugin-development/templates/03_/350/251/263/347/264/260/350/250/255/350/250/210/infrastructure/schema.dbml +25 -0
  26. package/spec-runner/templates/.claude/skills/plugin-development/templates/03_/350/251/263/347/264/260/350/250/255/350/250/210/infrastructure/sequence//343/202/267/343/203/274/343/202/261/343/203/263/343/202/271/345/233/263/343/203/206/343/203/263/343/203/227/343/203/254/343/203/274/343/203/210.md +28 -0
  27. package/spec-runner/templates/.claude/skills/plugin-development/templates/03_/350/251/263/347/264/260/350/250/255/350/250/210/src/agents/{agent_name}/agent.md +56 -0
  28. package/spec-runner/templates/.claude/skills/plugin-development/templates/03_/350/251/263/347/264/260/350/250/255/350/250/210/src/agents/{agent_name}/config.md +47 -0
  29. package/spec-runner/templates/.claude/skills/plugin-development/templates/03_/350/251/263/347/264/260/350/250/255/350/250/210/src/agents/{agent_name}/domain.md +67 -0
  30. package/spec-runner/templates/.claude/skills/plugin-development/templates/03_/350/251/263/347/264/260/350/250/255/350/250/210/src/agents/{agent_name}/prompts.md +72 -0
  31. package/spec-runner/templates/.claude/skills/plugin-development/templates/03_/350/251/263/347/264/260/350/250/255/350/250/210/src/plugins/skills/{skill_name}/skill.md +53 -0
  32. package/spec-runner/templates/.claude/skills/plugin-development/templates/03_/350/251/263/347/264/260/350/250/255/350/250/210/src/plugins/tools/{tool_name}/tool.md +51 -0
  33. package/spec-runner/templates/.claude/skills/test-driven-development/SKILL.md +211 -0
  34. package/spec-runner/templates/.github/agents/code-reviewer.agent.md +69 -0
  35. package/spec-runner/templates/.github/agents/design-reviewer.agent.md +65 -0
  36. package/spec-runner/templates/.github/agents/test-runner.agent.md +34 -0
  37. package/spec-runner/templates/.github/instructions/coding.instructions.md +105 -0
  38. package/spec-runner/templates/.github/instructions/design-docs.instructions.md +62 -0
  39. package/spec-runner/templates/.github/skills/architecture-definition/SKILL.md +60 -0
  40. package/spec-runner/templates/.github/skills/architecture-skill-development/SKILL.md +126 -0
  41. package/spec-runner/templates/.github/skills/commit/SKILL.md +83 -0
  42. package/spec-runner/templates/.github/skills/design-change/SKILL.md +94 -0
  43. package/spec-runner/templates/.github/skills/design-change/references//345/275/261/351/237/277/347/257/204/345/233/262/343/203/201/343/202/247/343/203/203/343/202/257/343/203/252/343/202/271/343/203/210.md +66 -0
  44. package/spec-runner/templates/.github/skills/design-change/templates/90_ADR/ADR/343/203/206/343/203/263/343/203/227/343/203/254/343/203/274/343/203/210.md +81 -0
  45. package/spec-runner/templates/.github/skills/existing-project-to-docs/SKILL.md +57 -0
  46. package/spec-runner/templates/.github/skills/harness-engineering/SKILL.md +100 -0
  47. package/spec-runner/templates/.github/skills/plugin-development/SKILL.md +173 -0
  48. package/spec-runner/templates/.github/skills/plugin-development/templates/01_/350/246/201/344/273/266/345/256/232/347/276/251//346/246/202/350/246/201/343/203/206/343/203/263/343/203/227/343/203/254/343/203/274/343/203/210.md +88 -0
  49. package/spec-runner/templates/.github/skills/plugin-development/templates/02_/346/246/202/350/246/201/350/250/255/350/250/210/90_ADR/ADR/343/203/206/343/203/263/343/203/227/343/203/254/343/203/274/343/203/210.md +81 -0
  50. package/spec-runner/templates/.github/skills/plugin-development/templates/02_/346/246/202/350/246/201/350/250/255/350/250/210//343/202/267/343/202/271/343/203/206/343/203/240/345/205/250/344/275/223/344/277/257/347/236/260/343/203/206/343/203/263/343/203/227/343/203/254/343/203/274/343/203/210.md +80 -0
  51. package/spec-runner/templates/.github/skills/plugin-development/templates/02_/346/246/202/350/246/201/350/250/255/350/250/210//343/203/246/343/203/274/343/202/271/343/202/261/343/203/274/343/202/271/344/270/200/350/246/247/343/203/206/343/203/263/343/203/227/343/203/254/343/203/274/343/203/210.md +57 -0
  52. package/spec-runner/templates/.github/skills/plugin-development/templates/03_/350/251/263/347/264/260/350/250/255/350/250/210/infrastructure/aws.md +53 -0
  53. package/spec-runner/templates/.github/skills/plugin-development/templates/03_/350/251/263/347/264/260/350/250/255/350/250/210/infrastructure/database.md +54 -0
  54. package/spec-runner/templates/.github/skills/plugin-development/templates/03_/350/251/263/347/264/260/350/250/255/350/250/210/infrastructure/schema.dbml +25 -0
  55. package/spec-runner/templates/.github/skills/plugin-development/templates/03_/350/251/263/347/264/260/350/250/255/350/250/210/infrastructure/sequence//343/202/267/343/203/274/343/202/261/343/203/263/343/202/271/345/233/263/343/203/206/343/203/263/343/203/227/343/203/254/343/203/274/343/203/210.md +28 -0
  56. package/spec-runner/templates/.github/skills/plugin-development/templates/03_/350/251/263/347/264/260/350/250/255/350/250/210/src/agents/{agent_name}/agent.md +56 -0
  57. package/spec-runner/templates/.github/skills/plugin-development/templates/03_/350/251/263/347/264/260/350/250/255/350/250/210/src/agents/{agent_name}/config.md +47 -0
  58. package/spec-runner/templates/.github/skills/plugin-development/templates/03_/350/251/263/347/264/260/350/250/255/350/250/210/src/agents/{agent_name}/domain.md +67 -0
  59. package/spec-runner/templates/.github/skills/plugin-development/templates/03_/350/251/263/347/264/260/350/250/255/350/250/210/src/agents/{agent_name}/prompts.md +72 -0
  60. package/spec-runner/templates/.github/skills/plugin-development/templates/03_/350/251/263/347/264/260/350/250/255/350/250/210/src/plugins/skills/{skill_name}/skill.md +53 -0
  61. package/spec-runner/templates/.github/skills/plugin-development/templates/03_/350/251/263/347/264/260/350/250/255/350/250/210/src/plugins/tools/{tool_name}/tool.md +51 -0
  62. package/spec-runner/templates/.github/skills/test-driven-development/SKILL.md +211 -0
  63. package/bin/spec-runner.js +0 -270
  64. package/docs/flow.md +0 -72
  65. package/templates/.spec-runner/project.json.example +0 -27
  66. package/templates/.spec-runner/scripts/check.sh +0 -390
  67. package/templates/.spec-runner/scripts/spec-runner-core.sh +0 -289
  68. package/templates/.spec-runner/scripts/uc-next-start.sh +0 -161
  69. package/templates/.spec-runner/spec-runner.sh +0 -29
  70. package/templates/.spec-runner/steps/steps.json +0 -96
  71. package/templates/.spec-runner/steps//343/203/206/343/202/271/343/203/210/350/250/255/350/250/210.md +0 -58
  72. package/templates/.spec-runner/steps//343/203/211/343/203/241/343/202/244/343/203/263/350/250/255/350/250/210.md +0 -52
  73. package/templates/.spec-runner/steps//344/273/225/346/247/230/347/255/226/345/256/232.md +0 -210
  74. package/templates/.spec-runner/steps//345/210/206/346/236/220.md +0 -106
  75. package/templates/.spec-runner/steps//345/256/237/350/243/205.md +0 -80
  76. package/templates/.spec-runner/steps//345/256/237/350/243/205/350/250/210/347/224/273.md +0 -96
  77. package/templates/.spec-runner/steps//346/206/262/347/253/240.md +0 -95
  78. package/templates/.spec-runner/steps//346/233/226/346/230/247/343/201/225/350/247/243/346/266/210.md +0 -110
  79. package/templates/.spec-runner/templates/UC-N-MMDD-/345/210/244/346/226/255/350/250/230/351/214/262/343/203/206/343/203/263/343/203/227/343/203/254.md +0 -33
  80. package/templates/.spec-runner/templates/UC-N-/343/203/246/343/203/274/343/202/271/343/202/261/343/203/274/343/202/271/345/220/215.md +0 -26
  81. package/templates/.spec-runner/templates/phase-locks.json +0 -49
  82. package/templates/.spec-runner/templates//343/203/211/343/203/241/343/202/244/343/203/263/343/203/242/343/203/207/343/203/253.md +0 -21
  83. package/templates/.spec-runner/templates//343/203/246/343/203/223/343/202/255/343/202/277/343/202/271/350/250/200/350/252/236/350/276/236/346/233/270.md +0 -16
  84. package/templates/.spec-runner/templates//346/206/262/347/253/240.md +0 -51
  85. package/templates/.spec-runner/templates//351/233/206/347/264/204.md +0 -46
  86. package/templates/mkdocs-scaffold/docs/index.md +0 -32
  87. package/templates/mkdocs-scaffold/mkdocs.yml +0 -16
  88. package/templates/mkdocs-scaffold/requirements-docs.txt +0 -2
  89. package/templates/skills/uc-k1-work-card-init/SKILL.md +0 -76
  90. package/templates/skills/uc-k2-pre-commit-check/SKILL.md +0 -57
  91. package/templates/skills/uc-k3-spec-impl-diff-review/SKILL.md +0 -57
  92. package/templates/spec-runner-command.md +0 -51
@@ -1,270 +0,0 @@
1
- #!/usr/bin/env node
2
- "use strict";
3
-
4
- /**
5
- * spec-runner インストーラー(templates/.spec-runner ベース)
6
- *
7
- * ゴール:
8
- * - `npx spec-runner` または `npm exec spec-runner` を実行すると、
9
- * プロジェクト直下に `./.spec-runner/` フォルダを作成する。
10
- * - Claude Code から `/spec-runner` を実行すれば、
11
- * 「現在フェーズ」と「やるべきステップ .md」が 1 本だけ返ってくる。
12
- * - メッセージ・ファイルはすべて日本語のみ。
13
- *
14
- * 重要:
15
- * - すでに `.spec-runner/` が存在する場合はデフォルトでは上書きしない。
16
- * 上書きしたい場合は、環境変数 `SPEC_RUNNER_FORCE=1` を付けて実行する。
17
- *
18
- * 必須テンプレ(パッケージ内):
19
- * - templates/.spec-runner/project.json.example
20
- * - templates/.spec-runner/templates/phase-locks.json
21
- *
22
- * MkDocs(任意・プロジェクトルート):
23
- * - templates/mkdocs-scaffold/ の mkdocs.yml / requirements-docs.txt / docs/index.md を
24
- * 未有効時のみコピー(憲章・設計書は既存の docs/01..06 をそのまま閲覧)
25
- */
26
-
27
- const fs = require("fs");
28
- const path = require("path");
29
-
30
- const CWD = process.cwd();
31
- const PKG_DIR = path.resolve(__dirname, "..");
32
- const TEMPLATE_SPEC_RUNNER_DIR = path.join(PKG_DIR, "templates", ".spec-runner");
33
- const DEST_DIR = path.join(CWD, ".spec-runner");
34
- const TEMPLATES_DIR = path.join(TEMPLATE_SPEC_RUNNER_DIR, "templates");
35
- const PHASE_LOCKS_TEMPLATE = path.join(TEMPLATES_DIR, "phase-locks.json");
36
- const MKDOCS_SCAFFOLD_DIR = path.join(PKG_DIR, "templates", "mkdocs-scaffold");
37
- const SKILLS_TEMPLATE_DIR = path.join(PKG_DIR, "templates", "skills");
38
-
39
- /** コピー時はスキップし、FORCE 時は消さない(ユーザー状態を保持) */
40
- const USER_STATE_BASENAMES = new Set([
41
- "project.json",
42
- "phase-locks.json",
43
- ]);
44
-
45
- function log(msg) {
46
- console.log(msg);
47
- }
48
-
49
- function info(msg) {
50
- console.log(`ℹ ${msg}`);
51
- }
52
-
53
- function ok(msg) {
54
- console.log(`✓ ${msg}`);
55
- }
56
-
57
- function error(msg) {
58
- console.error(`ERROR: ${msg}`);
59
- }
60
-
61
- function exists(p) {
62
- try {
63
- fs.accessSync(p);
64
- return true;
65
- } catch {
66
- return false;
67
- }
68
- }
69
-
70
- function ensureTemplateDirOrExit() {
71
- if (!exists(TEMPLATE_SPEC_RUNNER_DIR)) {
72
- error("パッケージ内に templates/.spec-runner テンプレートが見つかりません。");
73
- process.exit(1);
74
- }
75
- if (!exists(path.join(TEMPLATE_SPEC_RUNNER_DIR, "project.json.example"))) {
76
- error("必須テンプレ project.json.example が見つかりません。");
77
- process.exit(1);
78
- }
79
- if (!exists(PHASE_LOCKS_TEMPLATE)) {
80
- error("必須テンプレ templates/phase-locks.json が見つかりません。");
81
- process.exit(1);
82
- }
83
- }
84
-
85
- function assertDestInstallableOrExit() {
86
- const force = process.env.SPEC_RUNNER_FORCE === "1";
87
- if (!exists(DEST_DIR)) return;
88
- if (force) {
89
- info("既存の .spec-runner/ を上書きします(SPEC_RUNNER_FORCE=1)。");
90
- return;
91
- }
92
- error(".spec-runner/ フォルダがすでに存在します。");
93
- info("上書きする場合は、環境変数 SPEC_RUNNER_FORCE=1 を付けて実行してください。");
94
- info("例: SPEC_RUNNER_FORCE=1 npx spec-runner");
95
- process.exit(1);
96
- }
97
-
98
- /** FORCE 時: テンプレから消えたファイルも反映できるよう、保持対象以外を削除 */
99
- function wipeDestExceptUserState() {
100
- if (!exists(DEST_DIR) || process.env.SPEC_RUNNER_FORCE !== "1") return;
101
- for (const entry of fs.readdirSync(DEST_DIR, { withFileTypes: true })) {
102
- if (USER_STATE_BASENAMES.has(entry.name)) continue;
103
- fs.rmSync(path.join(DEST_DIR, entry.name), { recursive: true, force: true });
104
- }
105
- }
106
-
107
- function copyDirRecursively(src, dest, options = {}) {
108
- const { skipNames = new Set() } = options;
109
- if (!exists(src)) return;
110
- const stat = fs.statSync(src);
111
- if (!stat.isDirectory()) {
112
- throw new Error(`ディレクトリではありません: ${src}`);
113
- }
114
-
115
- fs.mkdirSync(dest, { recursive: true });
116
-
117
- for (const entry of fs.readdirSync(src, { withFileTypes: true })) {
118
- if (skipNames.has(entry.name)) continue;
119
- const srcPath = path.join(src, entry.name);
120
- const destPath = path.join(dest, entry.name);
121
-
122
- if (entry.isDirectory()) {
123
- copyDirRecursively(srcPath, destPath, { skipNames });
124
- } else {
125
- fs.mkdirSync(path.dirname(destPath), { recursive: true });
126
- fs.copyFileSync(srcPath, destPath);
127
- ok(path.relative(CWD, destPath));
128
- }
129
- }
130
- }
131
-
132
- function expandTemplateTree() {
133
- copyDirRecursively(TEMPLATE_SPEC_RUNNER_DIR, DEST_DIR, {
134
- skipNames: USER_STATE_BASENAMES,
135
- });
136
- }
137
-
138
- function bootstrapProjectJson() {
139
- const examplePath = path.join(TEMPLATE_SPEC_RUNNER_DIR, "project.json.example");
140
- const projectJsonDest = path.join(DEST_DIR, "project.json");
141
- fs.writeFileSync(projectJsonDest, fs.readFileSync(examplePath, "utf8"), "utf8");
142
- ok(path.relative(CWD, projectJsonDest));
143
- }
144
-
145
- /**
146
- * フェーズ用 JSON は templates/.spec-runner/templates/*.json を正とする。
147
- * .spec-runner/ 直下に無いときだけコピー(既存のロックは上書きしない)。
148
- */
149
- function writeInitialLocks() {
150
- const locksDest = path.join(DEST_DIR, "phase-locks.json");
151
- if (!exists(locksDest)) {
152
- fs.copyFileSync(PHASE_LOCKS_TEMPLATE, locksDest);
153
- ok(path.relative(CWD, locksDest));
154
- }
155
- }
156
-
157
- function installClaudeCommandIfPresent() {
158
- const commandTmpl = path.join(PKG_DIR, "templates", "spec-runner-command.md");
159
- if (!exists(commandTmpl)) return;
160
- const claudeCmd = path.join(CWD, ".claude", "commands", "spec-runner.md");
161
- fs.mkdirSync(path.dirname(claudeCmd), { recursive: true });
162
- fs.writeFileSync(claudeCmd, fs.readFileSync(commandTmpl, "utf8"), "utf8");
163
- ok(path.relative(CWD, claudeCmd));
164
- }
165
-
166
- function installClaudeSkillsTemplatesIfPresent() {
167
- if (!exists(SKILLS_TEMPLATE_DIR)) return;
168
- const destRoot = path.join(CWD, ".claude", "skills");
169
- info("Skills テンプレート(不足分のみ)を .claude/skills に配置します...");
170
-
171
- function walk(srcDir, rel = "") {
172
- for (const entry of fs.readdirSync(srcDir, { withFileTypes: true })) {
173
- const srcPath = path.join(srcDir, entry.name);
174
- const relPath = path.join(rel, entry.name);
175
- const destPath = path.join(destRoot, relPath);
176
- if (entry.isDirectory()) {
177
- walk(srcPath, relPath);
178
- } else {
179
- if (exists(destPath)) continue;
180
- fs.mkdirSync(path.dirname(destPath), { recursive: true });
181
- fs.copyFileSync(srcPath, destPath);
182
- ok(path.relative(CWD, destPath));
183
- }
184
- }
185
- }
186
-
187
- walk(SKILLS_TEMPLATE_DIR);
188
- }
189
-
190
- /**
191
- * MkDocs + Material 用のファイルをプロジェクトルートに配置(未存在時のみ)。
192
- * 設計書本体は steps.json どおり docs/01..06 に置かれ、mkdocs の docs_dir でそのまま掲載する。
193
- */
194
- function copyFileIfMissing(src, dest) {
195
- if (!exists(src) || exists(dest)) return false;
196
- fs.mkdirSync(path.dirname(dest), { recursive: true });
197
- fs.copyFileSync(src, dest);
198
- ok(path.relative(CWD, dest));
199
- return true;
200
- }
201
-
202
- function appendGitignoreVenvDocsIfNeeded() {
203
- const gitignorePath = path.join(CWD, ".gitignore");
204
- const marker = ".venv-docs/";
205
- if (!exists(gitignorePath)) return;
206
- const raw = fs.readFileSync(gitignorePath, "utf8");
207
- const lines = raw.split(/\r?\n/);
208
- if (lines.some((line) => /^\.venv-docs\/?$/.test(line.trim()))) return;
209
- fs.appendFileSync(
210
- gitignorePath,
211
- `\n# spec-runner: MkDocs 用 Python 仮想環境\n${marker}\n`,
212
- "utf8",
213
- );
214
- ok(`${path.relative(CWD, gitignorePath)}(${marker} を追記)`);
215
- }
216
-
217
- function installMkdocsScaffold() {
218
- if (!exists(MKDOCS_SCAFFOLD_DIR)) {
219
- info("MkDocs テンプレート(templates/mkdocs-scaffold)が見つかりません。スキップします。");
220
- return;
221
- }
222
- info("MkDocs 用ファイル(不足分のみ)をプロジェクトルートに配置します...");
223
- copyFileIfMissing(
224
- path.join(MKDOCS_SCAFFOLD_DIR, "mkdocs.yml"),
225
- path.join(CWD, "mkdocs.yml"),
226
- );
227
- copyFileIfMissing(
228
- path.join(MKDOCS_SCAFFOLD_DIR, "requirements-docs.txt"),
229
- path.join(CWD, "requirements-docs.txt"),
230
- );
231
- copyFileIfMissing(
232
- path.join(MKDOCS_SCAFFOLD_DIR, "docs", "index.md"),
233
- path.join(CWD, "docs", "index.md"),
234
- );
235
- appendGitignoreVenvDocsIfNeeded();
236
- }
237
-
238
- function printBanner() {
239
- log("");
240
- log("╔════════════════════════════════════════╗");
241
- log("║ spec-runner インストーラ ║");
242
- log("║ フェーズ駆動 / 次のステップ方式 ║");
243
- log("╚════════════════════════════════════════╝");
244
- log("");
245
- }
246
-
247
- function printFooter() {
248
- log("");
249
- log("次のステップ(Claude Code 専用):");
250
- log(" /spec-runner を実行して");
251
- log("");
252
- }
253
-
254
- function main() {
255
- printBanner();
256
- ensureTemplateDirOrExit();
257
- installMkdocsScaffold();
258
- assertDestInstallableOrExit();
259
-
260
- info(".spec-runner/ を展開しています...");
261
- wipeDestExceptUserState();
262
- expandTemplateTree();
263
- bootstrapProjectJson();
264
- writeInitialLocks();
265
- installClaudeCommandIfPresent();
266
- installClaudeSkillsTemplatesIfPresent();
267
- printFooter();
268
- }
269
-
270
- main();
package/docs/flow.md DELETED
@@ -1,72 +0,0 @@
1
- # spec-runner フロー(シンプル版)
2
-
3
- このドキュメントは、`templates/.spec-runner/scripts/spec-runner-core.sh` と `templates/.spec-runner/steps/steps.json` に合わせた最新フローを説明する。
4
-
5
- ## 入口コマンド
6
-
7
- | 用途 | コマンド |
8
- |---|---|
9
- | 次のステップ | `./.spec-runner/spec-runner.sh 次のステップ --json` |
10
- | lock 状態表示 | `./.spec-runner/spec-runner.sh 次のステップ --lock` |
11
-
12
- ## 設計方針
13
-
14
- - `spec-runner` は **薄いオーケストレータ**(次の一手を返す)
15
- - 正本は `docs/work.md`
16
- - 主線は 6 ステップ(実行フェーズは5本 + 憲章)、横断は 2 ステップ
17
- - ブランチ運用やグレード判定は強制しない
18
-
19
- ## 主線 6 ステップ
20
-
21
- 1. `charter`(憲章)
22
- 2. `uc_spec`(仕様策定)
23
- 3. `domain`(ドメイン設計)
24
- 4. `architecture_plan`(実装計画)
25
- 5. `test_design`(テスト設計)
26
- 6. `implement`(実装)
27
-
28
- ※ 運用上は「実行フェーズ5本(仕様→ドメイン→計画→テスト→実装)+ 憲章」で扱う。
29
-
30
- ## 横断 2 ステップ
31
-
32
- - `clarify`(曖昧さ解消)
33
- - `analyze`(分析)
34
-
35
- これらは任意タイミングで使う補助ステップ。主線フェーズを増やさない。
36
-
37
- ## 次ステップ判定(概要)
38
-
39
- `spec-runner-core.sh` は lock と成果物から次を返す。
40
-
41
- 1. `charter.completed` が false
42
- - 憲章が未整備なら `charter`
43
- - 憲章があるなら `clarify` / `analyze` を先に返すことがある
44
- 2. `uc_discovery.completed` が false
45
- - 未レビュー UC があれば `clarify` / `analyze`(UC 整合性チェック)
46
- - すべてレビュー済みなら `uc_spec`(次 UC 作成)
47
- 3. `domain.completed` が false
48
- - 未レビュー UC が 1 件でも残っていれば先に `clarify` / `analyze`
49
- - 全 UC レビュー済みなら `domain`(必要に応じ `clarify` / `analyze`)
50
- 4. `architecture.completed` が false
51
- - `architecture_plan`(必要に応じ `clarify` / `analyze`)
52
- - lock が true でも、設計成果物(`docs/03` / `docs/04` の `.md`)が無い場合は該当設計フェーズに戻る
53
- 5. 最新 UC がレビュー済みかつテスト準備済み
54
- - `implement`
55
- それ以外は `test_design`
56
-
57
- ## 正本(Single Source)
58
-
59
- - フロー定義: `.spec-runner/steps/steps.json`
60
- - 進行状態: `.spec-runner/phase-locks.json`
61
- - 作業正本: `docs/work.md`
62
- - 仕様本文: `docs/01..06`, `docs/02_ユースケース仕様/**`
63
- - 実装検証: `tests/**`, `test_command.run`
64
-
65
- ## 運用ルール(最小)
66
-
67
- 1. 実装前に `docs/work.md` の受入条件を埋める
68
- 2. 作業中は `docs/work.md` のタスクを更新する
69
- 3. コミット前に `docs/work.md` の `- [ ]` を確認する
70
- 4. 完了時に `docs/work.md` の検証結果を更新する
71
- 5. UC を十分に作ってレビュー完了したら `uc_discovery.completed` を `true` にする
72
- 6. カテゴリは箱として扱い、1カテゴリに UC を複数(目安 2〜3 件以上)用意してからドメインへ進む
@@ -1,27 +0,0 @@
1
- {
2
- "_comment": "AI が編集して作成。other_work_prefixes は UC 以外の作業用ブランチ(例: feature/cicd/xxx)。",
3
- "_comment_required_docs": "required_docs は steps.json を単一ソースにするため、\"steps:<common.docsキー>[/suffix]\" を指定できる(例: steps:openapi, steps:domain_root/集約.md)。",
4
- "naming": {
5
- "branch_prefix": "feature",
6
- "uc_id_pattern": "UC-[0-9]+",
7
- "uc_spec_basename": "{uc_id}-{slug}.md",
8
- "adr_basename": "MMDD-{title}.md",
9
- "docs_05_categories": true,
10
- "other_work_prefixes": ["work", "infra", "cicd"]
11
- },
12
- "required_docs": {
13
- "charter": ["steps:charter"],
14
- "domain": ["steps:domain_root/ユビキタス言語辞書.md", "steps:domain_root/ドメインモデル.md", "steps:domain_root/集約.md"],
15
- "architecture": ["steps:architecture_root/パターン選定.md", "steps:architecture_root/インフラ方針.md", "steps:architecture_root/設計判断記録"],
16
- "grade_a": ["steps:infra_root/schema.dbml"],
17
- "gate3_openapi": ["steps:openapi"]
18
- },
19
- "test_design": {
20
- "dir": "tests",
21
- "pattern": "*.spec.*",
22
- "require_uc_prefixed_tests": false
23
- },
24
- "test_command": {
25
- "run": "npm test"
26
- }
27
- }