You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(kiro-ide): make hooks work via USER_PROMPT env, not stdin
Kiro IDE delivers hook context through the USER_PROMPT environment
variable (not stdin, which it opens but never writes), and leaves
toolArgs empty. The IDE adapter now reads USER_PROMPT, recovers the
written file path from the tool-result prose, and drives the
command/payload-free hooks off the audit trail.
- audit-logger, sensor-fire, runtime-compile, sync-statusline now do
real work on Kiro IDE; write paths resolved relative to workspace root.
- runtime-compile and sync-statusline gate on the audit tail (payload-free).
- sync-statusline ide-audit-sync is forward-only (never rewinds Current
Stage): skips when not Running, pointer none, or audit slug already
completed/skipped.
- runtime-compile IDE path adds an mtime idempotency guard so a lingering
transition does not recompile on every subsequent shell command.
- extractWrittenPath tolerates trailing newlines, strips a str_replace
" (N occurrences)" suffix, and records a visible hook-drop when a
write-class tool yields no extractable path.
- latestStartedStageSlug ignores synthetic --single stage-runner rows.
- opt-in hook debug log: AIDLC_HOOK_DEBUG=1 or touch aidlc/.aidlc-hook-debug.
Kiro CLI, Claude Code, and Codex behaviour unchanged (new branches gated
behind the IDE-only ide-audit-sync marker and the opt-in debug env var).
Copy file name to clipboardExpand all lines: CHANGELOG.md
+66Lines changed: 66 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,72 @@
2
2
3
3
All notable changes to this project will be documented in this file.
4
4
5
+
## [2.2.11] - 2026-07-08
6
+
7
+
Fixes the Kiro IDE harness's hooks, which previously no-op'd for everything that
8
+
needed to know what the agent just did. Kiro IDE delivers hook context through
9
+
the `USER_PROMPT` environment variable (not stdin, which it opens but never
10
+
writes), and it leaves the tool arguments empty — so the IDE adapter now reads
11
+
`USER_PROMPT`, recovers the written file path from the tool result text, and
12
+
drives the command/payload-free hooks off the audit trail instead. The audit
13
+
logger, sensor firing, runtime-graph recompile, and statusline sync now work in
14
+
Kiro IDE without the agent having to compile the graph by hand. Dropping the
15
+
stdin read also removes the 2s stdin-race timeout the CLI adapter paid on every
16
+
hook; the human-presence mint/block hooks now resolve the project dir from
17
+
`process.cwd()`. The Kiro CLI harness is unaffected (it uses a separate adapter
18
+
and a working stdin channel). Re-copy your `dist/kiro-ide/.kiro/` to pick up the
19
+
fix.
20
+
21
+
***Kiro IDE hooks fire correctly** — `aidlc-audit-logger`, `aidlc-sensor-fire`,
22
+
`aidlc-runtime-compile`, and `aidlc-sync-statusline` now do real work on Kiro
23
+
IDE. Artifact writes are audited, sensors run, the runtime graph recompiles on
24
+
transitions, and `Current Stage` stays in sync.
25
+
***File paths are resolved relative to the workspace root.** Kiro IDE reports
26
+
the written path relative to the project root in the tool-result text; the
27
+
adapter resolves it to absolute so `audit-logger`'s record-root check passes.
28
+
***`aidlc-runtime-compile` and `aidlc-sync-statusline` are payload-free on the
29
+
IDE** — both gate on the audit tail (latest transition / latest
30
+
`STAGE_STARTED`) instead of the tool command or task payload the IDE does not
31
+
surface. `aidlc-sync-statusline` is wired to the `shell` tool event.
32
+
***The IDE audit-tail gating is forward-only and idempotent.**
33
+
`aidlc-sync-statusline` never rewinds `Current Stage`: it skips when the
34
+
workflow is not `Running`, when the pointer is `none`, or when the audit's
35
+
latest stage is already completed/skipped. `latestStartedStageSlug` ignores
36
+
synthetic `--single` stage-runner rows. `aidlc-runtime-compile`'s IDE path
37
+
adds an mtime idempotency guard so a lingering transition (e.g. after
38
+
`WORKFLOW_COMPLETED`) does not recompile on every subsequent shell command.
39
+
***The `str_replace`/`fs_append` path extraction is robust.** The adapter
40
+
tolerates trailing newlines, strips a `str_replace`` (N occurrences)`
41
+
suffix, and records a visible hook-drop when a write-class tool yields no
42
+
extractable path (no silent no-op).
43
+
***The human-presence mint/block hooks survive the stdin removal.** The
44
+
`promptSubmit` mint (`HUMAN_TURN`) and the `preToolUse` block floor now
45
+
resolve the project dir from `process.cwd()` (the IDE gives no `cwd` payload),
46
+
so the Kiro IDE human-presence gate keeps working; dropping the stdin read
47
+
also removes the 2s stdin-race the block hook paid on every `preToolUse`.
48
+
***`log-subagent` records the delegate's identity.** The adapter no longer
49
+
hardcodes `agent_type: "unknown"`; it extracts the self-identifying first line
50
+
(`**Reviewer:** <name>` / `**Agent:** <name>`) from the subagent result and
51
+
forwards the result text, so `SUBAGENT_COMPLETED` carries the real agent. The
52
+
two reviewer agents (`aidlc-product-lead-agent`,
53
+
`aidlc-architecture-reviewer-agent`) now emit that identity marker as the
54
+
first line of their response (an Output Contract in their persona, reinforced
55
+
in stage-protocol §12a), so the audit trail names which reviewer ran instead
56
+
of recording `unknown`.
57
+
***Failed tool calls are not audited as writes.**`audit-and-sensors`
58
+
explicitly guards `toolSuccess === false`, so a failed op no longer relies on
59
+
its error prose failing to match the path regexes.
60
+
***Opt-in hook debug log.** Enable it to have every hook append its decision
61
+
path to `<record>/.aidlc-hooks-health/hook-debug.log` — either set
62
+
`AIDLC_HOOK_DEBUG=1`, or `touch aidlc/.aidlc-hook-debug` (the filesystem
63
+
marker takes effect on the next hook fire with no IDE restart). Off by
64
+
default (no log, no overhead); see the Kiro IDE harness guide.
65
+
***Behaviour for Kiro CLI, Claude Code, and Codex is unchanged.** The shared
66
+
core hooks are edited and re-shipped to all four dists, but the new branches
67
+
are gated behind the IDE-only `ide-audit-sync` marker (and the opt-in
68
+
`AIDLC_HOOK_DEBUG` env var), so the CLI/Claude/Codex payload paths behave
69
+
exactly as before.
70
+
5
71
## [2.2.10] - 2026-07-06
6
72
7
73
Workspace detection now recognizes git submodules. A workspace whose code lives in uninitialized submodules (empty dirs plus a `.gitmodules` file) previously scanned as Greenfield, so reverse-engineering was auto-skipped and every design stage ran with zero code understanding. The scanner gains a sixth brownfield signal: a parseable `.gitmodules` with at least one submodule path entry classifies the workspace Brownfield. When submodule paths are uninitialized, the scan warns and names the remedy (`git submodule update --init --recursive`) at birth, in the doctor report, and on `detect`. Languages stay as scanned (Unknown is truthful until the submodules are fetched). **Upgrade:** re-copy your `dist/<harness>/` shell into the project.
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ A native implementation of the **AI-DLC methodology** (AI-Driven Development Lif
8
8
9
9
The methodology lives once, in a harness-neutral `core/`; each harness adds a thin surface that decides how it shows up on that harness. So you edit the methodology in one place, and every harness distribution is generated from it — no harness gets special treatment. (See [Repository layout](#repository-layout) for how the pieces fit together.)
0 commit comments