specdojo 0.9.1 → 0.9.2
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/.github/agents/specdojo-orchestrator.md +7 -0
- package/CHANGELOG.md +23 -0
- package/README.md +4 -4
- package/dist/commands/agent.js +15 -24
- package/dist/commands/init.js +8 -5
- package/dist/commands/orchestrator.js +6 -11
- package/dist/dashboard/timeline.js +2 -2
- package/dist/devcontainer/command.js +1 -1
- package/dist/devcontainer/scaffold.js +6 -5
- package/dist/exec/agent-config.js +4 -0
- package/dist/exec/commands.js +54 -4
- package/dist/exec/executor-outcome-checks.js +104 -0
- package/dist/exec/migrate-records.js +3 -1
- package/dist/exec/parent-validation.js +66 -15
- package/dist/exec/pipeline-state.js +16 -0
- package/dist/exec/register.js +4 -0
- package/dist/exec/run/agent-pipeline.js +44 -3
- package/dist/exec/run/register-command.js +9 -0
- package/dist/exec/run/register-core.js +2 -1
- package/dist/exec/run/register-resume.js +19 -2
- package/dist/exec/run/register-worktree.js +2 -1
- package/dist/exec/run/resume-notes.js +50 -0
- package/dist/exec/run/shared.js +5 -0
- package/dist/exec/task-repos.js +6 -0
- package/dist/exec/validation-process-group.js +98 -0
- package/dist/grade/command-inspect.js +3 -1
- package/dist/grade/command-run.js +1 -0
- package/dist/grade/command-shared.js +10 -0
- package/dist/grade/run.js +58 -6
- package/dist/grade/targets.js +106 -0
- package/dist/register/create-commands.js +30 -3
- package/dist/register/events.js +1 -1
- package/dist/register/item.js +1 -0
- package/dist/register/maintenance-commands.js +3 -1
- package/dist/register/renumber.js +14 -1
- package/dist/register/section.js +114 -0
- package/dist/register/update.js +18 -0
- package/dist/shared/antigravity-block.js +24 -0
- package/dist/shared/plan-conventions.js +11 -0
- package/dist/shared/provider-scaffold.js +4 -0
- package/dist/shared/specdojo-config.js +5 -4
- package/dist/shared/where-alias.js +2 -2
- package/docs/ja/specdojo/guides/exec-config-guide.md +15 -12
- package/docs/ja/specdojo/guides/exec-operation-guide.md +21 -7
- package/docs/ja/specdojo/guides/orchestrator-operation-guide.md +5 -3
- package/docs/ja/specdojo/guides/plan-result-lifecycle-guide.md +1 -1
- package/docs/ja/specdojo/guides/register-operation-guide.md +1 -1
- package/docs/ja/specdojo/guides/timeline-design-guide.md +1 -1
- package/docs/ja/specdojo/references/command-reference.md +76 -51
- package/docs/ja/specdojo/rulebooks/dec-rulebook.md +10 -42
- package/docs/ja/specdojo/rulebooks/ntp-rulebook.md +10 -50
- package/docs/ja/specdojo/samples/dec-sample.md +3 -30
- package/docs/ja/specdojo/samples/dss-sample.md +12 -12
- package/docs/ja/specdojo/samples/ntp-sample.md +3 -30
- package/docs/specdojo/schemas/v1/pipeline-state.schema.yaml +18 -0
- package/docs/specdojo/schemas/v1/register-events.schema.yaml +1 -0
- package/package.json +1 -1
- package/templates/antigravity/orchestrator.md +7 -0
- package/templates/claude/agents/specdojo-orchestrator.md +7 -0
- package/templates/codex/agents/specdojo-orchestrator.toml +7 -0
- package/templates/codex/orchestrator.md +7 -0
- package/templates/opencode/agents/specdojo-orchestrator.md +7 -0
|
@@ -155,6 +155,8 @@ npx specdojo kata eject --id <id> # 上書きしたいものだけ複
|
|
|
155
155
|
|
|
156
156
|
利用者が規範を変えたいと言った場合にだけ `eject` を提案する。eject したファイルは利用リポジトリの git 管理下に入り、以後そちらが優先される。`exec-template` と `schema` は CLI の版と対応するため eject できない。
|
|
157
157
|
|
|
158
|
+
型を整える schedule では、review の段とは別に、型そのもの(rulebook と sample の組)を grade して確かめる。
|
|
159
|
+
|
|
158
160
|
## タスク実行
|
|
159
161
|
|
|
160
162
|
```bash
|
|
@@ -170,15 +172,20 @@ npx specdojo exec validate --project <project-id>
|
|
|
170
172
|
|
|
171
173
|
失敗して `waiting` になった場合は、個票の `block_reason` と result の申し送りを読み、原因を特定してから再開する。reporter 段だけの再開は `--resume` で行う。
|
|
172
174
|
|
|
175
|
+
人の確定のタスクも claim と complete で記録し、確定したら成果物の `status` を ready に上げる。直すために確定を開き直すときは、`exec reopen` してから直す。
|
|
176
|
+
|
|
173
177
|
## 実行の運び方
|
|
174
178
|
|
|
175
179
|
- `exec run --register` は `--worktree` で流す。同時に流すのは 2〜3 件までとする。親の検証は 1 件ずつ順に流れ、並行が多いと負荷で統合テストが時間切れになる。
|
|
176
180
|
- 時間のかかる run は background で流し、終わりの通知を待つ。途中経過を何度も見に行かない。
|
|
181
|
+
- 裏で完了を待つときは、ログの文字列ではなく、終了コードや lock のファイルで判定する。ログを grep で読む場合はバイナリとして扱われないようにする。
|
|
177
182
|
- grade・`exec run`・build を順に流すときは、待ち合わせのシェルスクリプトを書かず `specdojo exec queue add <queue-id> --step "..."` で予約し、`specdojo exec queue run <queue-id>` を background で流す。進み具合は `exec queue status <queue-id>` か `exec status` の `queues:` で確かめる。止まった予約は原因を直してから同じ `exec queue run` で再開する。
|
|
178
183
|
- プロセスを探す・止めるときに `pkill -f`・`pgrep -f` を使わない。探す文字列を含む自分のシェルにも一致し、自分を止める。
|
|
179
184
|
- 統合の後に `src` が dist より新しくなると、次の run は始まる前に止まる。dist を作り直してから流す。
|
|
180
185
|
- 記帳は `register ... --commit` で行う。登録簿の lifecycle のロックを取るため、実行中の run と取り合わない。
|
|
181
186
|
- 個票の本文を書き換えて普通に commit するのは、統合中の run がないときだけにする(`.git/index.lock` を確かめる)。commit に失敗したら、index に載ったファイルを残さない。残ると次の run の checkpoint が止まる。
|
|
187
|
+
- 実行中の run が残した状態のファイルを、自分の commit に混ぜない。
|
|
188
|
+
- strategy の YAML を道具で書き直したときは、`task_suffix` などの文字列が数値に変わっていないかを schema の検査で確かめる。
|
|
182
189
|
- 保護された設定(agent の定義・名簿・`exec-defaults.yaml`・`package.json` など)は、executor が書き換えると統合の前に止まる。register の完了条件では「案を個票の対応結果に書き、pipeline では報告の `handoff` にも書く」と指示する。「案を result に書く」は executor が result を直接書ける実行形式に限る。反映は利用者の承認のもと feature ブランチで行う。
|
|
183
190
|
- プロジェクトの文書にオーケストレーター向けの運用メモがあれば、作業を始める前に読む。
|
|
184
191
|
|
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,29 @@ SpecDojo の利用者に影響する変更を記録します。
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.9.2] - 2026-11-21
|
|
8
|
+
|
|
9
|
+
同梱パッケージ(`@specdojo/docs-lint` 0.5.0、`@specdojo/docs-site` 0.6.0)は変わらないため、公開しません。
|
|
10
|
+
|
|
11
|
+
### 利用者から見て動きが変わる点
|
|
12
|
+
|
|
13
|
+
- Antigravity CLI(`agy`)を起動しなくなりました。consumer plan では、他社の agent や application の中から agy を起動することを Antigravity の FAQ(<https://antigravity.google/docs/faq>)が対象外とし、Additional Terms の Section 6(<https://antigravity.google/terms>)が契約違反としており、アカウントの停止につながるおそれがあるためです。exec・grade・trial、`agent launch`、`orchestrator launch` は、provider が `antigravity` の指定を agy の起動前にエラーで止めます。自動選択と代わりの agent の選択では、agy の member を候補から外します。`init`・`config scaffold`・`devcontainer scaffold` でも antigravity を選べません。agy の対応は 0.10.0 で外します(PJR-NJE4)。
|
|
14
|
+
- 0.9.1 までの `init` で antigravity を選んでいた場合、0.9.2 に上げると agy の member を使う `exec run` などがエラーで止まります。`.specdojo/agent-members.yaml` で agy の member に `disabled: true` を付けるか消し、`.specdojo/exec-defaults.yaml` の `routing` で agy の member を指している箇所を、ほかの provider の member に替えてください。`package.json` の `orch:argon`・`orch:flash` などのスクリプトも使えないため消してください(PJR-NJE4)。
|
|
15
|
+
- 使われていない・移行用の 9 コマンド(`timeline where`・`timeline build`、`exec note`・`exec link`・`exec estimate`・`exec migrate-records`、`grade migrate`、`register migrate`、`config migrate-members`)を非推奨にしました。help と実行時に、代わりの操作と、0.10.0 で消すことを表示します。各コマンドの `where` の別名の警告も、消す版(0.10.0)を示すようにしました(PJR-BSCK)。
|
|
16
|
+
- 実践の型の決定記録(dec)と移行テスト計画(ntp)を非推奨にしました。決定は登録簿の decision に、移行テストの計画は `mtp-rulebook` に記録してください(PJR-HVQZ)。
|
|
17
|
+
|
|
18
|
+
### 追加
|
|
19
|
+
|
|
20
|
+
- `grade run --target kata` に `--kata <name>`(繰り返し指定できる)を足しました。型の名前を並べると、その型の rulebook と sample を 1 回で順に評価し、終わったときに型ごとの結果を一覧にします。`--kata` のときは、rate limit が起きても残りの型を続けます(PJR-SW7T)。
|
|
21
|
+
- `exec run --register <ID> --resume --resume-from executor` に `--resume-note <text>`(繰り返し指定できる)を足しました。再開の前に、run の plan へ再開の指示の節を足し、指示と日時を `pipeline-state.json` の `resume_notes` に残します(PJR-5F1Y)。
|
|
22
|
+
- `register update` に `--section <章の名前>` と `--section-file <path>` を足しました。個票の 1 つの章の本文を、ファイルの中身で差し替えます。`--dry-run` でも、個票に無い章・読めないファイル・見出しを含むファイルはエラーになります(PJR-7KXW)。
|
|
23
|
+
- オーケストレーターの本体に、型を整えるときの grade、人の確定の記録、裏での完了の待ち方、実行中の run の状態のファイルを commit に混ぜないこと、YAML の文字列の型の確かめ方を足しました。`init` が配る provider ごとのテンプレートにも反映されます(PJR-70SS)。
|
|
24
|
+
|
|
25
|
+
### 不具合修正
|
|
26
|
+
|
|
27
|
+
- executor が編集を拒まれたまま、またはプロダクトリポジトリを変えないまま「完了」と報告すると、runner が成功として review へ進めていた問題を修正しました。edit の executor の出力にツールの権限による拒否がある場合と、プロダクトを対象にする項目でプロダクトの worktree に変更が無い場合は、項目を `waiting` にして `block_reason` に理由を残します。「プロダクトの変更なし」は runner の要約と `exec status` に警告として出ます(PJR-QQRH)。
|
|
28
|
+
- 親の検証が時間切れになったとき、vitest などの子孫のプロセスまで止め、出力の pipe を持つプロセスが残っても、runner が止まらずに次の検証へ進むようにしました(PJR-V277)。
|
|
29
|
+
|
|
7
30
|
## [0.9.1] - 2026-11-20
|
|
8
31
|
|
|
9
32
|
同梱パッケージ(`@specdojo/docs-lint` 0.5.0、`@specdojo/docs-site` 0.6.0)は変わらないため、公開しません。
|
package/README.md
CHANGED
|
@@ -105,19 +105,19 @@ npm run orch:opus
|
|
|
105
105
|
| `claude` | `.claude/agents/specdojo-orchestrator.md` | `npm run orch:opus` ほか |
|
|
106
106
|
| `opencode` | `.opencode/agents/specdojo-orchestrator.md` | `npm run orch:opencode` |
|
|
107
107
|
| `codex` | `.specdojo/codex/orchestrator.md` | `npm run orch:sol` ほか |
|
|
108
|
-
| `antigravity` |
|
|
108
|
+
| `antigravity` | 0.9.2 から使えない(下記) | - |
|
|
109
109
|
|
|
110
110
|
各設定を個別に管理したい場合は、後述の「設定を個別に行う場合」にある `config init` と `config scaffold` を使います。
|
|
111
111
|
|
|
112
|
-
Antigravity CLI
|
|
112
|
+
0.9.2 から、SpecDojo は Antigravity CLI(`agy`)を起動しません。consumer plan では、他社の agent や application の中から agy を起動することを [Antigravity の FAQ](https://antigravity.google/docs/faq) が対象外とし、[Additional Terms](https://antigravity.google/terms) の Section 6 が契約違反としているためです。exec・grade などの agent 実行、`agent launch`・`orchestrator launch` は provider が `antigravity` の指定を agy の起動前にエラーで止め、`init`・`config scaffold`・`devcontainer scaffold` でも `antigravity` は選べません。0.9.1 の `init` で antigravity を選んだ場合は、`.specdojo/agent-members.yaml` で agy の member に `disabled: true` を付けるか削除し、ほかの provider を使ってください。
|
|
113
|
+
|
|
114
|
+
次の Antigravity CLI のグローバル設定は 0.9.2 から使えません(`config scaffold --provider antigravity` はエラーになります)。0.9.1 までは、Antigravity CLI を無人実行する場合に利用者のグローバル設定へ permission rule を追加していました。この設定はすべてのリポジトリに効くため、必ず先に差分を確認してから適用していました。
|
|
113
115
|
|
|
114
116
|
```sh
|
|
115
117
|
npx specdojo config scaffold --provider antigravity --global --dry-run
|
|
116
118
|
npx specdojo config scaffold --provider antigravity --global
|
|
117
119
|
```
|
|
118
120
|
|
|
119
|
-
実適用では既存設定を残し、変更前のファイルをバックアップします。追加する allow は `git status` / `diff` / `log` / `show` の読み取り操作だけです。
|
|
120
|
-
|
|
121
121
|
#### Dev Container を使う場合(任意)
|
|
122
122
|
|
|
123
123
|
利用環境として Dev Container を使う場合は、オーケストレーターの配置に加えて次のコマンドを実行すると、指定した provider の CLI が組み込まれた `.devcontainer/` を生成できます。
|
package/dist/commands/agent.js
CHANGED
|
@@ -1,36 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { productRootsFromEnvironment } from "../exec/task-repos.js";
|
|
3
|
-
import { runOrchestratorLaunch } from "./orchestrator.js";
|
|
1
|
+
import { assertProviderLaunchAllowed } from "../shared/antigravity-block.js";
|
|
4
2
|
import { AGENT_RUN_RATE_LIMIT_EXIT_CODE, runAgentPlan, writeAgentOutput, } from "../exec/agent-plan.js";
|
|
5
3
|
export { AGENT_RUN_RATE_LIMIT_EXIT_CODE, resolveAgentMember, resolveAgentCommand, readAgentPlan, writeAgentOutput, runAgentPlan, } from "../exec/agent-plan.js";
|
|
4
|
+
/**
|
|
5
|
+
* `agent launch` only ever wrapped agy, and 0.9.1 `init` wrote command templates that call it.
|
|
6
|
+
* Since 0.9.2 it fails before spawning anything so those existing configurations stop here.
|
|
7
|
+
*/
|
|
8
|
+
export function runAgentLaunch(options) {
|
|
9
|
+
assertProviderLaunchAllowed(options.provider, "agent launch");
|
|
10
|
+
throw new Error(`agent launch supports no provider other than antigravity, which is no longer launched: ${options.provider}`);
|
|
11
|
+
}
|
|
6
12
|
export function registerAgentCommands(program) {
|
|
7
13
|
const agent = program
|
|
8
14
|
.command("agent", { hidden: true })
|
|
9
15
|
.description("Run a plan with a specific agent");
|
|
10
16
|
agent
|
|
11
17
|
.command("launch", { hidden: true })
|
|
12
|
-
.description("
|
|
13
|
-
.requiredOption("--provider <name>", "Provider CLI (antigravity)")
|
|
14
|
-
.
|
|
15
|
-
.argument("[providerArgs...]", "
|
|
16
|
-
.action(
|
|
18
|
+
.description("Former agy launcher; refuses to launch Antigravity since 0.9.2")
|
|
19
|
+
.requiredOption("--provider <name>", "Provider CLI (antigravity is no longer launched)")
|
|
20
|
+
.option("--role <role>", "Pipeline role (edit|review|report); ignored")
|
|
21
|
+
.argument("[providerArgs...]", "Provider arguments after --")
|
|
22
|
+
.action((_providerArgs, options) => {
|
|
17
23
|
try {
|
|
18
|
-
|
|
19
|
-
throw new Error("agent launch requires antigravity and a pipeline role (edit|review|report)");
|
|
20
|
-
}
|
|
21
|
-
const cwd = process.cwd();
|
|
22
|
-
const args = antigravitySessionArguments({
|
|
23
|
-
role: antigravityRole(options.role),
|
|
24
|
-
cwd,
|
|
25
|
-
repoRoots: productRootsFromEnvironment(process.env).map((repo) => repo.path),
|
|
26
|
-
providerArgs,
|
|
27
|
-
});
|
|
28
|
-
process.exitCode = await runOrchestratorLaunch({
|
|
29
|
-
command: "agy",
|
|
30
|
-
args,
|
|
31
|
-
cwd,
|
|
32
|
-
env: { ...process.env },
|
|
33
|
-
});
|
|
24
|
+
runAgentLaunch(options);
|
|
34
25
|
}
|
|
35
26
|
catch (error) {
|
|
36
27
|
process.stderr.write(`${error instanceof Error ? error.message : String(error)}\n`);
|
package/dist/commands/init.js
CHANGED
|
@@ -13,7 +13,9 @@ import { generateDerivedViewFiles } from "../register/register.js";
|
|
|
13
13
|
import { defaultWorktreeBase, projectGitignoreLayout, specdojoRootDir, } from "../shared/specdojo-config.js";
|
|
14
14
|
import { ensureGitignore, formatGitignoreReport, gitignorePatternsForLayouts, } from "../shared/specdojo-gitignore.js";
|
|
15
15
|
import { specdojoPackageRootDir } from "../shared/package-paths.js";
|
|
16
|
-
|
|
16
|
+
import { AntigravityBlockedError, isBlockedProvider } from "../shared/antigravity-block.js";
|
|
17
|
+
// antigravity is intentionally absent: agy is never launched since 0.9.2 (PJR-NJE4).
|
|
18
|
+
const PROVIDERS = ["claude", "codex", "opencode", "copilot"];
|
|
17
19
|
const PARENT_VALIDATION_SCRIPTS = {
|
|
18
20
|
"lint-ts": "lint:ts",
|
|
19
21
|
"lint-fm": "lint:fm",
|
|
@@ -56,6 +58,9 @@ function parseProviders(value) {
|
|
|
56
58
|
.map((item) => item.trim())
|
|
57
59
|
.filter(Boolean)),
|
|
58
60
|
];
|
|
61
|
+
if (providers.some((provider) => isBlockedProvider(provider))) {
|
|
62
|
+
throw new AntigravityBlockedError("init cannot select provider antigravity");
|
|
63
|
+
}
|
|
59
64
|
const unknown = providers.filter((provider) => !PROVIDERS.includes(provider));
|
|
60
65
|
if (unknown.length > 0) {
|
|
61
66
|
throw new Error(`Unknown provider: ${unknown.join(", ")}. Available: ${PROVIDERS.join(", ")}`);
|
|
@@ -352,7 +357,7 @@ function writeExecConfiguration(repoRoot, packageRoot, providers, dryRun) {
|
|
|
352
357
|
const members = memberTemplate.members.filter((member) => member.provider && selected.has(member.provider));
|
|
353
358
|
const aliases = selectAliases(memberTemplate.aliases ?? [], new Set(members.map((member) => member.nickname)));
|
|
354
359
|
// normal の段(medium・easy と全 reporter)と expert の段(hard)を provider ごとに選ぶ。
|
|
355
|
-
// expert の段がない provider(opencode
|
|
360
|
+
// expert の段がない provider(opencode など)は hard も normal の段を使う。
|
|
356
361
|
const pairs = providers.map((provider) => {
|
|
357
362
|
const executor = members.find((member) => member.provider === provider &&
|
|
358
363
|
member.stage_role === "executor" &&
|
|
@@ -575,9 +580,7 @@ export async function runInit(options, deps) {
|
|
|
575
580
|
? "orch:opus"
|
|
576
581
|
: firstProvider === "codex"
|
|
577
582
|
? "orch:sol"
|
|
578
|
-
: firstProvider
|
|
579
|
-
? "orch:flash"
|
|
580
|
-
: `orch:${firstProvider}`;
|
|
583
|
+
: `orch:${firstProvider}`;
|
|
581
584
|
process.stdout.write("Next steps:\n" +
|
|
582
585
|
(firstProvider
|
|
583
586
|
? ` 1. Run npm run ${script} and create the first register item.\n`
|
|
@@ -2,7 +2,7 @@ import { spawn } from "node:child_process";
|
|
|
2
2
|
import { constants as osConstants } from "node:os";
|
|
3
3
|
import { resolve } from "node:path";
|
|
4
4
|
import { agentExtraRootArguments, resolveProductRepos } from "../exec/task-repos.js";
|
|
5
|
-
import {
|
|
5
|
+
import { assertProviderLaunchAllowed } from "../shared/antigravity-block.js";
|
|
6
6
|
import { OPENCODE_CONFIG_CONTENT_ENV, opencodeAgentNameFromArguments, opencodeExtraRootConfig, } from "../exec/opencode-permissions.js";
|
|
7
7
|
import { loadConfig, resolveExternalProjects, specdojoRootDir, } from "../shared/specdojo-config.js";
|
|
8
8
|
import { registerNightOrchestratorCommand } from "./night-orchestrator.js";
|
|
@@ -35,17 +35,10 @@ function opencodeAgentName(args) {
|
|
|
35
35
|
return selected;
|
|
36
36
|
}
|
|
37
37
|
export function buildOrchestratorLaunch(options) {
|
|
38
|
+
assertProviderLaunchAllowed(options.provider, "orchestrator launch");
|
|
38
39
|
const env = { ...(options.env ?? process.env) };
|
|
39
40
|
const args = [...options.providerArgs];
|
|
40
|
-
if (options.provider === "
|
|
41
|
-
args.splice(0, args.length, ...antigravitySessionArguments({
|
|
42
|
-
role: "orchestrator",
|
|
43
|
-
cwd: options.cwd,
|
|
44
|
-
repoRoots: options.repoRoots,
|
|
45
|
-
providerArgs: args,
|
|
46
|
-
}));
|
|
47
|
-
}
|
|
48
|
-
else if (options.provider === "opencode" && options.repoRoots.length > 0) {
|
|
41
|
+
if (options.provider === "opencode" && options.repoRoots.length > 0) {
|
|
49
42
|
env[OPENCODE_CONFIG_CONTENT_ENV] = opencodeExtraRootConfig(env[OPENCODE_CONFIG_CONTENT_ENV], opencodeAgentName(args), options.repoRoots, options.cwd);
|
|
50
43
|
}
|
|
51
44
|
else {
|
|
@@ -59,6 +52,8 @@ export function buildOrchestratorLaunch(options) {
|
|
|
59
52
|
};
|
|
60
53
|
}
|
|
61
54
|
export function resolveOrchestratorLaunch(options) {
|
|
55
|
+
// Refuse before reading any configuration so a blocked provider never reaches spawn.
|
|
56
|
+
assertProviderLaunchAllowed(options.provider, "orchestrator launch");
|
|
62
57
|
const env = options.env ?? process.env;
|
|
63
58
|
const rootDir = specdojoRootDir();
|
|
64
59
|
const configuredRoot = env[ORCHESTRATOR_CONFIG_ROOT_ENV]?.trim();
|
|
@@ -142,7 +137,7 @@ export function registerOrchestratorCommands(program) {
|
|
|
142
137
|
orchestrator
|
|
143
138
|
.command("launch")
|
|
144
139
|
.description("Launch a provider CLI and allow only repositories declared by the project")
|
|
145
|
-
.requiredOption("--provider <name>", "Provider CLI (
|
|
140
|
+
.requiredOption("--provider <name>", "Provider CLI (claude|codex|copilot|opencode; antigravity is refused)")
|
|
146
141
|
.option("--project <projectId>", "Project id in specdojo.config.json")
|
|
147
142
|
.argument("[providerArgs...]", "Provider arguments; put them after --")
|
|
148
143
|
.action(async (providerArgs, opts) => {
|
|
@@ -72,12 +72,12 @@ export function registerTimelineCommands(program) {
|
|
|
72
72
|
registerDeprecatedWhereAlias(tml, printTimelinePaths);
|
|
73
73
|
const bcmd = tml
|
|
74
74
|
.command("build")
|
|
75
|
-
.description("Deprecated:
|
|
75
|
+
.description("Deprecated: use dashboard build; move domains and dependencies to register epics (will be removed in 0.10.0)");
|
|
76
76
|
addProjectOption(bcmd);
|
|
77
77
|
bcmd.option("--dry-run", "Print generated content to stdout without writing", false);
|
|
78
78
|
bcmd.action((opts) => {
|
|
79
79
|
try {
|
|
80
|
-
warnDeprecated("timeline build", "Use dashboard build; move domains and dependencies to register epics.");
|
|
80
|
+
warnDeprecated("timeline build", "Use dashboard build; move domains and dependencies to register epics. This command will be removed in 0.10.0.");
|
|
81
81
|
const { timelinePath, ...paths } = resolveTimelinePaths(opts);
|
|
82
82
|
const result = buildTimeline({ timelinePath, ...paths });
|
|
83
83
|
for (const warning of result.warnings)
|
|
@@ -7,7 +7,7 @@ export function registerDevcontainerCommands(program) {
|
|
|
7
7
|
dc.command("scaffold")
|
|
8
8
|
.description("Scaffold .devcontainer/ configuration for the repository")
|
|
9
9
|
.option("--preset <name>", "Apply a bundled preset (minimal|recommended|full)")
|
|
10
|
-
.option("--provider <names>", "Comma-separated list of agent providers to install (e.g. claude,codex,opencode
|
|
10
|
+
.option("--provider <names>", "Comma-separated list of agent providers to install (e.g. claude,codex,opencode)", "")
|
|
11
11
|
.option("--editor <names>", "Comma-separated list of editors to install and configure (emacs,vim)", "")
|
|
12
12
|
.option("--ollama", "Add Ollama connection settings", false)
|
|
13
13
|
.option("--cron", "Add cron support", false)
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { existsSync } from "node:fs";
|
|
2
2
|
import { readFile, writeFile, mkdir } from "node:fs/promises";
|
|
3
3
|
import * as path from "node:path";
|
|
4
|
+
import { assertProviderLaunchAllowed } from "../shared/antigravity-block.js";
|
|
4
5
|
export const DEVCONTAINER_PRESETS = ["minimal", "recommended", "full"];
|
|
5
6
|
const RECOMMENDED_VSCODE_EXTENSIONS = [
|
|
6
7
|
"mhutchie.git-graph",
|
|
@@ -153,6 +154,10 @@ export function generateSshConfigSample(ports) {
|
|
|
153
154
|
}
|
|
154
155
|
export async function runDevcontainerScaffold(opts) {
|
|
155
156
|
const { packageRoot, repoRoot, workspaceName: workspaceNameOverride, preset, providers, editors, ollama, cron, tmux, force, dryRun, } = opts;
|
|
157
|
+
// agy is never launched since 0.9.2, so refuse before writing any install step or volume for it.
|
|
158
|
+
for (const provider of providers) {
|
|
159
|
+
assertProviderLaunchAllowed(provider, "devcontainer scaffold cannot add provider antigravity");
|
|
160
|
+
}
|
|
156
161
|
if (preset !== undefined && !DEVCONTAINER_PRESETS.includes(preset)) {
|
|
157
162
|
throw new Error(`Unknown Dev Container preset: ${preset}. Available: ${DEVCONTAINER_PRESETS.join(", ")}`);
|
|
158
163
|
}
|
|
@@ -331,7 +336,7 @@ fi`);
|
|
|
331
336
|
devcontainer.containerEnv["LOCAL_OPENAI_BASE_URL"] = "http://host.docker.internal:11434/v1";
|
|
332
337
|
}
|
|
333
338
|
// providers の処理
|
|
334
|
-
const knownProviders = new Set(["claude", "codex", "opencode"
|
|
339
|
+
const knownProviders = new Set(["claude", "codex", "opencode"]);
|
|
335
340
|
for (const provider of providers) {
|
|
336
341
|
if (!knownProviders.has(provider)) {
|
|
337
342
|
process.stdout.write(`Warning: unknown provider "${provider}"\n`);
|
|
@@ -357,10 +362,6 @@ fi`);
|
|
|
357
362
|
// 本リポジトリで設定を確かめている opencode の npm パッケージ(opencode-ai)を使う。
|
|
358
363
|
extraScripts.push("sudo npm install -g opencode-ai@latest");
|
|
359
364
|
}
|
|
360
|
-
else if (provider === "antigravity") {
|
|
361
|
-
devcontainer.mounts.push(`source=${volumeName("antigravity")},target=/home/node/.config/antigravity,type=volume`);
|
|
362
|
-
extraScripts.push('if ! curl -fsSL https://antigravity.google/cli/install.sh | bash; then\n echo "Warning: Antigravity CLI installer failed."\nfi');
|
|
363
|
-
}
|
|
364
365
|
}
|
|
365
366
|
if (extraScripts.length > 0) {
|
|
366
367
|
postCreateScript = postCreateScript.replace("npm install", extraScripts.join("\n\n") + "\n\nnpm install");
|
|
@@ -7,6 +7,7 @@ import { resolveParentValidationConcurrency, resolveParentValidationAssignments,
|
|
|
7
7
|
import { resolveCommitHookSkips } from "./commit-hook-skips.js";
|
|
8
8
|
import { configureIndexLockWait, DEFAULT_INDEX_LOCK_WAIT_MS } from "../shared/git.js";
|
|
9
9
|
import { resolvePostIntegrationEntries } from "./post-integration.js";
|
|
10
|
+
import { assertProviderLaunchAllowed } from "../shared/antigravity-block.js";
|
|
10
11
|
const PLACEHOLDER_PATTERN = /\{([a-z][a-z0-9_]*)\}/g;
|
|
11
12
|
const BUILTIN_VARIABLE_NAMES = new Set(["nickname", "mode", "proficiency"]);
|
|
12
13
|
// Mirror of the nickname pattern in docs/specdojo/schemas/v1/agent-members.schema.yaml.
|
|
@@ -67,6 +68,9 @@ function buildCommandVariables(provider, member, params) {
|
|
|
67
68
|
// not runnable by exec run). Throws when a template exists but cannot be fully expanded,
|
|
68
69
|
// so a broken definition surfaces as an error instead of launching a malformed command.
|
|
69
70
|
export function resolveMemberCommand(config, member) {
|
|
71
|
+
// Every launch path (named, automatic, fallback) expands the command here, so refusing an
|
|
72
|
+
// Antigravity member before building any command keeps agy from ever being spawned.
|
|
73
|
+
assertProviderLaunchAllowed(member.provider, `Cannot launch member ${member.nickname}`);
|
|
70
74
|
// Require provider opt-in even for an explicit member command: otherwise a frontier
|
|
71
75
|
// member could silently inherit ordinary defaults or bypass the missing-tier error.
|
|
72
76
|
if (member.proficiency === "frontier" &&
|
package/dist/exec/commands.js
CHANGED
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import { registerDeprecatedWhereAlias } from "../shared/where-alias.js";
|
|
2
|
+
import { warnDeprecated } from "../shared/deprecation.js";
|
|
2
3
|
import { Option } from "commander";
|
|
3
4
|
import { existsSync } from "node:fs";
|
|
4
5
|
import { join, resolve as pathResolve } from "node:path";
|
|
5
6
|
import { validateCatalogLocalIds, validateRulebookKata } from "../catalog/build.js";
|
|
7
|
+
import { resolveRegisterPaths } from "../register/core.js";
|
|
8
|
+
import { loadRegisterItemDocs } from "../register/item.js";
|
|
6
9
|
import { commonViewpointsPath, scaffoldViewpoints } from "../review/plan.js";
|
|
7
10
|
import { runProviderScaffold, specdojoPackageRootDir } from "../shared/provider-scaffold.js";
|
|
8
|
-
import { assertValidActor, getProjectViewpointsPath, getProjectRoutinesPath, loadConfig, specdojoRootDir, } from "../shared/specdojo-config.js";
|
|
11
|
+
import { assertValidActor, getProjectRegisterPath, getProjectViewpointsPath, getProjectRoutinesPath, loadConfig, specdojoRootDir, } from "../shared/specdojo-config.js";
|
|
9
12
|
import { formatLocalConfigLines } from "../shared/local-config.js";
|
|
10
13
|
import { DEFAULT_EVENT_MESSAGES, KNOWN_OWNER_LABELS, KNOWN_OWNER_LABELS_TEXT, addCommonAddOptions, addForceOption, addLockOptions, addOwnerOptions, addProjectOptions, addTakeOverOption, ensureActorCanClaimNext, findRosterMember, loadRosterForOpts, loadValidatedExecState, parseApproach, parseTaskMode, printCommandError, resolveClaimOwner, resolveForceOverride, resolveProjectContext, resolveProjectId, resolveSchedulerStrategy, runLockedEventCommand, runReleaseAllBlocked, runSimpleEventCommand, scaffoldClaimResult, } from "./core.js";
|
|
11
14
|
import { acquireSchedulerLock, canBlockTask, canCancelTask, canClaimTask, canCompleteTask, canReleaseTask, canReopenTask, canUnblockTask, claimOwnerOf, computeReadyIds, readAllEventFiles, releaseSchedulerLock, schedulerLockPath, writeEventFile, } from "./events.js";
|
|
15
|
+
import { noProductChangeWarnings } from "./executor-outcome-checks.js";
|
|
12
16
|
import { registerExecHandoffCommands } from "./handoff.js";
|
|
13
17
|
import { registerRecordMigrationCommand } from "./migrate-records.js";
|
|
14
18
|
import { archivePlan, buildInPlaceStem, generateDeliverablePlan, generateSinglePlan, resolveDeliverableTarget, stemFromPlanPath, } from "./plans.js";
|
|
@@ -101,8 +105,25 @@ export function registerExecCommands(program) {
|
|
|
101
105
|
"link",
|
|
102
106
|
"estimate",
|
|
103
107
|
];
|
|
108
|
+
const deprecatedEventCommands = {
|
|
109
|
+
note: {
|
|
110
|
+
description: "Deprecated: record notes in tickets or execution results instead (will be removed in 0.10.0)",
|
|
111
|
+
migration: "Record notes in tickets or execution results instead. This command will be removed in 0.10.0.",
|
|
112
|
+
},
|
|
113
|
+
link: {
|
|
114
|
+
description: "Deprecated: declare dependencies in tickets (depends_on) or catalog instead (will be removed in 0.10.0)",
|
|
115
|
+
migration: "Declare dependencies in tickets (depends_on) or catalog instead. This command will be removed in 0.10.0.",
|
|
116
|
+
},
|
|
117
|
+
estimate: {
|
|
118
|
+
description: "Deprecated: manage estimates and difficulty in register tickets instead (will be removed in 0.10.0)",
|
|
119
|
+
migration: "Manage estimates and difficulty in register tickets instead. This command will be removed in 0.10.0.",
|
|
120
|
+
},
|
|
121
|
+
};
|
|
104
122
|
for (const t of types) {
|
|
105
|
-
const
|
|
123
|
+
const deprecation = deprecatedEventCommands[t];
|
|
124
|
+
const cmd = exec
|
|
125
|
+
.command(t)
|
|
126
|
+
.description(deprecation ? deprecation.description : `Write ${t} event JSON into exec/events/ (UTC)`);
|
|
106
127
|
addCommonAddOptions(cmd, {
|
|
107
128
|
requireTask: t !== "release" && t !== "complete",
|
|
108
129
|
msgDefault: DEFAULT_EVENT_MESSAGES[t],
|
|
@@ -130,7 +151,12 @@ export function registerExecCommands(program) {
|
|
|
130
151
|
});
|
|
131
152
|
}
|
|
132
153
|
else {
|
|
133
|
-
cmd.action((opts) =>
|
|
154
|
+
cmd.action((opts) => {
|
|
155
|
+
if (deprecation) {
|
|
156
|
+
warnDeprecated(`exec ${t}`, deprecation.migration);
|
|
157
|
+
}
|
|
158
|
+
runSimpleEventCommand(opts, t);
|
|
159
|
+
});
|
|
134
160
|
}
|
|
135
161
|
}
|
|
136
162
|
const vcmd = exec
|
|
@@ -510,7 +536,7 @@ export function registerExecCommands(program) {
|
|
|
510
536
|
scaffoldCmd.option("--force", "Overwrite existing files", false);
|
|
511
537
|
scaffoldCmd.option("--provider <name>", "Copy the provider's agent/settings templates (templates/<name>) into the repository");
|
|
512
538
|
scaffoldCmd.option("--dry-run", "Show planned files without writing", false);
|
|
513
|
-
scaffoldCmd.option("--global", "Merge provider permissions into user-level settings (currently
|
|
539
|
+
scaffoldCmd.option("--global", "Merge provider permissions into user-level settings (no provider currently supports it)", false);
|
|
514
540
|
scaffoldCmd.action(async (opts) => {
|
|
515
541
|
try {
|
|
516
542
|
if (opts.global && !opts.provider) {
|
|
@@ -588,6 +614,7 @@ export function registerExecCommands(program) {
|
|
|
588
614
|
const byMsg = filterBy ? ` for ${filterBy}` : "";
|
|
589
615
|
process.stdout.write(`No ${filterState} tasks${byMsg}.\n`);
|
|
590
616
|
writeActiveQueueSummary(executionPath);
|
|
617
|
+
writeNoProductChangeWarnings(opts.project, snapshot);
|
|
591
618
|
exitWithCode(true);
|
|
592
619
|
return;
|
|
593
620
|
}
|
|
@@ -612,6 +639,7 @@ export function registerExecCommands(program) {
|
|
|
612
639
|
process.stdout.write(` ${padEndDisplay(r.taskId, taskWidth)} ${padEndDisplay(r.name, nameWidth)} ${padEndDisplay(r.by, byWidth)} ${r.ts}\n`);
|
|
613
640
|
}
|
|
614
641
|
writeActiveQueueSummary(executionPath);
|
|
642
|
+
writeNoProductChangeWarnings(opts.project, snapshot);
|
|
615
643
|
exitWithCode(true);
|
|
616
644
|
}
|
|
617
645
|
catch (error) {
|
|
@@ -620,3 +648,25 @@ export function registerExecCommands(program) {
|
|
|
620
648
|
});
|
|
621
649
|
registerDeprecatedWhereAlias(exec, printExecPaths);
|
|
622
650
|
}
|
|
651
|
+
// PJR-QQRH: keep runs blocked for missing product changes visible in `exec status`, whatever
|
|
652
|
+
// state filter is selected. Register items are read only when the project declares a register.
|
|
653
|
+
function writeNoProductChangeWarnings(project, snapshot) {
|
|
654
|
+
const projectId = resolveProjectId({ project });
|
|
655
|
+
const projectConfig = loadConfig().config?.projects[projectId];
|
|
656
|
+
const registerItems = projectConfig && getProjectRegisterPath(projectConfig)
|
|
657
|
+
? loadRegisterItemDocs(resolveRegisterPaths({ project: projectId }).projectRegisterPath).map((doc) => ({ id: doc.id, status: doc.item.status, blockReason: doc.blockReason }))
|
|
658
|
+
: [];
|
|
659
|
+
const warnings = noProductChangeWarnings({
|
|
660
|
+
registerItems,
|
|
661
|
+
tasks: Object.entries(snapshot.tasks).map(([taskId, current]) => ({
|
|
662
|
+
taskId,
|
|
663
|
+
state: current.state,
|
|
664
|
+
...(current.last_msg ? { lastMsg: current.last_msg } : {}),
|
|
665
|
+
})),
|
|
666
|
+
});
|
|
667
|
+
if (warnings.length === 0)
|
|
668
|
+
return;
|
|
669
|
+
process.stdout.write("\nwarnings (no product changes):\n");
|
|
670
|
+
for (const line of warnings)
|
|
671
|
+
process.stdout.write(` ${line}\n`);
|
|
672
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { parsePlanTaskIdentity } from "./plans-storage.js";
|
|
2
|
+
import { redactSensitiveText } from "./shared.js";
|
|
3
|
+
// executor が complete と報告しても、runner が観測した事実と食い違う場合は成功として扱わない
|
|
4
|
+
// (PJR-QQRH)。ツールの権限による拒否が出力にある場合と、プロダクトを対象にする計画なのに
|
|
5
|
+
// プロダクトの worktree に変更が無い場合を検出する。
|
|
6
|
+
/** Marker that `exec status` looks for in block reasons. */
|
|
7
|
+
export const NO_PRODUCT_CHANGES_MARKER = "no product changes";
|
|
8
|
+
const MAX_REASON_LENGTH = 1_000;
|
|
9
|
+
const MAX_DENIAL_SAMPLE_LENGTH = 120;
|
|
10
|
+
const REPORT_BLOCK_PATTERN = /<specdojo_executor_evidence>[\s\S]*?<\/specdojo_executor_evidence>/giu;
|
|
11
|
+
// provider のツール権限による拒否の文言。シェルの EACCES など一般的な "Permission denied" は
|
|
12
|
+
// テストの出力などにも現れるため対象にしない。
|
|
13
|
+
const PERMISSION_DENIAL_PATTERNS = [
|
|
14
|
+
// opencode: permission rule の deny(PJR-08EK の実観測)。
|
|
15
|
+
/The user has specified a rule which prevents you from using this specific tool call/iu,
|
|
16
|
+
/"permission"\s*:\s*"[^"]+"\s*,\s*"action"\s*:\s*"deny"/iu,
|
|
17
|
+
// Claude Code: deny rule と未許可の書き込み。
|
|
18
|
+
/Permission to use \S+(?: with [^\n]*)? has been denied/iu,
|
|
19
|
+
/requested permissions? to (?:use|write|edit|read)[^\n]*but you haven't granted it/iu,
|
|
20
|
+
];
|
|
21
|
+
/** Output lines that show a provider's tool-permission denial, excluding the report envelope. */
|
|
22
|
+
export function toolPermissionDenials(output) {
|
|
23
|
+
const text = output.replace(REPORT_BLOCK_PATTERN, "");
|
|
24
|
+
const seen = new Set();
|
|
25
|
+
for (const line of text.split("\n")) {
|
|
26
|
+
const trimmed = line.trim();
|
|
27
|
+
if (!trimmed)
|
|
28
|
+
continue;
|
|
29
|
+
if (PERMISSION_DENIAL_PATTERNS.some((pattern) => pattern.test(trimmed)))
|
|
30
|
+
seen.add(trimmed);
|
|
31
|
+
}
|
|
32
|
+
return [...seen];
|
|
33
|
+
}
|
|
34
|
+
function escapeRegExp(value) {
|
|
35
|
+
return value.replace(/[.*+?^${}()|[\]\\]/gu, "\\$&");
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Product repositories the task targets: a `<repo>:<path>` value in the plan frontmatter
|
|
39
|
+
* `targets` or in `hints` (register `target_path` / `targets`), or a `<repo>:<path>` reference
|
|
40
|
+
* in the plan body. Returned in the order of `productNames`.
|
|
41
|
+
*/
|
|
42
|
+
export function targetedProductRepos(params) {
|
|
43
|
+
const identity = parsePlanTaskIdentity(params.plan);
|
|
44
|
+
const declared = [...(identity?.targets ?? []), ...(params.hints ?? [])].map((value) => value.trim());
|
|
45
|
+
return params.productNames.filter((name) => {
|
|
46
|
+
if (declared.some((value) => value.startsWith(`${name}:`) && value.length > name.length + 1)) {
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
// approach の plan は対象を frontmatter の targets で宣言し、本文の `<repo>:<path>` は
|
|
50
|
+
// 読み取り専用の手本(sources)でもありうるため、本文からは判定しない。
|
|
51
|
+
if (identity?.approach)
|
|
52
|
+
return false;
|
|
53
|
+
// 直前が語の一部でなく、`:` の直後にパスが続く参照だけを数える(`app1: 説明` は数えない)。
|
|
54
|
+
const reference = new RegExp(`(?:^|[^A-Za-z0-9._/:-])${escapeRegExp(name)}:[A-Za-z0-9._/-]`, "mu");
|
|
55
|
+
return reference.test(params.plan);
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
function bounded(value, limit) {
|
|
59
|
+
const redacted = redactSensitiveText(value);
|
|
60
|
+
return redacted.length <= limit ? redacted : `${redacted.slice(0, Math.max(0, limit - 1))}…`;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Why an executor that reported complete must not be treated as successful, or undefined.
|
|
64
|
+
* `unchangedTargetedRepos` lists targeted product repositories without uncommitted changes or
|
|
65
|
+
* exec-branch commits.
|
|
66
|
+
*/
|
|
67
|
+
export function executorOutcomeFailure(params) {
|
|
68
|
+
// register の block_reason は 200 文字で切られるため、`exec status` が探す目印を先頭に置く。
|
|
69
|
+
const reasons = [];
|
|
70
|
+
if (params.unchangedTargetedRepos.length > 0) {
|
|
71
|
+
reasons.push(`${NO_PRODUCT_CHANGES_MARKER} in ${params.unchangedTargetedRepos.join(", ")} ` +
|
|
72
|
+
"although the plan targets it");
|
|
73
|
+
}
|
|
74
|
+
const denials = toolPermissionDenials(params.output);
|
|
75
|
+
if (denials.length > 0) {
|
|
76
|
+
reasons.push(`${denials.length} tool permission denial(s) in executor output ` +
|
|
77
|
+
`(first: ${bounded(denials[0], MAX_DENIAL_SAMPLE_LENGTH)})`);
|
|
78
|
+
}
|
|
79
|
+
if (reasons.length === 0)
|
|
80
|
+
return undefined;
|
|
81
|
+
return bounded(`${reasons.join("; ")}; executor reported complete; next: ${params.resumeHint}`, MAX_REASON_LENGTH);
|
|
82
|
+
}
|
|
83
|
+
/** Whether a block reason records the missing product changes, for status warnings. */
|
|
84
|
+
export function isNoProductChangesReason(reason) {
|
|
85
|
+
return typeof reason === "string" && reason.includes(NO_PRODUCT_CHANGES_MARKER);
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* `exec status` warning lines for waiting register items and blocked schedule tasks whose block
|
|
89
|
+
* reason records missing product changes. Sorted by ID.
|
|
90
|
+
*/
|
|
91
|
+
export function noProductChangeWarnings(input) {
|
|
92
|
+
const lines = [
|
|
93
|
+
...input.registerItems
|
|
94
|
+
.filter((item) => item.status === "waiting" && isNoProductChangesReason(item.blockReason))
|
|
95
|
+
.map((item) => ({
|
|
96
|
+
id: item.id,
|
|
97
|
+
line: `${item.id} (register, waiting): ${item.blockReason}`,
|
|
98
|
+
})),
|
|
99
|
+
...input.tasks
|
|
100
|
+
.filter((task) => task.state === "blocked" && isNoProductChangesReason(task.lastMsg))
|
|
101
|
+
.map((task) => ({ id: task.taskId, line: `${task.taskId} (blocked): ${task.lastMsg}` })),
|
|
102
|
+
];
|
|
103
|
+
return lines.sort((a, b) => a.id.localeCompare(b.id)).map((entry) => entry.line);
|
|
104
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { spawnSync } from "node:child_process";
|
|
2
2
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
3
3
|
import { basename, dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
4
|
+
import { warnDeprecated } from "../shared/deprecation.js";
|
|
4
5
|
import { readSpecdojoNamespace } from "../shared/frontmatter-namespace.js";
|
|
5
6
|
import { listFilesRecursive } from "../shared/fs.js";
|
|
6
7
|
import { gitEnvironment } from "../shared/git.js";
|
|
@@ -229,11 +230,12 @@ export function applyRecordMigration(repoRoot, plan) {
|
|
|
229
230
|
export function registerRecordMigrationCommand(exec) {
|
|
230
231
|
const command = exec
|
|
231
232
|
.command("migrate-records")
|
|
232
|
-
.description("
|
|
233
|
+
.description("Deprecated: legacy run record migration is no longer needed; standard layout is execution/runs/ (will be removed in 0.10.0)");
|
|
233
234
|
addProjectOptions(command);
|
|
234
235
|
command.option("--dry-run", "List moves and reference updates without writing", false);
|
|
235
236
|
command.action((opts) => {
|
|
236
237
|
try {
|
|
238
|
+
warnDeprecated("exec migrate-records", "Legacy run record migration is no longer needed as execution/runs/ is standard. This command will be removed in 0.10.0.");
|
|
237
239
|
const { executionPath } = resolveProjectContext(opts);
|
|
238
240
|
const root = specdojoRootDir();
|
|
239
241
|
const plan = planRecordMigration(root, executionPath, resolveProjectId(opts));
|