Repository navigation
fix(corpflow): Sync CORPFLOW.md to the 4.0.27 contract - #24
Merged
Merged
Conversation
CORPFLOW.md targeted an older corpflow contract, so this plugin emitted
handoff frontmatter the harness rejects outright:
`fail: stage=DV missing required field: summary`. The shape it taught
(from/to/run_index/status/artifacts/metadata{}) is read by nothing:
state-patch.sh reads handoff.stage/.verdict/.summary/.worktree_*, and
handoff.metadata.* has no reader at all.
Adopt the canonical schema. Add the closing elicitation sweep, now
required on all 13 stages and hard-failing at every stage boundary, plus
the --facts payload that is a sweep stub's only route to the gate that
renders it. Add the worktree fields DR checks. Correct the artifact
basenames (testing-N.md, incident-N.md), drop the invalid
`needs_changes` verdict, and mark DR/SR/QA as the consultations they are
-- corpflow's own agents own those stages and artifacts. Correct the
stage sets: nine by default, --secure adds SR and RE, emergency is
IR->DV->DR->QA->RE->FN.
The file is read in full on every cross-plugin dispatch, so size is a
per-delegation token cost. Merging the two frontmatter sections and
dropping restated rationale keeps it near its previous length while
carrying a contract that was not there before. Rules that hard-fail a
stage keep a short cost clause; the rest are bare imperatives.
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.
Motivation
CORPFLOW.md targeted an older corpflow contract, so this plugin emitted handoff frontmatter the
harness rejects outright. Reproduced against
handoff-harness.sh --validate-frontmatter, whichcorpflow runs at every stage boundary and which hard-fails the stage:
The shape it taught (
from/to/run_index/status/artifacts/metadata{}) is read by nothing:state-patch.shreadshandoff.stage,.verdict,.summary,.worktree_path,.worktree_branch, andhandoff.metadata.*has no reader at all.Separately, the file is read in full on every cross-plugin delegation, so its size is a
per-dispatch token cost rather than a documentation concern.
Changes
handoff:schema. The annotated DV block is now both schema andtemplate; AR, DR, SR, QA and IR collapse into a delta table.
boundary regardless of
--strict— with its item shape,## elicitation-sweepanchor, and rules.state-patch.sh --factspayload, a sweep stub's only route to the gate that renders it.worktree/worktree_path/worktree_branchfields DR checks; absent or false isworktree_isolation_violation.testing-N.md(wasqa-<N>.md),incident-N.md(wasincident-report.md).needs_changes, which is outside the verdict enum.state that DV ownership depends on
tasks.DV0.agent.--secureadds SR and RE, emergency isIR→DV→DR→QA→RE→FN.drop restated rationale. Rules that hard-fail a stage keep a short cost clause; the rest are bare
imperatives. A size budget row is recorded in the footer.
Test plan
facts.open_questions[]andran corpflow's
handoff-harness.sh --validate-frontmatter <artifact> --state <state.json>:ok: stage=DV tokens=103, exit 0. The previous shape fails the same check.routing-matrix,handoff-harnessanddesc-lint: 52 passed, 0 failed.scripts/validate.sh: 0 errors (1 pre-existing unrelated SKILL.md size warning).stays one mechanical pass.
of the intentional removals listed above.
Notes
Part of a seven-repo sync against corpflow 4.0.27 — the template in corpflow and the five other
platform plugins carry the same change.
Closes #23