Skip to content

Expand Kiro test fixtures beyond steering files #599

@avifenesh

Description

@avifenesh

Summary

Kiro has 9 test fixtures but all are in tests/fixtures/kiro-steering/. Need fixtures for powers, agents, hooks, and MCP.

Current fixtures

tests/fixtures/kiro-steering/
  .kiro/steering/{bad-glob,empty,invalid-mode,missing-fields-auto,missing-pattern-filematch,valid-always,valid-auto,valid-filematch,valid-manual}.md

New fixture directories needed (from research)

Powers

tests/fixtures/kiro-powers/
  valid-power/
    POWER.md                     # valid: name, description, keywords + body
    mcp.json                     # valid mcpServers
  missing-frontmatter/
    POWER.md                     # missing name/description/keywords
  empty-keywords/
    POWER.md                     # keywords: [] (never activates)
  empty-body/
    POWER.md                     # frontmatter only, no body content
  bad-mcp/
    POWER.md                     # valid
    mcp.json                     # invalid mcpServers structure

Agent JSON

tests/fixtures/kiro-agents/
  .kiro/agents/
    valid-agent.json             # all fields correct
    minimal-agent.json           # only name field
    invalid-resource.json        # bad resource protocol (not file:// or skill://)
    invalid-model.json           # unknown model value
    mismatched-tools.json        # allowedTools has tool not in tools
    unknown-fields.json          # extra unknown fields
    no-mcp-access.json           # includeMcpJson:false + no mcpServers
    valid-hooks.json             # valid inline CLI hooks
    invalid-hook-event.json      # bad hook event key
    missing-hook-command.json    # hook entry without command field

IDE Hooks

tests/fixtures/kiro-hooks/
  .kiro/hooks/
    valid-file-save.kiro.hook        # fileEdited + patterns + runCommand
    valid-prompt-submit.kiro.hook    # promptSubmit + askAgent
    valid-pre-tool.kiro.hook         # preToolUse + toolTypes + runCommand
    invalid-event.kiro.hook          # unknown event type
    missing-patterns.kiro.hook       # file-based event without patterns
    missing-action.kiro.hook         # no runCommand or askAgent
    missing-tool-types.kiro.hook     # pre/post tool without toolTypes

MCP

tests/fixtures/kiro-mcp/
  .kiro/settings/
    valid-local-mcp.json         # command-based server
    valid-remote-mcp.json        # url-based server
    missing-command-url.json     # server with neither command nor url
    hardcoded-secrets.json       # env values without ${VAR} syntax

What was ruled out

  • Specs fixtures: Specs are freeform AI-generated markdown. No schema to validate = no fixtures needed.

Acceptance criteria

  • Fixture directories created for powers, agents, hooks, MCP
  • Both valid and invalid cases covered for each rule
  • Integration tests using fixtures pass

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions