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 @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- **README supported tools update**: Added a Kiro row to the Supported Tools table with current rule coverage (`KIRO-*`, `KR-SK-*`) and current file surface (`.kiro/steering/**/*.md` and `.kiro/skills/**/SKILL.md`) (#596).
- **Kiro S-tier CI gate**: Added an explicit `Kiro S-tier Gate` step in the main CI test job that executes dedicated Kiro gate checks for target behavior, docs/rule parity integrity, and real-world manifest coverage on every PR/push (#602).
- **Kiro fixture expansion**: Added fixture packs for Kiro powers, agents, hooks, and MCP settings plus integration tests to keep the corpus present and CLI-runnable (#599).
- **Kiro real-world repo coverage**: Added/updated explicit Kiro-tagged real-world repos (`awsdataarchitect/kiro-best-practices`, `dereknguyen269/derek-power`, `cremich/promptz`, `Theadd/kiro-agents`) and tightened CI gating to require the expanded baseline in `tests/real-world/repos.yaml` (#598).

### 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.
Expand Down
55 changes: 53 additions & 2 deletions crates/agnix-cli/tests/kiro_ci_gate.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use assert_cmd::Command;
use regex::Regex;
use serde::Deserialize;
use std::collections::HashSet;
use std::fs;
use std::io::Write;
use std::path::{Path, PathBuf};
Expand Down Expand Up @@ -54,6 +55,27 @@ fn agnix() -> Command {
cmd
}

fn normalize_repo_url(url: &str) -> Option<String> {
let trimmed = url.trim().trim_end_matches('/');
let prefix = "https://github.com/";
if !trimmed.starts_with(prefix) {
return None;
}

let mut parts = trimmed[prefix.len()..].split('/');
let owner = parts.next()?;
let repo = parts.next()?;
if owner.is_empty() || repo.is_empty() || parts.next().is_some() {
return None;
}

Some(format!(
"https://github.com/{}/{}",
owner.to_ascii_lowercase(),
repo.to_ascii_lowercase()
))
}

#[test]
#[ignore = "run via CI Kiro S-tier gate step"]
fn kiro_target_still_disables_claude_rules() {
Expand Down Expand Up @@ -224,9 +246,18 @@ fn real_world_manifest_has_explicit_kiro_coverage() {
.filter(|repo| repo.categories.iter().any(|category| category == "kiro"))
.collect();

let required_kiro_repos = [
"https://github.com/Theadd/kiro-agents",
"https://github.com/awsdataarchitect/kiro-best-practices",
"https://github.com/dereknguyen269/derek-power",
"https://github.com/cremich/promptz",
];

assert!(
!kiro_entries.is_empty(),
"tests/real-world/repos.yaml must include at least one explicit 'kiro' categorized repo"
kiro_entries.len() >= required_kiro_repos.len(),
"tests/real-world/repos.yaml must include at least {} explicit 'kiro' categorized repos, found {}",
required_kiro_repos.len(),
kiro_entries.len()
);

let repo_url_re =
Expand All @@ -237,4 +268,24 @@ fn real_world_manifest_has_explicit_kiro_coverage() {
.all(|repo| repo_url_re.is_match(&repo.url)),
"All explicit 'kiro' category entries must be valid GitHub owner/repo URLs"
Comment on lines 263 to 269

Copilot AI Mar 2, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

repo_url_re currently allows ? / # (and other non-path characters) inside the owner/repo segments because it uses [^/]+. That means URLs like https://github.com/owner/repo?tab=readme would be treated as valid and could slip into the explicit Kiro baseline. Consider tightening validation (and/or normalize_repo_url) to reject query/fragment parts and ensure each segment is strictly an owner/repo name (e.g., disallow ?, #, and .git).

Copilot uses AI. Check for mistakes.
);

let normalized_kiro_repo_urls: HashSet<String> = kiro_entries
.iter()
.map(|repo| normalize_repo_url(&repo.url))
.collect::<Option<HashSet<String>>>()
.expect("All explicit 'kiro' repo URLs must normalize to owner/repo form");
let missing_required: Vec<&str> = required_kiro_repos
.iter()
.copied()
.filter(|url| {
let normalized_required =
normalize_repo_url(url).expect("required Kiro repo URL constants must normalize");
!normalized_kiro_repo_urls.contains(&normalized_required)
})
.collect();
assert!(
missing_required.is_empty(),
"Missing required explicit Kiro real-world repos in tests/real-world/repos.yaml:\n{}",
missing_required.join("\n")
);
}
11 changes: 10 additions & 1 deletion tests/real-world/repos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1460,7 +1460,7 @@ repos:
- url: https://github.com/Royal-lobster/Transedit
categories: [auto-discovered]
status: pending
- url: https://github.com/Ryotaverse69/suptia-kiro
- url: https://github.com/Theadd/kiro-agents
categories: [auto-discovered, kiro]
status: pending
- url: https://github.com/SAP/e-mobility-charging-stations-simulator
Expand Down Expand Up @@ -1913,6 +1913,9 @@ repos:
- url: https://github.com/aviadshiber/kapsis
categories: [auto-discovered]
status: pending
- url: https://github.com/awsdataarchitect/kiro-best-practices
categories: [auto-discovered, kiro]
status: pending
- url: https://github.com/axAilotl/character-federation
categories: [auto-discovered]
status: pending
Expand Down Expand Up @@ -2177,6 +2180,9 @@ repos:
- url: https://github.com/derek1ee/clrviz
categories: [auto-discovered]
status: pending
- url: https://github.com/dereknguyen269/derek-power
categories: [auto-discovered, kiro]
status: pending
- url: https://github.com/deseven/ec-su_axb35-win
categories: [auto-discovered]
status: pending
Expand Down Expand Up @@ -3155,6 +3161,9 @@ repos:
- url: https://github.com/pratikpakhale/mixboard
categories: [auto-discovered]
status: pending
- url: https://github.com/cremich/promptz
categories: [auto-discovered, kiro]
status: pending
- url: https://github.com/presidio-oss/aider-based-code-generator
categories: [auto-discovered]
status: pending
Expand Down
Loading