Repository navigation
Conversation
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the hook files reuse the existing per-folder consent record and the existing hook-merge path. A file that cannot be read fails closed at every caller, and the four removed readers are all listed. Notes
[DESIGN-REVIEWED] 7ad2a85 Description read[DESCRIPTION-READ] 99a49d39f8dbb05838089a1299e01f3d0164eb012072a3d43cdf03dc0e7e56a9 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS One dead constant is the only thing to remove. A maintainer decision already on the base ( Notes
What this change shipsInventory (9 items) — 8 justifiedIntent: let a project's own
[FIRST-PRINCIPLES-REVIEWED] 7ad2a85 Description read[DESCRIPTION-READ] effe5bdcf718752c840d5cc15cb2ba6b4e2891a80fa8930acd618bd1ea5123b3 That sha256 names the PR description this verdict read. Recompute it with |
UX Review (Opus 5.5) — 🔴 BLOCKUX-level review of UX-Verdict: BLOCK The blind reader understood Turn on, the one control this PR's goal depends on, and still would not press it. The row's copy hands them a safety check they can't do and never says when Turn on is the right choice. BlockersTurn on copy gives a newcomer no reason to trust the folder Notes
[UX-REVIEWED] 7ad2a85 Description read[DESCRIPTION-READ] 03a3e3e03f9b4be93fd4385b20efe30b4ca826b7a9927bdc0639b6cfce254961 That sha256 names everything this verdict read: the PR description, plus the 9 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
GPT 6.1 Review — 🔴 changes requested (blocking)GPT 6.1 found at least one blocking issue that must be resolved before merging This comment is updated in place on each push. BLOCKING -- website/src/pages/chat/ProjectHooksNotice.tsx:155 -- Render blocked hook-read failures through ErrorNotice
[BLOCK-MERGE] 7ad2a85 Adjudication (Opus 5.5) — is blocking on each finding proportionate?F1: UPHOLD. The rule applies here. The blocked state comes from a hook file that could not be read, which is a failure, and the rule judges by where a value comes from ( [ADJUDICATION] 7ad2a85 total=1 uphold=1 downgrade=0 False positive or not applicable? A repository writer can comment: |
Opus 5.5 Review — 🔴 changes requested (blocking)Reviewed Blocks merge: when the project-hooks consent record can't be read, every KAS tool call in a folder with BLOCKING — src/kiro_crew/project_hooks_consent.py:1729 Notes:
[BLOCK-MERGE] 7ad2a85 Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
d74ae10 to
bb8e7a7
Compare
|
On the UX review of d74ae10: hook files now follow the same trust as a project agent file's hooks, so a folder that kiro-cli trusts runs its |
|
Scope note: the maintainer-side ruling changed from Turn-on-only to the same trust as project agent-file hooks (kiro-cli parity). The "Not a goal" bullet "Letting kiro-cli's folder trust start these files" no longer matched the diff, so it was removed; the Goal line is unchanged. The PR stays a draft until the maintainer confirms the row and the decision entry. |
bb8e7a7 to
3a03ddc
Compare
|
|
3a03ddc to
2d355de
Compare
d8212fb to
d20e35d
Compare
|
|
d20e35d to
c2dc292
Compare
|
c2dc292 to
9d85137
Compare
|
|
|
|
Started on e19690a. The trust model reads right. The files ride the existing per-folder Turn on (#33578), the fingerprint covers every hook file so an edit asks again, links and out-of-checkout paths are never read, Before I approve, one ask on evidence. Per
Please also name the head you ran. The section says 30328fa45533 and the PR is at e19690a. AI-assisted, sent by Bolin Review bot |
|
Thanks for the review. Head: The live KAS chat you ask for (main, then this head: nothing before Turn on, hooks firing after it, an edit asking again) needs a signed-in kiro-cli, and that sign-in needs a browser the maintainer does not have before 12-07. That run comes on 12-07 on this head, or on whichever head is live then. What is shown on this head today, without the engine:
Three of the five files run. The other two ( This does not show a hook's output inside a chat, or |
Code change approver deep review: A person should decideThis follow-up read head Earlier items
What else holds the approval The change is 2595 lines. That is more than this deep review approves, so a maintainer gives the final approval after item 1 is answered. Review result on this head The review found no code error. All five AI review comments name this head and none blocks. The check runs I saw are complete and none failed. The fail-closed choice is done well: a turned-on folder with a hook file that cannot be read refuses tool calls, and tests pin both sides of the choice (nothing before Turn on, a new question after an edit, Turn off wins over kiro-cli trust). Optional
Tier: 2, held for a person: changes requested by the deep review. A deep review by the code change approver, not by a person · commit |
e19690a to
b31919e
Compare
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Changes requested by the code change approver's deep review, not by a person.
Two items block this head (b31919e). The code paths I traced match the description, and the fail-closed block for an unreadable hook file is a careful touch. All five review lanes pass on this head.
-
The live KAS chat run a maintainer asked for is missing. PR/description line 79 says "Not run: a live KAS chat end to end", and line 85 says "After (head 30328fa45533)", which is a loader probe on an older head. @bolichen97 asked for this run before approving, and the scripted probe in your reply "does not show a hook's output inside a chat". No code change is needed. Please post, in the Real-machine section of the description, a signed-in dashboard KAS chat run that shows:
- on main: the five AI-DLC hook files in
.kiro/hooks, send/aidlc, no hook fires; - on b31919e (or the head that is live then, named): nothing runs before Turn on, a hook's output or audit row appears after Turn on, and the row asks again after an edit to a hook file.
Then update the "After (head ...)" line. This item also clears if @bolichen97 writes in the thread that the scripted probe is enough.
- on main: the five AI-DLC hook files in
-
The change retires a recorded decision with no superseding entry.
dashboard/chat_turn/turn_spec_hooks.py:382and:484now write only the Turn on / Turn off row._surface_withheld_project_hook_filesand_project_hook_files_noticeare gone, so a new KAS chat in a folder with hook files no longer gets the "do not run in this session" notice or its per-folder Dismiss.docs/decisions/2026-11-22-the-project-hook-files-notice-is-dismissed-per-folder.mdstill records that notice as the ruling, and the diff has no file underdocs/decisions/. The blocking rulerecorded-decisions-are-not-regressionstreats this as a regression. Smallest fix: add onedocs/decisionsentry with aSupersedes:line that names the 2026-11-22 file, says what replaces the notice, and cites the maintainer's statement, plus its README index row. Do you want it in this PR or in its own PR that lands first?
This change is 2595 lines, which is more than this review approves. A maintainer gives the final approval once the two items are settled.
Optional:
dashboard/chat_turn/turn_spec_hooks.py:334-337: no dashboard test covers a user-level agent in a blocked folder. If theexcept HookFilesUnreadablebranch is removed, the catch-all below it lets the turn run and no test fails. A test liketest/test_kas_project_hook_files.py:936with a user-level agent would pin it.test/test_kas_project_hook_files.py:227and:382skip on Windows. The harness helpersmake_escaping_linkandplant_day_linkcan plant the link there, so the two tests could run on every platform.project_hooks_consent.py:405-411: Kiro CLI folder trust also starts the hook files with no click in Crew and no fingerprint. The title and Goal name only Turn on. Consider naming that path in the Goal, and recording it in the new decision entry.
This block is withdrawn automatically when a new commit fixes these items or a reply shows one is wrong: the approver reviews it again. Any maintainer can dismiss this review at any time.
Tier: 2, held for a person: 36 files, more than 20.
Commit b31919e7ef · 2595 changed lines.
…on (#47306) Records Ray Xu's 2026-12-04 decision (#26568) that supersedes in part the 2026-11-22 project hook files notice entry: on KAS a folder's own .kiro/hooks/*.json files run under a project agent file's trust, the "do not run in this session" notice is no longer written, and a turned-on folder with an unreadable file names the file and the reason. The change itself is #46918.
|
The code change approver's item 2 (a recorded decision retired with no superseding entry) is cleared: #47306 merged into main ( Item 1 (the live KAS chat run) is still open. |
b31919e to
5d07665
Compare
5d07665 to
8b6a82e
Compare
8b6a82e to
7ad2a85
Compare
Problem / Motivation
Goal: A project's own
.kiro/hooks/*.jsonhook files run in a dashboard Kiro Agent (KAS) chat once the owner presses Turn on for that folder, so a workflow that ships its hooks this way (AWS AI-DLC) works without a terminal.On KAS, Crew lists a checkout's standalone
.kiro/hooks/*.jsonfiles only to show a notice, and never runs them.kiro-cli chat --agent-engine v3runs the same files in a trusted project. AI-DLC's Kiro distribution keeps all five of its hooks in these files, so in a dashboard chat none of them run: its approval gates never see that a person replied, and the workflow stops at the first/aidlcrequest.The notice that says so is also out of date. It says Crew "cannot read this backend's workspace-trust decision", but Crew has had a per-folder choice since #33578.
Why it matters
Teams adopting AI-DLC through Crew cannot use it from the dashboard. The only workaround is a terminal, or copying the files into
~/.kiro/hooks, which makes them run in every chat, Bots included.Not a goal
PreToolUseguard and its sub-agent log hook use them, and they are still dropped. Tracked in Hook matchers written as regular expressions are dropped, so AI-DLC's tool-call guard never runs #46900.What changed (motivation → approach → change)
Symptom: zero project hook files run on KAS. Cause: the user-file loader reads only
~/.kiro/hooks, and the per-folder choice covers only a folder agent's ownhooks.Approach: the files follow the same per-folder choice as a folder agent's own
hooks(#33578): the folder's Turn on in Crew, or kiro-cli's trust of the folder, through the same row and the same record.src/kiro_crew/project_hooks_consent.pyincludes each file (_scan_hook_files), so an edited, added or renamed file needs a new Turn on. A Turn on saved before fingerprints existed adopts only the agent files' hooks, so a folder with hook files asks again..kiro/hooksthat points outside, is never read. A checkout at HOME has none: its.kiro/hooksis the user's own directory.agent_sdk/project_hook_files.pyconverts the consented files like~/.kiro/hooksfiles. They getspec_origin="project_file", so the full deny list applies, and the governance nameprojectfile:<stem>.pre_tool_hook_matchersby session folder (sub-agent targets included; a hook file that cannot be read under a yes withholds every auto-approval, as an unreadable agent spec does; see the table below), the folder PreToolUse mark for scheduled turns, and the re-projection a person's turn triggers on a scheduled-kind batch. A scheduled turn never runs them. Past the cap (64 files, 64 hooks) the extra hooks do not run and do not affect auto-approval; one warning and one audit row per folder and file-name list say so.agent file, so{path}reads as the agent file,.kiro/hooks, or both. The sentence saysgivewhen it names both sources. A chat shows the row once per folder, state and command list, so a reconnect stays quiet.agent-host-contract.md,steering-and-hooks.mdandfeature-map/README.md.Security
Project hook files follow the same trust as a project agent file's hooks (#33578, owner decision C of 2026-11-09): Crew's Turn on, or kiro-cli's trust of the folder, as kiro-cli itself runs them.
Known limit, the same accepted trade-off now also covering hook files: a sandboxed agent can write kiro-cli's trust record under
~/.kiro/workspace-roots; the owner'smcp.protect_kiro_permission_rulessetting keeps the agent's file-edit tools from writing that directory.Crew's record
project_hooks_consent.jsonstays read-only inside the sandbox, and its writer is the owner-gated consent handler. The handler is unchanged (builder-security checked).Who reads the hook files
One read, one record:
_scan_hook_fileslists.kiro/hooksonce and records there whether the listing and every file within the cap read completely.consented_project_hook_filesis the one place that turns an incomplete scan into a decision: under a yes (on, an on gone stale, or kiro-cli trust) it raisesHookFilesUnreadable. Every reader goes throughproject_hook_files_for_gatingand lets it through;test_gating_modules_read_project_hook_files_only_through_the_strict_entry_pointpins that.acp/kas_agents.pypre_tool_hook_matchers(projection, sub-agent targets,hook_projection_stale)agent_sdk/kas_project_hooks.pyperson_turn_reprojectsagent_sdk/project_hook_files.pyproject_files_pre_tool(the mark atacp/harness/kas.py)agent_sdk/spec_hooks.pyturn_spec_hooksanddashboard/chat_turn/turn_spec_hooks.py(the hooks a turn fires)agent_sdk/project_hook_files.pylisted_project_hook_files(notice row)When a turned-on folder has a hook file Kiro Crew cannot read, the folder is
blocked: its tool calls are refused, and the row names the first file that did not read and the operating system's own reason for it (Kiro Crew can't read .kiro/hooks/guard.json: Permission denied. Tool calls here are blocked until it can. kiro-cli is not affected.). The refusal a tool call gets names the same file and reason (the project's .kiro/hooks/guard.json could not be read: Permission denied); the path is relative to the folder, so nothing outside it is named. The way forward is to fix the file. Once it reads again, the next message runs with the hooks and no click is needed: each turn reads the files again, and a blocked card asks the gateway every 15 seconds while the tab is visible, and when the tab regains focus, so it changes to the running text by itself. Turn off stays as a control for someone who does not want to fix the file now. The row stays the same card and switches to the blocked tone in place; its Ask the agent hand-off sends the row text and the project folder's path, so the agent can say which file to fix and how. A Turn on from an incomplete scan lands in the blocked state instead of failing. A missing.kiro/hooksis complete and empty; off or no choice never gates.Backwards compatibility
Compatible: a folder without
.kiro/hooksfiles keeps its fingerprint and its choice. A folder with them that was turned on for its agent file's hooks asks again, because the new Turn on covers more commands.Reader: src/kiro_crew/dashboard/chat_turn/turn_spec_hooks.py:_surface_withheld_project_hook_files -- chat -- removed with the row it wrote; the folder hooks row replaces it (test_the_row_for_hook_files_only)
Reader: src/kiro_crew/agent_sdk/spec_hooks.py:project_hook_file_names -- chat -- its one caller was that row; the consent scan lists the files now (test_nothing_runs_until_the_folder_is_turned_on)
Reader: src/kiro_crew/dashboard/chat_turn/tool_approval.py:_project_hook_files_notice -- chat -- its one caller was that row
Reader: website/src/pages/chat/SpecHooksNotice.tsx:ProjectHookFilesNotice -- chat -- rows already in a chat's history still render with their Dismiss link (SpecHooksNotice.test.tsx)
Tests
test/test_kas_project_hook_files.py: nothing runs before Turn on; a turned-on hook fires; an edit, an add or a rename turns them off until a new Turn on; an old fingerprint-less on does not adopt them; a folder without them keeps its fingerprint; aworkspaceTrusted: truekiro-cli record starts the hook files, and with an agent file starts both in one row; a Crew Turn off beats it; a symlinked file and a.kiro/hooksleading outside are never loaded; the consent record is a read-only sandbox leaf; a file PreToolUse hook withholds auto-approval only when on; the turn seam folds them in and a scheduled turn does not; AI-DLC's five files keep three hooks; the row texts, one row for both sources withgive.test/test_kas_user_hook_files.py: the two tests that pinned "not loaded, notice shown" now pin that the user loader never reads project files and no such notice is written.test/test_kas_project_hook_files.pyalso: a link inside the checkout is not loaded; a checkout at HOME lists none; an unreadable file withholds every auto-approval under either source; hooks past the cap are reported once (its warn-once set has a per-test reset); the row shows once per chat until its state or commands change.Proof: not provable -- other: the new test module imports a module this PR adds, so reverting the production hunks fails at collection; the mutation runs above stand in for it
Manual verification
AI-DLC's five
kiro-idehook files from awslabs/aidlc-workflows (harness/kiro-ide/hooks,{{INVOKE}}set toaidlc) were placed in a scratch checkout with scratch homes. Before Turn on no hook was loaded. After Turn on, SessionStart (AgentSpawn), UserPromptSubmit and Stop were loaded and the two regex-matcher hooks were dropped. After an edit none were loaded.Not run: a live KAS chat end to end, which needs a Kiro sign-in.
Real-machine verification
Machine: own computer, Amazon Linux 2023 (kernel 6.12), x86_64, 32 vCPU
Before (main c07d4da): probe of
spec_hookswith the five AI-DLC files in<checkout>/.kiro/hooks->project_hook_file_nameslists 5,hooks_enabledis(False, ''), no loader returns a project file, and the row state is''(no Turn on)After (head 30328fa45533): the same files -> nothing loaded before Turn on; after
set_choice(..., True)the three hooks above are loaded; after an edit nothing is loadedCleanup: own computer; scratch homes and checkout under the session scratch directory
Screenshots / video
The real
ProjectHooksNoticeat phone width (390 px), dark and light, rendered fromwebsite/capture/project-hook-files-notice.tsxwith the gateway's own text. Top three: a folder with only.kiro/hooksfiles, off, on, and started by kiro-cli's trust. Bottom three: a folder with an agent file and.kiro/hooksfiles, in the same three states, one row each.The blocked state, phone and desktop. A blocked row is the same card in the blocked tone, with Turn off and Ask the agent:
Blocked rows: phone light, desktop dark and light
Turn on lands blocked, then the file reads again and the 15-second recheck clears the block with no click. The card stays mounted the whole time; only its tone and text change (dark, then light):
flip-dark.mp4
flip-light.mp4
Light
Related Issues
Part of #26568. Regex matchers: #46900.
Sibling sweep
Swept: git grep -nE "user_hook_files()|merge_user_hook_files(|pre_tool_hook_matchers(" -- src/
Sibling: src/kiro_crew/agent_sdk/spec_hooks.py -- changed here
Sibling: src/kiro_crew/dashboard/chat_turn/turn_spec_hooks.py -- changed here
Sibling: src/kiro_crew/acp/kas_agents.py -- changed here
Sibling: src/kiro_crew/messaging/tool_hooks.py -- not affected -- channel turns reach the files through spec_hooks.turn_spec_hooks
Pattern harvest
Not generalizable: a missing loader for one file location, not a repeatable coding mistake.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...); PR Hygiene does not count commits