patch-impact-review
Skill0 starsChanged 2 months agoMITView on GitHub
Review a patch or Git diff against the evidence-backed current-system baseline, trace changed behavior through observable surfaces, runtime dependencies, integrations, and field/data provenance, identify compatibility/regression risks, and derive evidence-backed verification. Require scope isolation, provenance, and completion gates before declaring impact or sufficiency.
In this repository33 other files it gives its agents.
- .github/copilot-instructions.mdCopilot instructions
- adversarial-baseline-auditSkill
- architecture-drift-detectionSkill
- architecture-reconstruction-and-diagramsSkill
- artifact-detailed-designSkill
- baseline-source-of-truth-maintenanceSkill
- claim-verification-and-promotionSkill
- configuration-source-traceSkill
- contract-impact-test-designSkill
- current-state-tdd-synthesisSkill
- design-artifact-decompositionSkill
- design-artifact-decomposition-verificationSkill
- detailed-design-verificationSkill
- full-reverse-engineeringSkill
- implementation-readiness-certificationSkill
- incident-root-cause-analysisSkill
- integration-selection-analysisSkill
- observability-traceability-analysisSkill
- persistence-schema-reverse-engineeringSkill
- post-readiness-adversarial-auditSkill
- regression-test-designSkill
- requirement-compliance-reviewSkill
- resolve-high-impact-unknownsSkill
- resume-reverse-engineeringSkill
- reverse-engineering-bootstrapSkill
- reverse-engineering-coverage-auditSkill
- run-engineering-workflowSkill
- runtime-binding-verificationSkill
- runtime-flow-analysisSkill
- technical-design-proposalSkill
- technical-design-verificationSkill
- wbs-generationSkill
- wbs-verificationSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
40 rules. About 0 are common, 32 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈32
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 32
If requirement, source, and patch disagree, show the disagreement explicitly.
- Distinctive: line 33
Never update canonical baseline memory from an unmerged patch.
- Distinctive: line 34
Do not reuse a previous review conclusion as evidence.
- Distinctive: line 38
Use all applicable inputs:
- Very specific: line 53
Create atomic rules R-001, R-002, ...
- Distinctive: line 66
Do not invent acceptance criteria.
- Distinctive: line 70
When a requirement exists, create:
- Very specific: line 78
Do not transfer conditions between endpoints/surfaces/operations.
- Very specific: line 80
If scope is ambiguous, mark UNKNOWN.
- Distinctive: line 81
Use this matrix as authoritative scope for impact and sufficiency judgments.
- Distinctive: line 112
Do not infer correctness from implementation shape.
- Distinctive: line 148
Do not stop at the first caller or callee.
- Distinctive: line 173
If caller chains fan out, follow every material branch.
- Distinctive: line 174
If caller chains converge, preserve the distinct external entry points.
- Distinctive: line 175
Do not stop after finding one representative endpoint.
- Distinctive: line 189
Do not confuse a downstream CLI integration with a product CLI entry point:
- Distinctive: line 225
When changed behavior is input-driven, distinguish:
- Distinctive: line 234
Do not conflate these categories.
- Distinctive: line 237
Do not infer error behavior from naming alone.
- Very specific: line 260
If no REST impact, state NO_DIRECT_REST_API_IMPACT and prove it with the exposure trace.
- Distinctive: line 292
When is source data obtained?
- Distinctive: line 304
Do not require an explicit output-layer condition if earlier data-flow decisions already produce correct behavior.
- Distinctive: line 356
Do not misclassify secondary performance/design concerns as requirement violations unless the requirement covers them.
- Distinctive: line 365
If expected behavior cannot be established, write:
- Distinctive: line 401
If a required link cannot be proven:
- Very specific: line 404
use EXPECTED_BEHAVIOR_UNRESOLVED where applicable
- Distinctive: line 405
do not fill the gap with assumptions
- Distinctive: line 409
Before finalizing every HIGH/CRITICAL impact, no-impact claim, or insufficiency claim:
- Distinctive: line 412
search alternate downstream paths
- Distinctive: line 413
search earlier conditional retrieval/mapping
- Very specific: line 414
search serializers/mappers/configuration that contradict the initial finding
- Distinctive: line 415
verify conditions were not borrowed from another surface
- Distinctive: line 427
Do not change a finding merely to agree with the user.
- Distinctive: line 462
no extra expensive downstream mode for unchanged requests
- Distinctive: line 463
no extra call count where performance-sensitive
- Distinctive: line 466
Do not create generic tests without source-backed impact.
- Distinctive: line 481
Use the lowest level that proves the rule, while retaining end-to-end coverage for external contracts.
- Very specific: line 488
Every HIGH/CRITICAL impact must map to at least one concrete test.
- Very specific: line 489
Every changed external contract rule must map to API_CONTRACT or higher unless technically impossible.
- Distinctive: line 579
Test Matrix with Expected Behavior
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Patch Impact Review 4.0 — Contract + Runtime + Exposure Closure + Provenance + Test Impact
Purpose
A patch impact review is NOT a changed-function inventory.
PATCHED CODE
→ changed runtime rule
→ affected observable surface
→ affected input/output contract
→ affected field/data provenance
→ affected integration/data/state behavior
→ compatibility/regression risk
→ required verificationA changed method is only the starting point.
0. Baseline Safety
- CURRENT SOURCE = baseline behavior authority.
- PATCH/DIFF = candidate changed behavior.
- REQUIREMENT/SPEC = intended behavior.
- Promoted reverse-engineering memory is supporting evidence, not a substitute for current source.
- If requirement, source, and patch disagree, show the disagreement explicitly.
- Never update canonical baseline memory from an unmerged patch.
- Do not reuse a previous review conclusion as evidence.
1. Inputs
Use all applicable inputs:
- patch / Git diff
- current source
- promoted reverse-engineering baseline
- requirement / issue / customer clarification
- API/interface specification
- tests and fixtures
- integration protocol definitions
- configuration and persistence schema
Record missing evidence instead of guessing.
2. Normalize Intended Behavior
Create atomic rules R-001, R-002, ...
For each rule capture:
- observable surface / endpoint / operation
- trigger and preconditions
- supported inputs/parameters
- expected behavior and output/state
- failure/exception behavior
- compatibility requirement
- explicit exclusions / non-applicable surfaces
- ambiguity
Do not invent acceptance criteria.
2.1 Canonical Requirement / Scope Matrix
When a requirement exists, create:
| Rule | Surface / Operation | Applies? | Condition | Expected Observable Behavior |
Rules:
- Evaluate each row independently.
- Do not transfer conditions between endpoints/surfaces/operations.
- A condition applies only where explicitly assigned.
- If scope is ambiguous, mark
UNKNOWN. - Use this matrix as authoritative scope for impact and sufficiency judgments.
3. Reconstruct the Change at Three Levels
3.1 Business Purpose
Why the change is needed.
3.2 Observable Functional Behavior
What an external caller, operator, job, integration, or persisted state can observe before vs after.
For a bug fix:
Observed Problem
→ PATCH-IMPLIED ROOT CAUSE
→ Changed Rule
→ Corrected Observable BehaviorLabel patch-implied root cause unless source-verified.
3.3 Technical Implementation
Identify:
- changed files/symbols
- changed conditions/branches
- transformations
- integration calls
- .ai-engineering/state-templates/configuration changes
Do not infer correctness from implementation shape.
4. Mandatory Impact-Surface Discovery
For every semantically changed behavior, trace both directions.
Upstream / Exposure Trace
changed symbol
← callers
← service/facade/handler
← controller/resource/router/entry point
← endpoint/event/job/CLI/GUI/RPC surfaceDownstream / Effect Trace
changed symbol
→ callees/utilities
→ integration/client/DB/message/config/file
→ parser/transformation
→ response/.ai-engineering/state-templates/side effectStop only at:
EXTERNALLY_EXPOSED
INTERNAL_ONLY
BACKGROUND_OR_SCHEDULED
EXTERNAL_INTEGRATION_ONLY
SOURCE_NOT_RESOLVEDDo not stop at the first caller or callee.
4A. Boundary → Exposure Closure Gate
The upstream trace from a changed symbol is not sufficient when impact is discovered at a downstream integration/runtime boundary.
Whenever an impacted boundary is confirmed, such as:
- native executable / external process invocation
- RPC/SDK operation
- DB query
- message producer
- file/config writer
- persistence operation
- downstream service call
treat that boundary as a new reverse-trace seed.
Required algorithm
- Enumerate ALL source-visible direct invocation/construction sites of the boundary.
- For EACH site, trace callers upward independently.
- Continue until an external entry point or proven non-external root is reached.
- If caller chains fan out, follow every material branch.
- If caller chains converge, preserve the distinct external entry points.
- Do not stop after finding one representative endpoint.
Required trace:
impacted boundary
← invocation/construction site
← business/service caller
← handler/controller/resource/router
← exact external operationBoundary terminology
Do not confuse a downstream CLI integration with a product CLI entry point:
DOWNSTREAM_PROCESS_INTEGRATION: the application invokes an external executable or native process.PRODUCT_COMMAND_ENTRY_POINT: a user/operator enters the application through its own command interface.
Exposure Closure Matrix
| Boundary ID | Impacted Boundary | Invocation Site | Caller Chain | External Entry Type | Method | Exact Path / Operation | Classification | Evidence |
Classifications:
REST_REACHABLE
PRODUCT_COMMAND_REACHABLE
JOB_REACHABLE
EVENT_REACHABLE
GUI_REACHABLE
RPC_REACHABLE
INTERNAL_ONLY
SOURCE_NOT_RESOLVEDClosure rule
An impacted boundary is not exposure-complete until every source-visible direct invocation/construction site is classified.
NO_DIRECT_REST_API_IMPACT or any equivalent no-impact claim is forbidden while
a direct invocation site remains unresolved.
This gate is mandatory even when a broad external-interface inventory was already performed.
5. Input / Parameter Semantics Gate
When changed behavior is input-driven, distinguish:
- valid supported input/parameter
- unsupported input/parameter name
- wrong-case input/parameter name
- invalid value of a supported input/parameter
- invalid combination of supported inputs/parameters
- omitted / null / empty / default
Do not conflate these categories.
Preserve exact specification rules for case sensitivity, defaults, and unsupported inputs. Do not infer error behavior from naming alone.
6. External Contract Impact
Inspect all reachable external boundaries.
REST / HTTP
Check:
- method/path/version
- path/query/header/body fields
- required/optional/null/default
- allowed values/format/range
- parameter-combination rules
- case sensitivity / unsupported-parameter behavior
- status codes
- response fields/type/format
- conditional field presence
- null vs omitted
- error mapping
- filtering/pagination/ordering
- backward compatibility
If no REST impact, state NO_DIRECT_REST_API_IMPACT and prove it with the exposure trace.
Non-REST
Inspect applicable:
- CLI
- GUI
- RPC
- external SDK/API
- DB
- event/message
- file/configuration
- cache
- batch/scheduler
- authn/authz
- logs/audit/metrics when behaviorally significant
For each boundary trace:
input → transformation → output/side effect → failure behavior7. Field / Data Provenance Gate
For every changed, introduced, filtered, normalized, persisted, or conditionally exposed value, prove its lifecycle before declaring impact or no-impact.
| Surface | Field/Data | Trigger/Condition | Source Retrieval | Source Field/Data | Transform/Normalize | Mapping/Storage | Serialization/Output | Final Observable Behavior | Evidence |
Determine:
- When is source data obtained?
- Which command/query/call/branch makes it available?
- Where is it parsed?
- Where is it transformed/normalized?
- Where is it mapped/stored?
- What happens when it is absent or not retrieved?
- How is it serialized/emitted/consumed externally?
- What observable behavior results?
Important:
- Conditional behavior may be implemented indirectly by conditional retrieval.
- Do not require an explicit output-layer condition if earlier data-flow decisions already produce correct behavior.
- A changed output field does not imply the serializer is the root of impact.
- Extra internal retrieval is not automatically a contract violation.
- Report evidenced performance or side-effect risk separately.
This gate applies to REST responses, CLI output, persisted state, messages, configuration, identifiers, and other externally meaningful values.
8. Data and State Impact
Trace changed values through:
- parsing
- validation
- normalization/conversion
- persistence
- equality/comparison
- cache/map keys
- serialization/deserialization
- response mapping
- command construction
- configuration generation
- logging/display
For identifier-like values also check:
- prefix/range/length assumptions
- numeric/string conversion
- arithmetic
- truncation/padding
- uniqueness/collision
- backward-compatible lookup
9. Compatibility and Regression Impact
Evaluate separately:
- functional compatibility
- API compatibility
- integration compatibility
- data compatibility
- performance compatibility
- security compatibility when intersected
For performance, check:
- external call count
- data volume
- expensive query/command modes
- loops/retries
- cache changes
- DB query shape
Do not misclassify secondary performance/design concerns as requirement violations unless the requirement covers them.
10. Mandatory Before-vs-After Behavior Matrix
| Case ID | Entry Point / Endpoint | Preconditions | Request / Input Combination | Baseline Behavior | Patched Behavior | Expected Behavior | Compatibility | Evidence |
Derive dimensions from requirement + current source + patch.
If expected behavior cannot be established, write:
EXPECTED_BEHAVIOR_UNRESOLVED
and name the missing evidence.
11. Impact Claim Completion Gate
Do not declare:
IMPACTEDNOT_IMPACTEDPATCH_SUFFICIENTPATCH_PARTIALLY_SUFFICIENTPATCH_INSUFFICIENT
until the applicable chain is proven.
For externally observable changes:
changed code
→ runtime path
→ impacted downstream boundary (when applicable)
→ ALL invocation/construction sites
→ ALL reachable external surfaces
→ input condition
→ downstream/data provenance
→ mapping/.ai-engineering/state-templates/output
→ externally observable resultFor NO_DIRECT_*_IMPACT, prove that the exposure trace terminates before an external surface.
For changed response/output/data fields, the Field / Data Provenance Gate is mandatory.
If a required link cannot be proven:
- use
SOURCE_NOT_RESOLVED - use
EXPECTED_BEHAVIOR_UNRESOLVEDwhere applicable - do not fill the gap with assumptions
12. Adversarial Reverification
Before finalizing every HIGH/CRITICAL impact, no-impact claim, or insufficiency claim:
- search alternate callers
- search alternate downstream paths
- search earlier conditional retrieval/mapping
- search serializers/mappers/configuration that contradict the initial finding
- verify conditions were not borrowed from another surface
- inspect tests that could prove or disprove the finding
A user correction is not evidence.
If challenged:
- reopen the finding
- re-trace source
- search counterevidence
- revise only when source evidence supports revision
Do not change a finding merely to agree with the user.
13. Test Viewpoint Derivation
Derive only applicable viewpoints.
Contract/API
- backward compatibility
- new field/parameter positive cases
- omitted/null/empty/default
- valid/invalid combinations
- unsupported/wrong-case names when applicable
- boundary/format/range
- response presence/absence/nullability
- HTTP/error behavior
Runtime/business rule
- branch true/false
- model/type/state variants
- old/new representation
- fallback/error paths
Integration
- exact downstream command/options/request
- parser mapping
- missing/extra downstream fields
- downstream error mapping
Data/state
- persistence/read-back
- key/equality
- cache
- migration/legacy data
Non-functional
- no extra expensive downstream mode for unchanged requests
- no extra call count where performance-sensitive
- idempotency/concurrency only when impacted
Do not create generic tests without source-backed impact.
14. Test-Level Selection
Use:
UNIT
COMPONENT
API_CONTRACT
INTEGRATION
END_TO_END
REGRESSIONUse the lowest level that proves the rule, while retaining end-to-end coverage for external contracts.
15. Required Test Matrix
| Test ID | Level | Endpoint / Entry Point | Viewpoint | Preconditions | Input / Request | Expected Downstream Interaction | Expected Data Provenance / State | Expected Response / State | Regression Purpose | Evidence |
Every HIGH/CRITICAL impact must map to at least one concrete test. Every changed external contract rule must map to API_CONTRACT or higher unless technically impossible.
16. Mandatory Inventories
Changed Code Surface
| File | Class/Symbol | Change | Runtime Role |
Runtime Impact
| Class/Component | Method/Behavior | Why Impacted | Direct/Indirect | Patch Touches It? | Evidence |
Boundary → Exposure Closure
| Boundary | Invocation Site | Caller Chain | External Entry Type | Method | Exact Path / Operation | Classification | Evidence |
API Contract Impact
| API | Method + Path | Request Contract Impact | Response Contract Impact | Error/Status Impact | Compatibility Risk | Evidence |
External Contract Impact
| Boundary | Operation | Input Before/After | Output Before/After | Failure Impact | Evidence |
Field / Data Provenance Impact
| Surface | Field/Data | Before Provenance | After Provenance | Observable Change | Risk | Evidence |
17. Risk Table
| Risk ID | Surface | Scenario | Severity | Likelihood | Evidence | Required Verification |
Severity and likelihood must be justified by actual behavior.
18. Coverage Gate
[ ] Requirement/scope matrix created when requirement exists
[ ] Changed functions traced to callers and callees
[ ] External reachability determined
[ ] Every impacted downstream boundary has all direct invocation/construction sites enumerated
[ ] Every invocation site is reverse-traced to an external or proven internal root
[ ] Shared runtime/integration paths enumerate all distinct external entry points
[ ] Affected endpoints/surfaces identified or no-impact proven
[ ] Input/parameter semantics checked
[ ] Request/body/header impact checked
[ ] Response/status/error contract checked
[ ] Field/data provenance proven for changed output/data
[ ] External integrations checked
[ ] Data/persistence/config/cache impact checked
[ ] Backward compatibility checked
[ ] Performance-sensitive downstream behavior checked
[ ] Before-vs-after behavior matrix created
[ ] Expected behavior has an evidence-backed oracle
[ ] HIGH/CRITICAL claims adversarially reverified
[ ] Every HIGH/CRITICAL impact maps to a test
[ ] No-impact claims have a terminating source traceThe review is incomplete if any applicable item is omitted without explanation.
19. Output
Default:
docs/reverse-engineering/reviews/<patch>-impact-review.md
Required sections:
- Executive Conclusion
- Requirement / Intended Behavior
- Canonical Requirement / Scope Matrix
- Patch Intent and Implementation Summary
- Changed Code Surface
- Exposure and Runtime Flow
- REST / HTTP API Contract Impact
- External Integration Contract Impact
- Field / Data Provenance Impact
- Data / State / Configuration Impact
- Before-vs-After Behavior Matrix
- Compatibility and Regression Risks
- Missing / Insufficient Patch Coverage
- Test Viewpoints
- Test Matrix with Expected Behavior
- Evidence Index
- Coverage Gate Result
20. Final Decision
Use:
PATCH_SUFFICIENT
PATCH_PARTIALLY_SUFFICIENT
PATCH_INSUFFICIENT
CANNOT_VERIFYBase the decision on:
requirement scope
+ observable contract impact
+ complete runtime/data provenance
+ compatibility/regression evidencenot changed-file count or implementation shape.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

