Closing the intent-to-code chasm - specification-driven development with BDD verification chain
Overall
score
96%
Does it follow best practices?
Validation for skill structure
#!/usr/bin/env pwsh
[CmdletBinding()] param( [Parameter(Position = 0)] [string]$Selector, [switch]$Json, [switch]$Help )
$ErrorActionPreference = 'Stop'
if ($Help) { Write-Output @" Usage: set-active-feature.ps1 [-Json] <selector>
Set the active feature for the current project.
SELECTOR: Number: 1, 001, 3 Partial name: user-auth, bugfix Full dir: 001-user-auth
OPTIONS: -Json Output in JSON format -Help Show this help message
EXAMPLES: .\set-active-feature.ps1 1 .\set-active-feature.ps1 user-auth .\set-active-feature.ps1 -Json 001-user-auth
"@ exit 0 }
if (-not $Selector) { Write-Error "No feature selector provided. Use -Help for usage." exit 1 }
. "$PSScriptRoot/common.ps1"
$repoRoot = Get-RepoRoot $specsDir = Join-Path $repoRoot 'specs'
if (-not (Test-Path $specsDir -PathType Container)) { Write-Error "No specs/ directory found. Run /iikit-01-specify first." exit 1 }
$features = @(Get-ChildItem -Path $specsDir -Directory | Where-Object { $_.Name -match '^[0-9]{3}-' })
if ($features.Count -eq 0) { Write-Error "No feature directories found in specs/." exit 1 }
$matches = @()
if ($Selector -match '^\d+$') { $prefix = '{0:000}' -f [int]$Selector $matches = @($features | Where-Object { $_.Name -match "^$prefix-" }) }
if ($matches.Count -eq 0) { $matches = @($features | Where-Object { $_.Name -eq $Selector }) }
if ($matches.Count -eq 0) { $matches = @($features | Where-Object { $_.Name -like "$Selector" }) }
if ($matches.Count -eq 0) { Write-Error "No feature matching '$Selector' found." Write-Host "Available features:" foreach ($f in $features) { Write-Host " - $($f.Name)" } exit 1 } elseif ($matches.Count -gt 1) { Write-Error "Ambiguous selector '$Selector' matches multiple features:" foreach ($f in $matches) { Write-Host " - $($f.Name)" } Write-Host "Be more specific." exit 1 }
$feature = $matches[0].Name Write-ActiveFeature -Feature $feature $env:SPECIFY_FEATURE = $feature
$stage = Get-FeatureStage -RepoRoot $repoRoot -Feature $feature
if ($Json) { [PSCustomObject]@{ active_feature = $feature stage = $stage } | ConvertTo-Json -Compress } else { Write-Output "Active feature set to: $feature" Write-Output "Stage: $stage" }
Install with Tessl CLI
npx tessl i tessl-labs/intent-integrity-kit@2.3.5rules
skills
iikit-00-constitution
scripts
iikit-01-specify
iikit-02-clarify
iikit-03-plan
iikit-04-checklist
scripts
dashboard
iikit-05-testify
iikit-06-tasks
iikit-07-analyze
iikit-08-implement
iikit-09-taskstoissues
iikit-bugfix
scripts
iikit-core
scripts
bash
dashboard
powershell