Add maintenance-workflow: periodic drift detection and correction#126
Merged
Alan-Jowett merged 4 commits intomicrosoft:mainfrom Mar 30, 2026
Merged
Conversation
Add an interactive orchestration template that performs periodic health checks on repositories with existing semantic baselines. Workflow phases: 1. Full audit (D1-D13 across all artifact layers) 2. Human classification loop (intentional vs accidental drift) 3. Corrective patch generation (fix-spec, fix-impl, fix-both) 4. Patch audit (adversarial verification) 5. Human approval (loop back if needed) 6. Create deliverable (PR with corrective patches) Key design decisions: - Domain-agnostic: configurable persona for any engineering domain - 5 drift classifications: fix-spec, fix-impl, fix-both, accept, defer - Reuses all existing audit protocols (traceability-audit, code-compliance-audit, test-compliance-audit) - Reuses change-propagation and iterative-refinement for patches - Format skeletons follow exact format spec section structures - RECLASSIFY verdict for when audit reveals misclassified findings - Zero new protocols, formats, or personas Completes the engineering lifecycle triad: spec-extraction (bootstrap) -> engineering-workflow (evolve) -> maintenance-workflow (maintain) Closes microsoft#118 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new interactive PromptKit orchestration template that implements the “maintenance” leg of the lifecycle triad: periodically auditing a repo for semantic drift, guiding human classification, generating corrective patches, adversarially re-auditing, and preparing a deliverable PR.
Changes:
- Added
templates/maintenance-workflow.mdinteractive workflow template with phased audit → classify → patch → audit → approve → deliver flow. - Registered the new template in
manifest.yamlwith protocols/taxonomy/format metadata.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| templates/maintenance-workflow.md | New interactive maintenance workflow template describing phases, inputs, outputs, gates, and quality checklist. |
| manifest.yaml | Adds the maintenance-workflow template entry so it’s discoverable by the bootstrap/assembly tooling. |
- Fix triad reference to use full component name spec-extraction-workflow - Expand Findings field list to match investigation-report format (Category with D-label, Location, Description, Evidence, Root Cause, Impact, Confidence, Remediation) - Inline structured-patch constraints for multi-artifact context: CHG-NNN IDs, 'None identified' for empty sections, upstream-ref rules, 6-section structure Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…abels - Restrict Phase 1 to full-read specs only; implementation/verification uses search-then-selective-read per operational-constraints protocol - Use exact structured-patch heading text with numeric prefixes (## 1. Change Context, etc.) - Standardize classification labels to lowercase (fix-spec, fix-impl, fix-both, accept, defer) consistently throughout Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Clarify D5/D6 mapping: D5 for assumption drift, D6 for constraint violations (not vaguely 'consistency') - Fix escaped underscores in D-label example (D2\_UNTESTED\_ -> D2_UNTESTED_REQUIREMENT in code format) - Use exact investigation-report heading text with numeric prefixes and backtick formatting - Add severity ordering rule for findings 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 maintenance-workflow -- a periodic health check that detects drift, classifies findings with the user, generates corrective patches, and restores alignment.
Closes #118
Completes the Engineering Lifecycle Triad
spec-extraction-workflow (#119) -- bootstrap: no specs -> semantic baseline engineering-workflow (#116) -- evolve: change -> propagate -> audit -> deliver maintenance-workflow (this PR) -- maintain: detect drift -> classify -> fix -> deliverWorkflow Phases
Phase 1: Full Audit (D1-D13 across all layers) Phase 2: Human Classification (intentional vs accidental drift) Phase 3: Corrective Patch Generation (fix-spec / fix-impl / fix-both) Phase 4: Patch Audit (adversarial verification) Phase 5: Human Approval (loop back if needed) Phase 6: Create Deliverable (PR with corrections)Entry point:
read and execute templates/maintenance-workflow.mdNew Components
Just 1 template -- everything else is reused:
traceability-auditprotocolcode-compliance-auditprotocoltest-compliance-auditprotocolchange-propagationprotocoliterative-refinementprotocoladversarial-falsificationprotocolspecification-drifttaxonomyinvestigation-reportformatstructured-patchformatKey Design Decisions
Validation
Both validators pass cleanly.