Skip to content

Add Kiro plugin-tier adapter (hooks + mode switching) - #829

Open
santu47 wants to merge 2 commits into
DietrichGebert:mainfrom
santu47:kiro-plugin-tier
Open

Add Kiro plugin-tier adapter (hooks + mode switching)#829
santu47 wants to merge 2 commits into
DietrichGebert:mainfrom
santu47:kiro-plugin-tier

Conversation

@santu47

@santu47 santu47 commented Sep 7, 2026

Copy link
Copy Markdown

Kiro was instruction-tier only (always-on steering rule). Add a plugin-tier adapter mirroring the Qoder precedent so Kiro gets /ponytail level switching and subagent injection via its native hook system.

  • ponytail-runtime.js: detect Kiro via --host=kiro argv flag (or PONYTAIL_HOST=kiro); Kiro exposes no distinctive env var to hook subprocesses, so the adapter declares its identity. State dir under ~/.kiro; writeHookOutput emits raw stdout for all events (Kiro forwards a command hook's stdout as context for SessionStart/UserPromptSubmit/PreToolUse).

  • ponytail-activate.js: suppress the Claude-only statusline nudge for Kiro (no settings.json/statusLine concept), mirroring the isCopilot/isCodex handling.

  • hooks/kiro-hooks.json: Kiro v1 hook template (SessionStart -> activate, UserPromptSubmit -> mode-tracker, PreToolUse matched to the sub-agent tool -> subagent).

  • tests: Kiro runtime coverage in hooks.test.js + kiro-plugin.test.js smoke test.

  • docs/agent-portability.md + README.md: document Kiro plugin-tier.

Kiro was instruction-tier only (always-on steering rule). Add a plugin-tier adapter mirroring the Qoder precedent so Kiro gets /ponytail level switching and subagent injection via its native hook system.

- ponytail-runtime.js: detect Kiro via --host=kiro argv flag (or PONYTAIL_HOST=kiro); Kiro exposes no distinctive env var to hook subprocesses, so the adapter declares its identity. State dir under ~/.kiro; writeHookOutput emits raw stdout for all events (Kiro forwards a command hook's stdout as context for SessionStart/UserPromptSubmit/PreToolUse).

- ponytail-activate.js: suppress the Claude-only statusline nudge for Kiro (no settings.json/statusLine concept), mirroring the isCopilot/isCodex handling.

- hooks/kiro-hooks.json: Kiro v1 hook template (SessionStart -> activate, UserPromptSubmit -> mode-tracker, PreToolUse matched to the sub-agent tool -> subagent).

- tests: Kiro runtime coverage in hooks.test.js + kiro-plugin.test.js smoke test.

- docs/agent-portability.md + README.md: document Kiro plugin-tier.
Kiro has no SubagentStart event, and per Kiro's docs a PreToolUse command hook's stdout is ignored on exit 0 (it can only block via stderr+exit 2). So the subagent-injection hook could never inject the ruleset — and the tool name was wrong anyway (invoke_subagent, not invoke_sub_agent). Remove it; SessionStart activation and UserPromptSubmit /ponytail switching are the supported plugin-tier hooks, and the always-on steering rule covers agents.
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