first-officer: add Step 5 output-validation gate to Completion and Gates#144
Open
iamcxa wants to merge 1 commit intoclkao:mainfrom
Open
first-officer: add Step 5 output-validation gate to Completion and Gates#144iamcxa wants to merge 1 commit intoclkao:mainfrom
iamcxa wants to merge 1 commit intoclkao:mainfrom
Conversation
Pipeline integrity fix. The FO was advancing entities through the
pipeline based on Stage Report existence alone, without validating
that the completed stage actually produced its expected Output
section in the entity file. When a worker completed (hit its
checklist) but failed to write ## {Stage_Name} Output due to
context pressure, early-exit paths, or circuit breakers, the entity
would silently advance to the next stage with no usable output.
Downstream stages like execute or verify would then discover the
missing input and return BLOCKED, but the entity status had already
moved forward, leaving it stranded.
Step 5 closes the gap by greping the entity file for
## {Stage_Name} Output before advancing any stage that has a skill
property. Missing or empty Output section triggers one re-dispatch
of the same worker with a pointed instruction to write the missing
sections; a second failure escalates to the captain with a visible
diagnostic and halts advancement.
Evidence for the bug came from a ship-flow workflow (spacedock-ui)
where entities 035, 038, 029 advanced past plan or execute without
Plan Output or Execute Output sections. Paired fix on the skill
side (write output before early-exit) lives in the downstream
workflow repo; this FO change is the generic backstop that applies
to every spacedock-commissioned workflow.
Convention referenced: entity-body-schema "Each stage writes up to
3 standard blocks: Output, Report, UAT with headers ## {Stage}
{Block}". draft and done stages (no skill property) are skipped.
Owner
|
I am curious why limit the stage output verification only when skill is defined? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The FO advances entities through the pipeline based on
## Stage Reportexistence alone, without validating that the completed stage produced its expected## {Stage_Name} Outputsection. When a worker hits its checklist but fails to write the Output section (context pressure, early-exit paths, circuit breakers), the entity silently advances to the next stage with no usable output. Downstream stages then discover the missing input and return BLOCKED — but the entity status has already moved forward, leaving it stranded mid-pipeline.Fix
Add Step 5 to the Completion and Gates flow in
first-officer-shared-core.md:skill:property, grep the entity file for## {Stage_Name} Outputbefore advancingskill:(draft, done)Evidence
The bug was observed on a ship-flow workflow (spacedock-ui project) where three entities advanced past their stages without corresponding Output sections:
war-room-scroll-fix— status:plan, no## Plan Outputdesign-system-v2— status:execute, no## Plan Outputupstream-contributions-scan— status:verify, no## Plan OutputPaired fix on the skill side (each stage skill mandates writing Output before early-exit) lives in the downstream workflow repo (spacedock-ui). This FO change is the generic backstop that applies to every spacedock-commissioned workflow.
Convention
Follows the entity-body-schema convention: "Each stage writes up to 3 standard blocks: Output, Report, UAT with headers
## {Stage} {Block}."Testing
make test-staticpasses: 454 passed, 22 deselected, 10 subtests passed in 24.56sskills/first-officer/references/first-officer-shared-core.md(+8 lines)claude-first-officer-runtime.mdandcodex-first-officer-runtime.mddescribe HOW to detect worker completion (Agent(), wait_agent) but don't duplicate the Step 1-4 checklist prose, so Step 5 addition to the shared core is sufficient.Stats