musubix3 0.1.0 → 0.1.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.
Files changed (31) hide show
  1. package/.github/plugin/marketplace.json +2 -2
  2. package/.github/skills/sdd-implementation/SKILL.md +9 -2
  3. package/.github/skills/sdd-quality/SKILL.md +15 -6
  4. package/CHANGELOG.md +32 -0
  5. package/README-ja.md +45 -15
  6. package/README.md +47 -15
  7. package/dist/packages/analysis/src/adapters.d.ts +1 -0
  8. package/dist/packages/analysis/src/adapters.js +92 -5
  9. package/dist/packages/analysis/src/adapters.js.map +1 -1
  10. package/dist/packages/analysis/src/config.d.ts +10 -0
  11. package/dist/packages/analysis/src/config.js +121 -10
  12. package/dist/packages/analysis/src/config.js.map +1 -1
  13. package/dist/packages/analysis/src/files.js +19 -1
  14. package/dist/packages/analysis/src/files.js.map +1 -1
  15. package/dist/packages/analysis/src/formal.d.ts +2 -0
  16. package/dist/packages/analysis/src/formal.js +14 -2
  17. package/dist/packages/analysis/src/formal.js.map +1 -1
  18. package/dist/packages/analysis/src/gate.d.ts +6 -0
  19. package/dist/packages/analysis/src/gate.js +36 -5
  20. package/dist/packages/analysis/src/gate.js.map +1 -1
  21. package/dist/packages/analysis/src/mutation.d.ts +15 -1
  22. package/dist/packages/analysis/src/mutation.js +86 -0
  23. package/dist/packages/analysis/src/mutation.js.map +1 -1
  24. package/dist/packages/analysis/src/tdd.js +17 -5
  25. package/dist/packages/analysis/src/tdd.js.map +1 -1
  26. package/dist/packages/analysis/src/workflow.js +5 -3
  27. package/dist/packages/analysis/src/workflow.js.map +1 -1
  28. package/dist/packages/cli/src/main.js +23 -7
  29. package/dist/packages/cli/src/main.js.map +1 -1
  30. package/package.json +1 -1
  31. package/plugin.json +1 -1
@@ -3,13 +3,13 @@
3
3
  "owner": { "name": "nahisaho" },
4
4
  "metadata": {
5
5
  "description": "GitHub Copilot CLI specification-driven development skills",
6
- "version": "0.1.0"
6
+ "version": "0.1.2"
7
7
  },
8
8
  "plugins": [
9
9
  {
10
10
  "name": "musubix3",
11
11
  "source": ".",
12
- "version": "0.1.0",
12
+ "version": "0.1.2",
13
13
  "description": "Evidence-driven SDD without duplicating native Copilot capabilities."
14
14
  }
15
15
  ]
@@ -20,6 +20,9 @@ After the work, run `npx musubix3 workflow-record sdd-implementation complete
20
20
  Follow its native identity contract: pytest/Cargo use underscore names, Go
21
21
  uses a `TEST-*` subtest, and JUnit uses an exact `@Tag("TEST-*")` plus an
22
22
  underscore-form ID in the method name.
23
+ Run the repository formatter before recording Red. Formatting is part of the
24
+ test fingerprint: after Red, do not edit or reformat the authoritative test
25
+ until the matching Green has been recorded.
23
26
  Make the runner emit a fresh
24
27
  `musubix-json` report containing only the selected test (plus declared
25
28
  deterministic `operations` counters when applicable) and run
@@ -43,11 +46,15 @@ After the work, run `npx musubix3 workflow-record sdd-implementation complete
43
46
  Put annotations in the authoritative source and test files, including
44
47
  supported non-JS/TS files; never add a proxy file just to increase coverage.
45
48
  An annotation establishes a link, not proof that code or tests are correct.
46
- 5. Run the project's actual focused tests/typecheck/build; fix failures.
49
+ 5. Before recording Red, run every configured `tdd.redPreflightCommands`
50
+ formatter/check and let musubix3 enforce that preflight. Then run the
51
+ project's actual focused tests/typecheck/build; fix failures.
47
52
  When mutation evidence is required, use the project's existing lightweight
48
53
  mutation mechanism to emit schema-v1 deterministic identities, requirement/
49
54
  test linkage, source/test SHA-256, operator/location, and killed status.
50
- Never fabricate results or add a large mutation dependency.
55
+ Never fabricate results or add a large mutation dependency. Use
56
+ `npx musubix3 mutation doctor --json` to inspect locally available engines
57
+ and configuration recommendations.
51
58
  6. Regenerate `npx musubix3 trace build`, check `trace check --strict`, then
