Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed
- **Kiro docs and tests**: Expanded integration/contract tests for Kiro target paths and updated usage docs to clarify legacy `--target` behavior versus `tools = [...]` filtering.
- **Kiro authoring parity follow-up**: Kiro agent completions now emit JSON-formatted insert text (quoted values and JSON key syntax) and fixture docs now explicitly clarify that `KiroMcp` detection currently targets `.kiro/settings/mcp.json` only (#612, #613).

## [0.14.0] - 2026-02-27

Expand Down
52 changes: 40 additions & 12 deletions crates/agnix-core/src/authoring.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,12 @@ fn is_yaml_family(file_type: FileType) -> bool {
fn is_json_family(file_type: FileType) -> bool {
matches!(
file_type,
FileType::Hooks | FileType::KiroHook | FileType::Plugin | FileType::Mcp | FileType::KiroMcp
FileType::Hooks
| FileType::KiroHook
| FileType::Plugin
| FileType::Mcp
| FileType::KiroMcp
| FileType::KiroAgent
)
}

Expand Down Expand Up @@ -423,20 +428,43 @@ mod tests {

#[test]
fn test_completion_kiro_agent_value_context() {
let content = "---\nmodel: \n---\n";
let content = "{\n \"model\": \n}";
let byte = content
.find("model: ")
.expect("test content must contain 'model: '")
+ "model: ".len();
.find("\"model\": ")
.expect("test content must contain '\"model\": '")
+ "\"model\": ".len();
let candidates = completion_candidates(FileType::KiroAgent, content, byte);
assert!(
candidates.iter().any(|c| c.label == "sonnet"),
"KiroAgent model values should include 'sonnet', got: {:?}",
candidates.iter().map(|c| &c.label).collect::<Vec<_>>()
let sonnet = candidates
.iter()
.find(|c| c.label == "sonnet")
.expect("KiroAgent model values should include 'sonnet'");
let opus = candidates
.iter()
.find(|c| c.label == "opus")
.expect("KiroAgent model values should include 'opus'");

assert_eq!(
sonnet.insert_text, "\"sonnet\"",
"KiroAgent value insert text should be JSON-quoted"
);
assert!(
candidates.iter().any(|c| c.label == "opus"),
"KiroAgent model values should include 'opus'"
assert_eq!(
opus.insert_text, "\"opus\"",
"KiroAgent value insert text should be JSON-quoted"
);
}

#[test]
fn test_completion_kiro_agent_key_context_uses_json_key_insert() {
let content = "{\n \"mod\n}";
let byte = content.find("\"mod").unwrap() + 1;
let candidates = completion_candidates(FileType::KiroAgent, content, byte);
let model = candidates
.iter()
.find(|c| c.label == "model")
.expect("KiroAgent key completions should include 'model'");
assert_eq!(
model.insert_text, "\"model\": ",
"KiroAgent key insert text should use JSON syntax"
);
}

Expand Down
1 change: 1 addition & 0 deletions tests/fixtures/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ Keep fixtures minimal, deterministic, and focused on one rule family when possib
- REF-002 only fires on agent config files (CLAUDE.md, AGENTS.md, SKILL.md), so broken-link fixture uses CLAUDE.md.
- Keep fixture paths stable, as tests assert on filenames.
- Kiro powers/agents/hooks/MCP fixture packs are guarded by inventory and CLI smoke-baseline checks in `crates/agnix-cli/tests/kiro_fixture_inventory.rs`, including detection baselines and representative file-type assertions.
- Kiro MCP file-type detection currently only matches `.kiro/settings/mcp.json`; other JSON files in `kiro-mcp/.kiro/settings/` are fixture artifacts and are not detected as `KiroMcp`.
Comment thread
avifenesh marked this conversation as resolved.
Loading