Repository navigation
feat(governance): escalate normative RFC 2119 clause changes in ucp to technical council review - #81
Open
damaz91 wants to merge 2 commits into
Conversation
damaz91
force-pushed
the
feat/normative-clause-l3-escalation
branch
from
October 23, 2026 10:06
17ce7c8 to
8a96db0
Compare
…l closed - Add per-rule 'normative_escalation' flag; enable it only for docs/specification/** in ucp-rules.yml instead of all Markdown in ucp. - Remove the hardcoded NORMATIVE_ESCALATION_REPOS repo gate; fetch patches/contents only for opted-in Markdown files. - Escalate opted-in files whose contents and diff cannot be retrieved, and discard partially fetched base/head contents.
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.
Description
Escalates governance approval requirements to at least Level 3 (Technical Council) whenever a Pull Request adds, removes, or modifies normative RFC 2119 clauses (
MUST,MUST NOT,SHALL,SHALL NOT,SHOULD,SHOULD NOT,MAY, or proseREQUIRED,RECOMMENDED,OPTIONAL) in a Markdown document (*.md,*.markdown) matched by a governance rule that opts in vianormative_escalation: true, even if that rule would otherwise only require Level 1 (devops-maintainers) or Level 2 (maintainers) approval. Inucp-rules.yml, onlydocumentation_spec(docs/specification/**) opts in.Note
Rebased onto
mainfollowing the merge of #76 (org-tools/requirements-extractorv0.4.0).normative_detector.pydirectly reusesrequirements_extractor's Markdown parser, RFC 2119 classifier, exclusion filters, and clause digest normalization without duplicating logic, and isolates Markdown dependencies via PEP 723 inline script metadata (pr_validator.py) anduv run --with(tests.yml) sopyproject.tomlanduv.lockremain untouched.Key Changes
org-tools/governance/scripts/normative_detector.py):parser.parse_text), RFC 2119 classification (classifier.classify), exclusion rules (fenced/indented code blocks, inline code spans, HTML blocks/comments, headings, table headers, RFC 2119 boilerplate definitions citingidentity.normalize,identity.text_digest) torequirements_extractor(feat(org-tools): add the requirements extractor and a reusable catalog check #76).{ target="_blank" }attr_listsuffixes, dash swaps, non-keyword emphasis) do not trigger false positives, while preserving code-span tokens (e.g.,`dev.ucp.*`) and leading field/status labels on multi-sentence or colon-split list items.report.candidates_without_emphasiscandidates throughclassifier.classify(preserving inline code spans), and tracks list items under normative colon-terminated stems.org-tools/governance/scripts/pr_validator.py,governance_config_parser.py,pr_models.py,rules/ucp-rules.yml):normative_escalationboolean (defaultfalse). Only Markdown files matched by an opted-in rule are checked; general docs,README.md,AGENTS.md,.github/**, fallback files, and repositories whose rules files do not opt in are unaffected.ucp-rules.ymlenables it only fordocs/specification/**.level < 3on a touched Markdown file to Level 3 while preservingmin_approvals(requirements already at Level 3 or Level 4governance-councilremain unchanged).shopping,food,lodging,payment/payments) to the corresponding Domain Tech Council (shopping-tech-council,food-tech-council,lodging-tech-council,payments-tech-council) and cross-domain documents to any Technical Council (Level 3) or higher.markdown-it-py==3.0.0andmarkdown==3.10.2via PEP 723# /// scriptmetadata inpr_validator.pyand--withflags in.github/workflows/tests.yml.org-tools/governance/scripts/validation_logger.py):* **Reason:** ⚠️ ...) and the File-by-File Breakdown (* **Escalation:** ⚠️ ...), including the affected RFC 2119 keywords and the original rule tier from which the requirement was escalated.org-tools/README.md,org-tools/governance/README.md, andorg-tools/governance/docs/validation_report.md.test_normative_detector.py,test_pr_validator.py,test_pr_models.py,test_validation_logger.py, andtest_governance_config_parser.py(including opt-in scoping and fail-closed behavior).Category (Required)
Please select one or more categories that apply to this change.
ucp-schematool (resolver, linter, validator). (Requires Maintainer approval)Related Issues
Builds on
org-tools/requirements-extractor(#76)Checklist
!for breaking changes).