52
59
  `npx musubix3 gate --changed`. Configure real command/argument arrays first.
53
60
  7. Use Copilot's native review and security-review capabilities when appropriate.
@@ -8,7 +8,6 @@ Follow the user's input language (日本語 / English). Use native Copilot revie
8
8
  security review for their specialist reasoning; this skill does not replace them.
9
9
  After the work, run `npx musubix3 workflow-record sdd-quality complete --status
10
10
  completed` exactly once.
11
-
12
11
  1. Inspect `.musubix/config.json` and `.musubix/policy-baseline.json` before
13
12
  running commands. Only execute trusted project configuration. Commands are
14
13
  executable/argument arrays, not shell text. Never edit the baseline without
@@ -18,11 +17,19 @@ completed` exactly once.
18
17
  custom report or a built-in Vitest/Jest, pytest, Go test, Cargo or JUnit
19
18
  adapter. Require executable native adapter contracts in CI; JUnit targets use
20
19
  an exact `@Tag("TEST-*")`, and pytest requires `pytest-json-report`. Review
21
- `requiredChecks`, coverage thresholds and architecture rules. Use strict
20
+ `requiredChecks`, `qualityProfile`, coverage thresholds and architecture rules.
21
+ Use `recommended` or `release` only when all profile requirements are
22
+ intentionally configured; profile validation never invents missing evidence. Use strict
22
23
  `codeGraph.mode` when unresolved computed module loading must block release,
23
24
  and ensure the trusted baseline prevents downgrading it. Configure a
24
25
  fresh structured `testReport` for `test-identities`. Do not weaken policy.
25
26
  3. Run `npx musubix3 gate --json` or `npx musubix3 gate --changed --json`.
27
+ `evidence refresh --json` runs the same fail-closed pipeline. If `input-stability` fails,
28
+ inspect its per-path added/modified/deleted diagnostics and stop generators
29
+ or formatters before rerunning. Standard dependency/build directories,
30
+ including manifest-scoped Cargo and Maven `target/` and conventional `.venv`
31
+ or `venv` roots with a regular `pyvenv.cfg`, are excluded; arbitrary source
32
+ directories and source-like generated inputs are not silently ignored.
26
33
  Changed mode reports Git changes and dependent files but conservatively runs
27
34
  all checks, including commands. It never treats unrun checks as successful.
28
35
  When `tdd` is required, confirm every command has test-scoped `tddArgs`, every
@@ -34,8 +41,9 @@ completed` exactly once.
34
41
  Treat workflow records as declarations until `workflow-verify` binds each
35
42
  completed declaration to one distinct completed Copilot Skill tool call.
36
43
  In strict mode require one final successful result, matching session UUID,
37
- causal timestamps, bounded freshness, complete tool lifecycles and canonical
38
- transcript hash. Ensure the baseline protects strict/session/freshness policy.
44
+ causal transcript order, policy-bounded concurrent-event clock skew, bounded
45
+ freshness, complete tool lifecycles and canonical transcript hash. Ensure the
46
+ baseline protects strict/session/freshness/event-skew policy.
39
47
  When `change-history` is required,
40
48
  confirm ordered checkpoints, chained TDD records, requirement-scoped Code
41
49
  Graph changes, exact CHANGE requirement enumeration, measurable Acceptance,
@@ -53,7 +61,8 @@ completed` exactly once.
53
61
  identities bound to must functional requirements, current source/test
54
62
  fingerprints, operator/location, authoritative tests, and killed results.
55
63
  Reject survived, skipped, duplicate, conflicting, stale, or unlinked mutants.
56
- musubix3 validates evidence; it does not bundle a mutation engine.
64
+ Run `mutation doctor` for language-aware local probes and remediation;
65
+ musubix3 validates evidence and does not bundle a mutation engine.
57
66
  Missing required tools, commands, artifacts or evidence block readiness.
58
67
  5. Use native review/security-review as needed, recording their findings
59
68
  separately from machine evidence. Never fabricate review or test results.
@@ -66,4 +75,4 @@ completed` exactly once.
66
75
  Ensure the baseline protects CI-required mode, strict OIDC and key binding.
67
76
  Never store a private key or overstate OIDC as proof of arbitrary runner work.
68
77
  7. Run `npx musubix3 status --json`; stale evidence must be refreshed. Report
