feat(u4-conduit-parity): --autonomy 起動宣言の導線を全面へ追記しパリティを回帰テストで固定する - #2532
Conversation
… 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.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthrough
ChangesIntent autonomy conduit
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Comment |
|
@coderabbitai review |
|
…rio in the semi paragraph
There was a problem hiding this comment.
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
📒 Files selected for processing (16)
README.ja.mdREADME.mddocs/reference/24-intent-autonomy.ja.mddocs/reference/24-intent-autonomy.mdpackages/framework/core/amadeus-common/protocols/stage-protocol.mdpackages/framework/core/tools/amadeus-utility.tspackages/framework/harness/claude/skills/amadeus/SKILL.mdpackages/framework/harness/codex/skills/amadeus/SKILL.mdpackages/framework/harness/cursor/commands/amadeus.mdpackages/framework/harness/kimi/skills/amadeus/SKILL.mdpackages/framework/harness/kiro-ide/skills/amadeus/SKILL.mdpackages/framework/harness/kiro/skills/amadeus/SKILL.mdpackages/framework/harness/opencode/commands/amadeus.mdpackages/framework/harness/pi/skills/amadeus/SKILL.mdtests/integration/t-coverage-mechanism-ratchet.test.tstests/integration/t492-autonomy-conduit-parity.integration.test.ts
概要(Bolt: u4-conduit-parity / intent 260807-autonomy-reachability)
--autonomy起動宣言は u2(#2524)で実際に動くようになったが、conductor が読む面には記載がゼロだった(RE finding 8)。本 PR はその導線を全面へ追記し、パリティを blocking テストで固定する。harness/{claude,codex,kimi,kiro,kiro-ide,pi}/skills/amadeus/SKILL.md+harness/{cursor,opencode}/commands/amadeus.md)へ、フラグ列挙と説明ブロックを追記amadeus-utility.tsの help(:265 フラグ行 / :284 例)、README.md/README.ja.md、docs/reference/24-intent-autonomy.md/.ja.md(対訳は同一変更で同期)stage-protocol.md:137に semi の decide-question 操作手順を新設(fullと同じ手順を名指しし、実際の差分2点 — semi スコープの基準と--policies-file— だけを分離)。あわせてAUTONOMY IS NEVER INFERREDを「エンジンに記録された mode による自動裁定は推論ではない」旨と整合するよう改訂。同根棚卸しで claude だけでなく kimi/kiro/kiro-ide の同一行も是正tests/integration/t492-autonomy-conduit-parity.integration.test.tsを新設対象面の導出(件数のマジックナンバーなし)
導線集合はディスク走査で導出する —
readdirSyncでpackages/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から--autonomy4箇所を除去(残 0 を grep 確認)→ 赤がharness:kimiを名指しで発生(他4テストは green のまま)→git checkout f679e2864 -- <path>で復元 →git statusclean・残渣 grep 0 → 再実行 5 pass / 0 fail。builder 側は
opencode/commands/amadeus.mdで同型の1セットを実施済み。検証
bun run typecheck0 /bun run lint0 /complexity-gate --check0 /gen-coverage-registry --check0 /source-only:check0bash tests/run-tests.sh --ciexit 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.mdorcommands/amadeus.md) now list--autonomy, instruct passing it verbatim toamadeus-orchestrate.ts next, and spell out thatnone/semirecord via the canonical path whilefullstill requires the grant ceremony (not the flag). CLI help inamadeus-utility.tsadds the flag line and an example. README (EN/JA) anddocs/reference/24-intent-autonomygain a “declaring at launch” section with first-declaration-only rules andfull/revoke refusal behavior.Stage protocol: adds an explicit
semiquestion path using the samedecide-questionprocedure asfull, and tightens “AUTONOMY IS NEVER INFERRED” so engine-recordedsemi/fullrulings are not treated as inferred permission.Regression: new
t492-autonomy-conduit-parityintegration test derives every harness entry from disk, asserts--autonomyon each conduit plus doc surfaces and spawnedhelpoutput, and checks the semi paragraph exists instage-protocol.md.Reviewed by Cursor Bugbot for commit f679e28. Configure here.
Summary by CodeRabbit
none・semi・full)を指定できます。semiは限定的な自動処理、fullは人間による確認・許可を経て利用できます。semiとfullにおける質問処理や停止条件を明確化しました。