Repository navigation
feat: project-level gate criteria overrides - #69
Merged
Merged
Conversation
check-gate.py now reads pipeline/gate-criteria.md from the project when present. A stage defined there replaces the plugin's criteria for that stage; stages it omits fall back to references/gate-criteria.md. Output reports criteria_source (and source per criterion). Project script_returns_zero criteria resolve scripts in the project first, then the plugin, so a project can ship its own check or reuse a plugin script with its own argv. A missing script stays inconclusive and is promoted to blocker (REQ-GATESTUB-001). why.py explains overridden criteria the same way. _load_stage_criteria keeps its plugin-only contract. check_srs_acceptance.py gains --id-pattern, --acceptance-pattern and --row-scoped so SRSs with other ID schemes or requirements held in markdown table rows can reuse G1-003. Defaults are unchanged. Mirrored to forge-opencode/scripts. Tests cover override replace and fallback, project/plugin script resolution, the inconclusive path, the table-row mode, and why.py. Co-Authored-By: Claude Opus 5.5 <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.
Summary
check-gate.pyreadspipeline/gate-criteria.mdfrom the project. A stage defined there replaces the plugin's criteria for that stage; other stages fall back toreferences/gate-criteria.md. Output addscriteria_source(andsourceper criterion).script_returns_zerocriteria resolvescriptin the project first, then the plugin — ship a project check, or reuse a plugin script with projectargv. Missing script stays inconclusive + blocker (REQ-GATESTUB-001).check_srs_acceptance.py: new--id-pattern,--acceptance-pattern,--row-scopedfor SRSs with non-REQ-NNNIDs or table-row requirements. Defaults unchanged.why.pyhonours the same override._load_stage_criteria(plugin_dir, stage)keeps its plugin-only contract (used by the gate-criteria audit test).forge-opencode/scripts/;references/gate-criteria.mdand CHANGELOG updated.Motivation
A project whose SRS is generated in its own layout (e.g.
| **REQ-F-001** | … | Given … when … then … |rows) failed G1-002/G1-003/G1-004 with no way to adapt the gate short of/forge:force-advanceon every advance. The default acceptance checker also splits blocks at every ID mention, which misfires on table layouts and cross-references.Test plan
python3 -m pytest tests/ -q— 2042 passedpython3 scripts/validate-plugin.py— OKcriteria_source: project; blanking one acceptance cell flags exactly that requirement🤖 Generated with Claude Code