69
- limitations and residual risks before handoff. No resident watcher or REPL.
78
+ limitations and residual risks before handoff; no resident watcher or REPL.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,38 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.1.2 - 2026-09-07
6
+
7
+ - Exclude conventional `.venv` and `venv` Python environments identified by a
8
+ regular `pyvenv.cfg` file from project snapshots and Code Graph indexing,
9
+ without allowing the marker to hide arbitrary source directories.
10
+ - Add configurable `tdd.redPreflightCommands` so formatters and other plain
11
+ preflight commands complete before a Red test fingerprint is captured.
12
+ - Add explicit `custom`, `minimal`, `recommended`, and `release` quality
13
+ profiles with fail-closed requirements for stronger profiles.
14
+ - Accept bounded timestamp skew for causally ordered concurrent Copilot tool
15
+ events in strict workflow verification, with a policy-protected
16
+ `workflow.maxEventSkewMs` limit.
17
+ - Add `mutation doctor` with language-aware local engine probes, attempted
18
+ commands, and actionable configuration recommendations.
19
+
20
+ ## 0.1.1 - 2026-09-07
21
+
22
+ - Preserve fail-closed input-stability checks while reporting every added,
23
+ modified, or deleted path with before/after SHA-256 fingerprints.
24
+ - Exclude standard Cargo and Maven `target/` build output from project input
25
+ snapshots without ignoring source-like generated inputs.
26
+ - Merge legacy Cargo/Go `test` subcommands without producing duplicated commands
27
+ such as `cargo test test`, and reject conflicting adapter-owned report flags.
28
+ - Discover JUnit XML recursively so nested multi-module report directories can
29
+ be normalized.
30
+ - Add `evidence refresh` as an explicit entry point for the deterministic
31
+ evidence and quality-gate pipeline.
32
+ - Extend `formal doctor` with every attempted solver command and actionable
33
+ installation/configuration recommendations.
34
+ - Clarify Skill guidance to format tests before recording Red and to investigate
35
+ per-path input-stability diagnostics without weakening quality policy.
36
+
5
37
  ## 0.1.0 - 2026-09-07
6
38
 
7
39
  - Add SHA-pinned cross-platform CI, reproducible native/formal toolchains, and
package/README-ja.md CHANGED
@@ -1,9 +1,11 @@
1
1
  # musubix3
2
2
 
3
- **リリース候補 · GitHub Copilot CLI 専用 · Node.js ≥20 · TypeScript · MIT**
3
+ **最新公開版 v0.1.2 · GitHub Copilot CLI 専用 · Node.js ≥20 · TypeScript · MIT**
4
4
 
5
5
  [English](README.md)
6
6
 
7
+ [musubix2 から musubix3 で変わったこと](MUSUBIX2-TO-MUSUBIX3.md)
8
+
7
9
  要求 → 憲章 → 設計・ADR → 実装 → 追跡可能性 → 品質根拠、という
8
10
  仕様駆動開発(SDD)を、8つの Skills と決定的な検証エンジンで支援します。
9
11
  形式的整合性検査、コンパイラによる依存解析、ローカル知識検索も含みます。
@@ -14,8 +16,25 @@ ID の接続や SAT 判定だけで、実装の正しさを保証するもので
14
16
 
15
17
  ## クイックスタート
16
18
 
17
- RC はローカルでビルド・パッケージ化できます。以下のレジストリ向けコマンドは、
18
- npm 公開後の利用例です。インストールテストは公開を行いません。
19
+ 対象プロジェクトで、公開済みパッケージを実行します。
20
+
21
+ ```sh
22
+ npx musubix3@0.1.2 --version
23
+ npx musubix3@0.1.2 init --dry-run
24
+ npx musubix3@0.1.2 init
25
+ copilot
26
+ ```
27
+
28
+ バージョンを固定してプロジェクトへインストールする場合は、次を実行します。
29
+
30
+ ```sh
31
+ npm install --save-dev --save-exact musubix3@0.1.2
32
+ npx --no-install musubix3 --version
33
+ npx --no-install musubix3 init --dry-run
34
+ npx --no-install musubix3 init
35
+ ```
36
+
37
+ リポジトリ自体をビルドする場合は、次を実行します。
19
38
 
20
39
  ```sh
21
40
  git clone https://github.com/nahisaho/musubix3.git
@@ -23,16 +42,6 @@ cd musubix3
23
42
  npm install
24
43
  npm run build
25
44
  node dist/packages/cli/src/main.js --help
26
- node dist/packages/cli/src/main.js init --root ../your-project --dry-run
27
- node dist/packages/cli/src/main.js init --root ../your-project
28
- ```
29
-
30
- npm 公開後は、対象プロジェクトで実行します。
31
-
32
- ```sh
33
- npx musubix3 init --dry-run
34
- npx musubix3 init
35
- copilot
36
45
  ```
37
46
 
38
47
  Copilot に「sdd-requirements でこの機能の要求を定義し、設計を計画して」と依頼します。
