Imported from alonf/KeyContextAI (
.specify/extensions/specrew-speckit/.specify-dev/agent-commands/agy/speckit-specrew-speckit-sync-clarify/SKILL.md). Install upstream withnpx skills add alonf/KeyContextAI --skill speckit-specrew-speckit-sync-clarify. Copyright stays with the author.
Sync Clarify Boundary State
Record the arrival (before the advancement gate)
After /speckit.clarify updates the active spec, record the boundary arrival FIRST — the sync
mints the pending crossing and writes .specrew/runtime/pending-verdict-stop.md, the controller
truth the verdict stop renders from. This arrival-first order prevents a stop with no artifact:
$featureJson = Get-Content -LiteralPath .\.specify\feature.json -Raw -Encoding UTF8 | ConvertFrom-Json
$featureRef = Split-Path -Leaf $featureJson.feature_directory
pwsh -File .\.specify\extensions\specrew-speckit\scripts\sync-boundary-state.ps1 -ProjectPath . -BoundaryType clarify -FeatureRef $featureRef
If the sync fails, stop and report the exact file-write error before continuing. If the sync is refused because an earlier crossing is still unapproved (the ratchet), that refusal IS the stop — surface it and wait for the human; do not work around it.
Advancement gate (after the arrival is recorded)
The gate BLOCKS until the human's verdict authorizes this crossing:
. .\.specify\extensions\specrew-speckit\scripts\shared-governance.ps1
$authorization = Test-SpecrewBoundaryAuthorization -ProjectRoot . -CurrentBoundary 'specify' -RequestedBoundary 'clarify'
if (-not $authorization.Authorized) {
Write-Output (Write-SpecrewBoundaryAuthorizationDirective -CurrentBoundary $authorization.CurrentBoundary -RequestedBoundary $authorization.RequestedBoundary -DirectiveSentinel $authorization.DirectiveSentinel)
throw $authorization.Reason
}
On a gate block, .specrew/runtime/pending-verdict-stop.md is the controller truth: render the
six-section boundary packet from its Boundary to ask for, Human approval phrase, and
Marker last line exactly values, then stop for the human's verdict. Do not infer a marker from
the phase you are in.