feat(plan-validator): add flat-parallelism validator for codex-fleet plan.json#131
Merged
Merged
Conversation
…plan.json
Adds scripts/codex-fleet/lib/plan-validator.sh — a standalone validator
that enforces the codex-fleet parallel-first planning contract on any
plan.json before it is dispatched.
Rules:
(a) every sub-task's depends_on is empty UNLESS --allow-waves is passed
(b) no two sub-tasks share a file path in file_scope; a directory entry
(trailing '/') overlaps with any sibling under that prefix
(c) acceptance_criteria is a non-empty array of strings, each >= 40 chars
Exit codes follow the Lane 4 contract: 0 ok, 2 warnings only, 3 hard
errors. A JSON summary {"ok", "warnings", "errors"} is emitted on stdout
on every run so callers (Lane 5's plan-watcher tick) can parse it
without scraping stderr.
Verified:
- shellcheck koalaman/shellcheck:stable -> exit 0
- bash plan-validator.sh against the current TUI improvements plan -> ok
- inline self-test fixtures (commented in header) round-trip correctly:
ok plan -> 0, plan with overlapping file_scope -> 3
- negative tests: short AC, depends_on without --allow-waves, invalid
JSON, missing arg all produce the documented exit codes
This lane intentionally does NOT wire the validator into
plan-watcher.sh; that is Lane 5's scope.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Automated by gx branch finish (PR flow).