@@ -167,8 +176,10 @@ npx musubix3 status --json
167
176
  | `knowledge query <text> [--limit 10]` | TF-IDF/cosine のランキングと陳腐化情報 |
168
177
  | `formal generate <file> [--format both\|smt2\|lean]` | SHA-256付きの再現可能なsolver入力生成 |
169
178
  | `formal doctor` | Z3、Lean、`lake env lean` の存在とバージョン確認 |
179
+ | `mutation doctor` | 言語別のローカルmutation engine確認と導入推奨 |
170
180
  | `formal check <file> [--solver auto\|none\|z3\|lean]` | 明示的なBoolean・条件・数値・時間・状態遷移モデルを検査 |
171
181
  | `model-correspondence validate` | Formal JSON→生成trace→正本passing testの証拠を再検証 |
182
+ | `evidence refresh [--changed]` | 同じfail-closed gate pipelineで派生証拠を再生成 |
172
183
  | `mutation validate` | 要求scopeのschema-v1 killed-mutant証拠を再検証 |
173
184
  | `tdd red\|green\|refactor <TEST-ID> --requirement <REQ-ID> --command <name>` | 検証可能なTDDフェーズを実行・記録 |
174
185
  | `workflow-record <skill> <phase> --status <status>` | 自己申告のworkflow宣言を記録 |
