STANDARD OPERATING PROCEDURE
Purpose
Assess code for forms of connascence (name, type, meaning, timing, algorithm, position, execution) and enforce remediation gates before merge.
Trigger Conditions
- Positive: reviews focused on coupling/maintainability risk, architectural refactors, or release gates that target hidden dependencies.
- Negative: pure functionality debugging (use functionality-audit) or cosmetic linting only.
Guardrails
- Confidence ceiling: include
Confidence: X.XX (ceiling: TYPE Y.YY) with ceilings {inference/report 0.70, research 0.85, observation/definition 0.95}.
- Evidence-first: Each connascence finding must cite file:line, connascence type, and impact (risk or cost) with a proposed decoupling strategy.
- Structure-first: Maintain examples and tests that show both detection and approved remediation patterns.
- Adversarial validation: Challenge borderline cases (intentional coupling, domain invariants) and mark waivers explicitly.
Execution Phases
- Context & Scope
- Identify modules or features under review and allowed coupling (domain invariants, protocol guarantees).
- Exclude generated/vendor code unless coupling leaks into product code.
- Detection & Classification
- Scan for each connascence type; record evidence with severity (high if change ripple or hidden temporal ordering).
- Note systemic patterns (shared globals, positional parameters, synchronized deployments).
- Remediation Design
- Propose refactors (interfaces, adapters, events, typed contracts, configuration) and expected impact.
- Sequence fixes to minimize blast radius; align with product timelines.
- Validation & Gate Decision
- Require at least one mitigation path per critical finding before approval.
- Document waivers with rationale and expiry; state confidence with ceiling.
Output Format
- Scope summary and allowed/forbidden coupling rules.
- Finding list with connascence type, file:line evidence, impact, and remediation.
- Gate decision (approve/block/waiver) with reasoning.
- Confidence statement using ceiling syntax.
Validation Checklist
Confidence: 0.71 (ceiling: inference 0.70) - SOP rewritten with Prompt Architect confidence discipline and Skill Forge structure-first guardrails.
1---2name: connascence-quality-gate3description: Enforce connascence-based quality gates by detecting harmful coupling and demanding refactoring plans with evidence.4---5
6
7
8
9## STANDARD OPERATING PROCEDURE
10
11### Purpose
12Assess code for forms of connascence (name, type, meaning, timing, algorithm, position, execution) and enforce remediation gates before merge.
13
14### Trigger Conditions
15- **Positive:** reviews focused on coupling/maintainability risk, architectural refactors, or release gates that target hidden dependencies.
16- **Negative:** pure functionality debugging (use functionality-audit) or cosmetic linting only.
17
18### Guardrails
19- **Confidence ceiling:** include `Confidence: X.XX (ceiling: TYPE Y.YY)` with ceilings {inference/report 0.70, research 0.85, observation/definition 0.95}.
20- **Evidence-first:** Each connascence finding must cite file:line, connascence type, and impact (risk or cost) with a proposed decoupling strategy.
21- **Structure-first:** Maintain examples and tests that show both detection and approved remediation patterns.
22- **Adversarial validation:** Challenge borderline cases (intentional coupling, domain invariants) and mark waivers explicitly.
23
24### Execution Phases
251. **Context & Scope**
26 - Identify modules or features under review and allowed coupling (domain invariants, protocol guarantees).
27 - Exclude generated/vendor code unless coupling leaks into product code.
282. **Detection & Classification**
29 - Scan for each connascence type; record evidence with severity (high if change ripple or hidden temporal ordering).
30 - Note systemic patterns (shared globals, positional parameters, synchronized deployments).
313. **Remediation Design**
32 - Propose refactors (interfaces, adapters, events, typed contracts, configuration) and expected impact.
33 - Sequence fixes to minimize blast radius; align with product timelines.
344. **Validation & Gate Decision**
35 - Require at least one mitigation path per critical finding before approval.
36 - Document waivers with rationale and expiry; state confidence with ceiling.
37
38### Output Format
39- Scope summary and allowed/forbidden coupling rules.
40- Finding list with connascence type, file:line evidence, impact, and remediation.
41- Gate decision (approve/block/waiver) with reasoning.
42- Confidence statement using ceiling syntax.
43
44### Validation Checklist
45- [ ] Scope and exemptions captured.
46- [ ] Each finding includes connascence type, evidence, and remediation.
47- [ ] Waivers include expiry and owner; blockers flagged.
48- [ ] Examples/tests updated or queued.
49- [ ] Confidence ceiling provided; English-only output.
50
51Confidence: 0.71 (ceiling: inference 0.70) - SOP rewritten with Prompt Architect confidence discipline and Skill Forge structure-first guardrails.