Skip to content

docs(adapters): add "add a new agent harness" step-by-step recipe - #741

Merged
potiuk merged 1 commit into
apache:mainfrom
justinmclean:add-a-harness-recipe
Jul 5, 2026
Merged

potiuk merged 1 commit into
apache:mainfrom
justinmclean:add-a-harness-recipe

Conversation

@justinmclean

Copy link
Copy Markdown
Member

Summary

Four-step recipe covering the relay-symlink registry row, the action-guard adapter, the spec-loop runner profile, and the substrate-tool harness declarations. Cross-linked from docs/vendor-neutrality.md § Agentic runtime so the extension point is a recipe, not tribal knowledge.

Generated-by: Claude (claude-sonnet-4-6)

Type of change

  • Skill change (.claude/skills/<name>/) — eval fixtures updated below
  • Tool / bridge contract (tools/<system>/*.md)
  • Python package (tools/*/ with pyproject.toml)
  • Groovy reference impl
  • Cross-cutting (RFC, AGENTS.md, sandbox, privacy-LLM)
  • Documentation (docs/, README.md, CONTRIBUTING.md)
  • Project template (projects/_template/)
  • CI / dev loop (prek, workflows, validators)
  • Other:

Test plan

  • prek run --all-files passes
  • For Python packages touched: uv run pytest / ruff check / mypy passes
  • For Groovy bridges touched: command-line invocation tested end-to-end
  • For skill changes: eval suite passes for the affected skill
    (PYTHONPATH=tools/skill-evals/src python3 -m skill_evals.runner tools/skill-evals/evals/<skill>/)
  • For skill behaviour changes: a new or updated eval fixture is included in this PR
    (a regression test for the bug fixed / the behaviour added — see CONTRIBUTING.md)
  • Other:

Four-step recipe covering the relay-symlink registry row, the
action-guard adapter, the spec-loop runner profile, and the
substrate-tool harness declarations. Cross-linked from
docs/vendor-neutrality.md § Agentic runtime so the extension
point is a recipe, not tribal knowledge.

Generated-by: Claude (claude-sonnet-4-6)
@justinmclean justinmclean self-assigned this Jul 5, 2026
@potiuk
potiuk merged commit cb9ec68 into apache:main Jul 5, 2026
36 checks passed
potiuk pushed a commit to Alexhans/airflow-steward that referenced this pull request Jul 8, 2026
Bring Kiro CLI (the rebranded Amazon Q Developer CLI — apache#320) to parity with
Claude Code and OpenCode as a skill runtime, following the
docs/adapters/add-a-harness.md recipe (apache#741).

Discovery: Kiro reads .kiro/skills/ (not .agents/skills/), so add a `kiro` row
to the skills/setup/agents.md registry plus the per-skill relays; the
registry-driven adopt/verify/worktree-init logic then wires it automatically.
.agents/.github/.kiro all carry the 69 magpie-* relays.

Enforcement (agent-harness score: Kiro now 5/5 substrate tools):
- agent-guard: a --kiro preToolUse adapter (kiro_main) over the shared
  dispatch() core — Kiro feeds {tool_name, tool_input.command, cwd} on stdin
  and blocks on exit 2 with the reason on stderr.
- sandbox-lint --kiro and permission-audit audit-kiro: encode Kiro's
  allowlist/denylist model (allowedCommands/deniedCommands = \A..\z regex,
  deny-before-allow, denyByDefault) and flag configs that auto-approve
  dangerous shell / exfil surfaces.
- agent-isolation kiro-iso: the env -i credential-strip launcher (the harness
  name `kiro` normalises to the `kiro-cli` binary).
- spec-loop: a headless `kiro-cli chat --no-interactive` runner profile in lib.sh.

Verified: full prek --all-files; per-tool pytest + ruff + mypy; the spec-loop
runner fixture (kiro argv); symlink-lint (relays cycle-free + target-correct);
discovery — a fresh kiro-cli discovers all skills with the relays present and 0
without (negative control); agent-guard end-to-end — a real .kiro preToolUse
hook blocks a Co-Authored-By commit and allows a clean one;
vendor-neutrality-score regenerates with Kiro at 5/5.

Known limitations: agent-isolation's bubblewrap OS-sandbox layer is unit-tested
for the launcher but its e2e is deferred to a bwrap-capable host (as OpenCode's
is); a general /magpie-setup auto-installer for non-Claude-only harness
enforcement is a follow-up (Claude-only today), so the Kiro hook uses
${MAGPIE_AGENT_GUARD:-.claude/hooks/agent-guard.py}.

Generated-by: Kiro CLI (Opus 4.8)
potiuk added a commit that referenced this pull request Jul 8, 2026
Bring Kiro CLI (the rebranded Amazon Q Developer CLI — #320) to parity with
Claude Code and OpenCode as a skill runtime, following the
docs/adapters/add-a-harness.md recipe (#741).

Discovery: Kiro reads .kiro/skills/ (not .agents/skills/), so add a `kiro` row
to the skills/setup/agents.md registry plus the per-skill relays; the
registry-driven adopt/verify/worktree-init logic then wires it automatically.
.agents/.github/.kiro all carry the 69 magpie-* relays.

Enforcement (agent-harness score: Kiro now 5/5 substrate tools):
- agent-guard: a --kiro preToolUse adapter (kiro_main) over the shared
  dispatch() core — Kiro feeds {tool_name, tool_input.command, cwd} on stdin
  and blocks on exit 2 with the reason on stderr.
- sandbox-lint --kiro and permission-audit audit-kiro: encode Kiro's
  allowlist/denylist model (allowedCommands/deniedCommands = \A..\z regex,
  deny-before-allow, denyByDefault) and flag configs that auto-approve
  dangerous shell / exfil surfaces.
- agent-isolation kiro-iso: the env -i credential-strip launcher (the harness
  name `kiro` normalises to the `kiro-cli` binary).
- spec-loop: a headless `kiro-cli chat --no-interactive` runner profile in lib.sh.

Verified: full prek --all-files; per-tool pytest + ruff + mypy; the spec-loop
runner fixture (kiro argv); symlink-lint (relays cycle-free + target-correct);
discovery — a fresh kiro-cli discovers all skills with the relays present and 0
without (negative control); agent-guard end-to-end — a real .kiro preToolUse
hook blocks a Co-Authored-By commit and allows a clean one;
vendor-neutrality-score regenerates with Kiro at 5/5.

Known limitations: agent-isolation's bubblewrap OS-sandbox layer is unit-tested
for the launcher but its e2e is deferred to a bwrap-capable host (as OpenCode's
is); a general /magpie-setup auto-installer for non-Claude-only harness
enforcement is a follow-up (Claude-only today), so the Kiro hook uses
${MAGPIE_AGENT_GUARD:-.claude/hooks/agent-guard.py}.

Generated-by: Kiro CLI (Opus 4.8)

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
@potiuk potiuk added the family:docs Docs, MISSION.md, READMEs label Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

family:docs Docs, MISSION.md, READMEs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants