Add code compliance audit template (spec+design → code)#42
Merged
Alan-Jowett merged 2 commits intomicrosoft:mainfrom Mar 20, 2026
Merged
Add code compliance audit template (spec+design → code)#42Alan-Jowett merged 2 commits intomicrosoft:mainfrom
Alan-Jowett merged 2 commits intomicrosoft:mainfrom
Conversation
Add a new template that audits source code against requirements and design documents for specification drift. Detects unimplemented requirements (D8), undocumented behavior (D9), and constraint violations in code (D10). New components: - Protocol: code-compliance-audit — 7-phase methodology for mapping spec claims to code behavior (spec inventory, code inventory, forward/backward traceability, constraint verification) - Template: audit-code-compliance — consumes requirements + code + optional design, produces investigation-report Extended components: - Taxonomy: specification-drift — D8-D10 labels defined, D11-D13 remain reserved for test compliance - Ranking criteria updated to include D8-D10 - Scenarios gallery updated (moved from future to existing) Closes microsoft#37 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new PromptKit template + reasoning protocol to audit source code vs. requirements/design for “code compliance drift”, extending the existing specification-drift taxonomy to cover D8–D10 and documenting the new scenario as an existing capability.
Changes:
- Added
audit-code-compliancetemplate that consumes requirements + code context (+ optional design) and produces an investigation report classified with D8–D10. - Added
code-compliance-auditreasoning protocol defining a phased audit methodology (spec inventory → code inventory → forward/backward tracing → constraint verification → classification → coverage). - Extended
specification-drifttaxonomy with D8–D10 labels and updated docs/manifest registrations accordingly.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| templates/audit-code-compliance.md | New audit template wiring persona/protocols/taxonomy/format plus task instructions and quality checklist. |
| protocols/reasoning/code-compliance-audit.md | New 7-phase reasoning protocol for code↔spec compliance auditing and reporting. |
| taxonomies/specification-drift.md | Adds D8–D10 code-compliance drift labels; updates applicability and ranking criteria. |
| manifest.yaml | Registers the new protocol and template in the component manifest. |
| docs/scenarios.md | Moves the code-compliance audit scenario into “Existing Templates” and documents the assembled components. |
…us scoping - INCONCLUSIVE is now a confidence level (Low), not a competing label - PARTIALLY IMPLEMENTED maps to D8 with Medium confidence - D9 findings use 'None — no matching requirement identified' for spec location since undocumented behavior has no requirement by definition - Focus area scoping applies to code modules, not just requirements Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.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
Adds a new template that audits source code against requirements and design documents for code compliance drift — gaps between what was specified and what was built. Closes #37.
New Components
Extended Components
New Drift Types (D8–D10)
D11–D13 remain reserved for the future \�udit-test-compliance\ template (#38).
Reused Components
Validation