@@ -317,6 +328,7 @@ version: 1.0.0
317
328
  {
318
329
  "schemaVersion": 1,
319
330
  "language": "auto",
331
+ "qualityProfile": "custom",
320
332
  "commands": [
321
333
  { "name": "typecheck", "command": "npm", "args": ["run", "typecheck"], "required": true, "timeoutMs": 120000 },
322
334
  {
@@ -332,10 +344,12 @@ version: 1.0.0
332
344
  "thresholds": { "design": 1, "implementation": 1, "tests": 1 },
333
345
  "formal": { "solver": "none", "minModeledFraction": 0, "timeoutMs": 12000 },
334
346
  "mutation": { "mode": "compatible" },
347
+ "tdd": { "redPreflightCommands": [] },
335
348
  "workflow": {
336
349
  "mode": "compatible",
337
350
  "maxAgeSeconds": 3600,
338
- "maxFutureSkewSeconds": 60
351
+ "maxFutureSkewSeconds": 60,
352
+ "maxEventSkewMs": 1000
339
353
  },
340
354
  "attestation": {
341
355
  "mode": "local",
@@ -356,6 +370,15 @@ version: 1.0.0
356
370
 
357
371
  未知の設定キー、不正な閾値、重複コマンドはエラーです。
358
372
  glob は `*` / `**` / `?` に対応し、外部依存は `npm:` 接頭辞で表現します。
373
+ `qualityProfile`の既定値は`custom`です。`minimal`はSDDの基本gate、
374
+ `recommended`はstrict Code Graph、TDD、構造化test identityも要求し、
375
+ `release`はformal、mutation、workflow、変更、performance、CI attestationを
376
+ 含む完全なrelease checkを要求します。不足設定や弱い設定を証拠で補ったことにはしません。
377
+ `tdd.redPreflightCommands`にはformatter等のplain command名を指定でき、
378
+ Redのtest fingerprintを取得する前に成功が必須です。
379
+ 通常ファイルの`pyvenv.cfg`を含む`.venv`と`venv`はsnapshotと
380
+ Code Graphから除外されますが、任意のsource directoryにmarkerを置いても
381
+ 除外されません。
359
382
  `codeGraph.mode` の既定値は `compatible` で、未解決の計算された
360
383
  `import()` / `require()` は警告です。`strict` にするとグラフゲートを阻止する
361
384
  エラーになります。信頼済みbaselineが `strict` の場合、`compatible` への
@@ -376,7 +399,9 @@ command reportでpassしたことを要求します。欠落・改変・stale・
376
399
 
377
400
  `.musubix/policy-baseline.json` は必須チェック、閾値、アーキテクチャ、
378
401
  Formalポリシー、mutation mode、workflow strict/session/freshness、CI必須attestation、
379
- strict OIDC identity/key binding、必須コマンド名の最低条件です。弱体化は拒否され、
402
+ strict OIDC identity/key binding、必須コマンド名の最低条件です。Red preflightを
403
+ 要求するbaselineは正規化済み`commands`定義も保持し、同名formatterへの
404
+ すり替えを拒否します。弱体化は拒否され、
380
405
  変更ゲート中のbaseline変更には独立承認が必要です。CODEOWNERS等で保護してください。
381
406
 
382
407
  **信頼した設定だけを実行してください。** ゲートは環境変数を継承し、シェルを
@@ -456,6 +481,11 @@ strict検証は`workflow.maxAgeSeconds`と`workflow.maxFutureSkewSeconds`で
456
481
  terminal transcriptの古さと未来方向clock skewも制限します。
457
482
  並行eventはtimestamp順で出力されない場合があるため、全体sortではなくtool/resultの
458
483
  因果順序を検査します。
484
+ gate実行中に入力が変わった場合、`input-stability`は追加・変更・削除された各pathと
485
+ 前後のSHA-256を報告します。Cargo/Mavenの標準`target/`は除外しますが、
486
+ source相当の生成入力はfail-closedのままです。組込みadapterは対象test選択とreport引数を
487
+ 所有します。Cargo/Goの既存設定にある先頭`test`は安全に統合し、
488
+ `--json-report`など競合するreport引数は早期拒否します。
459
489
  実行中の入力変更は失敗、その後の変更は `status` で stale になります。
460
490
  `maxAgeSeconds`より古いattestation、または`maxFutureSkewSeconds`を超えて未来の
461
491
  `issuedAt`は失敗します。local modeは未署名を明示します。
package/README.md CHANGED
@@ -1,9 +1,11 @@
1
1
  # musubix3
2
2
 
3
- **Release candidate · GitHub Copilot CLI only · Node.js ≥20 · TypeScript · MIT**
3
+ **Latest published v0.1.2 · GitHub Copilot CLI only · Node.js ≥20 · TypeScript · MIT**
4
4
 
5
5
  [日本語](README-ja.md)
6
6
 
7
+ [What changed from musubix2 to musubix3 (Japanese)](MUSUBIX2-TO-MUSUBIX3.md)
8
+
7
9
  Specification-driven development (SDD) skills backed by deterministic checks:
8
10
  requirements → constitution → design/ADRs → implementation → traceability →
9
11
  quality evidence. Optional formal consistency, compiler dependency analysis and
@@ -16,8 +18,25 @@ or requirements are satisfiable.
16
18
 
17
19
  ## Quick start
18
20
 
19
- The RC can be built and packed locally; registry commands below assume the
20
- package has been published. No publication is performed by installation tests.
21
+ Run the published package from the target project:
22
+
23
+ ```sh
24
+ npx musubix3@0.1.2 --version
25
+ npx musubix3@0.1.2 init --dry-run
26
+ npx musubix3@0.1.2 init
27
+ copilot
28
+ ```
29
+
30
+ For a reproducible project-local installation:
31
+
32
+ ```sh
33
+ npm install --save-dev --save-exact musubix3@0.1.2
34
+ npx --no-install musubix3 --version
35
+ npx --no-install musubix3 init --dry-run
36
+ npx --no-install musubix3 init
37
+ ```
38
+
39
+ To build the repository itself:
21
40
 
22
41
  ```sh
23
42
  git clone https://github.com/nahisaho/musubix3.git
@@ -25,16 +44,6 @@ cd musubix3
25
44
  npm install
26
45
  npm run build
27
46
  node dist/packages/cli/src/main.js --help
28
- node dist/packages/cli/src/main.js init --root ../your-project --dry-run
29
- node dist/packages/cli/src/main.js init --root ../your-project
30
- ```
31
-
32
- Once available on npm, from your target project:
33
-
34
- ```sh
35
- npx musubix3 init --dry-run
36
- npx musubix3 init
37
- copilot
38
47
  ```
39
48
 
40
49
  Ask Copilot: “Use sdd-change to add this feature and propagate it through the
@@ -175,8 +184,10 @@ validation/gate or requested solver failure, **2** usage, I/O or malformed confi
175
184
  | `knowledge query <text> [--limit 10]` | Deterministic TF-IDF/cosine results and staleness flag |
176
185
  | `formal generate <file> [--format both\|smt2\|lean]` | Reproducible solver inputs with SHA-256 evidence |
177
186
  | `formal doctor` | Probe Z3, Lean, and `lake env lean` availability and versions |
187
+ | `mutation doctor` | Probe language-aware local mutation engines and show setup recommendations |
178
188
  | `formal check <file> [--solver auto\|none\|z3\|lean]` | Check the explicit Boolean/conditional/numeric/temporal/transition model |
179
189
  | `model-correspondence validate` | Revalidate Formal JSON → generated trace → authoritative passing test evidence |
190
+ | `evidence refresh [--changed]` | Regenerate derived evidence through the same fail-closed gate pipeline |
180
191
  | `mutation validate` | Revalidate requirement-scoped schema-v1 killed-mutant evidence |
181
192
  | `tdd red\|green\|refactor <TEST-ID> --requirement <REQ-ID> --command <name>` | Execute and record a verified TDD phase |
182
193
  | `workflow-record <skill> <phase> --status <status>` | Record a compact self-reported workflow declaration |
@@ -318,6 +329,7 @@ Example `.musubix/config.json` (adapt command arguments to your own project):
318
329
  {
319
330
  "schemaVersion": 1,
320
331
  "language": "auto",
332
+ "qualityProfile": "custom",
321
333
  "commands": [
322
334
  { "name": "typecheck", "command": "npm", "args": ["run", "typecheck"], "required": true, "timeoutMs": 120000 },
323
335
  {
@@ -333,10 +345,12 @@ Example `.musubix/config.json` (adapt command arguments to your own project):
333
345
  "thresholds": { "design": 1, "implementation": 1, "tests": 1 },
334
346
  "formal": { "solver": "none", "minModeledFraction": 0, "timeoutMs": 12000 },
335
347
  "mutation": { "mode": "compatible" },
348
+ "tdd": { "redPreflightCommands": [] },
336
349
  "workflow": {
337
350
  "mode": "compatible",
338
351
  "maxAgeSeconds": 3600,
339
- "maxFutureSkewSeconds": 60
352
+ "maxFutureSkewSeconds": 60,
353
+ "maxEventSkewMs": 1000
340
354
  },
341
355
  "attestation": {
342
356
  "mode": "local",
@@ -357,6 +371,16 @@ Example `.musubix/config.json` (adapt command arguments to your own project):
357
371
 
358
372
  Config is validated strictly; misspelled keys, invalid bounds and duplicate
359
373
  commands fail closed. Globs support `*`, `**`, `?`; external imports use `npm:`.
374
+ `qualityProfile` is `custom` by default. `minimal` preserves the core SDD gate,
375
+ `recommended` also requires strict Code Graph, TDD and structured test
376
+ identities, and `release` requires the complete formal, mutation, workflow,
377
+ change, performance and CI-attestation checks. Stronger profiles reject missing
378
+ or weakened settings rather than silently filling in evidence.
379
+ Use `tdd.redPreflightCommands` to reference plain configured formatter commands;
380
+ they must pass before Red captures the authoritative test fingerprint.
381
+ Conventional `.venv` and `venv` Python environments containing a regular
382
+ `pyvenv.cfg` are excluded from source snapshots and Code Graph indexing.
383
+ Arbitrary source directories containing that marker remain tracked.
360
384
  `codeGraph.mode` defaults to `compatible`, where unresolved computed
361
385
  `import()`/`require()` calls remain warnings. Set it to `strict` to make those
362
386
  diagnostics gate-blocking errors. A trusted strict policy baseline prevents
@@ -381,7 +405,9 @@ diagnostic codes are stable English; human status labels include Japanese.
381
405
  `.musubix/policy-baseline.json` records minimum required checks, coverage,
382
406
  architecture, formal policy, mutation mode, workflow strict/session/freshness settings,
383
407
  CI-required attestation and strict OIDC identity/key binding, and required
384
- command names. Weakening is rejected; changing the baseline in `gate --changed`
408
+ command names. A baseline that requires TDD Red preflights must also include
409
+ their normalized `commands` definitions, which prevents replacing a trusted
410
+ formatter while retaining its name. Weakening is rejected; changing the baseline in `gate --changed`
385
411
  requires independent approval. Protect the baseline with review/CODEOWNERS.
386
412
 
387
413
  **Only run trusted configuration**: gates execute its commands with inherited
@@ -482,6 +508,12 @@ Strict verification also bounds terminal transcript age and future clock skew
482
508
  with `workflow.maxAgeSeconds` and `workflow.maxFutureSkewSeconds`.
483
509
  Unrelated concurrent events may be emitted out of timestamp order, so strict mode
484
510
  checks causal tool/result ordering rather than imposing a global timestamp sort.
511
+ If project inputs change while a gate is running, `input-stability` reports each
512
+ added, modified, or deleted path with before/after SHA-256 values. Standard
513
+ Cargo/Maven `target/` output is excluded, but source-like generated inputs remain
514
+ fail-closed. Built-in adapters own their targeting and report arguments. A
515
+ legacy leading Cargo/Go `test` subcommand is merged safely; conflicting report
516
+ flags such as `--json-report` are rejected.
485
517
  Changes during a gate fail input stability; later source/config changes make
486
518
  `status` stale. Attestations older than `maxAgeSeconds`, or issued farther in the
487
519
  future than `maxFutureSkewSeconds`, fail. Local mode explicitly reports unsigned
@@ -6,6 +6,7 @@ export interface AdapterInvocation {
6
6
  reportPath: string;
7
7
  source: 'file' | 'directory' | 'stdout';
8
8
  }
9
+ export declare function mergeAdapterArgs(adapter: TestAdapter, configuredArgs: string[], invocationArgs: string[]): string[];
9
10
  export declare function adapterInvocation(adapter: TestAdapter, commandName: string, testId?: string, testPath?: string): AdapterInvocation;
10
11
  export declare function clearAdapterOutput(invocation: AdapterInvocation, absolutePath: string): Promise<void>;
11
12
  export declare function readAdapterOutput(invocation: AdapterInvocation, absolutePath: string, stdout: string): Promise<string | null>;
@@ -1,6 +1,84 @@
1
- import { dirname } from 'node:path';
1
+ import { dirname, posix } from 'node:path';
2
2
  import { mkdir, readdir, readFile, rm, unlink, writeFile } from 'node:fs/promises';
3
3
  import { exists } from './files.js';
4
+ const goValueFlags = new Set([
5
+ '-C', '-asmflags', '-bench', '-benchtime', '-blockprofile', '-blockprofilerate',
6
+ '-buildmode', '-compiler',
7
+ '-count', '-covermode', '-coverpkg', '-coverprofile', '-cpu', '-cpuprofile', '-exec',
8
+ '-fuzz', '-fuzzminimizetime', '-fuzztime', '-gccgoflags', '-gcflags',
9
+ '-installsuffix', '-ldflags', '-list', '-memprofile', '-memprofilerate',
10
+ '-mod', '-modfile', '-mutexprofile',
11
+ '-mutexprofilefraction', '-o', '-outputdir', '-overlay', '-p', '-parallel',
12
+ '-pgo', '-pkgdir', '-run', '-shuffle', '-skip', '-tags', '-timeout', '-toolexec', '-trace',
13
+ '-vet',
14
+ ]);
15
+ function partitionGoArgs(args) {
16
+ const flags = [];
17
+ const packages = [];
18
+ let directory;
19
+ for (let index = 0; index < args.length; index++) {
20
+ const arg = args[index];
21
+ if (arg === '-args') {
22
+ return { flags, packages, passthrough: args.slice(index + 1), ...(directory ? { directory } : {}) };
23
+ }
24
+ if (arg.startsWith('-')) {
25
+ flags.push(arg);
26
+ const flag = arg.split('=', 1)[0];
27
+ if (!arg.includes('=') && goValueFlags.has(flag) && args[index + 1] !== undefined) {
28
+ const value = args[++index];
29
+ flags.push(value);
30
+ if (flag === '-C')
31
+ directory = value;
32
+ }
33
+ else if (flag === '-C' && arg.includes('=')) {
34
+ directory = arg.slice(arg.indexOf('=') + 1);
35
+ }
36
+ }
37
+ else {
38
+ packages.push(arg);
39
+ }
40
+ }
41
+ return { flags, packages, passthrough: [], ...(directory ? { directory } : {}) };
42
+ }
43
+ export function mergeAdapterArgs(adapter, configuredArgs, invocationArgs) {
44
+ if (adapter === 'cargo' && configuredArgs[0] === 'test' && invocationArgs[0] === 'test') {
45
+ const configuredSeparator = configuredArgs.indexOf('--');
46
+ const invocationSeparator = invocationArgs.indexOf('--');
47
+ const configuredCommandArgs = configuredSeparator < 0 ? configuredArgs.slice(1) : configuredArgs.slice(1, configuredSeparator);
48
+ const configuredHarnessArgs = configuredSeparator < 0 ? [] : configuredArgs.slice(configuredSeparator + 1);
49
+ const invocationCommandArgs = invocationSeparator < 0 ? invocationArgs.slice(1) : invocationArgs.slice(1, invocationSeparator);
50
+ const invocationHarnessArgs = invocationSeparator < 0 ? [] : invocationArgs.slice(invocationSeparator + 1);
51
+ return [
52
+ 'test',
53
+ ...configuredCommandArgs,
54
+ ...invocationCommandArgs,
55
+ ...(configuredHarnessArgs.length || invocationHarnessArgs.length
56
+ ? ['--', ...configuredHarnessArgs, ...invocationHarnessArgs]
57
+ : []),
58
+ ];
59
+ }
60
+ if (adapter === 'go-test' && configuredArgs[0] === 'test' && invocationArgs[0] === 'test') {
61
+ const configured = partitionGoArgs(configuredArgs.slice(1));
62
+ const generatedPackage = invocationArgs[2];
63
+ const targeted = invocationArgs.includes('-run');
64
+ if (configured.directory && posix.isAbsolute(configured.directory)) {
65
+ throw new Error('The go-test adapter requires a relative -C directory so it can preserve targeted package scope.');
66
+ }
67
+ const targetedPackage = configured.directory && generatedPackage.startsWith('./')
68
+ ? posix.relative(configured.directory, generatedPackage.slice(2)) || '.'
69
+ : generatedPackage;
70
+ const packages = !targeted && configured.packages.length ? configured.packages : [targetedPackage];
71
+ return [
72
+ 'test',
73
+ ...configured.flags,
74
+ '-json',
75
+ ...packages,
76
+ ...invocationArgs.slice(3),
77
+ ...(configured.passthrough.length ? ['-args', ...configured.passthrough] : []),
78
+ ];
79
+ }
80
+ return [...configuredArgs, ...invocationArgs];
81
+ }
4
82
  function reportPath(commandName, testId, adapter) {
5
83
  const suffix = adapter === 'junit' ? '' : '.json';
6
84
  return testId
@@ -72,12 +150,21 @@ export async function readAdapterOutput(invocation, absolutePath, stdout) {
72
150
  return null;
73
151
  if (invocation.source === 'file')
74
152
  return readFile(absolutePath, 'utf8');
75
- const entries = (await readdir(absolutePath, { withFileTypes: true }))
76
- .filter((entry) => entry.isFile() && entry.name.endsWith('.xml'))
77
- .sort((a, b) => a.name.localeCompare(b.name));
153
+ async function xmlFiles(directory) {
154
+ const found = [];
155
+ for (const entry of (await readdir(directory, { withFileTypes: true })).sort((a, b) => a.name.localeCompare(b.name))) {
156
+ const path = `${directory}/${entry.name}`;
157
+ if (entry.isDirectory())
158
+ found.push(...await xmlFiles(path));
159
+ else if (entry.isFile() && entry.name.endsWith('.xml'))
160
+ found.push(path);
161
+ }
162
+ return found;
163
+ }
164
+ const entries = await xmlFiles(absolutePath);
78
165
  if (!entries.length)
79
166
  return null;
80
- return (await Promise.all(entries.map((entry) => readFile(`${absolutePath}/${entry.name}`, 'utf8')))).join('\n');
167
+ return (await Promise.all(entries.map((entry) => readFile(entry, 'utf8')))).join('\n');
81
168
  }
82
169
  function idOf(value) {
83
170
  if (typeof value !== 'string')
@@ -1 +1 @@
1
- {"version":3,"file":"adapters.js","sourceRoot":"","sources":["../../../../packages/analysis/src/adapters.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACnF,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAYpC,SAAS,UAAU,CAAC,WAAmB,EAAE,MAAe,EAAE,OAAqB;IAC7E,MAAM,MAAM,GAAG,OAAO,KAAK,OAAO,CAAC,CAAC,CA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
  maxAgeSeconds?: number;
57
57
  maxFutureSkewSeconds?: number;
58
+ maxEventSkewMs?: number;
58
59
  }
59
60
  export interface CodeGraphConfig {
60
61
  mode: 'compatible' | 'strict';
@@ -62,9 +63,14 @@ export interface CodeGraphConfig {
62
63
  export interface MutationConfig {
63
64
  mode: 'compatible' | 'strict';
64
65
  }
66
+ export interface TddConfig {
67
+ redPreflightCommands: string[];
68
+ }
69
+ export type QualityProfile = 'custom' | 'minimal' | 'recommended' | 'release';
65
70
  export interface Config {
66
71
  schemaVersion: 1;
67
72
  language: 'auto' | 'en' | 'ja';
73
+ qualityProfile: QualityProfile;
68
74
  commands: CommandConfig[];
69
75
  requiredChecks: string[];
70
76
  thresholds: {
@@ -79,17 +85,21 @@ export interface Config {
79
85
  codeGraph: CodeGraphConfig;
80
86
  formal: FormalConfig;
81
87
  mutation: MutationConfig;
88
+ tdd: TddConfig;
82
89
  workflow: WorkflowConfig;
83
90
  attestation: AttestationConfig;
84
91
  }
85
92
  export interface PolicyBaseline {
86
93
  schemaVersion: 1;
94
+ qualityProfile: QualityProfile;
95
+ commands: CommandConfig[];
87
96
  requiredChecks: string[];
88
97
  thresholds: Config['thresholds'];
89
98
  architecture: Config['architecture'];
90
99
  codeGraph: Config['codeGraph'];
91
100
  formal: Pick<FormalConfig, 'solver' | 'minModeledFraction'>;
92
101
  mutation: MutationConfig;
102
+ tdd: TddConfig;
93
103
  workflow: WorkflowConfig;
94
104
  attestation: AttestationConfig;
95
105
  requiredCommands: string[];