Skip to content

feat(u4-conduit-parity): --autonomy 起動宣言の導線を全面へ追記しパリティを回帰テストで固定する - #2532

Merged
j5ik2o merged 4 commits into
mainfrom
bolt-2378-u4-conduit-parity
Aug 8, 2026
Merged

feat(u4-conduit-parity): --autonomy 起動宣言の導線を全面へ追記しパリティを回帰テストで固定する#2532
j5ik2o merged 4 commits into
mainfrom
bolt-2378-u4-conduit-parity

Conversation

@j5ik2o

@j5ik2o j5ik2o commented Aug 8, 2026

Copy link
Copy Markdown
Member

概要(Bolt: u4-conduit-parity / intent 260807-autonomy-reachability)

--autonomy 起動宣言は u2(#2524)で実際に動くようになったが、conductor が読む面には記載がゼロだった(RE finding 8)。本 PR はその導線を全面へ追記し、パリティを blocking テストで固定する。

  • FR-5a: 8つのハーネス入口(harness/{claude,codex,kimi,kiro,kiro-ide,pi}/skills/amadeus/SKILL.md + harness/{cursor,opencode}/commands/amadeus.md)へ、フラグ列挙と説明ブロックを追記
  • FR-5b: amadeus-utility.ts の help(:265 フラグ行 / :284 例)、README.md / README.ja.mddocs/reference/24-intent-autonomy.md / .ja.md(対訳は同一変更で同期)
  • FR-5c: stage-protocol.md:137semi の decide-question 操作手順を新設(full と同じ手順を名指しし、実際の差分2点 — semi スコープの基準と --policies-file — だけを分離)。あわせて AUTONOMY IS NEVER INFERRED を「エンジンに記録された mode による自動裁定は推論ではない」旨と整合するよう改訂。同根棚卸しで claude だけでなく kimi/kiro/kiro-ide の同一行も是正
  • FR-5d: パリティ回帰テスト tests/integration/t492-autonomy-conduit-parity.integration.test.ts を新設

対象面の導出(件数のマジックナンバーなし)

導線集合はディスク走査で導出する — readdirSyncpackages/framework/harness/ を列挙し isDirectory() で絞る(registry.ts / projections.ts は ignore list でなく構造的に落ちる)。各ハーネスは2つの入口形(skills/amadeus/SKILL.md / commands/amadeus.md)に解決する。新しいハーネスは存在するだけで契約に参加し、ファイル内に件数は一切現れない(count-free 原則)。

導出自体も assert している: entryPointsOf(harness).length !== 1 は赤になる。これが無いと、入口が移動したハーネスが集合から静かに抜けても全 assertion が通ってしまう。

docs 面(README 対 / reference-24 対)は列挙するディレクトリが無いため明示リストで、そのリストが canonical 定義になる。help text はソースを grep せず、dist/claude/.claude/tools/amadeus-utility.ts help を spawn して status === 0 と stdout 内容で観測する。

落ちる実証(builder / conductor が独立に1セットで実施)

conductor 側の独立再現: packages/framework/harness/kimi/skills/amadeus/SKILL.md から --autonomy 4箇所を除去(残 0 を grep 確認)→ 赤が harness:kimi を名指しで発生(他4テストは green のまま)→ git checkout f679e2864 -- <path> で復元 → git status clean・残渣 grep 0 → 再実行 5 pass / 0 fail

builder 側は opencode/commands/amadeus.md で同型の1セットを実施済み。

検証

  • bun run typecheck 0 / bun run lint 0 / complexity-gate --check 0 / gen-coverage-registry --check 0 / source-only:check 0
  • bash tests/run-tests.sh --ci exit 0(907 files・12181 assertions・0 fail)
  • bun run build 後の追跡ファイル不変

申し送り

t492 は CLI を spawn するため mechanism ratchet が none→cli と再分類し EXPECTED_NONE_TO_CLI への登録を要求した(c7bf27864)。触ったテストだけを流しても発見できないゲートで、以後 spawn するテストを足す unit は同じ経路を通る。

Refs #2378


Note

Low Risk
Documentation, harness prose, help text, and a parity integration test only; no changes to autonomy authorization logic in this diff.

Overview
Surfaces the existing /amadeus --autonomy <none|semi|full> launch declaration everywhere conductors and users look, after the engine already supported it but harness entry points did not mention it.

Harness parity: all eight harness canonical entry points (skills/amadeus/SKILL.md or commands/amadeus.md) now list --autonomy, instruct passing it verbatim to amadeus-orchestrate.ts next, and spell out that none/semi record via the canonical path while full still requires the grant ceremony (not the flag). CLI help in amadeus-utility.ts adds the flag line and an example. README (EN/JA) and docs/reference/24-intent-autonomy gain a “declaring at launch” section with first-declaration-only rules and full/revoke refusal behavior.

Stage protocol: adds an explicit semi question path using the same decide-question procedure as full, and tightens “AUTONOMY IS NEVER INFERRED” so engine-recorded semi/full rulings are not treated as inferred permission.

Regression: new t492-autonomy-conduit-parity integration test derives every harness entry from disk, asserts --autonomy on each conduit plus doc surfaces and spawned help output, and checks the semi paragraph exists in stage-protocol.md.

Reviewed by Cursor Bugbot for commit f679e28. Configure here.

Summary by CodeRabbit

  • 新機能
    • Intent 起動時に自律モード(nonesemifull)を指定できます。
    • semi は限定的な自動処理、full は人間による確認・許可を経て利用できます。
    • 自律モードの設定や判断結果を監査可能な形で記録します。
  • ドキュメント
    • 英語・日本語のリファレンス、README、各種CLIガイドを更新しました。
    • semifull における質問処理や停止条件を明確化しました。
  • テスト
    • 各環境でのオプション表示と関連ドキュメントの整合性を検証するテストを追加しました。

j5ik2o added 2 commits August 8, 2026 19:03
… every conduit

The launch declaration landed in the engine with no entry point naming it:
all eight harness surfaces, the help text, the README pair and the autonomy
reference were silent, so a flag that works was undiscoverable.

- name --autonomy on every harness entry point (six SKILL.md, two command
  files), with the real behaviour: none/semi apply at once, full prints the
  grant ceremony and stops
- add --autonomy to the help text, the README pair and reference chapter 24
  (both languages)
- give semi its own decide-question procedure in stage-protocol, and revise
  AUTONOMY IS NEVER INFERRED so executing a recorded mode is not read as
  inference
- add t492, a blocking parity guard whose conduit set is derived from the
  harness tree rather than listed
t492 observes the help text at the process boundary, so the repository-wide
mechanism ratchet reclassifies it none->cli. Add it to EXPECTED_NONE_TO_CLI,
which is the ratchet's declared spawner set.
@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 105016fc-828a-4d6a-be89-25e2a9d62ea5

📥 Commits

Reviewing files that changed from the base of the PR and between 4e80519 and 1cb16f3.

📒 Files selected for processing (2)
  • docs/reference/24-intent-autonomy.ja.md
  • docs/reference/24-intent-autonomy.md

📝 Walkthrough

Walkthrough

--autonomy <none|semi|full> の起動宣言と full のグラント手順を文書化しました。各ハーネスの転送規則を更新しました。README、ヘルプ、stage protocol、統合テストで指定内容の一致を検証します。

Changes

Intent autonomy conduit

Layer / File(s) Summary
自律モードの契約とリファレンス
README*, docs/reference/24-intent-autonomy*, packages/framework/core/tools/amadeus-utility.ts, packages/framework/core/amadeus-common/protocols/stage-protocol.md
nonesemifull の起動宣言を追加しました。初回宣言、再指定、human turn、full のグラント手順、semi の質問処理を記載しました。
ハーネスの引数転送
packages/framework/harness/*/skills/amadeus/SKILL.md, packages/framework/harness/*/commands/amadeus.md
ハーネスが --autonomynext に渡す規則を追加しました。nonesemi は記録し、full はグラント手順を表示して停止します。
導通パリティ検証
tests/integration/t492-autonomy-conduit-parity.integration.test.ts, tests/integration/t-coverage-mechanism-ratchet.test.ts
各ハーネスの入口、README、リファレンス、配布済みヘルプ、stage protocol に --autonomy と質問手順が含まれることを検証します。

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed タイトルは--autonomy起動宣言の導線追加とパリティ回帰テストという、変更の主目的を具体的に要約しています。
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Comment @coderabbitai help to get the list of available commands.

@j5ik2o

j5ik2o commented Aug 8, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/reference/24-intent-autonomy.ja.md`:
- Line 48: Specify the sh language on the startup-example code fence in
docs/reference/24-intent-autonomy.ja.md at lines 48-48 and
docs/reference/24-intent-autonomy.md at lines 50-50, updating both fences to
satisfy markdownlint MD040.

In `@packages/framework/core/amadeus-common/protocols/stage-protocol.md`:
- Line 137: Update the English and Japanese `semi` reference tables to include
non-boundary questions, matching the implementation contract of `SemiAuthority`,
`currentGrant = null`, saved policies, and the existing decision ladder when
`phase !== "phase-boundary"`. Keep phase-boundary and other milestone human
requirements unchanged, and add tests covering question handling, phase-boundary
behavior, and semi authorization.

In `@README.md`:
- Line 53: Update the “Intent autonomy” README entry in English and replace the
harness-specific `/amadeus --autonomy <none|semi|full>` example with
harness-neutral wording or a reference to the harness-specific launch commands.
Preserve the documented autonomy behavior, including launch-time application,
the human grant requirement for full autonomy, and recording unattended rulings.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: db990ab1-ca75-40ca-9a50-31a525c1378e

📥 Commits

Reviewing files that changed from the base of the PR and between 1df3caf and 4e80519.

📒 Files selected for processing (16)
  • README.ja.md
  • README.md
  • docs/reference/24-intent-autonomy.ja.md
  • docs/reference/24-intent-autonomy.md
  • packages/framework/core/amadeus-common/protocols/stage-protocol.md
  • packages/framework/core/tools/amadeus-utility.ts
  • packages/framework/harness/claude/skills/amadeus/SKILL.md
  • packages/framework/harness/codex/skills/amadeus/SKILL.md
  • packages/framework/harness/cursor/commands/amadeus.md
  • packages/framework/harness/kimi/skills/amadeus/SKILL.md
  • packages/framework/harness/kiro-ide/skills/amadeus/SKILL.md
  • packages/framework/harness/kiro/skills/amadeus/SKILL.md
  • packages/framework/harness/opencode/commands/amadeus.md
  • packages/framework/harness/pi/skills/amadeus/SKILL.md
  • tests/integration/t-coverage-mechanism-ratchet.test.ts
  • tests/integration/t492-autonomy-conduit-parity.integration.test.ts

Comment thread docs/reference/24-intent-autonomy.ja.md Outdated
Comment thread packages/framework/core/amadeus-common/protocols/stage-protocol.md
Comment thread README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant