Add quantitative-constraint-validation protocol and validate-budget template#99
Merged
Alan-Jowett merged 5 commits intomicrosoft:mainfrom Mar 29, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new PromptKit reasoning protocol + template to validate quantitative “budget” artifacts (power/cost/timing/link/memory/etc.) against numeric specification constraints, complementing the existing qualitative invariant-audit workflow (closes #94).
Changes:
- Added
quantitative-constraint-validationreasoning protocol with a 7-phase methodology (constraint/claim extraction, unit checks, arithmetic verification, margin + sensitivity, completeness). - Added
validate-budgettemplate that applies the new protocol and outputs aninvestigation-report. - Registered the new protocol/template in
manifest.yaml.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| templates/validate-budget.md | New template orchestrating inputs + protocol usage and mapping results into the investigation-report format. |
| protocols/reasoning/quantitative-constraint-validation.md | New 7-phase quantitative validation protocol (constraints/claims/units/arithmetic/margins/sensitivity/completeness). |
| manifest.yaml | Registers the new protocol and template so the bootstrap/assembly flow can discover them. |
…emplate Closes microsoft#94 — adds budget validation capability for any quantitative analysis artifact. - Protocol: quantitative-constraint-validation — 7-phase methodology covering constraint extraction, claim extraction, unit/dimension verification, arithmetic re-derivation, margin analysis with classification (Violated/Marginal/Adequate/Excessive), sensitivity analysis (break-even deltas), and completeness checking. Budget-type agnostic — works for power, cost, timing, link, and memory budgets. - Template: validate-budget — assembles specification-analyst persona + protocol + investigation-report format. Adapts to budget type with domain-specific guidance (per-state power budgets, dB-scale link budgets, critical-path timing, etc.). The quantitative counterpart to spec-invariant-audit: that protocol finds qualitative spec gaps, this one verifies numerical budgets actually close. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Protocol: fix Phase 5 margin semantics for dB/non-percentage units. Classification now uses margin delta (headroom-to-limit) with unit-appropriate thresholds. 10% default only applies to percentage margins; non-percentage margins use spec-defined thresholds or margin=0 as the boundary. - Template: move margin table out of Executive Summary narrative (keep 2-4 sentence format compliance), place after summary in Section 1. Fix severity rubric to reference adequacy threshold instead of hardcoded percentages. Change 'at least 3' to 'up to 3' for self-verification. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…tivity - Protocol: separate dB margin formulas for upper vs lower limits (EIRP ceiling vs SNR floor). Add margin formulas for range, ratio, and margin-requirement bound types. Use |limit| for division to handle negative limits; fall back to absolute headroom when limit=0. - Template: align sensitivity checklist with protocol (include Adequate findings with margin < 20%). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ding - Protocol: handle tolerance=0 (any deviation is violation, report native units). Fix margin-requirement formula to (headroom − required_margin) so negative margin correctly indicates violation. - Template: align sensitivity checklist with protocol — required for Violated/Marginal, recommended for Adequate <20%. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…label - Protocol: replace hardcoded '20%' sensitivity threshold with unit-agnostic 'thin margin' guidance. Fix 'budget type' → 'bound kind' label. Remove hardcoded '> 20%' for optional sensitivity. - Template: fix stale 'Phase 7 step 4' reference to 'protocol's completeness check (Phase 7)'. Align sensitivity wording. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
f62c688 to
42ed9a9
Compare
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
Adds budget validation capability — the quantitative counterpart to spec-invariant-audit. Closes #94.
Where spec-invariant-audit asks "can a compliant implementation violate this property?", this protocol asks "does this budget actually satisfy the spec's numerical limits?"
New Components
Protocol Phases
Design Decisions
Checklist